]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20171028
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.646 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-pkg-config{=path} enable/disable use of pkg-config
716   --with-pkg-config-libdir=XXX use given directory for installing pc-files
717   --enable-pc-files       generate and install .pc files for pkg-config
718   --with-pc-suffix        suffixes pc-files
719   --enable-mixed-case     tic should assume mixed-case filenames
720   --with-install-prefix   prefixes actual install-location ($DESTDIR)
721 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
722   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
723   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
724   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
725   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
726   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
727   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
728 Options to Specify the Libraries Built/Used:
729   --disable-libtool-version  enable to use libtool's incompatible naming scheme
730   --with-libtool          generate libraries with libtool
731   --with-shared           generate shared-libraries
732   --with-normal           generate normal-libraries (default)
733   --with-debug            generate debug-libraries (default)
734   --with-profile          generate profile-libraries
735   --with-cxx-shared       generate C++ shared-libraries
736   --with-lib-prefix       override library-prefix
737   --with-termlib          generate separate terminfo library
738   --with-ticlib           generate separate tic library
739   --with-gpm              use Alessandro Rubini's GPM library
740   --without-dlsym         do not use dlsym() to load GPM dynamically
741   --with-sysmouse         use sysmouse (FreeBSD console)
742   --enable-rpath          use rpath option when generating shared libraries
743   --disable-relink        relink shared libraries during install
744   --with-shlib-version=X  Specify rel or abi version for shared libs
745   --with-libtool-opts=XXX specify additional libtool options
746   --with-export-syms=XXX  limit exported symbols using libtool
747   --with-versioned-syms=X markup versioned symbols using ld
748   --disable-lib-suffixes  disable library suffixes
749   --disable-rpath-hack    don't add rpath options for additional libraries
750 Fine-Tuning Your Configuration:
751   --with-extra-suffix=X   append extra suffix to header/library paths
752   --disable-overwrite     put headers in subdir, omit link to -lcurses
753   --disable-database      do not use terminfo, only fallbacks/termcap
754   --with-database=XXX     specify terminfo source to install
755   --with-hashed-db        specify hashed-database library
756   --with-fallbacks=XXX    specify list of fallback terminal descriptions
757   --without-xterm-new     specify if xterm terminfo should be old version
758   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
759   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
760   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
761   --disable-big-core      assume machine has little memory
762   --disable-big-strings   assume compiler has only standard-size strings
763   --enable-termcap        compile in termcap fallback support
764   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
765   --enable-getcap         fast termcap load, no xrefs to terminfo
766   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
767   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
768   --disable-root-environ  restrict environment when running as root
769   --enable-symlinks       make tic use symbolic links not hard links
770   --enable-broken_linker  compile with broken-linker support code
771   --enable-bsdpad         recognize BSD-style prefix padding
772   --enable-widec          compile with wide-char/UTF-8 code
773   --disable-lp64          allow chtype to be long (ignore _LP64)
774   --disable-largefile     omit support for large files
775   --disable-tparm-varargs compile tparm() without varargs interface
776   --disable-tic-depends   link tic library without explicit dependency on ncurses library
777   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
778   --with-bool=TYPE        override fallback type of bool variable
779   --with-caps=alt         compile with alternate Caps file
780   --with-chtype=TYPE      override type of chtype
781   --with-ospeed=TYPE      override type of ospeed variable
782   --with-mmask-t=TYPE     override type of mmask_t
783   --with-ccharw-max=XXX   override size CCHARW_MAX
784   --with-tparm-arg=TYPE   override parameter type of tparm
785   --with-rcs-ids          compile-in RCS identifiers
786 Options to Specify How Manpages are Installed:
787   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
788                           optionally formatted/catonly, e.g., gzip,formatted
789   --with-manpage-renames  specify manpage-renaming
790   --with-manpage-aliases  specify manpage-aliases using .so
791   --with-manpage-symlinks specify manpage-aliases using symlinks
792   --with-manpage-tbl      specify manpage processing with tbl
793 Extensions:
794   --disable-ext-funcs     disable function-extensions
795   --enable-sp-funcs       enable SCREEN-extensions
796   --enable-term-driver    enable terminal-driver
797   --enable-const          compile with extra/non-standard const
798   --enable-ext-colors     compile for 256-color support
799   --enable-ext-mouse      compile for extended mouse-encoding
800   --enable-ext-putwin     compile with extended putwin/screendump
801   --enable-no-padding     compile with $NCURSES_NO_PADDING code
802   --enable-signed-char    compile using signed Boolean's in term.h
803   --enable-sigwinch       compile with SIGWINCH handler
804   --enable-tcap-names     compile with user-definable terminal capabilities
805   --with-pthread          use POSIX thread library
806   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
807   --enable-weak-symbols   enable weak-symbols for pthreads
808   --enable-reentrant      compile with reentrant code
809   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
810   --enable-opaque-form    make form-library structures "opaque"
811   --enable-opaque-menu    make menu-library structures "opaque"
812   --enable-opaque-panel   make panel-library structures "opaque"
813   --with-wrap-prefix=XXX  override prefix used for public variables
814 Development Code:
815   --without-develop       disable development options
816   --enable-hard-tabs      compile with hard-tabs code
817   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
818 Experimental Code:
819   --disable-assumed-color do not assume anything about default-colors
820   --disable-hashmap       compile without hashmap scrolling-optimization
821   --enable-colorfgbg      compile-in experimental $COLORFGBG code
822   --enable-interop        compile-in interop bindings
823   --enable-safe-sprintf   compile with experimental safe-sprintf code
824   --disable-scroll-hints  compile without scroll-hints code
825   --enable-wgetch-events  compile with wgetch-events code
826 Testing/development Options:
827   --disable-echo          do not display "compiling" commands
828   --enable-warnings       build: turn on GCC compiler warnings
829   --enable-string-hacks   work around bogus compiler/loader warnings
830   --enable-assertions     test: turn on generation of assertion code
831   --with-dmalloc          test: use Gray Watson's dmalloc library
832   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
833   --with-valgrind         test: use valgrind
834   --disable-leaks         test: free permanent memory, analyze leaks
835   --enable-expanded       test: generate functions for certain macros
836   --disable-macros        test: use functions rather than macros
837   --with-trace            test: add trace() function to all models of ncurses
838   --disable-gnat-projects test: disable GNAT projects even if usable
839 Ada95 Binding Options:
840   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
841   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
842   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
843   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
844
845 Some influential environment variables:
846   CC          C compiler command
847   CFLAGS      C compiler flags
848   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
849               nonstandard directory <lib dir>
850   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
851               headers in a nonstandard directory <include dir>
852   CPP         C preprocessor
853   CXX         C++ compiler command
854   CXXFLAGS    C++ compiler flags
855   CXXCPP      C++ preprocessor
856
857 Use these variables to override the choices made by `configure' or to help
858 it to find libraries and programs with nonstandard names/locations.
859
860 EOF
861 fi
862
863 if test "$ac_init_help" = "recursive"; then
864   # If there are subdirs, report their specific --help.
865   ac_popdir=`pwd`
866   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
867     cd $ac_subdir
868     # A "../" for each directory in /$ac_subdir.
869     ac_dots=`echo $ac_subdir |
870              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
871
872     case $srcdir in
873     .) # No --srcdir option.  We are building in place.
874       ac_sub_srcdir=$srcdir ;;
875     [\\/]* | ?:[\\/]* ) # Absolute path.
876       ac_sub_srcdir=$srcdir/$ac_subdir ;;
877     *) # Relative path.
878       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
879     esac
880
881     # Check for guested configure; otherwise get Cygnus style configure.
882     if test -f $ac_sub_srcdir/configure.gnu; then
883       echo
884       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
885     elif test -f $ac_sub_srcdir/configure; then
886       echo
887       $SHELL $ac_sub_srcdir/configure  --help=recursive
888     elif test -f $ac_sub_srcdir/configure.ac ||
889            test -f $ac_sub_srcdir/configure.in; then
890       echo
891       $ac_configure --help
892     else
893       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
894     fi
895     cd $ac_popdir
896   done
897 fi
898
899 test -n "$ac_init_help" && exit 0
900 if $ac_init_version; then
901   cat <<\EOF
902
903 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
904 Free Software Foundation, Inc.
905 This configure script is free software; the Free Software Foundation
906 gives unlimited permission to copy, distribute and modify it.
907 EOF
908   exit 0
909 fi
910 exec 5>config.log
911 cat >&5 <<EOF
912 This file contains any messages produced by compilers while
913 running configure, to aid debugging if configure makes a mistake.
914
915 It was created by $as_me, which was
916 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
917
918   $ $0 $@
919
920 EOF
921 {
922 cat <<_ASUNAME
923 ## ---------- ##
924 ## Platform.  ##
925 ## ---------- ##
926
927 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
928 uname -m = `(uname -m) 2>/dev/null || echo unknown`
929 uname -r = `(uname -r) 2>/dev/null || echo unknown`
930 uname -s = `(uname -s) 2>/dev/null || echo unknown`
931 uname -v = `(uname -v) 2>/dev/null || echo unknown`
932
933 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
934 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
935
936 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
937 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
938 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
939 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
940 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
941 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
942 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
943
944 PATH = $PATH
945
946 _ASUNAME
947 } >&5
948
949 cat >&5 <<EOF
950 ## ------------ ##
951 ## Core tests.  ##
952 ## ------------ ##
953
954 EOF
955
956 # Keep a trace of the command line.
957 # Strip out --no-create and --no-recursion so they do not pile up.
958 # Also quote any args containing shell meta-characters.
959 ac_configure_args=
960 ac_sep=
961 for ac_arg
962 do
963   case $ac_arg in
964   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
965   | --no-cr | --no-c) ;;
966   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
967   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
968   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
969     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
970     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
971     ac_sep=" " ;;
972   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
973      ac_sep=" " ;;
974   esac
975   # Get rid of the leading space.
976 done
977
978 # When interrupted or exit'd, cleanup temporary files, and complete
979 # config.log.  We remove comments because anyway the quotes in there
980 # would cause problems or look ugly.
981 trap 'exit_status=$?
982   # Save into config.log some information that might help in debugging.
983   echo >&5
984   echo "## ----------------- ##" >&5
985   echo "## Cache variables.  ##" >&5
986   echo "## ----------------- ##" >&5
987   echo >&5
988   # The following way of writing the cache mishandles newlines in values,
989 {
990   (set) 2>&1 |
991     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
992     *ac_space=\ *)
993       sed -n \
994         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
995           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
996       ;;
997     *)
998       sed -n \
999         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1000       ;;
1001     esac;
1002 } >&5
1003   sed "/^$/d" confdefs.h >conftest.log
1004   if test -s conftest.log; then
1005     echo >&5
1006     echo "## ------------ ##" >&5
1007     echo "## confdefs.h.  ##" >&5
1008     echo "## ------------ ##" >&5
1009     echo >&5
1010     cat conftest.log >&5
1011   fi
1012   (echo; echo) >&5
1013   test "$ac_signal" != 0 &&
1014     echo "$as_me: caught signal $ac_signal" >&5
1015   echo "$as_me: exit $exit_status" >&5
1016   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1017     exit $exit_status
1018      ' 0
1019 for ac_signal in 1 2 13 15; do
1020   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1021 done
1022 ac_signal=0
1023
1024 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1025 rm -rf conftest* confdefs.h
1026 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1027 echo >confdefs.h
1028
1029 # Let the site file select an alternate cache file if it wants to.
1030 # Prefer explicitly selected file to automatically selected ones.
1031 if test -z "$CONFIG_SITE"; then
1032   if test "x$prefix" != xNONE; then
1033     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1034   else
1035     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1036   fi
1037 fi
1038 for ac_site_file in $CONFIG_SITE; do
1039   if test -r "$ac_site_file"; then
1040     { echo "$as_me:1040: loading site script $ac_site_file" >&5
1041 echo "$as_me: loading site script $ac_site_file" >&6;}
1042     cat "$ac_site_file" >&5
1043     . "$ac_site_file"
1044   fi
1045 done
1046
1047 if test -r "$cache_file"; then
1048   # Some versions of bash will fail to source /dev/null (special
1049   # files actually), so we avoid doing that.
1050   if test -f "$cache_file"; then
1051     { echo "$as_me:1051: loading cache $cache_file" >&5
1052 echo "$as_me: loading cache $cache_file" >&6;}
1053     case $cache_file in
1054       [\\/]* | ?:[\\/]* ) . $cache_file;;
1055       *)                      . ./$cache_file;;
1056     esac
1057   fi
1058 else
1059   { echo "$as_me:1059: creating cache $cache_file" >&5
1060 echo "$as_me: creating cache $cache_file" >&6;}
1061   >$cache_file
1062 fi
1063
1064 # Check that the precious variables saved in the cache have kept the same
1065 # value.
1066 ac_cache_corrupted=false
1067 for ac_var in `(set) 2>&1 |
1068                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1069   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1070   eval ac_new_set=\$ac_env_${ac_var}_set
1071   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1072   eval ac_new_val="\$ac_env_${ac_var}_value"
1073   case $ac_old_set,$ac_new_set in
1074     set,)
1075       { echo "$as_me:1075: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1076 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1077       ac_cache_corrupted=: ;;
1078     ,set)
1079       { echo "$as_me:1079: error: \`$ac_var' was not set in the previous run" >&5
1080 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1081       ac_cache_corrupted=: ;;
1082     ,);;
1083     *)
1084       if test "x$ac_old_val" != "x$ac_new_val"; then
1085         { echo "$as_me:1085: error: \`$ac_var' has changed since the previous run:" >&5
1086 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1087         { echo "$as_me:1087:   former value:  $ac_old_val" >&5
1088 echo "$as_me:   former value:  $ac_old_val" >&2;}
1089         { echo "$as_me:1089:   current value: $ac_new_val" >&5
1090 echo "$as_me:   current value: $ac_new_val" >&2;}
1091         ac_cache_corrupted=:
1092       fi;;
1093   esac
1094   # Pass precious variables to config.status.  It doesn't matter if
1095   # we pass some twice (in addition to the command line arguments).
1096   if test "$ac_new_set" = set; then
1097     case $ac_new_val in
1098     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1099       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1100       ac_configure_args="$ac_configure_args '$ac_arg'"
1101       ;;
1102     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1103        ;;
1104     esac
1105   fi
1106 done
1107 if $ac_cache_corrupted; then
1108   { echo "$as_me:1108: error: changes in the environment can compromise the build" >&5
1109 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1110   { { echo "$as_me:1110: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1111 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1112    { (exit 1); exit 1; }; }
1113 fi
1114
1115 ac_ext=c
1116 ac_cpp='$CPP $CPPFLAGS'
1117 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1118 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1119 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1120 ac_main_return=return
1121
1122 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1123   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1124                    ECHO_T='     ' ;;
1125   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1126   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1127 esac
1128 echo "#! $SHELL" >conftest.sh
1129 echo  "exit 0"   >>conftest.sh
1130 chmod +x conftest.sh
1131 if { (echo "$as_me:1131: PATH=\".;.\"; conftest.sh") >&5
1132   (PATH=".;."; conftest.sh) 2>&5
1133   ac_status=$?
1134   echo "$as_me:1134: \$? = $ac_status" >&5
1135   (exit $ac_status); }; then
1136   ac_path_separator=';'
1137 else
1138   ac_path_separator=:
1139 fi
1140 PATH_SEPARATOR="$ac_path_separator"
1141 rm -f conftest.sh
1142
1143 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1144
1145 top_builddir=`pwd`
1146
1147 echo "$as_me:1147: checking for egrep" >&5
1148 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1149 if test "${ac_cv_prog_egrep+set}" = set; then
1150   echo $ECHO_N "(cached) $ECHO_C" >&6
1151 else
1152   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1153                 then ac_cv_prog_egrep='grep -E'
1154                 else ac_cv_prog_egrep='egrep'
1155         fi
1156 fi
1157 echo "$as_me:1157: result: $ac_cv_prog_egrep" >&5
1158 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1159         EGREP=$ac_cv_prog_egrep
1160
1161         test -z "$EGREP" && { { echo "$as_me:1161: error: No egrep program found" >&5
1162 echo "$as_me: error: No egrep program found" >&2;}
1163    { (exit 1); exit 1; }; }
1164
1165 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1166 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1167 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1168 cf_cv_abi_version=${NCURSES_MAJOR}
1169 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1170 cf_cv_timestamp=`date`
1171 echo "$as_me:1171: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1172 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1173
1174 if test -f $srcdir/VERSION ; then
1175         echo "$as_me:1175: checking for package version" >&5
1176 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1177
1178         # if there are not enough fields, cut returns the last one...
1179         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1180         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1181         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1182
1183         # this is how CF_BUNDLED_INTL uses $VERSION:
1184         VERSION="$cf_field1"
1185
1186         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1187         test -z "$VERSION_MAJOR" && { { echo "$as_me:1187: error: missing major-version" >&5
1188 echo "$as_me: error: missing major-version" >&2;}
1189    { (exit 1); exit 1; }; }
1190
1191         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1192         test -z "$VERSION_MINOR" && { { echo "$as_me:1192: error: missing minor-version" >&5
1193 echo "$as_me: error: missing minor-version" >&2;}
1194    { (exit 1); exit 1; }; }
1195
1196         echo "$as_me:1196: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1197 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1198
1199         echo "$as_me:1199: checking for package patch date" >&5
1200 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1201         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1202         case .$VERSION_PATCH in
1203         (.)
1204                 { { echo "$as_me:1204: error: missing patch-date $VERSION_PATCH" >&5
1205 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1206    { (exit 1); exit 1; }; }
1207                 ;;
1208         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1209                 ;;
1210         (*)
1211                 { { echo "$as_me:1211: error: illegal patch-date $VERSION_PATCH" >&5
1212 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1213    { (exit 1); exit 1; }; }
1214                 ;;
1215         esac
1216         echo "$as_me:1216: result: $VERSION_PATCH" >&5
1217 echo "${ECHO_T}$VERSION_PATCH" >&6
1218 else
1219         { { echo "$as_me:1219: error: did not find $srcdir/VERSION" >&5
1220 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1221    { (exit 1); exit 1; }; }
1222 fi
1223
1224 # show the actual data that we have for versions:
1225 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1226
1227 echo "${as_me:-configure}:1227: testing ABI VERSION $VERSION ..." 1>&5
1228
1229 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1232
1233 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1234
1235 echo "${as_me:-configure}:1235: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1236
1237 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1238
1239 echo "${as_me:-configure}:1239: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1240
1241         cf_PACKAGE=NCURSES
1242         PACKAGE=ncurses
1243
1244 cat >>confdefs.h <<EOF
1245 #define PACKAGE "$PACKAGE"
1246 EOF
1247
1248 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1249
1250         cat >>confdefs.h <<EOF
1251 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1252 EOF
1253
1254         cat >>confdefs.h <<EOF
1255 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1256 EOF
1257
1258 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1259
1260 # Check whether --with-rel-version or --without-rel-version was given.
1261 if test "${with_rel_version+set}" = set; then
1262   withval="$with_rel_version"
1263   { echo "$as_me:1263: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1264 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1265  cf_cv_rel_version=$withval
1266 fi;
1267
1268  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1269  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1270
1271 if test -n "$NCURSES_MAJOR" ; then
1272   case $NCURSES_MAJOR in
1273   ([0-9]*)
1274         ;;
1275   (*)
1276         { { echo "$as_me:1276: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1277 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1278    { (exit 1); exit 1; }; }
1279         ;;
1280   esac
1281 else
1282   { { echo "$as_me:1282: error: Release major-version value is empty" >&5
1283 echo "$as_me: error: Release major-version value is empty" >&2;}
1284    { (exit 1); exit 1; }; }
1285 fi
1286
1287 if test -n "$NCURSES_MINOR" ; then
1288   case $NCURSES_MINOR in
1289   ([0-9]*)
1290         ;;
1291   (*)
1292         { { echo "$as_me:1292: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1293 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1294    { (exit 1); exit 1; }; }
1295         ;;
1296   esac
1297 else
1298   { { echo "$as_me:1298: error: Release minor-version value is empty" >&5
1299 echo "$as_me: error: Release minor-version value is empty" >&2;}
1300    { (exit 1); exit 1; }; }
1301 fi
1302
1303 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1304
1305 # Check whether --with-abi-version or --without-abi-version was given.
1306 if test "${with_abi_version+set}" = set; then
1307   withval="$with_abi_version"
1308
1309         if test "x$cf_cv_abi_version" != "x$withval"
1310         then
1311                 { echo "$as_me:1311: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1312 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1313                 case $cf_cv_rel_version in
1314                 (5.*)
1315                         cf_cv_rel_version=$withval.0
1316                         ;;
1317                 (6.*)
1318                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1319                         ;;
1320                 esac
1321         fi
1322         cf_cv_abi_version=$withval
1323 fi;
1324
1325 if test -n "$cf_cv_abi_version" ; then
1326   case $cf_cv_abi_version in
1327   ([0-9]*)
1328         ;;
1329   (*)
1330         { { echo "$as_me:1330: error: ABI version is not a number: $cf_cv_abi_version" >&5
1331 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1332    { (exit 1); exit 1; }; }
1333         ;;
1334   esac
1335 else
1336   { { echo "$as_me:1336: error: ABI version value is empty" >&5
1337 echo "$as_me: error: ABI version value is empty" >&2;}
1338    { (exit 1); exit 1; }; }
1339 fi
1340
1341 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1342 then
1343         case $cf_cv_rel_version in
1344         (5.*)
1345                 cf_cv_rel_version=$with_abi_version.0
1346                 ;;
1347         esac
1348 fi
1349
1350 ac_aux_dir=
1351 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1352   if test -f $ac_dir/install-sh; then
1353     ac_aux_dir=$ac_dir
1354     ac_install_sh="$ac_aux_dir/install-sh -c"
1355     break
1356   elif 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/shtool; then
1361     ac_aux_dir=$ac_dir
1362     ac_install_sh="$ac_aux_dir/shtool install -c"
1363     break
1364   fi
1365 done
1366 if test -z "$ac_aux_dir"; then
1367   { { echo "$as_me:1367: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1368 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1369    { (exit 1); exit 1; }; }
1370 fi
1371 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1372 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1373 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1374
1375 # Make sure we can run config.sub.
1376 $ac_config_sub sun4 >/dev/null 2>&1 ||
1377   { { echo "$as_me:1377: error: cannot run $ac_config_sub" >&5
1378 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1379    { (exit 1); exit 1; }; }
1380
1381 echo "$as_me:1381: checking build system type" >&5
1382 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1383 if test "${ac_cv_build+set}" = set; then
1384   echo $ECHO_N "(cached) $ECHO_C" >&6
1385 else
1386   ac_cv_build_alias=$build_alias
1387 test -z "$ac_cv_build_alias" &&
1388   ac_cv_build_alias=`$ac_config_guess`
1389 test -z "$ac_cv_build_alias" &&
1390   { { echo "$as_me:1390: error: cannot guess build type; you must specify one" >&5
1391 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1392    { (exit 1); exit 1; }; }
1393 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1394   { { echo "$as_me:1394: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1395 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1396    { (exit 1); exit 1; }; }
1397
1398 fi
1399 echo "$as_me:1399: result: $ac_cv_build" >&5
1400 echo "${ECHO_T}$ac_cv_build" >&6
1401 build=$ac_cv_build
1402 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1403 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1404 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1405
1406 echo "$as_me:1406: checking host system type" >&5
1407 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1408 if test "${ac_cv_host+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_host_alias=$host_alias
1412 test -z "$ac_cv_host_alias" &&
1413   ac_cv_host_alias=$ac_cv_build_alias
1414 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1415   { { echo "$as_me:1415: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1416 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1417    { (exit 1); exit 1; }; }
1418
1419 fi
1420 echo "$as_me:1420: result: $ac_cv_host" >&5
1421 echo "${ECHO_T}$ac_cv_host" >&6
1422 host=$ac_cv_host
1423 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1424 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1425 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1426
1427 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1428         echo "$as_me:1428: checking target system type" >&5
1429 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1430 if test "${ac_cv_target+set}" = set; then
1431   echo $ECHO_N "(cached) $ECHO_C" >&6
1432 else
1433   ac_cv_target_alias=$target_alias
1434 test "x$ac_cv_target_alias" = "x" &&
1435   ac_cv_target_alias=$ac_cv_host_alias
1436 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1437   { { echo "$as_me:1437: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1438 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1439    { (exit 1); exit 1; }; }
1440
1441 fi
1442 echo "$as_me:1442: result: $ac_cv_target" >&5
1443 echo "${ECHO_T}$ac_cv_target" >&6
1444 target=$ac_cv_target
1445 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1446 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1447 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1448
1449 # The aliases save the names the user supplied, while $host etc.
1450 # will get canonicalized.
1451 test -n "$target_alias" &&
1452   test "$program_prefix$program_suffix$program_transform_name" = \
1453     NONENONEs,x,x, &&
1454   program_prefix=${target_alias}-
1455         system_name="$host_os"
1456 else
1457         system_name="`(uname -s -r) 2>/dev/null`"
1458         if test -z "$system_name" ; then
1459                 system_name="`(hostname) 2>/dev/null`"
1460         fi
1461 fi
1462 test -n "$system_name" &&
1463 cat >>confdefs.h <<EOF
1464 #define SYSTEM_NAME "$system_name"
1465 EOF
1466
1467 if test "${cf_cv_system_name+set}" = set; then
1468   echo $ECHO_N "(cached) $ECHO_C" >&6
1469 else
1470   cf_cv_system_name="$system_name"
1471 fi
1472
1473 test -z "$system_name" && system_name="$cf_cv_system_name"
1474 test -n "$cf_cv_system_name" && echo "$as_me:1474: result: Configuring for $cf_cv_system_name" >&5
1475 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1476
1477 if test ".$system_name" != ".$cf_cv_system_name" ; then
1478         echo "$as_me:1478: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1479 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1480         { { echo "$as_me:1480: error: \"Please remove config.cache and try again.\"" >&5
1481 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1482    { (exit 1); exit 1; }; }
1483 fi
1484
1485 # Check whether --with-system-type or --without-system-type was given.
1486 if test "${with_system_type+set}" = set; then
1487   withval="$with_system_type"
1488   { echo "$as_me:1488: WARNING: overriding system type to $withval" >&5
1489 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1490         cf_cv_system_name=$withval
1491         host_os=$withval
1492
1493 fi;
1494
1495 ###     Save the given $CFLAGS to allow user-override.
1496 cf_user_CFLAGS="$CFLAGS"
1497
1498 ###     Default install-location
1499
1500 echo "$as_me:1500: checking for prefix" >&5
1501 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1502 if test "x$prefix" = "xNONE" ; then
1503         case "$cf_cv_system_name" in
1504                 # non-vendor systems don't have a conflict
1505         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1506                 prefix=/usr
1507                 ;;
1508         (*)     prefix=$ac_default_prefix
1509                 ;;
1510         esac
1511 fi
1512 echo "$as_me:1512: result: $prefix" >&5
1513 echo "${ECHO_T}$prefix" >&6
1514
1515 if test "x$prefix" = "xNONE" ; then
1516 echo "$as_me:1516: checking for default include-directory" >&5
1517 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1518 test -n "$verbose" && echo 1>&6
1519 for cf_symbol in \
1520         $includedir \
1521         $includedir/ncurses \
1522         $prefix/include \
1523         $prefix/include/ncurses \
1524         /usr/local/include \
1525         /usr/local/include/ncurses \
1526         /usr/include \
1527         /usr/include/ncurses
1528 do
1529         cf_dir=`eval echo $cf_symbol`
1530         if test -f $cf_dir/curses.h ; then
1531         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1532                 includedir="$cf_symbol"
1533                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1534                 break
1535         fi
1536         fi
1537         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1538 done
1539 echo "$as_me:1539: result: $includedir" >&5
1540 echo "${ECHO_T}$includedir" >&6
1541 fi
1542
1543 ### Defaults for ncurses ABI
1544
1545 case x$cf_cv_abi_version in
1546 (x[6789])
1547         cf_dft_ext_colors=yes
1548         cf_dft_ext_const=yes
1549         cf_dft_ext_mouse=yes
1550         cf_dft_ext_putwin=yes
1551         cf_dft_ext_spfuncs=yes
1552         cf_dft_filter_syms=yes
1553         cf_dft_chtype=uint32_t
1554         cf_dft_mmask_t=uint32_t
1555         cf_dft_interop=yes
1556         cf_dft_tparm_arg=intptr_t
1557         cf_dft_with_lp64=yes
1558         ;;
1559 (*)
1560         cf_dft_ext_colors=no
1561         cf_dft_ext_const=no
1562         cf_dft_ext_mouse=no
1563         cf_dft_ext_putwin=no
1564         cf_dft_ext_spfuncs=no
1565         cf_dft_filter_syms=no
1566         cf_dft_chtype=auto
1567         cf_dft_mmask_t=auto
1568         cf_dft_interop=no
1569         cf_dft_tparm_arg=long
1570         cf_dft_with_lp64=no
1571         ;;
1572 esac
1573
1574 ###     Checks for programs.
1575
1576 # Check whether --with-ada or --without-ada was given.
1577 if test "${with_ada+set}" = set; then
1578   withval="$with_ada"
1579   cf_with_ada=$withval
1580 else
1581   cf_with_ada=yes
1582 fi;
1583 if test "x$cf_with_ada" = xyes
1584 then
1585         cf_PROG_CC="gnatgcc gcc cc"
1586 else
1587         cf_PROG_CC="gcc cc"
1588 fi
1589
1590 ac_ext=c
1591 ac_cpp='$CPP $CPPFLAGS'
1592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1595 ac_main_return=return
1596 if test -n "$ac_tool_prefix"; then
1597   for ac_prog in $cf_PROG_CC
1598   do
1599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1601 echo "$as_me:1601: checking for $ac_word" >&5
1602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1603 if test "${ac_cv_prog_CC+set}" = set; then
1604   echo $ECHO_N "(cached) $ECHO_C" >&6
1605 else
1606   if test -n "$CC"; then
1607   ac_cv_prog_CC="$CC" # Let the user override the test.
1608 else
1609   ac_save_IFS=$IFS; IFS=$ac_path_separator
1610 ac_dummy="$PATH"
1611 for ac_dir in $ac_dummy; do
1612   IFS=$ac_save_IFS
1613   test -z "$ac_dir" && ac_dir=.
1614   $as_executable_p "$ac_dir/$ac_word" || continue
1615 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1616 echo "$as_me:1616: found $ac_dir/$ac_word" >&5
1617 break
1618 done
1619
1620 fi
1621 fi
1622 CC=$ac_cv_prog_CC
1623 if test -n "$CC"; then
1624   echo "$as_me:1624: result: $CC" >&5
1625 echo "${ECHO_T}$CC" >&6
1626 else
1627   echo "$as_me:1627: result: no" >&5
1628 echo "${ECHO_T}no" >&6
1629 fi
1630
1631     test -n "$CC" && break
1632   done
1633 fi
1634 if test -z "$CC"; then
1635   ac_ct_CC=$CC
1636   for ac_prog in $cf_PROG_CC
1637 do
1638   # Extract the first word of "$ac_prog", so it can be a program name with args.
1639 set dummy $ac_prog; ac_word=$2
1640 echo "$as_me:1640: checking for $ac_word" >&5
1641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1642 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1643   echo $ECHO_N "(cached) $ECHO_C" >&6
1644 else
1645   if test -n "$ac_ct_CC"; then
1646   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1647 else
1648   ac_save_IFS=$IFS; IFS=$ac_path_separator
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651   IFS=$ac_save_IFS
1652   test -z "$ac_dir" && ac_dir=.
1653   $as_executable_p "$ac_dir/$ac_word" || continue
1654 ac_cv_prog_ac_ct_CC="$ac_prog"
1655 echo "$as_me:1655: found $ac_dir/$ac_word" >&5
1656 break
1657 done
1658
1659 fi
1660 fi
1661 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1662 if test -n "$ac_ct_CC"; then
1663   echo "$as_me:1663: result: $ac_ct_CC" >&5
1664 echo "${ECHO_T}$ac_ct_CC" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$ac_ct_CC" && break
1671 done
1672
1673   CC=$ac_ct_CC
1674 fi
1675
1676 test -z "$CC" && { { echo "$as_me:1676: error: no acceptable cc found in \$PATH" >&5
1677 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1678    { (exit 1); exit 1; }; }
1679
1680 # Provide some information about the compiler.
1681 echo "$as_me:1681:" \
1682      "checking for C compiler version" >&5
1683 ac_compiler=`set X $ac_compile; echo $2`
1684 { (eval echo "$as_me:1684: \"$ac_compiler --version </dev/null >&5\"") >&5
1685   (eval $ac_compiler --version </dev/null >&5) 2>&5
1686   ac_status=$?
1687   echo "$as_me:1687: \$? = $ac_status" >&5
1688   (exit $ac_status); }
1689 { (eval echo "$as_me:1689: \"$ac_compiler -v </dev/null >&5\"") >&5
1690   (eval $ac_compiler -v </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694 { (eval echo "$as_me:1694: \"$ac_compiler -V </dev/null >&5\"") >&5
1695   (eval $ac_compiler -V </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699
1700 cat >conftest.$ac_ext <<_ACEOF
1701 #line 1701 "configure"
1702 #include "confdefs.h"
1703
1704 int
1705 main (void)
1706 {
1707
1708   ;
1709   return 0;
1710 }
1711 _ACEOF
1712 ac_clean_files_save=$ac_clean_files
1713 ac_clean_files="$ac_clean_files a.out a.exe"
1714 # Try to create an executable without -o first, disregard a.out.
1715 # It will help us diagnose broken compilers, and finding out an intuition
1716 # of exeext.
1717 echo "$as_me:1717: checking for C compiler default output" >&5
1718 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1719 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1720 if { (eval echo "$as_me:1720: \"$ac_link_default\"") >&5
1721   (eval $ac_link_default) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }; then
1725   # Find the output, starting from the most likely.  This scheme is
1726 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1727 # resort.
1728 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1729                 ls a.out conftest 2>/dev/null;
1730                 ls a.* conftest.* 2>/dev/null`; do
1731   case $ac_file in
1732     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1733     a.out ) # We found the default executable, but exeext='' is most
1734             # certainly right.
1735             break;;
1736     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1737           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1738           export ac_cv_exeext
1739           break;;
1740     * ) break;;
1741   esac
1742 done
1743 else
1744   echo "$as_me: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1746 { { echo "$as_me:1746: error: C compiler cannot create executables" >&5
1747 echo "$as_me: error: C compiler cannot create executables" >&2;}
1748    { (exit 77); exit 77; }; }
1749 fi
1750
1751 ac_exeext=$ac_cv_exeext
1752 echo "$as_me:1752: result: $ac_file" >&5
1753 echo "${ECHO_T}$ac_file" >&6
1754
1755 # Check the compiler produces executables we can run.  If not, either
1756 # the compiler is broken, or we cross compile.
1757 echo "$as_me:1757: checking whether the C compiler works" >&5
1758 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1759 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1760 # If not cross compiling, check that we can run a simple program.
1761 if test "$cross_compiling" != yes; then
1762   if { ac_try='./$ac_file'
1763   { (eval echo "$as_me:1763: \"$ac_try\"") >&5
1764   (eval $ac_try) 2>&5
1765   ac_status=$?
1766   echo "$as_me:1766: \$? = $ac_status" >&5
1767   (exit $ac_status); }; }; then
1768     cross_compiling=no
1769   else
1770     if test "$cross_compiling" = maybe; then
1771         cross_compiling=yes
1772     else
1773         { { echo "$as_me:1773: error: cannot run C compiled programs.
1774 If you meant to cross compile, use \`--host'." >&5
1775 echo "$as_me: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&2;}
1777    { (exit 1); exit 1; }; }
1778     fi
1779   fi
1780 fi
1781 echo "$as_me:1781: result: yes" >&5
1782 echo "${ECHO_T}yes" >&6
1783
1784 rm -f a.out a.exe conftest$ac_cv_exeext
1785 ac_clean_files=$ac_clean_files_save
1786 # Check the compiler produces executables we can run.  If not, either
1787 # the compiler is broken, or we cross compile.
1788 echo "$as_me:1788: checking whether we are cross compiling" >&5
1789 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1790 echo "$as_me:1790: result: $cross_compiling" >&5
1791 echo "${ECHO_T}$cross_compiling" >&6
1792
1793 echo "$as_me:1793: checking for executable suffix" >&5
1794 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1795 if { (eval echo "$as_me:1795: \"$ac_link\"") >&5
1796   (eval $ac_link) 2>&5
1797   ac_status=$?
1798   echo "$as_me:1798: \$? = $ac_status" >&5
1799   (exit $ac_status); }; then
1800   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1801 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1802 # work properly (i.e., refer to `conftest.exe'), while it won't with
1803 # `rm'.
1804 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1805   case $ac_file in
1806     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1807     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1808           export ac_cv_exeext
1809           break;;
1810     * ) break;;
1811   esac
1812 done
1813 else
1814   { { echo "$as_me:1814: error: cannot compute EXEEXT: cannot compile and link" >&5
1815 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1816    { (exit 1); exit 1; }; }
1817 fi
1818
1819 rm -f conftest$ac_cv_exeext
1820 echo "$as_me:1820: result: $ac_cv_exeext" >&5
1821 echo "${ECHO_T}$ac_cv_exeext" >&6
1822
1823 rm -f conftest.$ac_ext
1824 EXEEXT=$ac_cv_exeext
1825 ac_exeext=$EXEEXT
1826 echo "$as_me:1826: checking for object suffix" >&5
1827 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1828 if test "${ac_cv_objext+set}" = set; then
1829   echo $ECHO_N "(cached) $ECHO_C" >&6
1830 else
1831   cat >conftest.$ac_ext <<_ACEOF
1832 #line 1832 "configure"
1833 #include "confdefs.h"
1834
1835 int
1836 main (void)
1837 {
1838
1839   ;
1840   return 0;
1841 }
1842 _ACEOF
1843 rm -f conftest.o conftest.obj
1844 if { (eval echo "$as_me:1844: \"$ac_compile\"") >&5
1845   (eval $ac_compile) 2>&5
1846   ac_status=$?
1847   echo "$as_me:1847: \$? = $ac_status" >&5
1848   (exit $ac_status); }; then
1849   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1850   case $ac_file in
1851     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1852     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1853        break;;
1854   esac
1855 done
1856 else
1857   echo "$as_me: failed program was:" >&5
1858 cat conftest.$ac_ext >&5
1859 { { echo "$as_me:1859: error: cannot compute OBJEXT: cannot compile" >&5
1860 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1861    { (exit 1); exit 1; }; }
1862 fi
1863
1864 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1865 fi
1866 echo "$as_me:1866: result: $ac_cv_objext" >&5
1867 echo "${ECHO_T}$ac_cv_objext" >&6
1868 OBJEXT=$ac_cv_objext
1869 ac_objext=$OBJEXT
1870 echo "$as_me:1870: checking whether we are using the GNU C compiler" >&5
1871 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1872 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1873   echo $ECHO_N "(cached) $ECHO_C" >&6
1874 else
1875   cat >conftest.$ac_ext <<_ACEOF
1876 #line 1876 "configure"
1877 #include "confdefs.h"
1878
1879 int
1880 main (void)
1881 {
1882 #ifndef __GNUC__
1883        choke me
1884 #endif
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 rm -f conftest.$ac_objext
1891 if { (eval echo "$as_me:1891: \"$ac_compile\"") >&5
1892   (eval $ac_compile) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); } &&
1896          { ac_try='test -s conftest.$ac_objext'
1897   { (eval echo "$as_me:1897: \"$ac_try\"") >&5
1898   (eval $ac_try) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); }; }; then
1902   ac_compiler_gnu=yes
1903 else
1904   echo "$as_me: failed program was:" >&5
1905 cat conftest.$ac_ext >&5
1906 ac_compiler_gnu=no
1907 fi
1908 rm -f conftest.$ac_objext conftest.$ac_ext
1909 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1910
1911 fi
1912 echo "$as_me:1912: result: $ac_cv_c_compiler_gnu" >&5
1913 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1914 GCC=`test $ac_compiler_gnu = yes && echo yes`
1915 ac_test_CFLAGS=${CFLAGS+set}
1916 ac_save_CFLAGS=$CFLAGS
1917 CFLAGS="-g"
1918 echo "$as_me:1918: checking whether $CC accepts -g" >&5
1919 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1920 if test "${ac_cv_prog_cc_g+set}" = set; then
1921   echo $ECHO_N "(cached) $ECHO_C" >&6
1922 else
1923   cat >conftest.$ac_ext <<_ACEOF
1924 #line 1924 "configure"
1925 #include "confdefs.h"
1926
1927 int
1928 main (void)
1929 {
1930
1931   ;
1932   return 0;
1933 }
1934 _ACEOF
1935 rm -f conftest.$ac_objext
1936 if { (eval echo "$as_me:1936: \"$ac_compile\"") >&5
1937   (eval $ac_compile) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); } &&
1941          { ac_try='test -s conftest.$ac_objext'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); }; }; then
1947   ac_cv_prog_cc_g=yes
1948 else
1949   echo "$as_me: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1951 ac_cv_prog_cc_g=no
1952 fi
1953 rm -f conftest.$ac_objext conftest.$ac_ext
1954 fi
1955 echo "$as_me:1955: result: $ac_cv_prog_cc_g" >&5
1956 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1957 if test "$ac_test_CFLAGS" = set; then
1958   CFLAGS=$ac_save_CFLAGS
1959 elif test $ac_cv_prog_cc_g = yes; then
1960   if test "$GCC" = yes; then
1961     CFLAGS="-g -O2"
1962   else
1963     CFLAGS="-g"
1964   fi
1965 else
1966   if test "$GCC" = yes; then
1967     CFLAGS="-O2"
1968   else
1969     CFLAGS=
1970   fi
1971 fi
1972 # Some people use a C++ compiler to compile C.  Since we use `exit',
1973 # in C++ we need to declare it.  In case someone uses the same compiler
1974 # for both compiling C and C++ we need to have the C++ compiler decide
1975 # the declaration of exit, since it's the most demanding environment.
1976 cat >conftest.$ac_ext <<_ACEOF
1977 #ifndef __cplusplus
1978   choke me
1979 #endif
1980 _ACEOF
1981 rm -f conftest.$ac_objext
1982 if { (eval echo "$as_me:1982: \"$ac_compile\"") >&5
1983   (eval $ac_compile) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); } &&
1987          { ac_try='test -s conftest.$ac_objext'
1988   { (eval echo "$as_me:1988: \"$ac_try\"") >&5
1989   (eval $ac_try) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); }; }; then
1993   for ac_declaration in \
1994    ''\
1995    '#include <stdlib.h>' \
1996    'extern "C" void std::exit (int) throw (); using std::exit;' \
1997    'extern "C" void std::exit (int); using std::exit;' \
1998    'extern "C" void exit (int) throw ();' \
1999    'extern "C" void exit (int);' \
2000    'void exit (int);'
2001 do
2002   cat >conftest.$ac_ext <<_ACEOF
2003 #line 2003 "configure"
2004 #include "confdefs.h"
2005 #include <stdlib.h>
2006 $ac_declaration
2007 int
2008 main (void)
2009 {
2010 exit (42);
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   :
2028 else
2029   echo "$as_me: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 continue
2032 fi
2033 rm -f conftest.$ac_objext conftest.$ac_ext
2034   cat >conftest.$ac_ext <<_ACEOF
2035 #line 2035 "configure"
2036 #include "confdefs.h"
2037 $ac_declaration
2038 int
2039 main (void)
2040 {
2041 exit (42);
2042   ;
2043   return 0;
2044 }
2045 _ACEOF
2046 rm -f conftest.$ac_objext
2047 if { (eval echo "$as_me:2047: \"$ac_compile\"") >&5
2048   (eval $ac_compile) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); } &&
2052          { ac_try='test -s conftest.$ac_objext'
2053   { (eval echo "$as_me:2053: \"$ac_try\"") >&5
2054   (eval $ac_try) 2>&5
2055   ac_status=$?
2056   echo "$as_me:2056: \$? = $ac_status" >&5
2057   (exit $ac_status); }; }; then
2058   break
2059 else
2060   echo "$as_me: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 fi
2063 rm -f conftest.$ac_objext conftest.$ac_ext
2064 done
2065 rm -rf conftest*
2066 if test -n "$ac_declaration"; then
2067   echo '#ifdef __cplusplus' >>confdefs.h
2068   echo $ac_declaration      >>confdefs.h
2069   echo '#endif'             >>confdefs.h
2070 fi
2071
2072 else
2073   echo "$as_me: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 fi
2076 rm -f conftest.$ac_objext conftest.$ac_ext
2077 ac_ext=c
2078 ac_cpp='$CPP $CPPFLAGS'
2079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2082 ac_main_return=return
2083
2084 GCC_VERSION=none
2085 if test "$GCC" = yes ; then
2086         echo "$as_me:2086: checking version of $CC" >&5
2087 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2088         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.].*//'`"
2089         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2090         echo "$as_me:2090: result: $GCC_VERSION" >&5
2091 echo "${ECHO_T}$GCC_VERSION" >&6
2092 fi
2093
2094 echo "$as_me:2094: checking for $CC option to accept ANSI C" >&5
2095 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2096 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2097   echo $ECHO_N "(cached) $ECHO_C" >&6
2098 else
2099   ac_cv_prog_cc_stdc=no
2100 ac_save_CC=$CC
2101 cat >conftest.$ac_ext <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104 #include <stdarg.h>
2105 #include <stdio.h>
2106 #include <sys/types.h>
2107 #include <sys/stat.h>
2108 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2109 struct buf { int x; };
2110 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2111 static char *e (p, i)
2112      char **p;
2113      int i;
2114 {
2115   return p[i];
2116 }
2117 static char *f (char * (*g) (char **, int), char **p, ...)
2118 {
2119   char *s;
2120   va_list v;
2121   va_start (v,p);
2122   s = g (p, va_arg (v,int));
2123   va_end (v);
2124   return s;
2125 }
2126 int test (int i, double x);
2127 struct s1 {int (*f) (int a);};
2128 struct s2 {int (*f) (double a);};
2129 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2130 int argc;
2131 char **argv;
2132 int
2133 main (void)
2134 {
2135 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2136   ;
2137   return 0;
2138 }
2139 _ACEOF
2140 # Don't try gcc -ansi; that turns off useful extensions and
2141 # breaks some systems' header files.
2142 # AIX                   -qlanglvl=ansi
2143 # Ultrix and OSF/1      -std1
2144 # HP-UX 10.20 and later -Ae
2145 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2146 # SVR4                  -Xc -D__EXTENSIONS__
2147 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2148 do
2149   CC="$ac_save_CC $ac_arg"
2150   rm -f conftest.$ac_objext
2151 if { (eval echo "$as_me:2151: \"$ac_compile\"") >&5
2152   (eval $ac_compile) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); } &&
2156          { ac_try='test -s conftest.$ac_objext'
2157   { (eval echo "$as_me:2157: \"$ac_try\"") >&5
2158   (eval $ac_try) 2>&5
2159   ac_status=$?
2160   echo "$as_me:2160: \$? = $ac_status" >&5
2161   (exit $ac_status); }; }; then
2162   ac_cv_prog_cc_stdc=$ac_arg
2163 break
2164 else
2165   echo "$as_me: failed program was:" >&5
2166 cat conftest.$ac_ext >&5
2167 fi
2168 rm -f conftest.$ac_objext
2169 done
2170 rm -f conftest.$ac_ext conftest.$ac_objext
2171 CC=$ac_save_CC
2172
2173 fi
2174
2175 case "x$ac_cv_prog_cc_stdc" in
2176   x|xno)
2177     echo "$as_me:2177: result: none needed" >&5
2178 echo "${ECHO_T}none needed" >&6 ;;
2179   *)
2180     echo "$as_me:2180: result: $ac_cv_prog_cc_stdc" >&5
2181 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2182     CC="$CC $ac_cv_prog_cc_stdc" ;;
2183 esac
2184
2185 # This should have been defined by AC_PROG_CC
2186 : ${CC:=cc}
2187
2188 echo "$as_me:2188: checking \$CC variable" >&5
2189 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2190 case "$CC" in
2191 (*[\ \  ]-*)
2192         echo "$as_me:2192: result: broken" >&5
2193 echo "${ECHO_T}broken" >&6
2194         { echo "$as_me:2194: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2195 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2196         # humor him...
2197         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2198         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2199         CC="$cf_prog"
2200         for cf_arg in $cf_flags
2201         do
2202                 case "x$cf_arg" in
2203                 (x-[IUDfgOW]*)
2204
2205 cf_fix_cppflags=no
2206 cf_new_cflags=
2207 cf_new_cppflags=
2208 cf_new_extra_cppflags=
2209
2210 for cf_add_cflags in $cf_arg
2211 do
2212 case $cf_fix_cppflags in
2213 (no)
2214         case $cf_add_cflags in
2215         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2216                 case $cf_add_cflags in
2217                 (-D*)
2218                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2219
2220                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2221                                 && test -z "${cf_tst_cflags}" \
2222                                 && cf_fix_cppflags=yes
2223
2224                         if test $cf_fix_cppflags = yes ; then
2225
2226         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2227         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2228
2229                                 continue
2230                         elif test "${cf_tst_cflags}" = "\"'" ; then
2231
2232         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2233         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2234
2235                                 continue
2236                         fi
2237                         ;;
2238                 esac
2239                 case "$CPPFLAGS" in
2240                 (*$cf_add_cflags)
2241                         ;;
2242                 (*)
2243                         case $cf_add_cflags in
2244                         (-D*)
2245                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2246
2247 CPPFLAGS=`echo "$CPPFLAGS" | \
2248         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2249                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2250
2251                                 ;;
2252                         esac
2253
2254         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2255         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2256
2257                         ;;
2258                 esac
2259                 ;;
2260         (*)
2261
2262         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2263         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2264
2265                 ;;
2266         esac
2267         ;;
2268 (yes)
2269
2270         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2271         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2272
2273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2274
2275         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2276                 && test -z "${cf_tst_cflags}" \
2277                 && cf_fix_cppflags=no
2278         ;;
2279 esac
2280 done
2281
2282 if test -n "$cf_new_cflags" ; then
2283
2284         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2285         CFLAGS="${CFLAGS}$cf_new_cflags"
2286
2287 fi
2288
2289 if test -n "$cf_new_cppflags" ; then
2290
2291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2292         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2293
2294 fi
2295
2296 if test -n "$cf_new_extra_cppflags" ; then
2297
2298         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2299         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2300
2301 fi
2302
2303                         ;;
2304                 (*)
2305                         CC="$CC $cf_arg"
2306                         ;;
2307                 esac
2308         done
2309         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2310
2311 echo "${as_me:-configure}:2311: testing resulting CC: '$CC' ..." 1>&5
2312
2313         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2314
2315 echo "${as_me:-configure}:2315: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2316
2317         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2318
2319 echo "${as_me:-configure}:2319: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2320
2321         ;;
2322 (*)
2323         echo "$as_me:2323: result: ok" >&5
2324 echo "${ECHO_T}ok" >&6
2325         ;;
2326 esac
2327
2328 ac_ext=c
2329 ac_cpp='$CPP $CPPFLAGS'
2330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2333 ac_main_return=return
2334 echo "$as_me:2334: checking how to run the C preprocessor" >&5
2335 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2336 # On Suns, sometimes $CPP names a directory.
2337 if test -n "$CPP" && test -d "$CPP"; then
2338   CPP=
2339 fi
2340 if test -z "$CPP"; then
2341   if test "${ac_cv_prog_CPP+set}" = set; then
2342   echo $ECHO_N "(cached) $ECHO_C" >&6
2343 else
2344       # Double quotes because CPP needs to be expanded
2345     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2346     do
2347       ac_preproc_ok=false
2348 for ac_c_preproc_warn_flag in '' yes
2349 do
2350   # Use a header file that comes with gcc, so configuring glibc
2351   # with a fresh cross-compiler works.
2352   # On the NeXT, cc -E runs the code through the compiler's parser,
2353   # not just through cpp. "Syntax error" is here to catch this case.
2354   cat >conftest.$ac_ext <<_ACEOF
2355 #line 2355 "configure"
2356 #include "confdefs.h"
2357 #include <assert.h>
2358                      Syntax error
2359 _ACEOF
2360 if { (eval echo "$as_me:2360: \"$ac_cpp conftest.$ac_ext\"") >&5
2361   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2362   ac_status=$?
2363   egrep -v '^ *\+' conftest.er1 >conftest.err
2364   rm -f conftest.er1
2365   cat conftest.err >&5
2366   echo "$as_me:2366: \$? = $ac_status" >&5
2367   (exit $ac_status); } >/dev/null; then
2368   if test -s conftest.err; then
2369     ac_cpp_err=$ac_c_preproc_warn_flag
2370   else
2371     ac_cpp_err=
2372   fi
2373 else
2374   ac_cpp_err=yes
2375 fi
2376 if test -z "$ac_cpp_err"; then
2377   :
2378 else
2379   echo "$as_me: failed program was:" >&5
2380   cat conftest.$ac_ext >&5
2381   # Broken: fails on valid input.
2382 continue
2383 fi
2384 rm -f conftest.err conftest.$ac_ext
2385
2386   # OK, works on sane cases.  Now check whether non-existent headers
2387   # can be detected and how.
2388   cat >conftest.$ac_ext <<_ACEOF
2389 #line 2389 "configure"
2390 #include "confdefs.h"
2391 #include <ac_nonexistent.h>
2392 _ACEOF
2393 if { (eval echo "$as_me:2393: \"$ac_cpp conftest.$ac_ext\"") >&5
2394   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2395   ac_status=$?
2396   egrep -v '^ *\+' conftest.er1 >conftest.err
2397   rm -f conftest.er1
2398   cat conftest.err >&5
2399   echo "$as_me:2399: \$? = $ac_status" >&5
2400   (exit $ac_status); } >/dev/null; then
2401   if test -s conftest.err; then
2402     ac_cpp_err=$ac_c_preproc_warn_flag
2403   else
2404     ac_cpp_err=
2405   fi
2406 else
2407   ac_cpp_err=yes
2408 fi
2409 if test -z "$ac_cpp_err"; then
2410   # Broken: success on invalid input.
2411 continue
2412 else
2413   echo "$as_me: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   # Passes both tests.
2416 ac_preproc_ok=:
2417 break
2418 fi
2419 rm -f conftest.err conftest.$ac_ext
2420
2421 done
2422 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2423 rm -f conftest.err conftest.$ac_ext
2424 if $ac_preproc_ok; then
2425   break
2426 fi
2427
2428     done
2429     ac_cv_prog_CPP=$CPP
2430
2431 fi
2432   CPP=$ac_cv_prog_CPP
2433 else
2434   ac_cv_prog_CPP=$CPP
2435 fi
2436 echo "$as_me:2436: result: $CPP" >&5
2437 echo "${ECHO_T}$CPP" >&6
2438 ac_preproc_ok=false
2439 for ac_c_preproc_warn_flag in '' yes
2440 do
2441   # Use a header file that comes with gcc, so configuring glibc
2442   # with a fresh cross-compiler works.
2443   # On the NeXT, cc -E runs the code through the compiler's parser,
2444   # not just through cpp. "Syntax error" is here to catch this case.
2445   cat >conftest.$ac_ext <<_ACEOF
2446 #line 2446 "configure"
2447 #include "confdefs.h"
2448 #include <assert.h>
2449                      Syntax error
2450 _ACEOF
2451 if { (eval echo "$as_me:2451: \"$ac_cpp conftest.$ac_ext\"") >&5
2452   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2453   ac_status=$?
2454   egrep -v '^ *\+' conftest.er1 >conftest.err
2455   rm -f conftest.er1
2456   cat conftest.err >&5
2457   echo "$as_me:2457: \$? = $ac_status" >&5
2458   (exit $ac_status); } >/dev/null; then
2459   if test -s conftest.err; then
2460     ac_cpp_err=$ac_c_preproc_warn_flag
2461   else
2462     ac_cpp_err=
2463   fi
2464 else
2465   ac_cpp_err=yes
2466 fi
2467 if test -z "$ac_cpp_err"; then
2468   :
2469 else
2470   echo "$as_me: failed program was:" >&5
2471   cat conftest.$ac_ext >&5
2472   # Broken: fails on valid input.
2473 continue
2474 fi
2475 rm -f conftest.err conftest.$ac_ext
2476
2477   # OK, works on sane cases.  Now check whether non-existent headers
2478   # can be detected and how.
2479   cat >conftest.$ac_ext <<_ACEOF
2480 #line 2480 "configure"
2481 #include "confdefs.h"
2482 #include <ac_nonexistent.h>
2483 _ACEOF
2484 if { (eval echo "$as_me:2484: \"$ac_cpp conftest.$ac_ext\"") >&5
2485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2486   ac_status=$?
2487   egrep -v '^ *\+' conftest.er1 >conftest.err
2488   rm -f conftest.er1
2489   cat conftest.err >&5
2490   echo "$as_me:2490: \$? = $ac_status" >&5
2491   (exit $ac_status); } >/dev/null; then
2492   if test -s conftest.err; then
2493     ac_cpp_err=$ac_c_preproc_warn_flag
2494   else
2495     ac_cpp_err=
2496   fi
2497 else
2498   ac_cpp_err=yes
2499 fi
2500 if test -z "$ac_cpp_err"; then
2501   # Broken: success on invalid input.
2502 continue
2503 else
2504   echo "$as_me: failed program was:" >&5
2505   cat conftest.$ac_ext >&5
2506   # Passes both tests.
2507 ac_preproc_ok=:
2508 break
2509 fi
2510 rm -f conftest.err conftest.$ac_ext
2511
2512 done
2513 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2514 rm -f conftest.err conftest.$ac_ext
2515 if $ac_preproc_ok; then
2516   :
2517 else
2518   { { echo "$as_me:2518: error: C preprocessor \"$CPP\" fails sanity check" >&5
2519 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2520    { (exit 1); exit 1; }; }
2521 fi
2522
2523 ac_ext=c
2524 ac_cpp='$CPP $CPPFLAGS'
2525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2528 ac_main_return=return
2529
2530 if test $ac_cv_c_compiler_gnu = yes; then
2531     echo "$as_me:2531: checking whether $CC needs -traditional" >&5
2532 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2533 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2534   echo $ECHO_N "(cached) $ECHO_C" >&6
2535 else
2536     ac_pattern="Autoconf.*'x'"
2537   cat >conftest.$ac_ext <<_ACEOF
2538 #line 2538 "configure"
2539 #include "confdefs.h"
2540 #include <sgtty.h>
2541 int Autoconf = TIOCGETP;
2542 _ACEOF
2543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2544   egrep "$ac_pattern" >/dev/null 2>&1; then
2545   ac_cv_prog_gcc_traditional=yes
2546 else
2547   ac_cv_prog_gcc_traditional=no
2548 fi
2549 rm -rf conftest*
2550
2551   if test $ac_cv_prog_gcc_traditional = no; then
2552     cat >conftest.$ac_ext <<_ACEOF
2553 #line 2553 "configure"
2554 #include "confdefs.h"
2555 #include <termio.h>
2556 int Autoconf = TCGETA;
2557 _ACEOF
2558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2559   egrep "$ac_pattern" >/dev/null 2>&1; then
2560   ac_cv_prog_gcc_traditional=yes
2561 fi
2562 rm -rf conftest*
2563
2564   fi
2565 fi
2566 echo "$as_me:2566: result: $ac_cv_prog_gcc_traditional" >&5
2567 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2568   if test $ac_cv_prog_gcc_traditional = yes; then
2569     CC="$CC -traditional"
2570   fi
2571 fi
2572
2573 echo "$as_me:2573: checking whether $CC understands -c and -o together" >&5
2574 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2575 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2576   echo $ECHO_N "(cached) $ECHO_C" >&6
2577 else
2578
2579 cat > conftest.$ac_ext <<CF_EOF
2580 int main(void)
2581 {
2582         ${cf_cv_main_return:-return}(0);
2583 }
2584 CF_EOF
2585 # We do the test twice because some compilers refuse to overwrite an
2586 # existing .o file with -o, though they will create one.
2587 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2588 if { (eval echo "$as_me:2588: \"$ac_try\"") >&5
2589   (eval $ac_try) 2>&5
2590   ac_status=$?
2591   echo "$as_me:2591: \$? = $ac_status" >&5
2592   (exit $ac_status); } &&
2593   test -f conftest2.$ac_objext && { (eval echo "$as_me:2593: \"$ac_try\"") >&5
2594   (eval $ac_try) 2>&5
2595   ac_status=$?
2596   echo "$as_me:2596: \$? = $ac_status" >&5
2597   (exit $ac_status); };
2598 then
2599   eval cf_cv_prog_CC_c_o=yes
2600 else
2601   eval cf_cv_prog_CC_c_o=no
2602 fi
2603 rm -rf conftest*
2604
2605 fi
2606 if test $cf_cv_prog_CC_c_o = yes; then
2607   echo "$as_me:2607: result: yes" >&5
2608 echo "${ECHO_T}yes" >&6
2609 else
2610   echo "$as_me:2610: result: no" >&5
2611 echo "${ECHO_T}no" >&6
2612 fi
2613
2614 if test "$cross_compiling" = yes ; then
2615         LDCONFIG=:
2616 else
2617         case "$cf_cv_system_name" in
2618         (dragonfly*|mirbsd*|freebsd*)
2619                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2620                 ;;
2621         (*) LDPATH=$PATH:/sbin:/usr/sbin
2622                 # Extract the first word of "ldconfig", so it can be a program name with args.
2623 set dummy ldconfig; ac_word=$2
2624 echo "$as_me:2624: checking for $ac_word" >&5
2625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2626 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2627   echo $ECHO_N "(cached) $ECHO_C" >&6
2628 else
2629   case $LDCONFIG in
2630   [\\/]* | ?:[\\/]*)
2631   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2632   ;;
2633   *)
2634   ac_save_IFS=$IFS; IFS=$ac_path_separator
2635 ac_dummy="$LDPATH"
2636 for ac_dir in $ac_dummy; do
2637   IFS=$ac_save_IFS
2638   test -z "$ac_dir" && ac_dir=.
2639   if $as_executable_p "$ac_dir/$ac_word"; then
2640    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2641    echo "$as_me:2641: found $ac_dir/$ac_word" >&5
2642    break
2643 fi
2644 done
2645
2646   ;;
2647 esac
2648 fi
2649 LDCONFIG=$ac_cv_path_LDCONFIG
2650
2651 if test -n "$LDCONFIG"; then
2652   echo "$as_me:2652: result: $LDCONFIG" >&5
2653 echo "${ECHO_T}$LDCONFIG" >&6
2654 else
2655   echo "$as_me:2655: result: no" >&5
2656 echo "${ECHO_T}no" >&6
2657 fi
2658
2659                 ;;
2660         esac
2661 fi
2662
2663 echo "$as_me:2663: checking if you want to ensure bool is consistent with C++" >&5
2664 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2665
2666 # Check whether --with-cxx or --without-cxx was given.
2667 if test "${with_cxx+set}" = set; then
2668   withval="$with_cxx"
2669   cf_with_cxx=$withval
2670 else
2671   cf_with_cxx=yes
2672 fi;
2673 echo "$as_me:2673: result: $cf_with_cxx" >&5
2674 echo "${ECHO_T}$cf_with_cxx" >&6
2675 if test "X$cf_with_cxx" = Xno ; then
2676         CXX=""
2677         GXX=""
2678 else
2679         # with autoconf 2.13, we can change the error to a warning:
2680                 ac_ext=cc
2681 ac_cpp='$CXXCPP $CPPFLAGS'
2682 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2685 ac_main_return=return
2686 if test -n "$ac_tool_prefix"; then
2687   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2688   do
2689     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2690 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2691 echo "$as_me:2691: checking for $ac_word" >&5
2692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2693 if test "${ac_cv_prog_CXX+set}" = set; then
2694   echo $ECHO_N "(cached) $ECHO_C" >&6
2695 else
2696   if test -n "$CXX"; then
2697   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2698 else
2699   ac_save_IFS=$IFS; IFS=$ac_path_separator
2700 ac_dummy="$PATH"
2701 for ac_dir in $ac_dummy; do
2702   IFS=$ac_save_IFS
2703   test -z "$ac_dir" && ac_dir=.
2704   $as_executable_p "$ac_dir/$ac_word" || continue
2705 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2706 echo "$as_me:2706: found $ac_dir/$ac_word" >&5
2707 break
2708 done
2709
2710 fi
2711 fi
2712 CXX=$ac_cv_prog_CXX
2713 if test -n "$CXX"; then
2714   echo "$as_me:2714: result: $CXX" >&5
2715 echo "${ECHO_T}$CXX" >&6
2716 else
2717   echo "$as_me:2717: result: no" >&5
2718 echo "${ECHO_T}no" >&6
2719 fi
2720
2721     test -n "$CXX" && break
2722   done
2723 fi
2724 if test -z "$CXX"; then
2725   ac_ct_CXX=$CXX
2726   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2727 do
2728   # Extract the first word of "$ac_prog", so it can be a program name with args.
2729 set dummy $ac_prog; ac_word=$2
2730 echo "$as_me:2730: checking for $ac_word" >&5
2731 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2732 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2733   echo $ECHO_N "(cached) $ECHO_C" >&6
2734 else
2735   if test -n "$ac_ct_CXX"; then
2736   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2737 else
2738   ac_save_IFS=$IFS; IFS=$ac_path_separator
2739 ac_dummy="$PATH"
2740 for ac_dir in $ac_dummy; do
2741   IFS=$ac_save_IFS
2742   test -z "$ac_dir" && ac_dir=.
2743   $as_executable_p "$ac_dir/$ac_word" || continue
2744 ac_cv_prog_ac_ct_CXX="$ac_prog"
2745 echo "$as_me:2745: found $ac_dir/$ac_word" >&5
2746 break
2747 done
2748
2749 fi
2750 fi
2751 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2752 if test -n "$ac_ct_CXX"; then
2753   echo "$as_me:2753: result: $ac_ct_CXX" >&5
2754 echo "${ECHO_T}$ac_ct_CXX" >&6
2755 else
2756   echo "$as_me:2756: result: no" >&5
2757 echo "${ECHO_T}no" >&6
2758 fi
2759
2760   test -n "$ac_ct_CXX" && break
2761 done
2762 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2763
2764   CXX=$ac_ct_CXX
2765 fi
2766
2767 # Provide some information about the compiler.
2768 echo "$as_me:2768:" \
2769      "checking for C++ compiler version" >&5
2770 ac_compiler=`set X $ac_compile; echo $2`
2771 { (eval echo "$as_me:2771: \"$ac_compiler --version </dev/null >&5\"") >&5
2772   (eval $ac_compiler --version </dev/null >&5) 2>&5
2773   ac_status=$?
2774   echo "$as_me:2774: \$? = $ac_status" >&5
2775   (exit $ac_status); }
2776 { (eval echo "$as_me:2776: \"$ac_compiler -v </dev/null >&5\"") >&5
2777   (eval $ac_compiler -v </dev/null >&5) 2>&5
2778   ac_status=$?
2779   echo "$as_me:2779: \$? = $ac_status" >&5
2780   (exit $ac_status); }
2781 { (eval echo "$as_me:2781: \"$ac_compiler -V </dev/null >&5\"") >&5
2782   (eval $ac_compiler -V </dev/null >&5) 2>&5
2783   ac_status=$?
2784   echo "$as_me:2784: \$? = $ac_status" >&5
2785   (exit $ac_status); }
2786
2787 echo "$as_me:2787: checking whether we are using the GNU C++ compiler" >&5
2788 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2789 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2795
2796 int
2797 main (void)
2798 {
2799 #ifndef __GNUC__
2800        choke me
2801 #endif
2802
2803   ;
2804   return 0;
2805 }
2806 _ACEOF
2807 rm -f conftest.$ac_objext
2808 if { (eval echo "$as_me:2808: \"$ac_compile\"") >&5
2809   (eval $ac_compile) 2>&5
2810   ac_status=$?
2811   echo "$as_me:2811: \$? = $ac_status" >&5
2812   (exit $ac_status); } &&
2813          { ac_try='test -s conftest.$ac_objext'
2814   { (eval echo "$as_me:2814: \"$ac_try\"") >&5
2815   (eval $ac_try) 2>&5
2816   ac_status=$?
2817   echo "$as_me:2817: \$? = $ac_status" >&5
2818   (exit $ac_status); }; }; then
2819   ac_compiler_gnu=yes
2820 else
2821   echo "$as_me: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
2823 ac_compiler_gnu=no
2824 fi
2825 rm -f conftest.$ac_objext conftest.$ac_ext
2826 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2827
2828 fi
2829 echo "$as_me:2829: result: $ac_cv_cxx_compiler_gnu" >&5
2830 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2831 GXX=`test $ac_compiler_gnu = yes && echo yes`
2832 ac_test_CXXFLAGS=${CXXFLAGS+set}
2833 ac_save_CXXFLAGS=$CXXFLAGS
2834 CXXFLAGS="-g"
2835 echo "$as_me:2835: checking whether $CXX accepts -g" >&5
2836 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2837 if test "${ac_cv_prog_cxx_g+set}" = set; then
2838   echo $ECHO_N "(cached) $ECHO_C" >&6
2839 else
2840   cat >conftest.$ac_ext <<_ACEOF
2841 #line 2841 "configure"
2842 #include "confdefs.h"
2843
2844 int
2845 main (void)
2846 {
2847
2848   ;
2849   return 0;
2850 }
2851 _ACEOF
2852 rm -f conftest.$ac_objext
2853 if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5
2854   (eval $ac_compile) 2>&5
2855   ac_status=$?
2856   echo "$as_me:2856: \$? = $ac_status" >&5
2857   (exit $ac_status); } &&
2858          { ac_try='test -s conftest.$ac_objext'
2859   { (eval echo "$as_me:2859: \"$ac_try\"") >&5
2860   (eval $ac_try) 2>&5
2861   ac_status=$?
2862   echo "$as_me:2862: \$? = $ac_status" >&5
2863   (exit $ac_status); }; }; then
2864   ac_cv_prog_cxx_g=yes
2865 else
2866   echo "$as_me: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 ac_cv_prog_cxx_g=no
2869 fi
2870 rm -f conftest.$ac_objext conftest.$ac_ext
2871 fi
2872 echo "$as_me:2872: result: $ac_cv_prog_cxx_g" >&5
2873 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2874 if test "$ac_test_CXXFLAGS" = set; then
2875   CXXFLAGS=$ac_save_CXXFLAGS
2876 elif test $ac_cv_prog_cxx_g = yes; then
2877   if test "$GXX" = yes; then
2878     CXXFLAGS="-g -O2"
2879   else
2880     CXXFLAGS="-g"
2881   fi
2882 else
2883   if test "$GXX" = yes; then
2884     CXXFLAGS="-O2"
2885   else
2886     CXXFLAGS=
2887   fi
2888 fi
2889 for ac_declaration in \
2890    ''\
2891    '#include <stdlib.h>' \
2892    'extern "C" void std::exit (int) throw (); using std::exit;' \
2893    'extern "C" void std::exit (int); using std::exit;' \
2894    'extern "C" void exit (int) throw ();' \
2895    'extern "C" void exit (int);' \
2896    'void exit (int);'
2897 do
2898   cat >conftest.$ac_ext <<_ACEOF
2899 #line 2899 "configure"
2900 #include "confdefs.h"
2901 #include <stdlib.h>
2902 $ac_declaration
2903 int
2904 main (void)
2905 {
2906 exit (42);
2907   ;
2908   return 0;
2909 }
2910 _ACEOF
2911 rm -f conftest.$ac_objext
2912 if { (eval echo "$as_me:2912: \"$ac_compile\"") >&5
2913   (eval $ac_compile) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); } &&
2917          { ac_try='test -s conftest.$ac_objext'
2918   { (eval echo "$as_me:2918: \"$ac_try\"") >&5
2919   (eval $ac_try) 2>&5
2920   ac_status=$?
2921   echo "$as_me:2921: \$? = $ac_status" >&5
2922   (exit $ac_status); }; }; then
2923   :
2924 else
2925   echo "$as_me: failed program was:" >&5
2926 cat conftest.$ac_ext >&5
2927 continue
2928 fi
2929 rm -f conftest.$ac_objext conftest.$ac_ext
2930   cat >conftest.$ac_ext <<_ACEOF
2931 #line 2931 "configure"
2932 #include "confdefs.h"
2933 $ac_declaration
2934 int
2935 main (void)
2936 {
2937 exit (42);
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:2943: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>&5
2945   ac_status=$?
2946   echo "$as_me:2946: \$? = $ac_status" >&5
2947   (exit $ac_status); } &&
2948          { ac_try='test -s conftest.$ac_objext'
2949   { (eval echo "$as_me:2949: \"$ac_try\"") >&5
2950   (eval $ac_try) 2>&5
2951   ac_status=$?
2952   echo "$as_me:2952: \$? = $ac_status" >&5
2953   (exit $ac_status); }; }; then
2954   break
2955 else
2956   echo "$as_me: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
2958 fi
2959 rm -f conftest.$ac_objext conftest.$ac_ext
2960 done
2961 rm -rf conftest*
2962 if test -n "$ac_declaration"; then
2963   echo '#ifdef __cplusplus' >>confdefs.h
2964   echo $ac_declaration      >>confdefs.h
2965   echo '#endif'             >>confdefs.h
2966 fi
2967
2968 ac_ext=c
2969 ac_cpp='$CPP $CPPFLAGS'
2970 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2971 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2972 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2973 ac_main_return=return
2974
2975         ac_ext=cc
2976 ac_cpp='$CXXCPP $CPPFLAGS'
2977 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2978 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2979 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2980 ac_main_return=return
2981
2982         if test "x$cf_with_cxx" != xno
2983         then
2984                 # Several of the C++ configurations do not work, particularly when
2985                 # cross-compiling (20140913 -TD)
2986                 echo "$as_me:2986: checking if $CXX works" >&5
2987 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2988
2989                 save_CPPFLAGS="$CPPFLAGS"
2990                 eval cf_includedir=${includedir}
2991                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2992
2993 cat >conftest.$ac_ext <<_ACEOF
2994 #line 2994 "configure"
2995 #include "confdefs.h"
2996
2997 #include <stdlib.h>
2998 #include <stdio.h>
2999
3000 int
3001 main (void)
3002 {
3003
3004                 printf("Hello world!\n")
3005
3006   ;
3007   return 0;
3008 }
3009 _ACEOF
3010 rm -f conftest.$ac_objext
3011 if { (eval echo "$as_me:3011: \"$ac_compile\"") >&5
3012   (eval $ac_compile) 2>&5
3013   ac_status=$?
3014   echo "$as_me:3014: \$? = $ac_status" >&5
3015   (exit $ac_status); } &&
3016          { ac_try='test -s conftest.$ac_objext'
3017   { (eval echo "$as_me:3017: \"$ac_try\"") >&5
3018   (eval $ac_try) 2>&5
3019   ac_status=$?
3020   echo "$as_me:3020: \$? = $ac_status" >&5
3021   (exit $ac_status); }; }; then
3022   cf_cxx_works=yes
3023 else
3024   echo "$as_me: failed program was:" >&5
3025 cat conftest.$ac_ext >&5
3026 cf_cxx_works=no
3027 fi
3028 rm -f conftest.$ac_objext conftest.$ac_ext
3029                 CPPFLAGS="$save_CPPFLAGS"
3030
3031                 echo "$as_me:3031: result: $cf_cxx_works" >&5
3032 echo "${ECHO_T}$cf_cxx_works" >&6
3033                 if test "x$cf_cxx_works" = xno
3034                 then
3035                         { echo "$as_me:3035: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3036 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3037                         cf_with_cxx=no; CXX=""; GXX="";
3038                 fi
3039         fi
3040         ac_ext=c
3041 ac_cpp='$CPP $CPPFLAGS'
3042 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3043 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3045 ac_main_return=return
3046
3047         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3048         if test "$CXX" = "g++" ; then
3049                 # Extract the first word of "g++", so it can be a program name with args.
3050 set dummy g++; ac_word=$2
3051 echo "$as_me:3051: checking for $ac_word" >&5
3052 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3053 if test "${ac_cv_path_CXX+set}" = set; then
3054   echo $ECHO_N "(cached) $ECHO_C" >&6
3055 else
3056   case $CXX in
3057   [\\/]* | ?:[\\/]*)
3058   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3059   ;;
3060   *)
3061   ac_save_IFS=$IFS; IFS=$ac_path_separator
3062 ac_dummy="$PATH"
3063 for ac_dir in $ac_dummy; do
3064   IFS=$ac_save_IFS
3065   test -z "$ac_dir" && ac_dir=.
3066   if $as_executable_p "$ac_dir/$ac_word"; then
3067    ac_cv_path_CXX="$ac_dir/$ac_word"
3068    echo "$as_me:3068: found $ac_dir/$ac_word" >&5
3069    break
3070 fi
3071 done
3072
3073   ;;
3074 esac
3075 fi
3076 CXX=$ac_cv_path_CXX
3077
3078 if test -n "$CXX"; then
3079   echo "$as_me:3079: result: $CXX" >&5
3080 echo "${ECHO_T}$CXX" >&6
3081 else
3082   echo "$as_me:3082: result: no" >&5
3083 echo "${ECHO_T}no" >&6
3084 fi
3085
3086         fi
3087         case "x$CXX" in
3088         (x|xg++)
3089                 { echo "$as_me:3089: WARNING: You don't have any C++ compiler, too bad" >&5
3090 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3091                 cf_with_cxx=no; CXX=""; GXX="";
3092                 ;;
3093         esac
3094 fi
3095
3096 GXX_VERSION=none
3097 if test "$GXX" = yes; then
3098         echo "$as_me:3098: checking version of ${CXX:-g++}" >&5
3099 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3100         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3101         if test -z "$GXX_VERSION"
3102         then
3103                 GXX_VERSION=unknown
3104                 GXX=no
3105         fi
3106         echo "$as_me:3106: result: $GXX_VERSION" >&5
3107 echo "${ECHO_T}$GXX_VERSION" >&6
3108 fi
3109
3110 case $GXX_VERSION in
3111 (1*|2.[0-6]*)
3112         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3113         # cf_cxx_library=no
3114         { echo "$as_me:3114: WARNING: templates do not work" >&5
3115 echo "$as_me: WARNING: templates do not work" >&2;}
3116         ;;
3117 esac
3118
3119 echo "$as_me:3119: checking if you want to build C++ binding and demo" >&5
3120 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3121
3122 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3123 if test "${with_cxx_binding+set}" = set; then
3124   withval="$with_cxx_binding"
3125   cf_with_cxx_binding=$withval
3126 else
3127   cf_with_cxx_binding=$cf_with_cxx
3128 fi;
3129 echo "$as_me:3129: result: $cf_with_cxx_binding" >&5
3130 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3131
3132 echo "$as_me:3132: checking if you want to build with Ada95" >&5
3133 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3134 echo "$as_me:3134: result: $cf_with_ada" >&5
3135 echo "${ECHO_T}$cf_with_ada" >&6
3136
3137 echo "$as_me:3137: checking if you want to install terminal database" >&5
3138 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3139
3140 # Check whether --enable-db-install or --disable-db-install was given.
3141 if test "${enable_db_install+set}" = set; then
3142   enableval="$enable_db_install"
3143   cf_with_db_install=$enableval
3144 else
3145   cf_with_db_install=yes
3146 fi;
3147 echo "$as_me:3147: result: $cf_with_db_install" >&5
3148 echo "${ECHO_T}$cf_with_db_install" >&6
3149
3150 echo "$as_me:3150: checking if you want to install manpages" >&5
3151 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3152
3153 # Check whether --with-manpages or --without-manpages was given.
3154 if test "${with_manpages+set}" = set; then
3155   withval="$with_manpages"
3156   cf_with_manpages=$withval
3157 else
3158   cf_with_manpages=yes
3159 fi;
3160 echo "$as_me:3160: result: $cf_with_manpages" >&5
3161 echo "${ECHO_T}$cf_with_manpages" >&6
3162
3163 echo "$as_me:3163: checking if you want to build programs such as tic" >&5
3164 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3165
3166 # Check whether --with-progs or --without-progs was given.
3167 if test "${with_progs+set}" = set; then
3168   withval="$with_progs"
3169   cf_with_progs=$withval
3170 else
3171   cf_with_progs=yes
3172 fi;
3173 echo "$as_me:3173: result: $cf_with_progs" >&5
3174 echo "${ECHO_T}$cf_with_progs" >&6
3175
3176 if test -f $srcdir/tack/tack.h; then
3177         if test "x$cross_compiling" = xyes ; then
3178                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3179
3180 echo "${as_me:-configure}:3180: testing ignoring tack because we are cross-compiling ..." 1>&5
3181
3182                 cf_with_tack=no
3183         else
3184                 echo "$as_me:3184: checking if you want to build the tack program" >&5
3185 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3186
3187 # Check whether --with-tack or --without-tack was given.
3188 if test "${with_tack+set}" = set; then
3189   withval="$with_tack"
3190   cf_with_tack=$withval
3191 else
3192   cf_with_tack=$cf_with_progs
3193 fi;
3194                 echo "$as_me:3194: result: $cf_with_tack" >&5
3195 echo "${ECHO_T}$cf_with_tack" >&6
3196         fi
3197 else
3198         cf_with_tack=no
3199 fi
3200
3201 echo "$as_me:3201: checking if you want to build test-programs" >&5
3202 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3203
3204 # Check whether --with-tests or --without-tests was given.
3205 if test "${with_tests+set}" = set; then
3206   withval="$with_tests"
3207   cf_with_tests=$withval
3208 else
3209   cf_with_tests=yes
3210 fi;
3211 echo "$as_me:3211: result: $cf_with_tests" >&5
3212 echo "${ECHO_T}$cf_with_tests" >&6
3213
3214 echo "$as_me:3214: checking if you wish to install curses.h" >&5
3215 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3216
3217 # Check whether --with-curses-h or --without-curses-h was given.
3218 if test "${with_curses_h+set}" = set; then
3219   withval="$with_curses_h"
3220   with_curses_h=$withval
3221 else
3222   with_curses_h=yes
3223 fi;
3224 echo "$as_me:3224: result: $with_curses_h" >&5
3225 echo "${ECHO_T}$with_curses_h" >&6
3226
3227 modules_to_build="ncurses"
3228 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3229 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3230 modules_to_build="$modules_to_build panel menu form"
3231
3232 test "$program_prefix" != NONE &&
3233   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3234 # Use a double $ so make ignores it.
3235 test "$program_suffix" != NONE &&
3236   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3237 # Double any \ or $.  echo might interpret backslashes.
3238 # By default was `s,x,x', remove it if useless.
3239 cat <<\_ACEOF >conftest.sed
3240 s/[\\$]/&&/g;s/;s,x,x,$//
3241 _ACEOF
3242 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3243 rm conftest.sed
3244
3245 for ac_prog in mawk gawk nawk awk
3246 do
3247   # Extract the first word of "$ac_prog", so it can be a program name with args.
3248 set dummy $ac_prog; ac_word=$2
3249 echo "$as_me:3249: checking for $ac_word" >&5
3250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3251 if test "${ac_cv_prog_AWK+set}" = set; then
3252   echo $ECHO_N "(cached) $ECHO_C" >&6
3253 else
3254   if test -n "$AWK"; then
3255   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3256 else
3257   ac_save_IFS=$IFS; IFS=$ac_path_separator
3258 ac_dummy="$PATH"
3259 for ac_dir in $ac_dummy; do
3260   IFS=$ac_save_IFS
3261   test -z "$ac_dir" && ac_dir=.
3262   $as_executable_p "$ac_dir/$ac_word" || continue
3263 ac_cv_prog_AWK="$ac_prog"
3264 echo "$as_me:3264: found $ac_dir/$ac_word" >&5
3265 break
3266 done
3267
3268 fi
3269 fi
3270 AWK=$ac_cv_prog_AWK
3271 if test -n "$AWK"; then
3272   echo "$as_me:3272: result: $AWK" >&5
3273 echo "${ECHO_T}$AWK" >&6
3274 else
3275   echo "$as_me:3275: result: no" >&5
3276 echo "${ECHO_T}no" >&6
3277 fi
3278
3279   test -n "$AWK" && break
3280 done
3281
3282 test -z "$AWK" && { { echo "$as_me:3282: error: No awk program found" >&5
3283 echo "$as_me: error: No awk program found" >&2;}
3284    { (exit 1); exit 1; }; }
3285
3286 echo "$as_me:3286: checking for egrep" >&5
3287 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3288 if test "${ac_cv_prog_egrep+set}" = set; then
3289   echo $ECHO_N "(cached) $ECHO_C" >&6
3290 else
3291   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3292                 then ac_cv_prog_egrep='grep -E'
3293                 else ac_cv_prog_egrep='egrep'
3294         fi
3295 fi
3296 echo "$as_me:3296: result: $ac_cv_prog_egrep" >&5
3297 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3298         EGREP=$ac_cv_prog_egrep
3299
3300         test -z "$EGREP" && { { echo "$as_me:3300: error: No egrep program found" >&5
3301 echo "$as_me: error: No egrep program found" >&2;}
3302    { (exit 1); exit 1; }; }
3303
3304 # Find a good install program.  We prefer a C program (faster),
3305 # so one script is as good as another.  But avoid the broken or
3306 # incompatible versions:
3307 # SysV /etc/install, /usr/sbin/install
3308 # SunOS /usr/etc/install
3309 # IRIX /sbin/install
3310 # AIX /bin/install
3311 # AmigaOS /C/install, which installs bootblocks on floppy discs
3312 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3313 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3314 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3315 # ./install, which can be erroneously created by make from ./install.sh.
3316 echo "$as_me:3316: checking for a BSD compatible install" >&5
3317 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3318 if test -z "$INSTALL"; then
3319 if test "${ac_cv_path_install+set}" = set; then
3320   echo $ECHO_N "(cached) $ECHO_C" >&6
3321 else
3322     ac_save_IFS=$IFS; IFS=$ac_path_separator
3323   for ac_dir in $PATH; do
3324     IFS=$ac_save_IFS
3325     # Account for people who put trailing slashes in PATH elements.
3326     case $ac_dir/ in
3327     / | ./ | .// | /cC/* \
3328     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3329     | /usr/ucb/* ) ;;
3330     *)
3331       # OSF1 and SCO ODT 3.0 have their own names for install.
3332       # Don't use installbsd from OSF since it installs stuff as root
3333       # by default.
3334       for ac_prog in ginstall scoinst install; do
3335         if $as_executable_p "$ac_dir/$ac_prog"; then
3336           if test $ac_prog = install &&
3337             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3338             # AIX install.  It has an incompatible calling convention.
3339             :
3340           elif test $ac_prog = install &&
3341             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3342             # program-specific install script used by HP pwplus--don't use.
3343             :
3344           else
3345             ac_cv_path_install="$ac_dir/$ac_prog -c"
3346             break 2
3347           fi
3348         fi
3349       done
3350       ;;
3351     esac
3352   done
3353
3354 fi
3355   if test "${ac_cv_path_install+set}" = set; then
3356     INSTALL=$ac_cv_path_install
3357   else
3358     # As a last resort, use the slow shell script.  We don't cache a
3359     # path for INSTALL within a source directory, because that will
3360     # break other packages using the cache if that directory is
3361     # removed, or if the path is relative.
3362     INSTALL=$ac_install_sh
3363   fi
3364 fi
3365 echo "$as_me:3365: result: $INSTALL" >&5
3366 echo "${ECHO_T}$INSTALL" >&6
3367
3368 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3369 # It thinks the first close brace ends the variable substitution.
3370 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3371
3372 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3373
3374 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3375
3376 case $INSTALL in
3377 (/*)
3378         ;;
3379 (*)
3380         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3381         test -z "$cf_dir" && cf_dir=.
3382         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3383         ;;
3384 esac
3385
3386 for ac_prog in lint cppcheck splint
3387 do
3388   # Extract the first word of "$ac_prog", so it can be a program name with args.
3389 set dummy $ac_prog; ac_word=$2
3390 echo "$as_me:3390: checking for $ac_word" >&5
3391 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3392 if test "${ac_cv_prog_LINT+set}" = set; then
3393   echo $ECHO_N "(cached) $ECHO_C" >&6
3394 else
3395   if test -n "$LINT"; then
3396   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3397 else
3398   ac_save_IFS=$IFS; IFS=$ac_path_separator
3399 ac_dummy="$PATH"
3400 for ac_dir in $ac_dummy; do
3401   IFS=$ac_save_IFS
3402   test -z "$ac_dir" && ac_dir=.
3403   $as_executable_p "$ac_dir/$ac_word" || continue
3404 ac_cv_prog_LINT="$ac_prog"
3405 echo "$as_me:3405: found $ac_dir/$ac_word" >&5
3406 break
3407 done
3408
3409 fi
3410 fi
3411 LINT=$ac_cv_prog_LINT
3412 if test -n "$LINT"; then
3413   echo "$as_me:3413: result: $LINT" >&5
3414 echo "${ECHO_T}$LINT" >&6
3415 else
3416   echo "$as_me:3416: result: no" >&5
3417 echo "${ECHO_T}no" >&6
3418 fi
3419
3420   test -n "$LINT" && break
3421 done
3422
3423 echo "$as_me:3423: checking whether ln -s works" >&5
3424 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3425 LN_S=$as_ln_s
3426 if test "$LN_S" = "ln -s"; then
3427   echo "$as_me:3427: result: yes" >&5
3428 echo "${ECHO_T}yes" >&6
3429 else
3430   echo "$as_me:3430: result: no, using $LN_S" >&5
3431 echo "${ECHO_T}no, using $LN_S" >&6
3432 fi
3433
3434 echo "$as_me:3434: checking if $LN_S -f options work" >&5
3435 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3436
3437 rm -f conf$$.src conf$$dst
3438 echo >conf$$.dst
3439 echo first >conf$$.src
3440 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3441         cf_prog_ln_sf=yes
3442 else
3443         cf_prog_ln_sf=no
3444 fi
3445 rm -f conf$$.dst conf$$src
3446 echo "$as_me:3446: result: $cf_prog_ln_sf" >&5
3447 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3448
3449 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3450
3451 echo "$as_me:3451: checking for long file names" >&5
3452 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3453 if test "${ac_cv_sys_long_file_names+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456   ac_cv_sys_long_file_names=yes
3457 # Test for long file names in all the places we know might matter:
3458 #      .                the current directory, where building will happen
3459 #      $prefix/lib      where we will be installing things
3460 #      $exec_prefix/lib likewise
3461 # eval it to expand exec_prefix.
3462 #      $TMPDIR          if set, where it might want to write temporary files
3463 # if $TMPDIR is not set:
3464 #      /tmp             where it might want to write temporary files
3465 #      /var/tmp         likewise
3466 #      /usr/tmp         likewise
3467 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3468   ac_tmpdirs=$TMPDIR
3469 else
3470   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3471 fi
3472 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3473   test -d $ac_dir || continue
3474   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3475   ac_xdir=$ac_dir/cf$$
3476   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3477   ac_tf1=$ac_xdir/conftest9012345
3478   ac_tf2=$ac_xdir/conftest9012346
3479   (echo 1 >$ac_tf1) 2>/dev/null
3480   (echo 2 >$ac_tf2) 2>/dev/null
3481   ac_val=`cat $ac_tf1 2>/dev/null`
3482   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3483     ac_cv_sys_long_file_names=no
3484     rm -rf $ac_xdir 2>/dev/null
3485     break
3486   fi
3487   rm -rf $ac_xdir 2>/dev/null
3488 done
3489 fi
3490 echo "$as_me:3490: result: $ac_cv_sys_long_file_names" >&5
3491 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3492 if test $ac_cv_sys_long_file_names = yes; then
3493
3494 cat >>confdefs.h <<\EOF
3495 #define HAVE_LONG_FILE_NAMES 1
3496 EOF
3497
3498 fi
3499
3500 # if we find pkg-config, check if we should install the ".pc" files.
3501
3502 echo "$as_me:3502: checking if you want to use pkg-config" >&5
3503 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3504
3505 # Check whether --with-pkg-config or --without-pkg-config was given.
3506 if test "${with_pkg_config+set}" = set; then
3507   withval="$with_pkg_config"
3508   cf_pkg_config=$withval
3509 else
3510   cf_pkg_config=yes
3511 fi;
3512 echo "$as_me:3512: result: $cf_pkg_config" >&5
3513 echo "${ECHO_T}$cf_pkg_config" >&6
3514
3515 case $cf_pkg_config in
3516 (no)
3517         PKG_CONFIG=none
3518         ;;
3519 (yes)
3520
3521 if test -n "$ac_tool_prefix"; then
3522   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3523 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3524 echo "$as_me:3524: checking for $ac_word" >&5
3525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3526 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   case $PKG_CONFIG in
3530   [\\/]* | ?:[\\/]*)
3531   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3532   ;;
3533   *)
3534   ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 ac_dummy="$PATH"
3536 for ac_dir in $ac_dummy; do
3537   IFS=$ac_save_IFS
3538   test -z "$ac_dir" && ac_dir=.
3539   if $as_executable_p "$ac_dir/$ac_word"; then
3540    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3541    echo "$as_me:3541: found $ac_dir/$ac_word" >&5
3542    break
3543 fi
3544 done
3545
3546   ;;
3547 esac
3548 fi
3549 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3550
3551 if test -n "$PKG_CONFIG"; then
3552   echo "$as_me:3552: result: $PKG_CONFIG" >&5
3553 echo "${ECHO_T}$PKG_CONFIG" >&6
3554 else
3555   echo "$as_me:3555: result: no" >&5
3556 echo "${ECHO_T}no" >&6
3557 fi
3558
3559 fi
3560 if test -z "$ac_cv_path_PKG_CONFIG"; then
3561   ac_pt_PKG_CONFIG=$PKG_CONFIG
3562   # Extract the first word of "pkg-config", so it can be a program name with args.
3563 set dummy pkg-config; ac_word=$2
3564 echo "$as_me:3564: checking for $ac_word" >&5
3565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3566 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569   case $ac_pt_PKG_CONFIG in
3570   [\\/]* | ?:[\\/]*)
3571   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3572   ;;
3573   *)
3574   ac_save_IFS=$IFS; IFS=$ac_path_separator
3575 ac_dummy="$PATH"
3576 for ac_dir in $ac_dummy; do
3577   IFS=$ac_save_IFS
3578   test -z "$ac_dir" && ac_dir=.
3579   if $as_executable_p "$ac_dir/$ac_word"; then
3580    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3581    echo "$as_me:3581: found $ac_dir/$ac_word" >&5
3582    break
3583 fi
3584 done
3585
3586   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3587   ;;
3588 esac
3589 fi
3590 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3591
3592 if test -n "$ac_pt_PKG_CONFIG"; then
3593   echo "$as_me:3593: result: $ac_pt_PKG_CONFIG" >&5
3594 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3595 else
3596   echo "$as_me:3596: result: no" >&5
3597 echo "${ECHO_T}no" >&6
3598 fi
3599
3600   PKG_CONFIG=$ac_pt_PKG_CONFIG
3601 else
3602   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3603 fi
3604
3605         ;;
3606 (*)
3607         PKG_CONFIG=$withval
3608         ;;
3609 esac
3610
3611 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3612 if test "$PKG_CONFIG" != none ; then
3613
3614 if test "x$prefix" != xNONE; then
3615         cf_path_syntax="$prefix"
3616 else
3617         cf_path_syntax="$ac_default_prefix"
3618 fi
3619
3620 case ".$PKG_CONFIG" in
3621 (.\$\(*\)*|.\'*\'*)
3622         ;;
3623 (..|./*|.\\*)
3624         ;;
3625 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3626         ;;
3627 (.\${*prefix}*|.\${*dir}*)
3628         eval PKG_CONFIG="$PKG_CONFIG"
3629         case ".$PKG_CONFIG" in
3630         (.NONE/*)
3631                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3632                 ;;
3633         esac
3634         ;;
3635 (.no|.NONE/*)
3636         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3637         ;;
3638 (*)
3639         { { echo "$as_me:3639: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3640 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3641    { (exit 1); exit 1; }; }
3642         ;;
3643 esac
3644
3645 elif test "x$cf_pkg_config" != xno ; then
3646         { echo "$as_me:3646: WARNING: pkg-config is not installed" >&5
3647 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3648 fi
3649
3650 case $PKG_CONFIG in
3651 (no|none|yes)
3652         echo "$as_me:3652: checking for pkg-config library directory" >&5
3653 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3654         ;;
3655 (*)
3656         echo "$as_me:3656: checking for $PKG_CONFIG library directory" >&5
3657 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3658         ;;
3659 esac
3660
3661 PKG_CONFIG_LIBDIR=no
3662
3663 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3664 if test "${with_pkg_config_libdir+set}" = set; then
3665   withval="$with_pkg_config_libdir"
3666   PKG_CONFIG_LIBDIR=$withval
3667 else
3668   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3669 fi;
3670
3671 case x$PKG_CONFIG_LIBDIR in
3672 (x/*)
3673         ;;
3674 (xyes)
3675         # Look for the library directory using the same prefix as the executable
3676         if test "x$PKG_CONFIG" = xnone
3677         then
3678                 cf_path=$prefix
3679         else
3680                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3681         fi
3682
3683         # If you don't like using the default architecture, you have to specify the
3684         # intended library directory and corresponding compiler/linker options.
3685         #
3686         # This case allows for Debian's 2014-flavor of multiarch, along with the
3687         # most common variations before that point.  Some other variants spell the
3688         # directory differently, e.g., "pkg-config", and put it in unusual places.
3689         # pkg-config has always been poorly standardized, which is ironic...
3690         case x`(arch) 2>/dev/null` in
3691         (*64)
3692                 cf_search_path="\
3693                         $cf_path/lib/*64-linux-gnu \
3694                         $cf_path/share \
3695                         $cf_path/lib64 \
3696                         $cf_path/lib32 \
3697                         $cf_path/lib"
3698                 ;;
3699         (*)
3700                 cf_search_path="\
3701                         $cf_path/lib/*-linux-gnu \
3702                         $cf_path/share \
3703                         $cf_path/lib32 \
3704                         $cf_path/lib \
3705                         $cf_path/libdata"
3706                 ;;
3707         esac
3708
3709         test -n "$verbose" && echo "    list..." 1>&6
3710
3711 echo "${as_me:-configure}:3711: testing list... ..." 1>&5
3712
3713         for cf_config in $cf_search_path
3714         do
3715                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3716
3717 echo "${as_me:-configure}:3717: testing checking $cf_config/pkgconfig ..." 1>&5
3718
3719                 if test -d $cf_config/pkgconfig
3720                 then
3721                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3722                         echo "$as_me:3722: checking done" >&5
3723 echo $ECHO_N "checking done... $ECHO_C" >&6
3724                         break
3725                 fi
3726         done
3727         ;;
3728 (*)
3729         ;;
3730 esac
3731
3732 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3733         echo "$as_me:3733: result: $PKG_CONFIG_LIBDIR" >&5
3734 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3735 fi
3736
3737 if test "x$PKG_CONFIG" != xnone
3738 then
3739         echo "$as_me:3739: checking if we should install .pc files for $PKG_CONFIG" >&5
3740 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3741 else
3742         echo "$as_me:3742: checking if we should install .pc files" >&5
3743 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3744 fi
3745
3746 # Check whether --enable-pc-files or --disable-pc-files was given.
3747 if test "${enable_pc_files+set}" = set; then
3748   enableval="$enable_pc_files"
3749   enable_pc_files=$enableval
3750 else
3751   enable_pc_files=no
3752 fi;
3753 echo "$as_me:3753: result: $enable_pc_files" >&5
3754 echo "${ECHO_T}$enable_pc_files" >&6
3755
3756 if test "x$enable_pc_files" != xno
3757 then
3758         MAKE_PC_FILES=
3759         case "x$PKG_CONFIG_LIBDIR" in
3760         (xno|xyes)
3761                 { echo "$as_me:3761: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3762 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3763                 ;;
3764         (*)
3765
3766 if test "x$prefix" != xNONE; then
3767         cf_path_syntax="$prefix"
3768 else
3769         cf_path_syntax="$ac_default_prefix"
3770 fi
3771
3772 case ".$PKG_CONFIG_LIBDIR" in
3773 (.\$\(*\)*|.\'*\'*)
3774         ;;
3775 (..|./*|.\\*)
3776         ;;
3777 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3778         ;;
3779 (.\${*prefix}*|.\${*dir}*)
3780         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3781         case ".$PKG_CONFIG_LIBDIR" in
3782         (.NONE/*)
3783                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3784                 ;;
3785         esac
3786         ;;
3787 (.no|.NONE/*)
3788         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3789         ;;
3790 (*)
3791         { { echo "$as_me:3791: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3792 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3793    { (exit 1); exit 1; }; }
3794         ;;
3795 esac
3796
3797                 ;;
3798         esac
3799 else
3800         MAKE_PC_FILES="#"
3801 fi
3802
3803 if test -z "$MAKE_PC_FILES"
3804 then
3805         echo "$as_me:3805: checking for suffix to add to pc-files" >&5
3806 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3807
3808 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3809 if test "${with_pc_suffix+set}" = set; then
3810   withval="$with_pc_suffix"
3811   case "x$withval" in
3812         (xyes|xno)
3813                 PC_MODULE_SUFFIX=
3814                 ;;
3815         (*)     PC_MODULE_SUFFIX="$withval"
3816                 ;;
3817         esac
3818 fi;
3819         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3820         echo "$as_me:3820: result: $PC_MODULE_SUFFIX" >&5
3821 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3822         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3823
3824 fi
3825
3826 echo "$as_me:3826: checking if we should assume mixed-case filenames" >&5
3827 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3828
3829 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3830 if test "${enable_mixed_case+set}" = set; then
3831   enableval="$enable_mixed_case"
3832   enable_mixedcase=$enableval
3833 else
3834   enable_mixedcase=auto
3835 fi;
3836 echo "$as_me:3836: result: $enable_mixedcase" >&5
3837 echo "${ECHO_T}$enable_mixedcase" >&6
3838 if test "$enable_mixedcase" = "auto" ; then
3839
3840 echo "$as_me:3840: checking if filesystem supports mixed-case filenames" >&5
3841 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3842 if test "${cf_cv_mixedcase+set}" = set; then
3843   echo $ECHO_N "(cached) $ECHO_C" >&6
3844 else
3845
3846 if test "$cross_compiling" = yes ; then
3847         case $target_alias in
3848         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3849                 cf_cv_mixedcase=no
3850                 ;;
3851         (*)
3852                 cf_cv_mixedcase=yes
3853                 ;;
3854         esac
3855 else
3856         rm -f conftest CONFTEST
3857         echo test >conftest
3858         if test -f CONFTEST ; then
3859                 cf_cv_mixedcase=no
3860         else
3861                 cf_cv_mixedcase=yes
3862         fi
3863         rm -f conftest CONFTEST
3864 fi
3865
3866 fi
3867 echo "$as_me:3867: result: $cf_cv_mixedcase" >&5
3868 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3869 test "$cf_cv_mixedcase" = yes &&
3870 cat >>confdefs.h <<\EOF
3871 #define MIXEDCASE_FILENAMES 1
3872 EOF
3873
3874 else
3875         cf_cv_mixedcase=$enable_mixedcase
3876         if test "x$enable_mixedcase" = "xyes" ; then
3877
3878 cat >>confdefs.h <<\EOF
3879 #define MIXEDCASE_FILENAMES 1
3880 EOF
3881
3882         fi
3883 fi
3884
3885 # do this after mixed-case option (tags/TAGS is not as important as tic).
3886 echo "$as_me:3886: checking whether ${MAKE-make} sets \${MAKE}" >&5
3887 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3888 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3889 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   cat >conftest.make <<\EOF
3893 all:
3894         @echo 'ac_maketemp="${MAKE}"'
3895 EOF
3896 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3897 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3898 if test -n "$ac_maketemp"; then
3899   eval ac_cv_prog_make_${ac_make}_set=yes
3900 else
3901   eval ac_cv_prog_make_${ac_make}_set=no
3902 fi
3903 rm -f conftest.make
3904 fi
3905 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3906   echo "$as_me:3906: result: yes" >&5
3907 echo "${ECHO_T}yes" >&6
3908   SET_MAKE=
3909 else
3910   echo "$as_me:3910: result: no" >&5
3911 echo "${ECHO_T}no" >&6
3912   SET_MAKE="MAKE=${MAKE-make}"
3913 fi
3914
3915 for ac_prog in exctags ctags
3916 do
3917   # Extract the first word of "$ac_prog", so it can be a program name with args.
3918 set dummy $ac_prog; ac_word=$2
3919 echo "$as_me:3919: checking for $ac_word" >&5
3920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3921 if test "${ac_cv_prog_CTAGS+set}" = set; then
3922   echo $ECHO_N "(cached) $ECHO_C" >&6
3923 else
3924   if test -n "$CTAGS"; then
3925   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3926 else
3927   ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 ac_dummy="$PATH"
3929 for ac_dir in $ac_dummy; do
3930   IFS=$ac_save_IFS
3931   test -z "$ac_dir" && ac_dir=.
3932   $as_executable_p "$ac_dir/$ac_word" || continue
3933 ac_cv_prog_CTAGS="$ac_prog"
3934 echo "$as_me:3934: found $ac_dir/$ac_word" >&5
3935 break
3936 done
3937
3938 fi
3939 fi
3940 CTAGS=$ac_cv_prog_CTAGS
3941 if test -n "$CTAGS"; then
3942   echo "$as_me:3942: result: $CTAGS" >&5
3943 echo "${ECHO_T}$CTAGS" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   test -n "$CTAGS" && break
3950 done
3951
3952 for ac_prog in exetags etags
3953 do
3954   # Extract the first word of "$ac_prog", so it can be a program name with args.
3955 set dummy $ac_prog; ac_word=$2
3956 echo "$as_me:3956: checking for $ac_word" >&5
3957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3958 if test "${ac_cv_prog_ETAGS+set}" = set; then
3959   echo $ECHO_N "(cached) $ECHO_C" >&6
3960 else
3961   if test -n "$ETAGS"; then
3962   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3963 else
3964   ac_save_IFS=$IFS; IFS=$ac_path_separator
3965 ac_dummy="$PATH"
3966 for ac_dir in $ac_dummy; do
3967   IFS=$ac_save_IFS
3968   test -z "$ac_dir" && ac_dir=.
3969   $as_executable_p "$ac_dir/$ac_word" || continue
3970 ac_cv_prog_ETAGS="$ac_prog"
3971 echo "$as_me:3971: found $ac_dir/$ac_word" >&5
3972 break
3973 done
3974
3975 fi
3976 fi
3977 ETAGS=$ac_cv_prog_ETAGS
3978 if test -n "$ETAGS"; then
3979   echo "$as_me:3979: result: $ETAGS" >&5
3980 echo "${ECHO_T}$ETAGS" >&6
3981 else
3982   echo "$as_me:3982: result: no" >&5
3983 echo "${ECHO_T}no" >&6
3984 fi
3985
3986   test -n "$ETAGS" && break
3987 done
3988
3989 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3990 set dummy ${CTAGS:-ctags}; ac_word=$2
3991 echo "$as_me:3991: checking for $ac_word" >&5
3992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3993 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3994   echo $ECHO_N "(cached) $ECHO_C" >&6
3995 else
3996   if test -n "$MAKE_LOWER_TAGS"; then
3997   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3998 else
3999   ac_save_IFS=$IFS; IFS=$ac_path_separator
4000 ac_dummy="$PATH"
4001 for ac_dir in $ac_dummy; do
4002   IFS=$ac_save_IFS
4003   test -z "$ac_dir" && ac_dir=.
4004   $as_executable_p "$ac_dir/$ac_word" || continue
4005 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4006 echo "$as_me:4006: found $ac_dir/$ac_word" >&5
4007 break
4008 done
4009
4010   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4011 fi
4012 fi
4013 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4014 if test -n "$MAKE_LOWER_TAGS"; then
4015   echo "$as_me:4015: result: $MAKE_LOWER_TAGS" >&5
4016 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4017 else
4018   echo "$as_me:4018: result: no" >&5
4019 echo "${ECHO_T}no" >&6
4020 fi
4021
4022 if test "$cf_cv_mixedcase" = yes ; then
4023         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4024 set dummy ${ETAGS:-etags}; ac_word=$2
4025 echo "$as_me:4025: checking for $ac_word" >&5
4026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4027 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4028   echo $ECHO_N "(cached) $ECHO_C" >&6
4029 else
4030   if test -n "$MAKE_UPPER_TAGS"; then
4031   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4032 else
4033   ac_save_IFS=$IFS; IFS=$ac_path_separator
4034 ac_dummy="$PATH"
4035 for ac_dir in $ac_dummy; do
4036   IFS=$ac_save_IFS
4037   test -z "$ac_dir" && ac_dir=.
4038   $as_executable_p "$ac_dir/$ac_word" || continue
4039 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4040 echo "$as_me:4040: found $ac_dir/$ac_word" >&5
4041 break
4042 done
4043
4044   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4045 fi
4046 fi
4047 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4048 if test -n "$MAKE_UPPER_TAGS"; then
4049   echo "$as_me:4049: result: $MAKE_UPPER_TAGS" >&5
4050 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4051 else
4052   echo "$as_me:4052: result: no" >&5
4053 echo "${ECHO_T}no" >&6
4054 fi
4055
4056 else
4057         MAKE_UPPER_TAGS=no
4058 fi
4059
4060 if test "$MAKE_UPPER_TAGS" = yes ; then
4061         MAKE_UPPER_TAGS=
4062 else
4063         MAKE_UPPER_TAGS="#"
4064 fi
4065
4066 if test "$MAKE_LOWER_TAGS" = yes ; then
4067         MAKE_LOWER_TAGS=
4068 else
4069         MAKE_LOWER_TAGS="#"
4070 fi
4071
4072 echo "$as_me:4072: checking for makeflags variable" >&5
4073 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4074 if test "${cf_cv_makeflags+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077
4078         cf_cv_makeflags=''
4079         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4080         do
4081                 cat >cf_makeflags.tmp <<CF_EOF
4082 SHELL = $SHELL
4083 all :
4084         @ echo '.$cf_option'
4085 CF_EOF
4086                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4087                 case "$cf_result" in
4088                 (.*k|.*kw)
4089                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4090                         case "$cf_result" in
4091                         (.*CC=*)        cf_cv_makeflags=
4092                                 ;;
4093                         (*)     cf_cv_makeflags=$cf_option
4094                                 ;;
4095                         esac
4096                         break
4097                         ;;
4098                 (.-)    ;;
4099                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4100                         ;;
4101                 esac
4102         done
4103         rm -f cf_makeflags.tmp
4104
4105 fi
4106 echo "$as_me:4106: result: $cf_cv_makeflags" >&5
4107 echo "${ECHO_T}$cf_cv_makeflags" >&6
4108
4109 if test -n "$ac_tool_prefix"; then
4110   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4111 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4112 echo "$as_me:4112: checking for $ac_word" >&5
4113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4114 if test "${ac_cv_prog_RANLIB+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -n "$RANLIB"; then
4118   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4119 else
4120   ac_save_IFS=$IFS; IFS=$ac_path_separator
4121 ac_dummy="$PATH"
4122 for ac_dir in $ac_dummy; do
4123   IFS=$ac_save_IFS
4124   test -z "$ac_dir" && ac_dir=.
4125   $as_executable_p "$ac_dir/$ac_word" || continue
4126 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4127 echo "$as_me:4127: found $ac_dir/$ac_word" >&5
4128 break
4129 done
4130
4131 fi
4132 fi
4133 RANLIB=$ac_cv_prog_RANLIB
4134 if test -n "$RANLIB"; then
4135   echo "$as_me:4135: result: $RANLIB" >&5
4136 echo "${ECHO_T}$RANLIB" >&6
4137 else
4138   echo "$as_me:4138: result: no" >&5
4139 echo "${ECHO_T}no" >&6
4140 fi
4141
4142 fi
4143 if test -z "$ac_cv_prog_RANLIB"; then
4144   ac_ct_RANLIB=$RANLIB
4145   # Extract the first word of "ranlib", so it can be a program name with args.
4146 set dummy ranlib; ac_word=$2
4147 echo "$as_me:4147: checking for $ac_word" >&5
4148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4149 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4150   echo $ECHO_N "(cached) $ECHO_C" >&6
4151 else
4152   if test -n "$ac_ct_RANLIB"; then
4153   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4154 else
4155   ac_save_IFS=$IFS; IFS=$ac_path_separator
4156 ac_dummy="$PATH"
4157 for ac_dir in $ac_dummy; do
4158   IFS=$ac_save_IFS
4159   test -z "$ac_dir" && ac_dir=.
4160   $as_executable_p "$ac_dir/$ac_word" || continue
4161 ac_cv_prog_ac_ct_RANLIB="ranlib"
4162 echo "$as_me:4162: found $ac_dir/$ac_word" >&5
4163 break
4164 done
4165
4166   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4167 fi
4168 fi
4169 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4170 if test -n "$ac_ct_RANLIB"; then
4171   echo "$as_me:4171: result: $ac_ct_RANLIB" >&5
4172 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176 fi
4177
4178   RANLIB=$ac_ct_RANLIB
4179 else
4180   RANLIB="$ac_cv_prog_RANLIB"
4181 fi
4182
4183 if test -n "$ac_tool_prefix"; then
4184   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4185 set dummy ${ac_tool_prefix}ld; ac_word=$2
4186 echo "$as_me:4186: checking for $ac_word" >&5
4187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4188 if test "${ac_cv_prog_LD+set}" = set; then
4189   echo $ECHO_N "(cached) $ECHO_C" >&6
4190 else
4191   if test -n "$LD"; then
4192   ac_cv_prog_LD="$LD" # Let the user override the test.
4193 else
4194   ac_save_IFS=$IFS; IFS=$ac_path_separator
4195 ac_dummy="$PATH"
4196 for ac_dir in $ac_dummy; do
4197   IFS=$ac_save_IFS
4198   test -z "$ac_dir" && ac_dir=.
4199   $as_executable_p "$ac_dir/$ac_word" || continue
4200 ac_cv_prog_LD="${ac_tool_prefix}ld"
4201 echo "$as_me:4201: found $ac_dir/$ac_word" >&5
4202 break
4203 done
4204
4205 fi
4206 fi
4207 LD=$ac_cv_prog_LD
4208 if test -n "$LD"; then
4209   echo "$as_me:4209: result: $LD" >&5
4210 echo "${ECHO_T}$LD" >&6
4211 else
4212   echo "$as_me:4212: result: no" >&5
4213 echo "${ECHO_T}no" >&6
4214 fi
4215
4216 fi
4217 if test -z "$ac_cv_prog_LD"; then
4218   ac_ct_LD=$LD
4219   # Extract the first word of "ld", so it can be a program name with args.
4220 set dummy ld; ac_word=$2
4221 echo "$as_me:4221: checking for $ac_word" >&5
4222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4223 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4224   echo $ECHO_N "(cached) $ECHO_C" >&6
4225 else
4226   if test -n "$ac_ct_LD"; then
4227   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4228 else
4229   ac_save_IFS=$IFS; IFS=$ac_path_separator
4230 ac_dummy="$PATH"
4231 for ac_dir in $ac_dummy; do
4232   IFS=$ac_save_IFS
4233   test -z "$ac_dir" && ac_dir=.
4234   $as_executable_p "$ac_dir/$ac_word" || continue
4235 ac_cv_prog_ac_ct_LD="ld"
4236 echo "$as_me:4236: found $ac_dir/$ac_word" >&5
4237 break
4238 done
4239
4240   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4241 fi
4242 fi
4243 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4244 if test -n "$ac_ct_LD"; then
4245   echo "$as_me:4245: result: $ac_ct_LD" >&5
4246 echo "${ECHO_T}$ac_ct_LD" >&6
4247 else
4248   echo "$as_me:4248: result: no" >&5
4249 echo "${ECHO_T}no" >&6
4250 fi
4251
4252   LD=$ac_ct_LD
4253 else
4254   LD="$ac_cv_prog_LD"
4255 fi
4256
4257 if test -n "$ac_tool_prefix"; then
4258   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4259 set dummy ${ac_tool_prefix}ar; ac_word=$2
4260 echo "$as_me:4260: checking for $ac_word" >&5
4261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4262 if test "${ac_cv_prog_AR+set}" = set; then
4263   echo $ECHO_N "(cached) $ECHO_C" >&6
4264 else
4265   if test -n "$AR"; then
4266   ac_cv_prog_AR="$AR" # Let the user override the test.
4267 else
4268   ac_save_IFS=$IFS; IFS=$ac_path_separator
4269 ac_dummy="$PATH"
4270 for ac_dir in $ac_dummy; do
4271   IFS=$ac_save_IFS
4272   test -z "$ac_dir" && ac_dir=.
4273   $as_executable_p "$ac_dir/$ac_word" || continue
4274 ac_cv_prog_AR="${ac_tool_prefix}ar"
4275 echo "$as_me:4275: found $ac_dir/$ac_word" >&5
4276 break
4277 done
4278
4279 fi
4280 fi
4281 AR=$ac_cv_prog_AR
4282 if test -n "$AR"; then
4283   echo "$as_me:4283: result: $AR" >&5
4284 echo "${ECHO_T}$AR" >&6
4285 else
4286   echo "$as_me:4286: result: no" >&5
4287 echo "${ECHO_T}no" >&6
4288 fi
4289
4290 fi
4291 if test -z "$ac_cv_prog_AR"; then
4292   ac_ct_AR=$AR
4293   # Extract the first word of "ar", so it can be a program name with args.
4294 set dummy ar; ac_word=$2
4295 echo "$as_me:4295: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$ac_ct_AR"; then
4301   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4302 else
4303   ac_save_IFS=$IFS; IFS=$ac_path_separator
4304 ac_dummy="$PATH"
4305 for ac_dir in $ac_dummy; do
4306   IFS=$ac_save_IFS
4307   test -z "$ac_dir" && ac_dir=.
4308   $as_executable_p "$ac_dir/$ac_word" || continue
4309 ac_cv_prog_ac_ct_AR="ar"
4310 echo "$as_me:4310: found $ac_dir/$ac_word" >&5
4311 break
4312 done
4313
4314   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4315 fi
4316 fi
4317 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4318 if test -n "$ac_ct_AR"; then
4319   echo "$as_me:4319: result: $ac_ct_AR" >&5
4320 echo "${ECHO_T}$ac_ct_AR" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326   AR=$ac_ct_AR
4327 else
4328   AR="$ac_cv_prog_AR"
4329 fi
4330
4331 if test -n "$ac_tool_prefix"; then
4332   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4333 set dummy ${ac_tool_prefix}nm; ac_word=$2
4334 echo "$as_me:4334: checking for $ac_word" >&5
4335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4336 if test "${ac_cv_prog_NM+set}" = set; then
4337   echo $ECHO_N "(cached) $ECHO_C" >&6
4338 else
4339   if test -n "$NM"; then
4340   ac_cv_prog_NM="$NM" # Let the user override the test.
4341 else
4342   ac_save_IFS=$IFS; IFS=$ac_path_separator
4343 ac_dummy="$PATH"
4344 for ac_dir in $ac_dummy; do
4345   IFS=$ac_save_IFS
4346   test -z "$ac_dir" && ac_dir=.
4347   $as_executable_p "$ac_dir/$ac_word" || continue
4348 ac_cv_prog_NM="${ac_tool_prefix}nm"
4349 echo "$as_me:4349: found $ac_dir/$ac_word" >&5
4350 break
4351 done
4352
4353 fi
4354 fi
4355 NM=$ac_cv_prog_NM
4356 if test -n "$NM"; then
4357   echo "$as_me:4357: result: $NM" >&5
4358 echo "${ECHO_T}$NM" >&6
4359 else
4360   echo "$as_me:4360: result: no" >&5
4361 echo "${ECHO_T}no" >&6
4362 fi
4363
4364 fi
4365 if test -z "$ac_cv_prog_NM"; then
4366   ac_ct_NM=$NM
4367   # Extract the first word of "nm", so it can be a program name with args.
4368 set dummy nm; ac_word=$2
4369 echo "$as_me:4369: checking for $ac_word" >&5
4370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4371 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4372   echo $ECHO_N "(cached) $ECHO_C" >&6
4373 else
4374   if test -n "$ac_ct_NM"; then
4375   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4376 else
4377   ac_save_IFS=$IFS; IFS=$ac_path_separator
4378 ac_dummy="$PATH"
4379 for ac_dir in $ac_dummy; do
4380   IFS=$ac_save_IFS
4381   test -z "$ac_dir" && ac_dir=.
4382   $as_executable_p "$ac_dir/$ac_word" || continue
4383 ac_cv_prog_ac_ct_NM="nm"
4384 echo "$as_me:4384: found $ac_dir/$ac_word" >&5
4385 break
4386 done
4387
4388   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4389 fi
4390 fi
4391 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4392 if test -n "$ac_ct_NM"; then
4393   echo "$as_me:4393: result: $ac_ct_NM" >&5
4394 echo "${ECHO_T}$ac_ct_NM" >&6
4395 else
4396   echo "$as_me:4396: result: no" >&5
4397 echo "${ECHO_T}no" >&6
4398 fi
4399
4400   NM=$ac_ct_NM
4401 else
4402   NM="$ac_cv_prog_NM"
4403 fi
4404
4405 if test -n "$ac_tool_prefix"; then
4406   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4407 set dummy ${ac_tool_prefix}ar; ac_word=$2
4408 echo "$as_me:4408: checking for $ac_word" >&5
4409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4410 if test "${ac_cv_prog_AR+set}" = set; then
4411   echo $ECHO_N "(cached) $ECHO_C" >&6
4412 else
4413   if test -n "$AR"; then
4414   ac_cv_prog_AR="$AR" # Let the user override the test.
4415 else
4416   ac_save_IFS=$IFS; IFS=$ac_path_separator
4417 ac_dummy="$PATH"
4418 for ac_dir in $ac_dummy; do
4419   IFS=$ac_save_IFS
4420   test -z "$ac_dir" && ac_dir=.
4421   $as_executable_p "$ac_dir/$ac_word" || continue
4422 ac_cv_prog_AR="${ac_tool_prefix}ar"
4423 echo "$as_me:4423: found $ac_dir/$ac_word" >&5
4424 break
4425 done
4426
4427 fi
4428 fi
4429 AR=$ac_cv_prog_AR
4430 if test -n "$AR"; then
4431   echo "$as_me:4431: result: $AR" >&5
4432 echo "${ECHO_T}$AR" >&6
4433 else
4434   echo "$as_me:4434: result: no" >&5
4435 echo "${ECHO_T}no" >&6
4436 fi
4437
4438 fi
4439 if test -z "$ac_cv_prog_AR"; then
4440   ac_ct_AR=$AR
4441   # Extract the first word of "ar", so it can be a program name with args.
4442 set dummy ar; ac_word=$2
4443 echo "$as_me:4443: checking for $ac_word" >&5
4444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4445 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4446   echo $ECHO_N "(cached) $ECHO_C" >&6
4447 else
4448   if test -n "$ac_ct_AR"; then
4449   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4450 else
4451   ac_save_IFS=$IFS; IFS=$ac_path_separator
4452 ac_dummy="$PATH"
4453 for ac_dir in $ac_dummy; do
4454   IFS=$ac_save_IFS
4455   test -z "$ac_dir" && ac_dir=.
4456   $as_executable_p "$ac_dir/$ac_word" || continue
4457 ac_cv_prog_ac_ct_AR="ar"
4458 echo "$as_me:4458: found $ac_dir/$ac_word" >&5
4459 break
4460 done
4461
4462   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4463 fi
4464 fi
4465 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4466 if test -n "$ac_ct_AR"; then
4467   echo "$as_me:4467: result: $ac_ct_AR" >&5
4468 echo "${ECHO_T}$ac_ct_AR" >&6
4469 else
4470   echo "$as_me:4470: result: no" >&5
4471 echo "${ECHO_T}no" >&6
4472 fi
4473
4474   AR=$ac_ct_AR
4475 else
4476   AR="$ac_cv_prog_AR"
4477 fi
4478
4479 echo "$as_me:4479: checking for options to update archives" >&5
4480 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4481 if test "${cf_cv_ar_flags+set}" = set; then
4482   echo $ECHO_N "(cached) $ECHO_C" >&6
4483 else
4484
4485         cf_cv_ar_flags=unknown
4486         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4487         do
4488
4489                 # check if $ARFLAGS already contains this choice
4490                 if test "x$ARFLAGS" != "x" ; then
4491                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4492                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4493                                 cf_cv_ar_flags=
4494                                 break
4495                         fi
4496                 fi
4497
4498                 rm -f conftest.$ac_cv_objext
4499                 rm -f conftest.a
4500
4501                 cat >conftest.$ac_ext <<EOF
4502 #line 4502 "configure"
4503 int     testdata[3] = { 123, 456, 789 };
4504 EOF
4505                 if { (eval echo "$as_me:4505: \"$ac_compile\"") >&5
4506   (eval $ac_compile) 2>&5
4507   ac_status=$?
4508   echo "$as_me:4508: \$? = $ac_status" >&5
4509   (exit $ac_status); } ; then
4510                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4511                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4512                         if test -f conftest.a ; then
4513                                 cf_cv_ar_flags=$cf_ar_flags
4514                                 break
4515                         fi
4516                 else
4517                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4518
4519 echo "${as_me:-configure}:4519: testing cannot compile test-program ..." 1>&5
4520
4521                         break
4522                 fi
4523         done
4524         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4525
4526 fi
4527 echo "$as_me:4527: result: $cf_cv_ar_flags" >&5
4528 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4529
4530 if test -n "$ARFLAGS" ; then
4531         if test -n "$cf_cv_ar_flags" ; then
4532                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4533         fi
4534 else
4535         ARFLAGS=$cf_cv_ar_flags
4536 fi
4537
4538 echo "$as_me:4538: checking if you have specified an install-prefix" >&5
4539 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4540
4541 # Check whether --with-install-prefix or --without-install-prefix was given.
4542 if test "${with_install_prefix+set}" = set; then
4543   withval="$with_install_prefix"
4544   case "x$withval" in
4545         (xyes|xno)
4546                 ;;
4547         (*)     DESTDIR="$withval"
4548                 ;;
4549         esac
4550 fi;
4551 echo "$as_me:4551: result: $DESTDIR" >&5
4552 echo "${ECHO_T}$DESTDIR" >&6
4553
4554 ###############################################################################
4555
4556 # If we're cross-compiling, allow the user to override the tools and their
4557 # options.  The configure script is oriented toward identifying the host
4558 # compiler, etc., but we need a build compiler to generate parts of the source.
4559
4560 if test "$cross_compiling" = yes ; then
4561
4562         # defaults that we might want to override
4563         : ${BUILD_CFLAGS:=''}
4564         : ${BUILD_CPPFLAGS:=''}
4565         : ${BUILD_LDFLAGS:=''}
4566         : ${BUILD_LIBS:=''}
4567         : ${BUILD_EXEEXT:='$x'}
4568         : ${BUILD_OBJEXT:='o'}
4569
4570 # Check whether --with-build-cc or --without-build-cc was given.
4571 if test "${with_build_cc+set}" = set; then
4572   withval="$with_build_cc"
4573   BUILD_CC="$withval"
4574 else
4575   for ac_prog in gcc cc cl
4576 do
4577   # Extract the first word of "$ac_prog", so it can be a program name with args.
4578 set dummy $ac_prog; ac_word=$2
4579 echo "$as_me:4579: checking for $ac_word" >&5
4580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4581 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4582   echo $ECHO_N "(cached) $ECHO_C" >&6
4583 else
4584   if test -n "$BUILD_CC"; then
4585   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4586 else
4587   ac_save_IFS=$IFS; IFS=$ac_path_separator
4588 ac_dummy="$PATH"
4589 for ac_dir in $ac_dummy; do
4590   IFS=$ac_save_IFS
4591   test -z "$ac_dir" && ac_dir=.
4592   $as_executable_p "$ac_dir/$ac_word" || continue
4593 ac_cv_prog_BUILD_CC="$ac_prog"
4594 echo "$as_me:4594: found $ac_dir/$ac_word" >&5
4595 break
4596 done
4597
4598 fi
4599 fi
4600 BUILD_CC=$ac_cv_prog_BUILD_CC
4601 if test -n "$BUILD_CC"; then
4602   echo "$as_me:4602: result: $BUILD_CC" >&5
4603 echo "${ECHO_T}$BUILD_CC" >&6
4604 else
4605   echo "$as_me:4605: result: no" >&5
4606 echo "${ECHO_T}no" >&6
4607 fi
4608
4609   test -n "$BUILD_CC" && break
4610 done
4611
4612 fi;
4613         echo "$as_me:4613: checking for native build C compiler" >&5
4614 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4615         echo "$as_me:4615: result: $BUILD_CC" >&5
4616 echo "${ECHO_T}$BUILD_CC" >&6
4617
4618         echo "$as_me:4618: checking for native build C preprocessor" >&5
4619 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4620
4621 # Check whether --with-build-cpp or --without-build-cpp was given.
4622 if test "${with_build_cpp+set}" = set; then
4623   withval="$with_build_cpp"
4624   BUILD_CPP="$withval"
4625 else
4626   BUILD_CPP='${BUILD_CC} -E'
4627 fi;
4628         echo "$as_me:4628: result: $BUILD_CPP" >&5
4629 echo "${ECHO_T}$BUILD_CPP" >&6
4630
4631         echo "$as_me:4631: checking for native build C flags" >&5
4632 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4633
4634 # Check whether --with-build-cflags or --without-build-cflags was given.
4635 if test "${with_build_cflags+set}" = set; then
4636   withval="$with_build_cflags"
4637   BUILD_CFLAGS="$withval"
4638 fi;
4639         echo "$as_me:4639: result: $BUILD_CFLAGS" >&5
4640 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4641
4642         echo "$as_me:4642: checking for native build C preprocessor-flags" >&5
4643 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4644
4645 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4646 if test "${with_build_cppflags+set}" = set; then
4647   withval="$with_build_cppflags"
4648   BUILD_CPPFLAGS="$withval"
4649 fi;
4650         echo "$as_me:4650: result: $BUILD_CPPFLAGS" >&5
4651 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4652
4653         echo "$as_me:4653: checking for native build linker-flags" >&5
4654 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4655
4656 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4657 if test "${with_build_ldflags+set}" = set; then
4658   withval="$with_build_ldflags"
4659   BUILD_LDFLAGS="$withval"
4660 fi;
4661         echo "$as_me:4661: result: $BUILD_LDFLAGS" >&5
4662 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4663
4664         echo "$as_me:4664: checking for native build linker-libraries" >&5
4665 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4666
4667 # Check whether --with-build-libs or --without-build-libs was given.
4668 if test "${with_build_libs+set}" = set; then
4669   withval="$with_build_libs"
4670   BUILD_LIBS="$withval"
4671 fi;
4672         echo "$as_me:4672: result: $BUILD_LIBS" >&5
4673 echo "${ECHO_T}$BUILD_LIBS" >&6
4674
4675         # this assumes we're on Unix.
4676         BUILD_EXEEXT=
4677         BUILD_OBJEXT=o
4678
4679         : ${BUILD_CC:='${CC}'}
4680
4681         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4682                 { { echo "$as_me:4682: error: Cross-build requires two compilers.
4683 Use --with-build-cc to specify the native compiler." >&5
4684 echo "$as_me: error: Cross-build requires two compilers.
4685 Use --with-build-cc to specify the native compiler." >&2;}
4686    { (exit 1); exit 1; }; }
4687         fi
4688
4689 else
4690         : ${BUILD_CC:='${CC}'}
4691         : ${BUILD_CPP:='${CPP}'}
4692         : ${BUILD_CFLAGS:='${CFLAGS}'}
4693         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4694         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4695         : ${BUILD_LIBS:='${LIBS}'}
4696         : ${BUILD_EXEEXT:='$x'}
4697         : ${BUILD_OBJEXT:='o'}
4698 fi
4699
4700 ###############################################################################
4701
4702 ### Options to allow the user to specify the set of libraries which are used.
4703 ### Use "--without-normal --with-shared" to allow the default model to be
4704 ### shared, for example.
4705 cf_list_models=""
4706
4707 echo "$as_me:4707: checking if libtool -version-number should be used" >&5
4708 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4709
4710 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4711 if test "${enable_libtool_version+set}" = set; then
4712   enableval="$enable_libtool_version"
4713   test "$enableval" != no && enableval=yes
4714         if test "$enableval" != "yes" ; then
4715     cf_libtool_version=no
4716         else
4717                 cf_libtool_version=yes
4718         fi
4719 else
4720   enableval=yes
4721         cf_libtool_version=yes
4722
4723 fi;
4724 echo "$as_me:4724: result: $cf_libtool_version" >&5
4725 echo "${ECHO_T}$cf_libtool_version" >&6
4726
4727 if test "$cf_libtool_version" = yes ; then
4728         LIBTOOL_VERSION="-version-number"
4729 else
4730         LIBTOOL_VERSION="-version-info"
4731         case "x$VERSION" in
4732         (x)
4733                 { echo "$as_me:4733: WARNING: VERSION was not set" >&5
4734 echo "$as_me: WARNING: VERSION was not set" >&2;}
4735                 ;;
4736         (x*.*.*)
4737                 ABI_VERSION="$VERSION"
4738                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4739
4740 echo "${as_me:-configure}:4740: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4741
4742                 ;;
4743         (x*:*:*)
4744                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4745                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4746
4747 echo "${as_me:-configure}:4747: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4748
4749                 ;;
4750         (*)
4751                 { echo "$as_me:4751: WARNING: unexpected VERSION value: $VERSION" >&5
4752 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4753                 ;;
4754         esac
4755 fi
4756
4757 LIBTOOL=
4758
4759 # common library maintenance symbols that are convenient for libtool scripts:
4760 LIB_CREATE='${AR} -cr'
4761 LIB_OBJECT='${OBJECTS}'
4762 LIB_SUFFIX=.a
4763 LIB_PREP="$RANLIB"
4764
4765 # symbols used to prop libtool up to enable it to determine what it should be
4766 # doing:
4767 LIB_CLEAN=
4768 LIB_COMPILE=
4769 LIB_LINK='${CC}'
4770 LIB_INSTALL=
4771 LIB_UNINSTALL=
4772
4773 echo "$as_me:4773: checking if you want to build libraries with libtool" >&5
4774 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4775
4776 # Check whether --with-libtool or --without-libtool was given.
4777 if test "${with_libtool+set}" = set; then
4778   withval="$with_libtool"
4779   with_libtool=$withval
4780 else
4781   with_libtool=no
4782 fi;
4783 echo "$as_me:4783: result: $with_libtool" >&5
4784 echo "${ECHO_T}$with_libtool" >&6
4785 if test "$with_libtool" != "no"; then
4786
4787         if test "$with_libtool" != "yes" ; then
4788
4789 if test "x$prefix" != xNONE; then
4790         cf_path_syntax="$prefix"
4791 else
4792         cf_path_syntax="$ac_default_prefix"
4793 fi
4794
4795 case ".$with_libtool" in
4796 (.\$\(*\)*|.\'*\'*)
4797         ;;
4798 (..|./*|.\\*)
4799         ;;
4800 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4801         ;;
4802 (.\${*prefix}*|.\${*dir}*)
4803         eval with_libtool="$with_libtool"
4804         case ".$with_libtool" in
4805         (.NONE/*)
4806                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4807                 ;;
4808         esac
4809         ;;
4810 (.no|.NONE/*)
4811         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4812         ;;
4813 (*)
4814         { { echo "$as_me:4814: error: expected a pathname, not \"$with_libtool\"" >&5
4815 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4816    { (exit 1); exit 1; }; }
4817         ;;
4818 esac
4819
4820                 LIBTOOL=$with_libtool
4821         else
4822                 if test -n "$ac_tool_prefix"; then
4823   for ac_prog in libtool glibtool
4824   do
4825     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4827 echo "$as_me:4827: checking for $ac_word" >&5
4828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4829 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4830   echo $ECHO_N "(cached) $ECHO_C" >&6
4831 else
4832   if test -n "$LIBTOOL"; then
4833   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4834 else
4835   ac_save_IFS=$IFS; IFS=$ac_path_separator
4836 ac_dummy="$PATH"
4837 for ac_dir in $ac_dummy; do
4838   IFS=$ac_save_IFS
4839   test -z "$ac_dir" && ac_dir=.
4840   $as_executable_p "$ac_dir/$ac_word" || continue
4841 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4842 echo "$as_me:4842: found $ac_dir/$ac_word" >&5
4843 break
4844 done
4845
4846 fi
4847 fi
4848 LIBTOOL=$ac_cv_prog_LIBTOOL
4849 if test -n "$LIBTOOL"; then
4850   echo "$as_me:4850: result: $LIBTOOL" >&5
4851 echo "${ECHO_T}$LIBTOOL" >&6
4852 else
4853   echo "$as_me:4853: result: no" >&5
4854 echo "${ECHO_T}no" >&6
4855 fi
4856
4857     test -n "$LIBTOOL" && break
4858   done
4859 fi
4860 if test -z "$LIBTOOL"; then
4861   ac_ct_LIBTOOL=$LIBTOOL
4862   for ac_prog in libtool glibtool
4863 do
4864   # Extract the first word of "$ac_prog", so it can be a program name with args.
4865 set dummy $ac_prog; ac_word=$2
4866 echo "$as_me:4866: checking for $ac_word" >&5
4867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4868 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4869   echo $ECHO_N "(cached) $ECHO_C" >&6
4870 else
4871   if test -n "$ac_ct_LIBTOOL"; then
4872   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4873 else
4874   ac_save_IFS=$IFS; IFS=$ac_path_separator
4875 ac_dummy="$PATH"
4876 for ac_dir in $ac_dummy; do
4877   IFS=$ac_save_IFS
4878   test -z "$ac_dir" && ac_dir=.
4879   $as_executable_p "$ac_dir/$ac_word" || continue
4880 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4881 echo "$as_me:4881: found $ac_dir/$ac_word" >&5
4882 break
4883 done
4884
4885 fi
4886 fi
4887 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4888 if test -n "$ac_ct_LIBTOOL"; then
4889   echo "$as_me:4889: result: $ac_ct_LIBTOOL" >&5
4890 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4891 else
4892   echo "$as_me:4892: result: no" >&5
4893 echo "${ECHO_T}no" >&6
4894 fi
4895
4896   test -n "$ac_ct_LIBTOOL" && break
4897 done
4898 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4899
4900   LIBTOOL=$ac_ct_LIBTOOL
4901 fi
4902
4903 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4904 then
4905         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.].*//'`
4906 else
4907         cf_cv_libtool_version=
4908 fi
4909 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4910
4911                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4912                 then
4913
4914 unset ac_cv_prog_ac_ct_LIBTOOL
4915 unset ac_ct_LIBTOOL
4916 unset LIBTOOL
4917
4918                         if test -n "$ac_tool_prefix"; then
4919   for ac_prog in glibtool
4920   do
4921     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4922 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4923 echo "$as_me:4923: checking for $ac_word" >&5
4924 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4925 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4926   echo $ECHO_N "(cached) $ECHO_C" >&6
4927 else
4928   if test -n "$LIBTOOL"; then
4929   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4930 else
4931   ac_save_IFS=$IFS; IFS=$ac_path_separator
4932 ac_dummy="$PATH"
4933 for ac_dir in $ac_dummy; do
4934   IFS=$ac_save_IFS
4935   test -z "$ac_dir" && ac_dir=.
4936   $as_executable_p "$ac_dir/$ac_word" || continue
4937 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4938 echo "$as_me:4938: found $ac_dir/$ac_word" >&5
4939 break
4940 done
4941
4942 fi
4943 fi
4944 LIBTOOL=$ac_cv_prog_LIBTOOL
4945 if test -n "$LIBTOOL"; then
4946   echo "$as_me:4946: result: $LIBTOOL" >&5
4947 echo "${ECHO_T}$LIBTOOL" >&6
4948 else
4949   echo "$as_me:4949: result: no" >&5
4950 echo "${ECHO_T}no" >&6
4951 fi
4952
4953     test -n "$LIBTOOL" && break
4954   done
4955 fi
4956 if test -z "$LIBTOOL"; then
4957   ac_ct_LIBTOOL=$LIBTOOL
4958   for ac_prog in glibtool
4959 do
4960   # Extract the first word of "$ac_prog", so it can be a program name with args.
4961 set dummy $ac_prog; ac_word=$2
4962 echo "$as_me:4962: checking for $ac_word" >&5
4963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4964 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967   if test -n "$ac_ct_LIBTOOL"; then
4968   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4969 else
4970   ac_save_IFS=$IFS; IFS=$ac_path_separator
4971 ac_dummy="$PATH"
4972 for ac_dir in $ac_dummy; do
4973   IFS=$ac_save_IFS
4974   test -z "$ac_dir" && ac_dir=.
4975   $as_executable_p "$ac_dir/$ac_word" || continue
4976 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4977 echo "$as_me:4977: found $ac_dir/$ac_word" >&5
4978 break
4979 done
4980
4981 fi
4982 fi
4983 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4984 if test -n "$ac_ct_LIBTOOL"; then
4985   echo "$as_me:4985: result: $ac_ct_LIBTOOL" >&5
4986 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4987 else
4988   echo "$as_me:4988: result: no" >&5
4989 echo "${ECHO_T}no" >&6
4990 fi
4991
4992   test -n "$ac_ct_LIBTOOL" && break
4993 done
4994 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4995
4996   LIBTOOL=$ac_ct_LIBTOOL
4997 fi
4998
4999 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5000 then
5001         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.].*//'`
5002 else
5003         cf_cv_libtool_version=
5004 fi
5005 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5006
5007                 fi
5008         fi
5009         if test -z "$LIBTOOL" ; then
5010                 { { echo "$as_me:5010: error: Cannot find libtool" >&5
5011 echo "$as_me: error: Cannot find libtool" >&2;}
5012    { (exit 1); exit 1; }; }
5013         fi
5014         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5015         LIB_OBJECT='${OBJECTS:.o=.lo}'
5016         LIB_SUFFIX=.la
5017         LIB_CLEAN='${LIBTOOL} --mode=clean'
5018         LIB_COMPILE='${LIBTOOL} --mode=compile'
5019         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5020         LIB_INSTALL='${LIBTOOL} --mode=install'
5021         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5022         LIB_PREP=:
5023
5024 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5025 then
5026         echo "$as_me:5026: checking version of $LIBTOOL" >&5
5027 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5028
5029 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5030 then
5031         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.].*//'`
5032 else
5033         cf_cv_libtool_version=
5034 fi
5035 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5036
5037         echo "$as_me:5037: result: $cf_cv_libtool_version" >&5
5038 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5039         if test -z "$cf_cv_libtool_version" ; then
5040                 { { echo "$as_me:5040: error: This is not GNU libtool" >&5
5041 echo "$as_me: error: This is not GNU libtool" >&2;}
5042    { (exit 1); exit 1; }; }
5043         fi
5044 else
5045         { { echo "$as_me:5045: error: GNU libtool has not been found" >&5
5046 echo "$as_me: error: GNU libtool has not been found" >&2;}
5047    { (exit 1); exit 1; }; }
5048 fi
5049
5050         # special hack to add -no-undefined (which libtool should do for itself)
5051         LT_UNDEF=
5052         case "$cf_cv_system_name" in
5053         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5054                 LT_UNDEF=-no-undefined
5055                 ;;
5056         esac
5057
5058         # special hack to add --tag option for C++ compiler
5059         case $cf_cv_libtool_version in
5060         (1.[5-9]*|[2-9].[0-9.a-z]*)
5061                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5062                 LIBTOOL="$LIBTOOL --tag=CC"
5063                 ;;
5064         (*)
5065                 LIBTOOL_CXX="$LIBTOOL"
5066                 ;;
5067         esac
5068 else
5069         LIBTOOL=""
5070         LIBTOOL_CXX=""
5071 fi
5072
5073 test -z "$LIBTOOL" && ECHO_LT=
5074
5075 if test "$with_libtool" != "no" ; then
5076
5077 cf_list_models="$cf_list_models libtool"
5078
5079 else
5080
5081 echo "$as_me:5081: checking if you want to build shared libraries" >&5
5082 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5083
5084 # Check whether --with-shared or --without-shared was given.
5085 if test "${with_shared+set}" = set; then
5086   withval="$with_shared"
5087   with_shared=$withval
5088 else
5089   with_shared=no
5090 fi;
5091 echo "$as_me:5091: result: $with_shared" >&5
5092 echo "${ECHO_T}$with_shared" >&6
5093 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5094
5095 echo "$as_me:5095: checking if you want to build static libraries" >&5
5096 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5097
5098 # Check whether --with-normal or --without-normal was given.
5099 if test "${with_normal+set}" = set; then
5100   withval="$with_normal"
5101   with_normal=$withval
5102 else
5103   with_normal=yes
5104 fi;
5105 echo "$as_me:5105: result: $with_normal" >&5
5106 echo "${ECHO_T}$with_normal" >&6
5107 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5108
5109 echo "$as_me:5109: checking if you want to build debug libraries" >&5
5110 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5111
5112 # Check whether --with-debug or --without-debug was given.
5113 if test "${with_debug+set}" = set; then
5114   withval="$with_debug"
5115   with_debug=$withval
5116 else
5117   with_debug=yes
5118 fi;
5119 echo "$as_me:5119: result: $with_debug" >&5
5120 echo "${ECHO_T}$with_debug" >&6
5121 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5122
5123 echo "$as_me:5123: checking if you want to build profiling libraries" >&5
5124 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5125
5126 # Check whether --with-profile or --without-profile was given.
5127 if test "${with_profile+set}" = set; then
5128   withval="$with_profile"
5129   with_profile=$withval
5130 else
5131   with_profile=no
5132 fi;
5133 echo "$as_me:5133: result: $with_profile" >&5
5134 echo "${ECHO_T}$with_profile" >&6
5135 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5136
5137 fi
5138
5139 if test "X$cf_with_cxx_binding" != Xno; then
5140 if test "x$with_shared" = "xyes"; then
5141 echo "$as_me:5141: checking if you want to build C++ shared libraries" >&5
5142 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5143
5144 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5145 if test "${with_cxx_shared+set}" = set; then
5146   withval="$with_cxx_shared"
5147   with_shared_cxx=$withval
5148 else
5149   with_shared_cxx=no
5150 fi;
5151 echo "$as_me:5151: result: $with_shared_cxx" >&5
5152 echo "${ECHO_T}$with_shared_cxx" >&6
5153 fi
5154 fi
5155
5156 ###############################################################################
5157
5158 echo "$as_me:5158: checking for specified models" >&5
5159 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5160 test -z "$cf_list_models" && cf_list_models=normal
5161 test "$with_libtool" != "no" && cf_list_models=libtool
5162 echo "$as_me:5162: result: $cf_list_models" >&5
5163 echo "${ECHO_T}$cf_list_models" >&6
5164
5165 ### Use the first model as the default, and save its suffix for use in building
5166 ### up test-applications.
5167 echo "$as_me:5167: checking for default model" >&5
5168 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5169 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5170 echo "$as_me:5170: result: $DFT_LWR_MODEL" >&5
5171 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5172
5173 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5174
5175 TICS_NAME=tic
5176
5177 TINFO_NAME=tinfo
5178
5179 LIB_NAME=ncurses
5180
5181 LIB_DIR=../lib
5182 LIB_2ND=../../lib
5183
5184 echo "$as_me:5184: checking if you want to have a library-prefix" >&5
5185 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5186
5187 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5188 if test "${with_lib_prefix+set}" = set; then
5189   withval="$with_lib_prefix"
5190   with_lib_prefix=$withval
5191 else
5192   with_lib_prefix=auto
5193 fi;
5194 echo "$as_me:5194: result: $with_lib_prefix" >&5
5195 echo "${ECHO_T}$with_lib_prefix" >&6
5196
5197 if test $with_lib_prefix = auto
5198 then
5199
5200         case $cf_cv_system_name in
5201         (OS/2*|os2*)
5202                 if test "$DFT_LWR_MODEL" = libtool; then
5203                         LIB_PREFIX='lib'
5204                 else
5205                         LIB_PREFIX=''
5206                 fi
5207                 ;;
5208         (*)     LIB_PREFIX='lib'
5209                 ;;
5210         esac
5211 cf_prefix=$LIB_PREFIX
5212
5213 elif test $with_lib_prefix = no
5214 then
5215         LIB_PREFIX=
5216 else
5217         LIB_PREFIX=$with_lib_prefix
5218 fi
5219
5220 LIB_SUFFIX=
5221
5222         echo "$as_me:5222: checking for PATH separator" >&5
5223 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5224         case $cf_cv_system_name in
5225         (os2*)  PATH_SEPARATOR=';'  ;;
5226         (*)     ${PATH_SEPARATOR:=':'}  ;;
5227         esac
5228
5229         echo "$as_me:5229: result: $PATH_SEPARATOR" >&5
5230 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5231
5232 ###############################################################################
5233
5234 echo "$as_me:5234: checking if you want to build a separate terminfo library" >&5
5235 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5236
5237 # Check whether --with-termlib or --without-termlib was given.
5238 if test "${with_termlib+set}" = set; then
5239   withval="$with_termlib"
5240   with_termlib=$withval
5241 else
5242   with_termlib=no
5243 fi;
5244 echo "$as_me:5244: result: $with_termlib" >&5
5245 echo "${ECHO_T}$with_termlib" >&6
5246
5247 echo "$as_me:5247: checking if you want to build a separate tic library" >&5
5248 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5249
5250 # Check whether --with-ticlib or --without-ticlib was given.
5251 if test "${with_ticlib+set}" = set; then
5252   withval="$with_ticlib"
5253   with_ticlib=$withval
5254 else
5255   with_ticlib=no
5256 fi;
5257 echo "$as_me:5257: result: $with_ticlib" >&5
5258 echo "${ECHO_T}$with_ticlib" >&6
5259
5260 ### Checks for special libraries, must be done up-front.
5261 SHLIB_LIST=""
5262
5263 echo "$as_me:5263: checking if you want to link with the GPM mouse library" >&5
5264 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5265
5266 # Check whether --with-gpm or --without-gpm was given.
5267 if test "${with_gpm+set}" = set; then
5268   withval="$with_gpm"
5269   with_gpm=$withval
5270 else
5271   with_gpm=maybe
5272 fi;
5273 echo "$as_me:5273: result: $with_gpm" >&5
5274 echo "${ECHO_T}$with_gpm" >&6
5275
5276 if test "$with_gpm" != no ; then
5277         echo "$as_me:5277: checking for gpm.h" >&5
5278 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5279 if test "${ac_cv_header_gpm_h+set}" = set; then
5280   echo $ECHO_N "(cached) $ECHO_C" >&6
5281 else
5282   cat >conftest.$ac_ext <<_ACEOF
5283 #line 5283 "configure"
5284 #include "confdefs.h"
5285 #include <gpm.h>
5286 _ACEOF
5287 if { (eval echo "$as_me:5287: \"$ac_cpp conftest.$ac_ext\"") >&5
5288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5289   ac_status=$?
5290   egrep -v '^ *\+' conftest.er1 >conftest.err
5291   rm -f conftest.er1
5292   cat conftest.err >&5
5293   echo "$as_me:5293: \$? = $ac_status" >&5
5294   (exit $ac_status); } >/dev/null; then
5295   if test -s conftest.err; then
5296     ac_cpp_err=$ac_c_preproc_warn_flag
5297   else
5298     ac_cpp_err=
5299   fi
5300 else
5301   ac_cpp_err=yes
5302 fi
5303 if test -z "$ac_cpp_err"; then
5304   ac_cv_header_gpm_h=yes
5305 else
5306   echo "$as_me: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308   ac_cv_header_gpm_h=no
5309 fi
5310 rm -f conftest.err conftest.$ac_ext
5311 fi
5312 echo "$as_me:5312: result: $ac_cv_header_gpm_h" >&5
5313 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5314 if test $ac_cv_header_gpm_h = yes; then
5315
5316 cat >>confdefs.h <<\EOF
5317 #define HAVE_GPM_H 1
5318 EOF
5319
5320                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5321                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5322
5323 echo "${as_me:-configure}:5323: testing assuming we really have GPM library ..." 1>&5
5324
5325 cat >>confdefs.h <<\EOF
5326 #define HAVE_LIBGPM 1
5327 EOF
5328
5329                         with_gpm=yes
5330                 else
5331                         echo "$as_me:5331: checking for Gpm_Open in -lgpm" >&5
5332 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5333 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5334   echo $ECHO_N "(cached) $ECHO_C" >&6
5335 else
5336   ac_check_lib_save_LIBS=$LIBS
5337 LIBS="-lgpm  $LIBS"
5338 cat >conftest.$ac_ext <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341
5342 /* Override any gcc2 internal prototype to avoid an error.  */
5343 #ifdef __cplusplus
5344 extern "C"
5345 #endif
5346 /* We use char because int might match the return type of a gcc2
5347    builtin and then its argument prototype would still apply.  */
5348 char Gpm_Open ();
5349 int
5350 main (void)
5351 {
5352 Gpm_Open ();
5353   ;
5354   return 0;
5355 }
5356 _ACEOF
5357 rm -f conftest.$ac_objext conftest$ac_exeext
5358 if { (eval echo "$as_me:5358: \"$ac_link\"") >&5
5359   (eval $ac_link) 2>&5
5360   ac_status=$?
5361   echo "$as_me:5361: \$? = $ac_status" >&5
5362   (exit $ac_status); } &&
5363          { ac_try='test -s conftest$ac_exeext'
5364   { (eval echo "$as_me:5364: \"$ac_try\"") >&5
5365   (eval $ac_try) 2>&5
5366   ac_status=$?
5367   echo "$as_me:5367: \$? = $ac_status" >&5
5368   (exit $ac_status); }; }; then
5369   ac_cv_lib_gpm_Gpm_Open=yes
5370 else
5371   echo "$as_me: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5373 ac_cv_lib_gpm_Gpm_Open=no
5374 fi
5375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5376 LIBS=$ac_check_lib_save_LIBS
5377 fi
5378 echo "$as_me:5378: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5379 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5380 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5381   with_gpm=yes
5382 else
5383
5384                                 if test "$with_gpm" = maybe; then
5385                                         { echo "$as_me:5385: WARNING: Cannot link with GPM library" >&5
5386 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5387                                         with_gpm=no
5388                                 else
5389                                         { { echo "$as_me:5389: error: Cannot link with GPM library" >&5
5390 echo "$as_me: error: Cannot link with GPM library" >&2;}
5391    { (exit 1); exit 1; }; }
5392                                 fi
5393
5394 fi
5395
5396                 fi
5397
5398 else
5399
5400                 test "$with_gpm" != maybe && { echo "$as_me:5400: WARNING: Cannot find GPM header" >&5
5401 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5402                 with_gpm=no
5403
5404 fi
5405
5406 fi
5407
5408 if test "$with_gpm" != no ; then
5409         echo "$as_me:5409: checking if you want to load GPM dynamically" >&5
5410 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5411
5412 # Check whether --with-dlsym or --without-dlsym was given.
5413 if test "${with_dlsym+set}" = set; then
5414   withval="$with_dlsym"
5415   with_dlsym=$withval
5416 else
5417   with_dlsym=yes
5418 fi;
5419         echo "$as_me:5419: result: $with_dlsym" >&5
5420 echo "${ECHO_T}$with_dlsym" >&6
5421         if test "x$with_dlsym" = xyes ; then
5422
5423 cf_have_dlsym=no
5424 echo "$as_me:5424: checking for dlsym" >&5
5425 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5426 if test "${ac_cv_func_dlsym+set}" = set; then
5427   echo $ECHO_N "(cached) $ECHO_C" >&6
5428 else
5429   cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432 /* System header to define __stub macros and hopefully few prototypes,
5433     which can conflict with char dlsym (); below.  */
5434 #include <assert.h>
5435 /* Override any gcc2 internal prototype to avoid an error.  */
5436 #ifdef __cplusplus
5437 extern "C"
5438 #endif
5439 /* We use char because int might match the return type of a gcc2
5440    builtin and then its argument prototype would still apply.  */
5441 char dlsym ();
5442 char (*f) ();
5443
5444 int
5445 main (void)
5446 {
5447 /* The GNU C library defines this for functions which it implements
5448     to always fail with ENOSYS.  Some functions are actually named
5449     something starting with __ and the normal name is an alias.  */
5450 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5451 choke me
5452 #else
5453 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5454 #endif
5455
5456   ;
5457   return 0;
5458 }
5459 _ACEOF
5460 rm -f conftest.$ac_objext conftest$ac_exeext
5461 if { (eval echo "$as_me:5461: \"$ac_link\"") >&5
5462   (eval $ac_link) 2>&5
5463   ac_status=$?
5464   echo "$as_me:5464: \$? = $ac_status" >&5
5465   (exit $ac_status); } &&
5466          { ac_try='test -s conftest$ac_exeext'
5467   { (eval echo "$as_me:5467: \"$ac_try\"") >&5
5468   (eval $ac_try) 2>&5
5469   ac_status=$?
5470   echo "$as_me:5470: \$? = $ac_status" >&5
5471   (exit $ac_status); }; }; then
5472   ac_cv_func_dlsym=yes
5473 else
5474   echo "$as_me: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5476 ac_cv_func_dlsym=no
5477 fi
5478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5479 fi
5480 echo "$as_me:5480: result: $ac_cv_func_dlsym" >&5
5481 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5482 if test $ac_cv_func_dlsym = yes; then
5483   cf_have_dlsym=yes
5484 else
5485
5486 cf_have_libdl=no
5487 echo "$as_me:5487: checking for dlsym in -ldl" >&5
5488 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5489 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5490   echo $ECHO_N "(cached) $ECHO_C" >&6
5491 else
5492   ac_check_lib_save_LIBS=$LIBS
5493 LIBS="-ldl  $LIBS"
5494 cat >conftest.$ac_ext <<_ACEOF
5495 #line 5495 "configure"
5496 #include "confdefs.h"
5497
5498 /* Override any gcc2 internal prototype to avoid an error.  */
5499 #ifdef __cplusplus
5500 extern "C"
5501 #endif
5502 /* We use char because int might match the return type of a gcc2
5503    builtin and then its argument prototype would still apply.  */
5504 char dlsym ();
5505 int
5506 main (void)
5507 {
5508 dlsym ();
5509   ;
5510   return 0;
5511 }
5512 _ACEOF
5513 rm -f conftest.$ac_objext conftest$ac_exeext
5514 if { (eval echo "$as_me:5514: \"$ac_link\"") >&5
5515   (eval $ac_link) 2>&5
5516   ac_status=$?
5517   echo "$as_me:5517: \$? = $ac_status" >&5
5518   (exit $ac_status); } &&
5519          { ac_try='test -s conftest$ac_exeext'
5520   { (eval echo "$as_me:5520: \"$ac_try\"") >&5
5521   (eval $ac_try) 2>&5
5522   ac_status=$?
5523   echo "$as_me:5523: \$? = $ac_status" >&5
5524   (exit $ac_status); }; }; then
5525   ac_cv_lib_dl_dlsym=yes
5526 else
5527   echo "$as_me: failed program was:" >&5
5528 cat conftest.$ac_ext >&5
5529 ac_cv_lib_dl_dlsym=no
5530 fi
5531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5532 LIBS=$ac_check_lib_save_LIBS
5533 fi
5534 echo "$as_me:5534: result: $ac_cv_lib_dl_dlsym" >&5
5535 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5536 if test $ac_cv_lib_dl_dlsym = yes; then
5537
5538         cf_have_dlsym=yes
5539         cf_have_libdl=yes
5540 fi
5541
5542 fi
5543
5544 if test "$cf_have_dlsym" = yes ; then
5545         test "$cf_have_libdl" = yes && {
5546 cf_add_libs="-ldl"
5547 # Filter out duplicates - this happens with badly-designed ".pc" files...
5548 for cf_add_1lib in $LIBS
5549 do
5550         for cf_add_2lib in $cf_add_libs
5551         do
5552                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5553                 then
5554                         cf_add_1lib=
5555                         break
5556                 fi
5557         done
5558         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5559 done
5560 LIBS="$cf_add_libs"
5561  }
5562
5563         echo "$as_me:5563: checking whether able to link to dl*() functions" >&5
5564 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5565         cat >conftest.$ac_ext <<_ACEOF
5566 #line 5566 "configure"
5567 #include "confdefs.h"
5568 #include <dlfcn.h>
5569 int
5570 main (void)
5571 {
5572
5573                 void *obj;
5574                 if ((obj = dlopen("filename", 0)) != 0) {
5575                         if (dlsym(obj, "symbolname") == 0) {
5576                         dlclose(obj);
5577                         }
5578                 }
5579   ;
5580   return 0;
5581 }
5582 _ACEOF
5583 rm -f conftest.$ac_objext conftest$ac_exeext
5584 if { (eval echo "$as_me:5584: \"$ac_link\"") >&5
5585   (eval $ac_link) 2>&5
5586   ac_status=$?
5587   echo "$as_me:5587: \$? = $ac_status" >&5
5588   (exit $ac_status); } &&
5589          { ac_try='test -s conftest$ac_exeext'
5590   { (eval echo "$as_me:5590: \"$ac_try\"") >&5
5591   (eval $ac_try) 2>&5
5592   ac_status=$?
5593   echo "$as_me:5593: \$? = $ac_status" >&5
5594   (exit $ac_status); }; }; then
5595
5596 cat >>confdefs.h <<\EOF
5597 #define HAVE_LIBDL 1
5598 EOF
5599
5600 else
5601   echo "$as_me: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603
5604                 { { echo "$as_me:5604: error: Cannot link test program for libdl" >&5
5605 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5606    { (exit 1); exit 1; }; }
5607 fi
5608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5609         echo "$as_me:5609: result: ok" >&5
5610 echo "${ECHO_T}ok" >&6
5611 else
5612         { { echo "$as_me:5612: error: Cannot find dlsym function" >&5
5613 echo "$as_me: error: Cannot find dlsym function" >&2;}
5614    { (exit 1); exit 1; }; }
5615 fi
5616
5617                 if test "x$with_gpm" != xyes ; then
5618                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5619
5620 echo "${as_me:-configure}:5620: testing assuming soname for gpm is $with_gpm ..." 1>&5
5621
5622                         cf_cv_gpm_soname="$with_gpm"
5623                 else
5624
5625 echo "$as_me:5625: checking for soname of gpm library" >&5
5626 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5627 if test "${cf_cv_gpm_soname+set}" = set; then
5628   echo $ECHO_N "(cached) $ECHO_C" >&6
5629 else
5630
5631 cf_cv_gpm_soname=unknown
5632 if test "$cross_compiling" != yes ; then
5633 cat >conftest.$ac_ext <<CF_EOF
5634 #include <gpm.h>
5635 int main(void)
5636 {
5637 if (Gpm_Open(0,0)) Gpm_Close();
5638         ${cf_cv_main_return:-return}(0);
5639 }
5640 CF_EOF
5641 cf_save_LIBS="$LIBS"
5642
5643 cf_add_libs="-lgpm"
5644 # Filter out duplicates - this happens with badly-designed ".pc" files...
5645 for cf_add_1lib in $LIBS
5646 do
5647         for cf_add_2lib in $cf_add_libs
5648         do
5649                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5650                 then
5651                         cf_add_1lib=
5652                         break
5653                 fi
5654         done
5655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5656 done
5657 LIBS="$cf_add_libs"
5658
5659         if { (eval echo "$as_me:5659: \"$ac_compile\"") >&5
5660   (eval $ac_compile) 2>&5
5661   ac_status=$?
5662   echo "$as_me:5662: \$? = $ac_status" >&5
5663   (exit $ac_status); } ; then
5664                 if { (eval echo "$as_me:5664: \"$ac_link\"") >&5
5665   (eval $ac_link) 2>&5
5666   ac_status=$?
5667   echo "$as_me:5667: \$? = $ac_status" >&5
5668   (exit $ac_status); } ; then
5669                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5670                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5671                 fi
5672         fi
5673 rm -rf conftest*
5674 LIBS="$cf_save_LIBS"
5675 fi
5676
5677 fi
5678 echo "$as_me:5678: result: $cf_cv_gpm_soname" >&5
5679 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5680
5681                 fi
5682                 test "$cf_cv_gpm_soname" != "unknown" &&
5683 cat >>confdefs.h <<EOF
5684 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5685 EOF
5686
5687                 SHLIB_LIST="-ldl $SHLIB_LIST"
5688         else
5689                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5690
5691 cf_add_libs="-lgpm"
5692 # Filter out duplicates - this happens with badly-designed ".pc" files...
5693 for cf_add_1lib in $TEST_LIBS
5694 do
5695         for cf_add_2lib in $cf_add_libs
5696         do
5697                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5698                 then
5699                         cf_add_1lib=
5700                         break
5701                 fi
5702         done
5703         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5704 done
5705 TEST_LIBS="$cf_add_libs"
5706
5707         fi
5708
5709 cat >>confdefs.h <<\EOF
5710 #define HAVE_LIBGPM 1
5711 EOF
5712
5713 echo "$as_me:5713: checking for Gpm_Wgetch in -lgpm" >&5
5714 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5715 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5716   echo $ECHO_N "(cached) $ECHO_C" >&6
5717 else
5718   ac_check_lib_save_LIBS=$LIBS
5719 LIBS="-lgpm  $LIBS"
5720 cat >conftest.$ac_ext <<_ACEOF
5721 #line 5721 "configure"
5722 #include "confdefs.h"
5723
5724 /* Override any gcc2 internal prototype to avoid an error.  */
5725 #ifdef __cplusplus
5726 extern "C"
5727 #endif
5728 /* We use char because int might match the return type of a gcc2
5729    builtin and then its argument prototype would still apply.  */
5730 char Gpm_Wgetch ();
5731 int
5732 main (void)
5733 {
5734 Gpm_Wgetch ();
5735   ;
5736   return 0;
5737 }
5738 _ACEOF
5739 rm -f conftest.$ac_objext conftest$ac_exeext
5740 if { (eval echo "$as_me:5740: \"$ac_link\"") >&5
5741   (eval $ac_link) 2>&5
5742   ac_status=$?
5743   echo "$as_me:5743: \$? = $ac_status" >&5
5744   (exit $ac_status); } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:5746: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:5749: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   ac_cv_lib_gpm_Gpm_Wgetch=yes
5752 else
5753   echo "$as_me: failed program was:" >&5
5754 cat conftest.$ac_ext >&5
5755 ac_cv_lib_gpm_Gpm_Wgetch=no
5756 fi
5757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5758 LIBS=$ac_check_lib_save_LIBS
5759 fi
5760 echo "$as_me:5760: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5761 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5762 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5763
5764 echo "$as_me:5764: checking if GPM is weakly bound to curses library" >&5
5765 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5766 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5767   echo $ECHO_N "(cached) $ECHO_C" >&6
5768 else
5769
5770 cf_cv_check_gpm_wgetch=unknown
5771 if test "$cross_compiling" != yes ; then
5772
5773 cat >conftest.$ac_ext <<CF_EOF
5774 #include <gpm.h>
5775 int main(void)
5776 {
5777         Gpm_Wgetch();
5778         ${cf_cv_main_return:-return}(0);
5779 }
5780 CF_EOF
5781
5782         cf_save_LIBS="$LIBS"
5783         # This only works if we can look at the symbol table.  If a shared
5784         # library is stripped for install, we cannot use that.  So we're forced
5785         # to rely on the static library, noting that some packagers may not
5786         # include it.
5787         LIBS="-static -lgpm -dynamic $LIBS"
5788         if { (eval echo "$as_me:5788: \"$ac_compile\"") >&5
5789   (eval $ac_compile) 2>&5
5790   ac_status=$?
5791   echo "$as_me:5791: \$? = $ac_status" >&5
5792   (exit $ac_status); } ; then
5793                 if { (eval echo "$as_me:5793: \"$ac_link\"") >&5
5794   (eval $ac_link) 2>&5
5795   ac_status=$?
5796   echo "$as_me:5796: \$? = $ac_status" >&5
5797   (exit $ac_status); } ; then
5798                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5799                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5800                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5801                 fi
5802         fi
5803         rm -rf conftest*
5804         LIBS="$cf_save_LIBS"
5805 fi
5806
5807 fi
5808 echo "$as_me:5808: result: $cf_cv_check_gpm_wgetch" >&5
5809 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5810
5811 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5812         { echo "$as_me:5812: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5813 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5814 fi
5815
5816 fi
5817
5818 fi
5819
5820 # not everyone has "test -c"
5821 if test -c /dev/sysmouse 2>/dev/null ; then
5822 echo "$as_me:5822: checking if you want to use sysmouse" >&5
5823 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5824
5825 # Check whether --with-sysmouse or --without-sysmouse was given.
5826 if test "${with_sysmouse+set}" = set; then
5827   withval="$with_sysmouse"
5828   cf_with_sysmouse=$withval
5829 else
5830   cf_with_sysmouse=maybe
5831 fi;
5832         if test "$cf_with_sysmouse" != no ; then
5833         cat >conftest.$ac_ext <<_ACEOF
5834 #line 5834 "configure"
5835 #include "confdefs.h"
5836
5837 #include <osreldate.h>
5838 #if (__FreeBSD_version >= 400017)
5839 #include <sys/consio.h>
5840 #include <sys/fbio.h>
5841 #else
5842 #include <machine/console.h>
5843 #endif
5844
5845 int
5846 main (void)
5847 {
5848
5849         struct mouse_info the_mouse;
5850         ioctl(0, CONS_MOUSECTL, &the_mouse);
5851
5852   ;
5853   return 0;
5854 }
5855 _ACEOF
5856 rm -f conftest.$ac_objext
5857 if { (eval echo "$as_me:5857: \"$ac_compile\"") >&5
5858   (eval $ac_compile) 2>&5
5859   ac_status=$?
5860   echo "$as_me:5860: \$? = $ac_status" >&5
5861   (exit $ac_status); } &&
5862          { ac_try='test -s conftest.$ac_objext'
5863   { (eval echo "$as_me:5863: \"$ac_try\"") >&5
5864   (eval $ac_try) 2>&5
5865   ac_status=$?
5866   echo "$as_me:5866: \$? = $ac_status" >&5
5867   (exit $ac_status); }; }; then
5868   cf_with_sysmouse=yes
5869 else
5870   echo "$as_me: failed program was:" >&5
5871 cat conftest.$ac_ext >&5
5872 cf_with_sysmouse=no
5873 fi
5874 rm -f conftest.$ac_objext conftest.$ac_ext
5875         fi
5876 echo "$as_me:5876: result: $cf_with_sysmouse" >&5
5877 echo "${ECHO_T}$cf_with_sysmouse" >&6
5878 test "$cf_with_sysmouse" = yes &&
5879 cat >>confdefs.h <<\EOF
5880 #define USE_SYSMOUSE 1
5881 EOF
5882
5883 fi
5884
5885 if test X"$CC_G_OPT" = X"" ; then
5886         CC_G_OPT='-g'
5887         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5888 fi
5889
5890 if test X"$CXX_G_OPT" = X"" ; then
5891         CXX_G_OPT='-g'
5892         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5893 fi
5894
5895 echo "$as_me:5895: checking for default loader flags" >&5
5896 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5897 case $DFT_LWR_MODEL in
5898 (libtool) LD_MODEL=''   ;;
5899 (normal)  LD_MODEL=''   ;;
5900 (debug)   LD_MODEL=$CC_G_OPT ;;
5901 (profile) LD_MODEL='-pg';;
5902 (shared)  LD_MODEL=''   ;;
5903 esac
5904 echo "$as_me:5904: result: $LD_MODEL" >&5
5905 echo "${ECHO_T}$LD_MODEL" >&6
5906
5907 case $DFT_LWR_MODEL in
5908 (shared)
5909
5910 echo "$as_me:5910: checking if rpath option should be used" >&5
5911 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5912
5913 # Check whether --enable-rpath or --disable-rpath was given.
5914 if test "${enable_rpath+set}" = set; then
5915   enableval="$enable_rpath"
5916   cf_cv_enable_rpath=$enableval
5917 else
5918   cf_cv_enable_rpath=no
5919 fi;
5920 echo "$as_me:5920: result: $cf_cv_enable_rpath" >&5
5921 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5922
5923 echo "$as_me:5923: checking if shared libraries should be relinked during install" >&5
5924 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5925
5926 # Check whether --enable-relink or --disable-relink was given.
5927 if test "${enable_relink+set}" = set; then
5928   enableval="$enable_relink"
5929   cf_cv_do_relink=$enableval
5930 else
5931   cf_cv_do_relink=yes
5932 fi;
5933 echo "$as_me:5933: result: $cf_cv_do_relink" >&5
5934 echo "${ECHO_T}$cf_cv_do_relink" >&6
5935         ;;
5936 esac
5937
5938 # we will build libraries one-level down.
5939 rel_builddir=..
5940
5941 LD_RPATH_OPT=
5942 echo "$as_me:5942: checking for an rpath option" >&5
5943 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5944 case $cf_cv_system_name in
5945 (irix*)
5946         if test "$GCC" = yes; then
5947                 LD_RPATH_OPT="-Wl,-rpath,"
5948         else
5949                 LD_RPATH_OPT="-rpath "
5950         fi
5951         ;;
5952 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5953         LD_RPATH_OPT="-Wl,-rpath,"
5954         ;;
5955 (openbsd[2-9].*|mirbsd*)
5956         LD_RPATH_OPT="-Wl,-rpath,"
5957         ;;
5958 (dragonfly*)
5959         LD_RPATH_OPT="-rpath "
5960         ;;
5961 (netbsd*)
5962         LD_RPATH_OPT="-Wl,-rpath,"
5963         ;;
5964 (osf*|mls+*)
5965         LD_RPATH_OPT="-rpath "
5966         ;;
5967 (solaris2*)
5968         LD_RPATH_OPT="-R"
5969         ;;
5970 (*)
5971         ;;
5972 esac
5973 echo "$as_me:5973: result: $LD_RPATH_OPT" >&5
5974 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5975
5976 case "x$LD_RPATH_OPT" in
5977 (x-R*)
5978         echo "$as_me:5978: checking if we need a space after rpath option" >&5
5979 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5980         cf_save_LIBS="$LIBS"
5981
5982 cf_add_libs="${LD_RPATH_OPT}$libdir"
5983 # Filter out duplicates - this happens with badly-designed ".pc" files...
5984 for cf_add_1lib in $LIBS
5985 do
5986         for cf_add_2lib in $cf_add_libs
5987         do
5988                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5989                 then
5990                         cf_add_1lib=
5991                         break
5992                 fi
5993         done
5994         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5995 done
5996 LIBS="$cf_add_libs"
5997
5998         cat >conftest.$ac_ext <<_ACEOF
5999 #line 5999 "configure"
6000 #include "confdefs.h"
6001
6002 int
6003 main (void)
6004 {
6005
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 rm -f conftest.$ac_objext conftest$ac_exeext
6011 if { (eval echo "$as_me:6011: \"$ac_link\"") >&5
6012   (eval $ac_link) 2>&5
6013   ac_status=$?
6014   echo "$as_me:6014: \$? = $ac_status" >&5
6015   (exit $ac_status); } &&
6016          { ac_try='test -s conftest$ac_exeext'
6017   { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:6020: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022   cf_rpath_space=no
6023 else
6024   echo "$as_me: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6026 cf_rpath_space=yes
6027 fi
6028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6029         LIBS="$cf_save_LIBS"
6030         echo "$as_me:6030: result: $cf_rpath_space" >&5
6031 echo "${ECHO_T}$cf_rpath_space" >&6
6032         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6033         ;;
6034 esac
6035
6036         RM_SHARED_OPTS=
6037         LOCAL_LDFLAGS=
6038         LOCAL_LDFLAGS2=
6039         LD_SHARED_OPTS=
6040         INSTALL_LIB="-m 644"
6041         : ${rel_builddir:=.}
6042
6043         shlibdir=$libdir
6044
6045         MAKE_DLLS="#"
6046
6047         cf_cv_do_symlinks=no
6048         cf_ld_rpath_opt=
6049         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6050
6051         echo "$as_me:6051: checking if release/abi version should be used for shared libs" >&5
6052 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6053
6054 # Check whether --with-shlib-version or --without-shlib-version was given.
6055 if test "${with_shlib_version+set}" = set; then
6056   withval="$with_shlib_version"
6057   test -z "$withval" && withval=auto
6058         case $withval in
6059         (yes)
6060                 cf_cv_shlib_version=auto
6061                 ;;
6062         (rel|abi|auto)
6063                 cf_cv_shlib_version=$withval
6064                 ;;
6065         (*)
6066                 echo "$as_me:6066: result: $withval" >&5
6067 echo "${ECHO_T}$withval" >&6
6068                 { { echo "$as_me:6068: error: option value must be one of: rel, abi, or auto" >&5
6069 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6070    { (exit 1); exit 1; }; }
6071                 ;;
6072         esac
6073
6074 else
6075   cf_cv_shlib_version=auto
6076 fi;
6077         echo "$as_me:6077: result: $cf_cv_shlib_version" >&5
6078 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6079
6080         cf_cv_rm_so_locs=no
6081         cf_try_cflags=
6082
6083         # Some less-capable ports of gcc support only -fpic
6084         CC_SHARED_OPTS=
6085
6086         cf_try_fPIC=no
6087         if test "$GCC" = yes
6088         then
6089                 cf_try_fPIC=yes
6090         else
6091                 case $cf_cv_system_name in
6092                 (*linux*)       # e.g., PGI compiler
6093                         cf_try_fPIC=yes
6094                         ;;
6095                 esac
6096         fi
6097
6098         if test "$cf_try_fPIC" = yes
6099         then
6100                 echo "$as_me:6100: checking which $CC option to use" >&5
6101 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6102                 cf_save_CFLAGS="$CFLAGS"
6103                 for CC_SHARED_OPTS in -fPIC -fpic ''
6104                 do
6105                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6106                         cat >conftest.$ac_ext <<_ACEOF
6107 #line 6107 "configure"
6108 #include "confdefs.h"
6109 #include <stdio.h>
6110 int
6111 main (void)
6112 {
6113 int x = 1
6114   ;
6115   return 0;
6116 }
6117 _ACEOF
6118 rm -f conftest.$ac_objext
6119 if { (eval echo "$as_me:6119: \"$ac_compile\"") >&5
6120   (eval $ac_compile) 2>&5
6121   ac_status=$?
6122   echo "$as_me:6122: \$? = $ac_status" >&5
6123   (exit $ac_status); } &&
6124          { ac_try='test -s conftest.$ac_objext'
6125   { (eval echo "$as_me:6125: \"$ac_try\"") >&5
6126   (eval $ac_try) 2>&5
6127   ac_status=$?
6128   echo "$as_me:6128: \$? = $ac_status" >&5
6129   (exit $ac_status); }; }; then
6130   break
6131 else
6132   echo "$as_me: failed program was:" >&5
6133 cat conftest.$ac_ext >&5
6134 fi
6135 rm -f conftest.$ac_objext conftest.$ac_ext
6136                 done
6137                 echo "$as_me:6137: result: $CC_SHARED_OPTS" >&5
6138 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6139                 CFLAGS="$cf_save_CFLAGS"
6140         fi
6141
6142         cf_cv_shlib_version_infix=no
6143
6144         case $cf_cv_system_name in
6145         (aix4.3-9*|aix[5-7]*)
6146                 if test "$GCC" = yes; then
6147                         CC_SHARED_OPTS='-Wl,-brtl'
6148                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6149                 else
6150                         CC_SHARED_OPTS='-brtl'
6151                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6152                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6153                 fi
6154                 ;;
6155         (beos*)
6156                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6157                 ;;
6158         (cygwin*)
6159                 CC_SHARED_OPTS=
6160                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6161                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6162                 cf_cv_shlib_version=cygdll
6163                 cf_cv_shlib_version_infix=cygdll
6164                 shlibdir=$bindir
6165                 MAKE_DLLS=
6166                 cat >mk_shared_lib.sh <<-CF_EOF
6167                 #!$SHELL
6168                 SHARED_LIB=\$1
6169                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6170                 shift
6171                 cat <<-EOF
6172                 Linking shared library
6173                 ** SHARED_LIB \$SHARED_LIB
6174                 ** IMPORT_LIB \$IMPORT_LIB
6175 EOF
6176                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6177 CF_EOF
6178                 chmod +x mk_shared_lib.sh
6179                 ;;
6180         (msys*)
6181                 CC_SHARED_OPTS=
6182                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6183                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6184                 cf_cv_shlib_version=msysdll
6185                 cf_cv_shlib_version_infix=msysdll
6186                 shlibdir=$bindir
6187                 MAKE_DLLS=
6188                 cat >mk_shared_lib.sh <<-CF_EOF
6189                 #!$SHELL
6190                 SHARED_LIB=\$1
6191                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6192                 shift
6193                 cat <<-EOF
6194                 Linking shared library
6195                 ** SHARED_LIB \$SHARED_LIB
6196                 ** IMPORT_LIB \$IMPORT_LIB
6197 EOF
6198                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6199 CF_EOF
6200                 chmod +x mk_shared_lib.sh
6201                 ;;
6202         (darwin*)
6203                 cf_try_cflags="no-cpp-precomp"
6204                 CC_SHARED_OPTS="-dynamic"
6205                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6206                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6207                 cf_cv_shlib_version_infix=yes
6208                 echo "$as_me:6208: checking if ld -search_paths_first works" >&5
6209 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6210 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6211   echo $ECHO_N "(cached) $ECHO_C" >&6
6212 else
6213
6214                         cf_save_LDFLAGS=$LDFLAGS
6215                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6216                         cat >conftest.$ac_ext <<_ACEOF
6217 #line 6217 "configure"
6218 #include "confdefs.h"
6219
6220 int
6221 main (void)
6222 {
6223 int i;
6224   ;
6225   return 0;
6226 }
6227 _ACEOF
6228 rm -f conftest.$ac_objext conftest$ac_exeext
6229 if { (eval echo "$as_me:6229: \"$ac_link\"") >&5
6230   (eval $ac_link) 2>&5
6231   ac_status=$?
6232   echo "$as_me:6232: \$? = $ac_status" >&5
6233   (exit $ac_status); } &&
6234          { ac_try='test -s conftest$ac_exeext'
6235   { (eval echo "$as_me:6235: \"$ac_try\"") >&5
6236   (eval $ac_try) 2>&5
6237   ac_status=$?
6238   echo "$as_me:6238: \$? = $ac_status" >&5
6239   (exit $ac_status); }; }; then
6240   cf_cv_ldflags_search_paths_first=yes
6241 else
6242   echo "$as_me: failed program was:" >&5
6243 cat conftest.$ac_ext >&5
6244 cf_cv_ldflags_search_paths_first=no
6245 fi
6246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6247                                 LDFLAGS=$cf_save_LDFLAGS
6248 fi
6249 echo "$as_me:6249: result: $cf_cv_ldflags_search_paths_first" >&5
6250 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6251                 if test $cf_cv_ldflags_search_paths_first = yes; then
6252                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6253                 fi
6254                 ;;
6255         (hpux[7-8]*)
6256                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6257                 if test "$GCC" != yes; then
6258                         CC_SHARED_OPTS='+Z'
6259                 fi
6260                 MK_SHARED_LIB='${LD} -b -o $@'
6261                 INSTALL_LIB="-m 555"
6262                 ;;
6263         (hpux*)
6264                 # (tested with gcc 2.7.2 -- I don't have c89)
6265                 if test "$GCC" = yes; then
6266                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6267                 else
6268                         CC_SHARED_OPTS='+Z'
6269                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6270                 fi
6271                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6272                 # HP-UX shared libraries must be executable, and should be
6273                 # readonly to exploit a quirk in the memory manager.
6274                 INSTALL_LIB="-m 555"
6275                 ;;
6276         (interix*)
6277                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6278                 if test "$cf_cv_shlib_version" = rel; then
6279                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6280                 else
6281                         cf_shared_soname='`basename `'
6282                 fi
6283                 CC_SHARED_OPTS=
6284                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6285                 ;;
6286         (irix*)
6287                 if test "$cf_cv_enable_rpath" = yes ; then
6288                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6289                 fi
6290                 # tested with IRIX 5.2 and 'cc'.
6291                 if test "$GCC" != yes; then
6292                         CC_SHARED_OPTS='-KPIC'
6293                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6294                 else
6295                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6296                 fi
6297                 cf_cv_rm_so_locs=yes
6298                 ;;
6299         (linux*|gnu*|k*bsd*-gnu)
6300                 if test "$DFT_LWR_MODEL" = "shared" ; then
6301                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6302                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6303                 fi
6304                 if test "$cf_cv_enable_rpath" = yes ; then
6305                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6306                 fi
6307
6308         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6309         if test "$cf_cv_shlib_version" = rel; then
6310                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6311         else
6312                 cf_cv_shared_soname='`basename $@`'
6313         fi
6314
6315                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6316                 ;;
6317         (mingw*)
6318                 cf_cv_shlib_version=mingw
6319                 cf_cv_shlib_version_infix=mingw
6320                 shlibdir=$bindir
6321                 MAKE_DLLS=
6322                 if test "$DFT_LWR_MODEL" = "shared" ; then
6323                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6324                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6325                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6326                 fi
6327                 CC_SHARED_OPTS=
6328                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6329                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6330                 cat >mk_shared_lib.sh <<-CF_EOF
6331                 #!$SHELL
6332                 SHARED_LIB=\$1
6333                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6334                 shift
6335                 cat <<-EOF
6336                 Linking shared library
6337                 ** SHARED_LIB \$SHARED_LIB
6338                 ** IMPORT_LIB \$IMPORT_LIB
6339 EOF
6340                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6341 CF_EOF
6342                 chmod +x mk_shared_lib.sh
6343                 ;;
6344         (openbsd[2-9].*|mirbsd*)
6345                 if test "$DFT_LWR_MODEL" = "shared" ; then
6346                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6347                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6348                 fi
6349                 if test "$cf_cv_enable_rpath" = yes ; then
6350                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6351                 fi
6352                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6353
6354         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6355         if test "$cf_cv_shlib_version" = rel; then
6356                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6357         else
6358                 cf_cv_shared_soname='`basename $@`'
6359         fi
6360
6361                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6362                 ;;
6363         (nto-qnx*|openbsd*|freebsd[12].*)
6364                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6365                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6366                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6367                 ;;
6368         (dragonfly*|freebsd*)
6369                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6370                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6371                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6372                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6373                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6374                 fi
6375
6376         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6377         if test "$cf_cv_shlib_version" = rel; then
6378                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6379         else
6380                 cf_cv_shared_soname='`basename $@`'
6381         fi
6382
6383                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6384                 ;;
6385         (netbsd*)
6386                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6387                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6388                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6389                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6390                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6391                         if test "$cf_cv_shlib_version" = auto; then
6392                         if test -f /usr/libexec/ld.elf_so; then
6393                                 cf_cv_shlib_version=abi
6394                         else
6395                                 cf_cv_shlib_version=rel
6396                         fi
6397                         fi
6398
6399         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6400         if test "$cf_cv_shlib_version" = rel; then
6401                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6402         else
6403                 cf_cv_shared_soname='`basename $@`'
6404         fi
6405
6406                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6407                 else
6408                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6409                 fi
6410                 ;;
6411         (osf*|mls+*)
6412                 # tested with OSF/1 V3.2 and 'cc'
6413                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6414                 # link with shared libs).
6415                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6416                 case $host_os in
6417                 (osf4*)
6418                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6419                         ;;
6420                 esac
6421                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6422                 if test "$DFT_LWR_MODEL" = "shared" ; then
6423                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6424                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6425                 fi
6426                 cf_cv_rm_so_locs=yes
6427                 ;;
6428         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6429                 # tested with osr5.0.5
6430                 if test "$GCC" != yes; then
6431                         CC_SHARED_OPTS='-belf -KPIC'
6432                 fi
6433                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6434                 if test "$cf_cv_enable_rpath" = yes ; then
6435                         # only way is to set LD_RUN_PATH but no switch for it
6436                         RUN_PATH=$libdir
6437                 fi
6438                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6439                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6440                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6441                 ;;
6442         (sunos4*)
6443                 # tested with SunOS 4.1.1 and gcc 2.7.0
6444                 if test "$GCC" != yes; then
6445                         CC_SHARED_OPTS='-KPIC'
6446                 fi
6447                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6448                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6449                 ;;
6450         (solaris2*)
6451                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6452                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6453                 if test "$DFT_LWR_MODEL" = "shared" ; then
6454                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6455                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6456                 fi
6457                 if test "$cf_cv_enable_rpath" = yes ; then
6458                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6459                 fi
6460
6461         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6462         if test "$cf_cv_shlib_version" = rel; then
6463                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6464         else
6465                 cf_cv_shared_soname='`basename $@`'
6466         fi
6467
6468                 if test "$GCC" != yes; then
6469                         cf_save_CFLAGS="$CFLAGS"
6470                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6471                         do
6472                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6473                                 cat >conftest.$ac_ext <<_ACEOF
6474 #line 6474 "configure"
6475 #include "confdefs.h"
6476 #include <stdio.h>
6477 int
6478 main (void)
6479 {
6480 printf("Hello\n");
6481   ;
6482   return 0;
6483 }
6484 _ACEOF
6485 rm -f conftest.$ac_objext
6486 if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
6487   (eval $ac_compile) 2>&5
6488   ac_status=$?
6489   echo "$as_me:6489: \$? = $ac_status" >&5
6490   (exit $ac_status); } &&
6491          { ac_try='test -s conftest.$ac_objext'
6492   { (eval echo "$as_me:6492: \"$ac_try\"") >&5
6493   (eval $ac_try) 2>&5
6494   ac_status=$?
6495   echo "$as_me:6495: \$? = $ac_status" >&5
6496   (exit $ac_status); }; }; then
6497   break
6498 else
6499   echo "$as_me: failed program was:" >&5
6500 cat conftest.$ac_ext >&5
6501 fi
6502 rm -f conftest.$ac_objext conftest.$ac_ext
6503                         done
6504                         CFLAGS="$cf_save_CFLAGS"
6505                         CC_SHARED_OPTS=$cf_shared_opts
6506                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6507                 else
6508                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6509                 fi
6510                 ;;
6511         (sysv5uw7*|unix_sv*)
6512                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6513                 if test "$GCC" != yes; then
6514                         CC_SHARED_OPTS='-KPIC'
6515                 fi
6516                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6517                 ;;
6518         (*)
6519                 CC_SHARED_OPTS='unknown'
6520                 MK_SHARED_LIB='echo unknown'
6521                 ;;
6522         esac
6523
6524         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6525         case "$cf_cv_shlib_version" in
6526         (rel|abi)
6527                 case "$MK_SHARED_LIB" in
6528                 (*'-o $@')
6529                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6530                         ;;
6531                 (*)
6532                         { echo "$as_me:6532: WARNING: ignored --with-shlib-version" >&5
6533 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6534                         ;;
6535                 esac
6536                 ;;
6537         esac
6538
6539         if test -n "$cf_try_cflags"
6540         then
6541 cat > conftest.$ac_ext <<EOF
6542 #line 6542 "${as_me:-configure}"
6543 #include <stdio.h>
6544 int main(int argc, char *argv[])
6545 {
6546         printf("hello\n");
6547         return (argv[argc-1] == 0) ;
6548 }
6549 EOF
6550                 cf_save_CFLAGS="$CFLAGS"
6551                 for cf_opt in $cf_try_cflags
6552                 do
6553                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6554                         echo "$as_me:6554: checking if CFLAGS option -$cf_opt works" >&5
6555 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6556                         if { (eval echo "$as_me:6556: \"$ac_compile\"") >&5
6557   (eval $ac_compile) 2>&5
6558   ac_status=$?
6559   echo "$as_me:6559: \$? = $ac_status" >&5
6560   (exit $ac_status); }; then
6561                                 echo "$as_me:6561: result: yes" >&5
6562 echo "${ECHO_T}yes" >&6
6563                                 cf_save_CFLAGS="$CFLAGS"
6564                         else
6565                                 echo "$as_me:6565: result: no" >&5
6566 echo "${ECHO_T}no" >&6
6567                         fi
6568                 done
6569                 CFLAGS="$cf_save_CFLAGS"
6570         fi
6571
6572         # RPATH_LIST is a colon-separated list of directories
6573         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6574         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6575
6576         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6577
6578         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6579
6580 echo "${as_me:-configure}:6580: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6581
6582         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6583
6584 echo "${as_me:-configure}:6584: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6585
6586 for model in $cf_list_models; do
6587         case $model in
6588         (libtool)
6589
6590 echo "$as_me:6590: checking for additional libtool options" >&5
6591 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6592
6593 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6594 if test "${with_libtool_opts+set}" = set; then
6595   withval="$with_libtool_opts"
6596   with_libtool_opts=$withval
6597 else
6598   with_libtool_opts=no
6599 fi;
6600 echo "$as_me:6600: result: $with_libtool_opts" >&5
6601 echo "${ECHO_T}$with_libtool_opts" >&6
6602
6603 case .$with_libtool_opts in
6604 (.yes|.no|.)
6605         ;;
6606 (*)
6607         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6608         ;;
6609 esac
6610
6611 echo "$as_me:6611: checking if exported-symbols file should be used" >&5
6612 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6613
6614 # Check whether --with-export-syms or --without-export-syms was given.
6615 if test "${with_export_syms+set}" = set; then
6616   withval="$with_export_syms"
6617   with_export_syms=$withval
6618 else
6619   with_export_syms=no
6620 fi;
6621 if test "x$with_export_syms" = xyes
6622 then
6623         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6624
6625 fi
6626 echo "$as_me:6626: result: $with_export_syms" >&5
6627 echo "${ECHO_T}$with_export_syms" >&6
6628 if test "x$with_export_syms" != xno
6629 then
6630         EXPORT_SYMS="-export-symbols $with_export_syms"
6631
6632 fi
6633
6634                 ;;
6635         (shared)
6636                 if test "$CC_SHARED_OPTS" = "unknown"; then
6637                         { { echo "$as_me:6637: error: Shared libraries are not supported in this version" >&5
6638 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6639    { (exit 1); exit 1; }; }
6640                 fi
6641                 # workaround for inept transition to PIE vs PIC...
6642                 echo "$as_me:6642: checking if current CFLAGS link properly" >&5
6643 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6644                 cat >conftest.$ac_ext <<_ACEOF
6645 #line 6645 "configure"
6646 #include "confdefs.h"
6647 #include <stdio.h>
6648 int
6649 main (void)
6650 {
6651 printf("Hello work\n");
6652   ;
6653   return 0;
6654 }
6655 _ACEOF
6656 rm -f conftest.$ac_objext conftest$ac_exeext
6657 if { (eval echo "$as_me:6657: \"$ac_link\"") >&5
6658   (eval $ac_link) 2>&5
6659   ac_status=$?
6660   echo "$as_me:6660: \$? = $ac_status" >&5
6661   (exit $ac_status); } &&
6662          { ac_try='test -s conftest$ac_exeext'
6663   { (eval echo "$as_me:6663: \"$ac_try\"") >&5
6664   (eval $ac_try) 2>&5
6665   ac_status=$?
6666   echo "$as_me:6666: \$? = $ac_status" >&5
6667   (exit $ac_status); }; }; then
6668   cf_cflags_work=yes
6669 else
6670   echo "$as_me: failed program was:" >&5
6671 cat conftest.$ac_ext >&5
6672 cf_cflags_work=no
6673 fi
6674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6675                 echo "$as_me:6675: result: $cf_cflags_work" >&5
6676 echo "${ECHO_T}$cf_cflags_work" >&6
6677                 if test "$cf_cflags_work" = no
6678                 then
6679                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6680
6681 echo "${as_me:-configure}:6681: testing try to work around by appending shared-options ..." 1>&5
6682
6683                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6684                 fi
6685
6686 echo "$as_me:6686: checking if versioned-symbols file should be used" >&5
6687 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6688
6689 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6690 if test "${with_versioned_syms+set}" = set; then
6691   withval="$with_versioned_syms"
6692   with_versioned_syms=$withval
6693 else
6694   with_versioned_syms=no
6695 fi;
6696 if test "x$with_versioned_syms" = xyes
6697 then
6698         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6699
6700 fi
6701 echo "$as_me:6701: result: $with_versioned_syms" >&5
6702 echo "${ECHO_T}$with_versioned_syms" >&6
6703
6704 RESULTING_SYMS=
6705 VERSIONED_SYMS=
6706 WILDCARD_SYMS=
6707
6708 if test "x$with_versioned_syms" != xno
6709 then
6710         RESULTING_SYMS=$with_versioned_syms
6711         case "x$MK_SHARED_LIB" in
6712         (*-Wl,*)
6713                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6714                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6715                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6716
6717 echo "${as_me:-configure}:6717: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6718
6719                 ;;
6720         (*-dy\ *)
6721                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6722                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6723                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6724
6725 echo "${as_me:-configure}:6725: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6726
6727                 ;;
6728         (*)
6729                 { echo "$as_me:6729: WARNING: this system does not support versioned-symbols" >&5
6730 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6731                 ;;
6732         esac
6733
6734         # Linux ld can selectively override scope, e.g., of symbols beginning with
6735         # "_" by first declaring some as global, and then using a wildcard to
6736         # declare the others as local.  Some other loaders cannot do this.  Check
6737         # by constructing a (very) simple shared library and inspecting its
6738         # symbols.
6739         if test "x$VERSIONED_SYMS" != "x"
6740         then
6741                 echo "$as_me:6741: checking if wildcards can be used to selectively omit symbols" >&5
6742 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6743                 WILDCARD_SYMS=no
6744
6745                 # make sources
6746                 rm -f conftest.*
6747
6748                 cat >conftest.ver <<EOF
6749 module_1.0 {
6750 global:
6751         globalf1;
6752 local:
6753         localf1;
6754 };
6755 module_2.0 {
6756 global:
6757         globalf2;
6758 local:
6759         localf2;
6760         _*;
6761 } module_1.0;
6762 submodule_1.0 {
6763 global:
6764         subglobalf1;
6765         _ismissing;
6766 local:
6767         sublocalf1;
6768 };
6769 submodule_2.0 {
6770 global:
6771         subglobalf2;
6772 local:
6773         sublocalf2;
6774         _*;
6775 } submodule_1.0;
6776 EOF
6777                 cat >conftest.$ac_ext <<EOF
6778 #line 6778 "configure"
6779 int     _ismissing(void) { return 1; }
6780 int     _localf1(void) { return 1; }
6781 int     _localf2(void) { return 2; }
6782 int     globalf1(void) { return 1; }
6783 int     globalf2(void) { return 2; }
6784 int     _sublocalf1(void) { return 1; }
6785 int     _sublocalf2(void) { return 2; }
6786 int     subglobalf1(void) { return 1; }
6787 int     subglobalf2(void) { return 2; }
6788 EOF
6789                 cat >conftest.mk <<EOF
6790 CC=${CC}
6791 CFLAGS=${CFLAGS}
6792 CPPFLAGS=${CPPFLAGS}
6793 LDFLAGS=${LDFLAGS}
6794 LIBS=${LIBS}
6795 VERSIONED_SYMS=${VERSIONED_SYMS}
6796 RESULTING_SYMS=conftest.ver
6797 MK_SHARED_LIB=${MK_SHARED_LIB}
6798 conftest.so: conftest.$ac_cv_objext
6799                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6800 EOF
6801
6802                 # compile source, make library
6803                 if make -f conftest.mk 2>&5 >/dev/null
6804                 then
6805                         # test for missing symbol in either Data or Text section
6806                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6807                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6808                 fi
6809                 echo "$as_me:6809: result: $WILDCARD_SYMS" >&5
6810 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6811                 rm -f conftest.*
6812         fi
6813 fi
6814
6815                 ;;
6816         esac
6817 done
6818
6819 # pretend that ncurses==ncursesw==ncursest
6820 echo "$as_me:6820: checking if you want to disable library suffixes" >&5
6821 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6822
6823 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6824 if test "${enable_lib_suffixes+set}" = set; then
6825   enableval="$enable_lib_suffixes"
6826   test "$enableval" != no && enableval=yes
6827         if test "$enableval" != "yes" ; then
6828     disable_lib_suffixes=yes
6829         else
6830                 disable_lib_suffixes=no
6831         fi
6832 else
6833   enableval=yes
6834         disable_lib_suffixes=no
6835
6836 fi;
6837 echo "$as_me:6837: result: $disable_lib_suffixes" >&5
6838 echo "${ECHO_T}$disable_lib_suffixes" >&6
6839
6840 ### If we're building with rpath, try to link non-standard libs that way too.
6841 if test "$DFT_LWR_MODEL" = "shared"; then
6842
6843 echo "$as_me:6843: checking if rpath-hack should be disabled" >&5
6844 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6845
6846 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6847 if test "${enable_rpath_hack+set}" = set; then
6848   enableval="$enable_rpath_hack"
6849   test "$enableval" != no && enableval=yes
6850         if test "$enableval" != "yes" ; then
6851     cf_disable_rpath_hack=yes
6852         else
6853                 cf_disable_rpath_hack=no
6854         fi
6855 else
6856   enableval=yes
6857         cf_disable_rpath_hack=no
6858
6859 fi;
6860 echo "$as_me:6860: result: $cf_disable_rpath_hack" >&5
6861 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6862 if test "$cf_disable_rpath_hack" = no ; then
6863
6864 echo "$as_me:6864: checking for updated LDFLAGS" >&5
6865 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6866 if test -n "$LD_RPATH_OPT" ; then
6867         echo "$as_me:6867: result: maybe" >&5
6868 echo "${ECHO_T}maybe" >&6
6869
6870         for ac_prog in ldd
6871 do
6872   # Extract the first word of "$ac_prog", so it can be a program name with args.
6873 set dummy $ac_prog; ac_word=$2
6874 echo "$as_me:6874: checking for $ac_word" >&5
6875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6876 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6877   echo $ECHO_N "(cached) $ECHO_C" >&6
6878 else
6879   if test -n "$cf_ldd_prog"; then
6880   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6881 else
6882   ac_save_IFS=$IFS; IFS=$ac_path_separator
6883 ac_dummy="$PATH"
6884 for ac_dir in $ac_dummy; do
6885   IFS=$ac_save_IFS
6886   test -z "$ac_dir" && ac_dir=.
6887   $as_executable_p "$ac_dir/$ac_word" || continue
6888 ac_cv_prog_cf_ldd_prog="$ac_prog"
6889 echo "$as_me:6889: found $ac_dir/$ac_word" >&5
6890 break
6891 done
6892
6893 fi
6894 fi
6895 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6896 if test -n "$cf_ldd_prog"; then
6897   echo "$as_me:6897: result: $cf_ldd_prog" >&5
6898 echo "${ECHO_T}$cf_ldd_prog" >&6
6899 else
6900   echo "$as_me:6900: result: no" >&5
6901 echo "${ECHO_T}no" >&6
6902 fi
6903
6904   test -n "$cf_ldd_prog" && break
6905 done
6906 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6907
6908         cf_rpath_list="/usr/lib /lib"
6909         if test "$cf_ldd_prog" != no
6910         then
6911                 cf_rpath_oops=
6912
6913 cat >conftest.$ac_ext <<_ACEOF
6914 #line 6914 "configure"
6915 #include "confdefs.h"
6916 #include <stdio.h>
6917 int
6918 main (void)
6919 {
6920 printf("Hello");
6921   ;
6922   return 0;
6923 }
6924 _ACEOF
6925 rm -f conftest.$ac_objext conftest$ac_exeext
6926 if { (eval echo "$as_me:6926: \"$ac_link\"") >&5
6927   (eval $ac_link) 2>&5
6928   ac_status=$?
6929   echo "$as_me:6929: \$? = $ac_status" >&5
6930   (exit $ac_status); } &&
6931          { ac_try='test -s conftest$ac_exeext'
6932   { (eval echo "$as_me:6932: \"$ac_try\"") >&5
6933   (eval $ac_try) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit $ac_status); }; }; then
6937   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6938                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6939 else
6940   echo "$as_me: failed program was:" >&5
6941 cat conftest.$ac_ext >&5
6942 fi
6943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6944
6945                 # If we passed the link-test, but get a "not found" on a given library,
6946                 # this could be due to inept reconfiguration of gcc to make it only
6947                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6948                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6949                 # /usr/local libraries.
6950                 if test -n "$cf_rpath_oops"
6951                 then
6952                         for cf_rpath_src in $cf_rpath_oops
6953                         do
6954                                 for cf_rpath_dir in \
6955                                         /usr/local \
6956                                         /usr/pkg \
6957                                         /opt/sfw
6958                                 do
6959                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6960                                         then
6961                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6962
6963 echo "${as_me:-configure}:6963: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6964
6965                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6966                                                 break
6967                                         fi
6968                                 done
6969                         done
6970                 fi
6971         fi
6972
6973         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6974
6975 echo "${as_me:-configure}:6975: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6976
6977 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6978
6979 echo "${as_me:-configure}:6979: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6980
6981 cf_rpath_dst=
6982 for cf_rpath_src in $LDFLAGS
6983 do
6984         case $cf_rpath_src in
6985         (-L*)
6986
6987                 # check if this refers to a directory which we will ignore
6988                 cf_rpath_skip=no
6989                 if test -n "$cf_rpath_list"
6990                 then
6991                         for cf_rpath_item in $cf_rpath_list
6992                         do
6993                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6994                                 then
6995                                         cf_rpath_skip=yes
6996                                         break
6997                                 fi
6998                         done
6999                 fi
7000
7001                 if test "$cf_rpath_skip" = no
7002                 then
7003                         # transform the option
7004                         if test "$LD_RPATH_OPT" = "-R " ; then
7005                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7006                         else
7007                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7008                         fi
7009
7010                         # if we have not already added this, add it now
7011                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7012                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7013                         then
7014                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7015
7016 echo "${as_me:-configure}:7016: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7017
7018                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7019                         fi
7020                 fi
7021                 ;;
7022         esac
7023         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7024 done
7025 LDFLAGS=$cf_rpath_dst
7026
7027 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7028
7029 echo "${as_me:-configure}:7029: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7030
7031 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7032
7033 echo "${as_me:-configure}:7033: testing ...checking LIBS $LIBS ..." 1>&5
7034
7035 cf_rpath_dst=
7036 for cf_rpath_src in $LIBS
7037 do
7038         case $cf_rpath_src in
7039         (-L*)
7040
7041                 # check if this refers to a directory which we will ignore
7042                 cf_rpath_skip=no
7043                 if test -n "$cf_rpath_list"
7044                 then
7045                         for cf_rpath_item in $cf_rpath_list
7046                         do
7047                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7048                                 then
7049                                         cf_rpath_skip=yes
7050                                         break
7051                                 fi
7052                         done
7053                 fi
7054
7055                 if test "$cf_rpath_skip" = no
7056                 then
7057                         # transform the option
7058                         if test "$LD_RPATH_OPT" = "-R " ; then
7059                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7060                         else
7061                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7062                         fi
7063
7064                         # if we have not already added this, add it now
7065                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7066                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7067                         then
7068                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7069
7070 echo "${as_me:-configure}:7070: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7071
7072                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7073                         fi
7074                 fi
7075                 ;;
7076         esac
7077         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7078 done
7079 LIBS=$cf_rpath_dst
7080
7081 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7082
7083 echo "${as_me:-configure}:7083: testing ...checked LIBS $LIBS ..." 1>&5
7084
7085         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7086
7087 echo "${as_me:-configure}:7087: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7088
7089 else
7090         echo "$as_me:7090: result: no" >&5
7091 echo "${ECHO_T}no" >&6
7092 fi
7093
7094 fi
7095
7096 fi
7097
7098 ###############################################################################
7099
7100 ###     use option --with-extra-suffix to append suffix to headers and libraries
7101 echo "$as_me:7101: checking if you wish to append extra suffix to header/library paths" >&5
7102 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7103 EXTRA_SUFFIX=
7104
7105 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7106 if test "${with_extra_suffix+set}" = set; then
7107   withval="$with_extra_suffix"
7108   case x$withval in
7109         (no)
7110                 ;;
7111         (xyes|x)
7112                 EXTRA_SUFFIX=$cf_cv_abi_version
7113                 ;;
7114         (*)
7115                 EXTRA_SUFFIX=$withval
7116                 ;;
7117         esac
7118
7119 fi;
7120 echo "$as_me:7120: result: $EXTRA_SUFFIX" >&5
7121 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7122
7123 ###     use option --disable-overwrite to leave out the link to -lcurses
7124 echo "$as_me:7124: checking if you wish to install ncurses overwriting curses" >&5
7125 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7126
7127 # Check whether --enable-overwrite or --disable-overwrite was given.
7128 if test "${enable_overwrite+set}" = set; then
7129   enableval="$enable_overwrite"
7130   with_overwrite=$enableval
7131 else
7132   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7133 fi;
7134 echo "$as_me:7134: result: $with_overwrite" >&5
7135 echo "${ECHO_T}$with_overwrite" >&6
7136
7137 echo "$as_me:7137: checking if external terminfo-database is used" >&5
7138 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7139
7140 # Check whether --enable-database or --disable-database was given.
7141 if test "${enable_database+set}" = set; then
7142   enableval="$enable_database"
7143   use_database=$enableval
7144 else
7145   use_database=yes
7146 fi;
7147 echo "$as_me:7147: result: $use_database" >&5
7148 echo "${ECHO_T}$use_database" >&6
7149
7150 case $host_os in
7151 (os2*)
7152         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7153         ;;
7154 (*)
7155         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7156         ;;
7157 esac
7158
7159 NCURSES_USE_DATABASE=0
7160 if test "$use_database" != no ; then
7161         NCURSES_USE_DATABASE=1
7162
7163         echo "$as_me:7163: checking which terminfo source-file will be installed" >&5
7164 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7165
7166 # Check whether --with-database or --without-database was given.
7167 if test "${with_database+set}" = set; then
7168   withval="$with_database"
7169   TERMINFO_SRC=$withval
7170 fi;
7171         echo "$as_me:7171: result: $TERMINFO_SRC" >&5
7172 echo "${ECHO_T}$TERMINFO_SRC" >&6
7173
7174         echo "$as_me:7174: checking whether to use hashed database instead of directory/tree" >&5
7175 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7176
7177 # Check whether --with-hashed-db or --without-hashed-db was given.
7178 if test "${with_hashed_db+set}" = set; then
7179   withval="$with_hashed_db"
7180
7181 else
7182   with_hashed_db=no
7183 fi;
7184         echo "$as_me:7184: result: $with_hashed_db" >&5
7185 echo "${ECHO_T}$with_hashed_db" >&6
7186 else
7187         with_hashed_db=no
7188 fi
7189
7190 echo "$as_me:7190: checking for list of fallback descriptions" >&5
7191 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7192
7193 # Check whether --with-fallbacks or --without-fallbacks was given.
7194 if test "${with_fallbacks+set}" = set; then
7195   withval="$with_fallbacks"
7196   with_fallback=$withval
7197 else
7198   with_fallback=
7199 fi;
7200 echo "$as_me:7200: result: $with_fallback" >&5
7201 echo "${ECHO_T}$with_fallback" >&6
7202 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7203
7204 echo "$as_me:7204: checking if you want modern xterm or antique" >&5
7205 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7206
7207 # Check whether --with-xterm-new or --without-xterm-new was given.
7208 if test "${with_xterm_new+set}" = set; then
7209   withval="$with_xterm_new"
7210   with_xterm_new=$withval
7211 else
7212   with_xterm_new=yes
7213 fi;
7214 case $with_xterm_new in
7215 (no) with_xterm_new=xterm-old;;
7216 (*)      with_xterm_new=xterm-new;;
7217 esac
7218 echo "$as_me:7218: result: $with_xterm_new" >&5
7219 echo "${ECHO_T}$with_xterm_new" >&6
7220 WHICH_XTERM=$with_xterm_new
7221
7222 echo "$as_me:7222: checking if xterm backspace sends BS or DEL" >&5
7223 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7224
7225 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7226 if test "${with_xterm_kbs+set}" = set; then
7227   withval="$with_xterm_kbs"
7228   with_xterm_kbs=$withval
7229 else
7230   with_xterm_kbs=BS
7231 fi;
7232 case x$with_xterm_kbs in
7233 (xyes|xno|xBS|xbs|x8)
7234         with_xterm_kbs=BS
7235         ;;
7236 (xDEL|xdel|x127)
7237         with_xterm_kbs=DEL
7238         ;;
7239 (*)
7240         with_xterm_kbs=$withval
7241         ;;
7242 esac
7243 echo "$as_me:7243: result: $with_xterm_kbs" >&5
7244 echo "${ECHO_T}$with_xterm_kbs" >&6
7245 XTERM_KBS=$with_xterm_kbs
7246
7247 MAKE_TERMINFO=
7248 if test "$use_database" = no ; then
7249         TERMINFO="${datadir}/terminfo"
7250         MAKE_TERMINFO="#"
7251 else
7252
7253 echo "$as_me:7253: checking for list of terminfo directories" >&5
7254 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7255
7256 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7257 if test "${with_terminfo_dirs+set}" = set; then
7258   withval="$with_terminfo_dirs"
7259
7260 else
7261   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7262 fi;
7263 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7264 cf_dst_path=
7265 for cf_src_path in $withval
7266 do
7267
7268 if test "x$prefix" != xNONE; then
7269         cf_path_syntax="$prefix"
7270 else
7271         cf_path_syntax="$ac_default_prefix"
7272 fi
7273
7274 case ".$cf_src_path" in
7275 (.\$\(*\)*|.\'*\'*)
7276         ;;
7277 (..|./*|.\\*)
7278         ;;
7279 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7280         ;;
7281 (.\${*prefix}*|.\${*dir}*)
7282         eval cf_src_path="$cf_src_path"
7283         case ".$cf_src_path" in
7284         (.NONE/*)
7285                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7286                 ;;
7287         esac
7288         ;;
7289 (.no|.NONE/*)
7290         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7291         ;;
7292 (*)
7293         { { echo "$as_me:7293: error: expected a pathname, not \"$cf_src_path\"" >&5
7294 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7295    { (exit 1); exit 1; }; }
7296         ;;
7297 esac
7298
7299   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7300   cf_dst_path="${cf_dst_path}${cf_src_path}"
7301 done
7302 IFS="$ac_save_ifs"
7303
7304 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7305 # so we have to check/work around.  We do prefer the result of "eval"...
7306 eval cf_dst_eval="$cf_dst_path"
7307 case "x$cf_dst_eval" in
7308 (xNONE*)
7309         TERMINFO_DIRS=$cf_dst_path
7310         ;;
7311 (*)
7312         TERMINFO_DIRS="$cf_dst_eval"
7313         ;;
7314 esac
7315
7316 echo "$as_me:7316: result: $TERMINFO_DIRS" >&5
7317 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7318 test -n "$TERMINFO_DIRS" &&
7319 cat >>confdefs.h <<EOF
7320 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7321 EOF
7322
7323 echo "$as_me:7323: checking for default terminfo directory" >&5
7324 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7325
7326 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7327 if test "${with_default_terminfo_dir+set}" = set; then
7328   withval="$with_default_terminfo_dir"
7329
7330 else
7331   withval="${TERMINFO:-${datadir}/terminfo}"
7332 fi; if test -n "${datadir}/terminfo" ; then
7333
7334 if test "x$prefix" != xNONE; then
7335         cf_path_syntax="$prefix"
7336 else
7337         cf_path_syntax="$ac_default_prefix"
7338 fi
7339
7340 case ".$withval" in
7341 (.\$\(*\)*|.\'*\'*)
7342         ;;
7343 (..|./*|.\\*)
7344         ;;
7345 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7346         ;;
7347 (.\${*prefix}*|.\${*dir}*)
7348         eval withval="$withval"
7349         case ".$withval" in
7350         (.NONE/*)
7351                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7352                 ;;
7353         esac
7354         ;;
7355 (.no|.NONE/*)
7356         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7357         ;;
7358 (*)
7359         { { echo "$as_me:7359: error: expected a pathname, not \"$withval\"" >&5
7360 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7361    { (exit 1); exit 1; }; }
7362         ;;
7363 esac
7364
7365 fi
7366 eval TERMINFO="$withval"
7367
7368 echo "$as_me:7368: result: $TERMINFO" >&5
7369 echo "${ECHO_T}$TERMINFO" >&6
7370
7371 cat >>confdefs.h <<EOF
7372 #define TERMINFO "$TERMINFO"
7373 EOF
7374
7375 fi
7376
7377 ###     use option --disable-big-core to make tic run on small machines
7378 ###     We need 4Mb, check if we can allocate 50% more than that.
7379 echo "$as_me:7379: checking if big-core option selected" >&5
7380 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7381
7382 # Check whether --enable-big-core or --disable-big-core was given.
7383 if test "${enable_big_core+set}" = set; then
7384   enableval="$enable_big_core"
7385   with_big_core=$enableval
7386 else
7387   if test "$cross_compiling" = yes; then
7388   with_big_core=no
7389 else
7390   cat >conftest.$ac_ext <<_ACEOF
7391 #line 7391 "configure"
7392 #include "confdefs.h"
7393
7394 #include <stdlib.h>
7395 #include <string.h>
7396 int main() {
7397         unsigned long n = 6000000L;
7398         char *s = malloc(n);
7399         if (s != 0)
7400                 s[0] = s[n-1] = 0;
7401         ${cf_cv_main_return:-return}(s == 0);
7402 }
7403 _ACEOF
7404 rm -f conftest$ac_exeext
7405 if { (eval echo "$as_me:7405: \"$ac_link\"") >&5
7406   (eval $ac_link) 2>&5
7407   ac_status=$?
7408   echo "$as_me:7408: \$? = $ac_status" >&5
7409   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7410   { (eval echo "$as_me:7410: \"$ac_try\"") >&5
7411   (eval $ac_try) 2>&5
7412   ac_status=$?
7413   echo "$as_me:7413: \$? = $ac_status" >&5
7414   (exit $ac_status); }; }; then
7415   with_big_core=yes
7416 else
7417   echo "$as_me: program exited with status $ac_status" >&5
7418 echo "$as_me: failed program was:" >&5
7419 cat conftest.$ac_ext >&5
7420 with_big_core=no
7421 fi
7422 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7423 fi
7424 fi;
7425 echo "$as_me:7425: result: $with_big_core" >&5
7426 echo "${ECHO_T}$with_big_core" >&6
7427 test "x$with_big_core" = "xyes" &&
7428 cat >>confdefs.h <<\EOF
7429 #define HAVE_BIG_CORE 1
7430 EOF
7431
7432 ### ISO C only guarantees 512-char strings, we have tables which load faster
7433 ### when constructed using "big" strings.  More than the C compiler, the awk
7434 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7435 echo "$as_me:7435: checking if big-strings option selected" >&5
7436 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7437
7438 # Check whether --enable-big-strings or --disable-big-strings was given.
7439 if test "${enable_big_strings+set}" = set; then
7440   enableval="$enable_big_strings"
7441   with_big_strings=$enableval
7442 else
7443
7444         case x$AWK in
7445         (x)
7446                 eval with_big_strings=no
7447                 ;;
7448         (*)
7449                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7450                         | $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
7451                         eval with_big_strings=yes
7452                 else
7453                         eval with_big_strings=no
7454                 fi
7455                 ;;
7456         esac
7457
7458 fi;
7459 echo "$as_me:7459: result: $with_big_strings" >&5
7460 echo "${ECHO_T}$with_big_strings" >&6
7461
7462 USE_BIG_STRINGS=0
7463 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7464
7465 ###     use option --enable-termcap to compile in the termcap fallback support
7466 echo "$as_me:7466: checking if you want termcap-fallback support" >&5
7467 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7468
7469 # Check whether --enable-termcap or --disable-termcap was given.
7470 if test "${enable_termcap+set}" = set; then
7471   enableval="$enable_termcap"
7472   with_termcap=$enableval
7473 else
7474   with_termcap=no
7475 fi;
7476 echo "$as_me:7476: result: $with_termcap" >&5
7477 echo "${ECHO_T}$with_termcap" >&6
7478
7479 NCURSES_USE_TERMCAP=0
7480 if test "x$with_termcap" != "xyes" ; then
7481         if test "$use_database" = no ; then
7482                 if test -z "$with_fallback" ; then
7483                         { { echo "$as_me:7483: error: You have disabled the database w/o specifying fallbacks" >&5
7484 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7485    { (exit 1); exit 1; }; }
7486                 fi
7487         fi
7488
7489 cat >>confdefs.h <<\EOF
7490 #define PURE_TERMINFO 1
7491 EOF
7492
7493 else
7494
7495         if test "$with_ticlib" != no ; then
7496                 { { echo "$as_me:7496: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7497 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7498    { (exit 1); exit 1; }; }
7499         fi
7500
7501         NCURSES_USE_TERMCAP=1
7502         echo "$as_me:7502: checking for list of termcap files" >&5
7503 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7504
7505 # Check whether --with-termpath or --without-termpath was given.
7506 if test "${with_termpath+set}" = set; then
7507   withval="$with_termpath"
7508
7509 else
7510   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7511 fi;
7512 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7513 cf_dst_path=
7514 for cf_src_path in $withval
7515 do
7516
7517 if test "x$prefix" != xNONE; then
7518         cf_path_syntax="$prefix"
7519 else
7520         cf_path_syntax="$ac_default_prefix"
7521 fi
7522
7523 case ".$cf_src_path" in
7524 (.\$\(*\)*|.\'*\'*)
7525         ;;
7526 (..|./*|.\\*)
7527         ;;
7528 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7529         ;;
7530 (.\${*prefix}*|.\${*dir}*)
7531         eval cf_src_path="$cf_src_path"
7532         case ".$cf_src_path" in
7533         (.NONE/*)
7534                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7535                 ;;
7536         esac
7537         ;;
7538 (.no|.NONE/*)
7539         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7540         ;;
7541 (*)
7542         { { echo "$as_me:7542: error: expected a pathname, not \"$cf_src_path\"" >&5
7543 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7544    { (exit 1); exit 1; }; }
7545         ;;
7546 esac
7547
7548   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7549   cf_dst_path="${cf_dst_path}${cf_src_path}"
7550 done
7551 IFS="$ac_save_ifs"
7552
7553 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7554 # so we have to check/work around.  We do prefer the result of "eval"...
7555 eval cf_dst_eval="$cf_dst_path"
7556 case "x$cf_dst_eval" in
7557 (xNONE*)
7558         TERMPATH=$cf_dst_path
7559         ;;
7560 (*)
7561         TERMPATH="$cf_dst_eval"
7562         ;;
7563 esac
7564
7565         echo "$as_me:7565: result: $TERMPATH" >&5
7566 echo "${ECHO_T}$TERMPATH" >&6
7567         test -n "$TERMPATH" &&
7568 cat >>confdefs.h <<EOF
7569 #define TERMPATH "$TERMPATH"
7570 EOF
7571
7572         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7573         echo "$as_me:7573: checking if fast termcap-loader is needed" >&5
7574 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7575
7576 # Check whether --enable-getcap or --disable-getcap was given.
7577 if test "${enable_getcap+set}" = set; then
7578   enableval="$enable_getcap"
7579   with_getcap=$enableval
7580 else
7581   with_getcap=no
7582 fi;
7583         echo "$as_me:7583: result: $with_getcap" >&5
7584 echo "${ECHO_T}$with_getcap" >&6
7585         test "x$with_getcap" = "xyes" &&
7586 cat >>confdefs.h <<\EOF
7587 #define USE_GETCAP 1
7588 EOF
7589
7590         echo "$as_me:7590: checking if translated termcaps will be cached in ~/.terminfo" >&5
7591 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7592
7593 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7594 if test "${enable_getcap_cache+set}" = set; then
7595   enableval="$enable_getcap_cache"
7596   with_getcap_cache=$enableval
7597 else
7598   with_getcap_cache=no
7599 fi;
7600         echo "$as_me:7600: result: $with_getcap_cache" >&5
7601 echo "${ECHO_T}$with_getcap_cache" >&6
7602         test "x$with_getcap_cache" = "xyes" &&
7603 cat >>confdefs.h <<\EOF
7604 #define USE_GETCAP_CACHE 1
7605 EOF
7606
7607 fi
7608
7609 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7610 echo "$as_me:7610: checking if ~/.terminfo is wanted" >&5
7611 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7612
7613 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7614 if test "${enable_home_terminfo+set}" = set; then
7615   enableval="$enable_home_terminfo"
7616   with_home_terminfo=$enableval
7617 else
7618   with_home_terminfo=yes
7619 fi;
7620 echo "$as_me:7620: result: $with_home_terminfo" >&5
7621 echo "${ECHO_T}$with_home_terminfo" >&6
7622 test "x$with_home_terminfo" = "xyes" &&
7623 cat >>confdefs.h <<\EOF
7624 #define USE_HOME_TERMINFO 1
7625 EOF
7626
7627 echo "$as_me:7627: checking if you want to use restricted environment when running as root" >&5
7628 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7629
7630 # Check whether --enable-root-environ or --disable-root-environ was given.
7631 if test "${enable_root_environ+set}" = set; then
7632   enableval="$enable_root_environ"
7633   with_root_environ=$enableval
7634 else
7635   with_root_environ=yes
7636 fi;
7637 echo "$as_me:7637: result: $with_root_environ" >&5
7638 echo "${ECHO_T}$with_root_environ" >&6
7639 test "x$with_root_environ" = xyes &&
7640 cat >>confdefs.h <<\EOF
7641 #define USE_ROOT_ENVIRON 1
7642 EOF
7643
7644 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7645 ###   to reduce storage requirements for the terminfo database.
7646
7647 for ac_header in \
7648 unistd.h \
7649
7650 do
7651 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7652 echo "$as_me:7652: checking for $ac_header" >&5
7653 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7654 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7655   echo $ECHO_N "(cached) $ECHO_C" >&6
7656 else
7657   cat >conftest.$ac_ext <<_ACEOF
7658 #line 7658 "configure"
7659 #include "confdefs.h"
7660 #include <$ac_header>
7661 _ACEOF
7662 if { (eval echo "$as_me:7662: \"$ac_cpp conftest.$ac_ext\"") >&5
7663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7664   ac_status=$?
7665   egrep -v '^ *\+' conftest.er1 >conftest.err
7666   rm -f conftest.er1
7667   cat conftest.err >&5
7668   echo "$as_me:7668: \$? = $ac_status" >&5
7669   (exit $ac_status); } >/dev/null; then
7670   if test -s conftest.err; then
7671     ac_cpp_err=$ac_c_preproc_warn_flag
7672   else
7673     ac_cpp_err=
7674   fi
7675 else
7676   ac_cpp_err=yes
7677 fi
7678 if test -z "$ac_cpp_err"; then
7679   eval "$as_ac_Header=yes"
7680 else
7681   echo "$as_me: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   eval "$as_ac_Header=no"
7684 fi
7685 rm -f conftest.err conftest.$ac_ext
7686 fi
7687 echo "$as_me:7687: result: `eval echo '${'$as_ac_Header'}'`" >&5
7688 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7689 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7690   cat >>confdefs.h <<EOF
7691 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7692 EOF
7693
7694 fi
7695 done
7696
7697 for ac_func in \
7698         remove \
7699         unlink
7700 do
7701 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7702 echo "$as_me:7702: checking for $ac_func" >&5
7703 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7704 if eval "test \"\${$as_ac_var+set}\" = set"; then
7705   echo $ECHO_N "(cached) $ECHO_C" >&6
7706 else
7707   cat >conftest.$ac_ext <<_ACEOF
7708 #line 7708 "configure"
7709 #include "confdefs.h"
7710 /* System header to define __stub macros and hopefully few prototypes,
7711     which can conflict with char $ac_func (); below.  */
7712 #include <assert.h>
7713 /* Override any gcc2 internal prototype to avoid an error.  */
7714 #ifdef __cplusplus
7715 extern "C"
7716 #endif
7717 /* We use char because int might match the return type of a gcc2
7718    builtin and then its argument prototype would still apply.  */
7719 char $ac_func ();
7720 char (*f) ();
7721
7722 int
7723 main (void)
7724 {
7725 /* The GNU C library defines this for functions which it implements
7726     to always fail with ENOSYS.  Some functions are actually named
7727     something starting with __ and the normal name is an alias.  */
7728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7729 choke me
7730 #else
7731 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7732 #endif
7733
7734   ;
7735   return 0;
7736 }
7737 _ACEOF
7738 rm -f conftest.$ac_objext conftest$ac_exeext
7739 if { (eval echo "$as_me:7739: \"$ac_link\"") >&5
7740   (eval $ac_link) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); } &&
7744          { ac_try='test -s conftest$ac_exeext'
7745   { (eval echo "$as_me:7745: \"$ac_try\"") >&5
7746   (eval $ac_try) 2>&5
7747   ac_status=$?
7748   echo "$as_me:7748: \$? = $ac_status" >&5
7749   (exit $ac_status); }; }; then
7750   eval "$as_ac_var=yes"
7751 else
7752   echo "$as_me: failed program was:" >&5
7753 cat conftest.$ac_ext >&5
7754 eval "$as_ac_var=no"
7755 fi
7756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7757 fi
7758 echo "$as_me:7758: result: `eval echo '${'$as_ac_var'}'`" >&5
7759 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7760 if test `eval echo '${'$as_ac_var'}'` = yes; then
7761   cat >>confdefs.h <<EOF
7762 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7763 EOF
7764
7765 fi
7766 done
7767
7768 if test "$cross_compiling" = yes ; then
7769
7770 for ac_func in \
7771                 link \
7772                 symlink
7773 do
7774 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7775 echo "$as_me:7775: checking for $ac_func" >&5
7776 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7777 if eval "test \"\${$as_ac_var+set}\" = set"; then
7778   echo $ECHO_N "(cached) $ECHO_C" >&6
7779 else
7780   cat >conftest.$ac_ext <<_ACEOF
7781 #line 7781 "configure"
7782 #include "confdefs.h"
7783 /* System header to define __stub macros and hopefully few prototypes,
7784     which can conflict with char $ac_func (); below.  */
7785 #include <assert.h>
7786 /* Override any gcc2 internal prototype to avoid an error.  */
7787 #ifdef __cplusplus
7788 extern "C"
7789 #endif
7790 /* We use char because int might match the return type of a gcc2
7791    builtin and then its argument prototype would still apply.  */
7792 char $ac_func ();
7793 char (*f) ();
7794
7795 int
7796 main (void)
7797 {
7798 /* The GNU C library defines this for functions which it implements
7799     to always fail with ENOSYS.  Some functions are actually named
7800     something starting with __ and the normal name is an alias.  */
7801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7802 choke me
7803 #else
7804 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7805 #endif
7806
7807   ;
7808   return 0;
7809 }
7810 _ACEOF
7811 rm -f conftest.$ac_objext conftest$ac_exeext
7812 if { (eval echo "$as_me:7812: \"$ac_link\"") >&5
7813   (eval $ac_link) 2>&5
7814   ac_status=$?
7815   echo "$as_me:7815: \$? = $ac_status" >&5
7816   (exit $ac_status); } &&
7817          { ac_try='test -s conftest$ac_exeext'
7818   { (eval echo "$as_me:7818: \"$ac_try\"") >&5
7819   (eval $ac_try) 2>&5
7820   ac_status=$?
7821   echo "$as_me:7821: \$? = $ac_status" >&5
7822   (exit $ac_status); }; }; then
7823   eval "$as_ac_var=yes"
7824 else
7825   echo "$as_me: failed program was:" >&5
7826 cat conftest.$ac_ext >&5
7827 eval "$as_ac_var=no"
7828 fi
7829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7830 fi
7831 echo "$as_me:7831: result: `eval echo '${'$as_ac_var'}'`" >&5
7832 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7833 if test `eval echo '${'$as_ac_var'}'` = yes; then
7834   cat >>confdefs.h <<EOF
7835 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7836 EOF
7837
7838 fi
7839 done
7840
7841 else
7842         echo "$as_me:7842: checking if link/symlink functions work" >&5
7843 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7844 if test "${cf_cv_link_funcs+set}" = set; then
7845   echo $ECHO_N "(cached) $ECHO_C" >&6
7846 else
7847
7848                 cf_cv_link_funcs=
7849                 for cf_func in link symlink ; do
7850                         if test "$cross_compiling" = yes; then
7851
7852                         eval 'ac_cv_func_'$cf_func'=error'
7853 else
7854   cat >conftest.$ac_ext <<_ACEOF
7855 #line 7855 "configure"
7856 #include "confdefs.h"
7857
7858 #include <sys/types.h>
7859 #include <sys/stat.h>
7860 #ifdef HAVE_UNISTD_H
7861 #include <unistd.h>
7862 #endif
7863 int main(void)
7864 {
7865         int fail = 0;
7866         char *src = "config.log";
7867         char *dst = "conftest.chk";
7868         struct stat src_sb;
7869         struct stat dst_sb;
7870
7871         stat(src, &src_sb);
7872         fail = ($cf_func("config.log", "conftest.chk") < 0)
7873             || (stat(dst, &dst_sb) < 0)
7874             || (dst_sb.st_mtime != src_sb.st_mtime);
7875 #ifdef HAVE_UNLINK
7876         unlink(dst);
7877 #else
7878         remove(dst);
7879 #endif
7880         ${cf_cv_main_return:-return} (fail);
7881 }
7882
7883 _ACEOF
7884 rm -f conftest$ac_exeext
7885 if { (eval echo "$as_me:7885: \"$ac_link\"") >&5
7886   (eval $ac_link) 2>&5
7887   ac_status=$?
7888   echo "$as_me:7888: \$? = $ac_status" >&5
7889   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7890   { (eval echo "$as_me:7890: \"$ac_try\"") >&5
7891   (eval $ac_try) 2>&5
7892   ac_status=$?
7893   echo "$as_me:7893: \$? = $ac_status" >&5
7894   (exit $ac_status); }; }; then
7895
7896                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7897                         eval 'ac_cv_func_'$cf_func'=yes'
7898 else
7899   echo "$as_me: program exited with status $ac_status" >&5
7900 echo "$as_me: failed program was:" >&5
7901 cat conftest.$ac_ext >&5
7902
7903                         eval 'ac_cv_func_'$cf_func'=no'
7904 fi
7905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7906 fi
7907                 done
7908                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7909
7910 fi
7911 echo "$as_me:7911: result: $cf_cv_link_funcs" >&5
7912 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7913         test "$ac_cv_func_link"    = yes &&
7914 cat >>confdefs.h <<\EOF
7915 #define HAVE_LINK 1
7916 EOF
7917
7918         test "$ac_cv_func_symlink" = yes &&
7919 cat >>confdefs.h <<\EOF
7920 #define HAVE_SYMLINK 1
7921 EOF
7922
7923 fi
7924
7925 with_links=no
7926 with_symlinks=no
7927
7928 # soft links (symbolic links) are useful for some systems where hard links do
7929 # not work, or to make it simpler to copy terminfo trees around.
7930 if test "x$ac_cv_func_symlink" = xyes ; then
7931         echo "$as_me:7931: checking if tic should use symbolic links" >&5
7932 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7933
7934 # Check whether --enable-symlinks or --disable-symlinks was given.
7935 if test "${enable_symlinks+set}" = set; then
7936   enableval="$enable_symlinks"
7937   with_symlinks=$enableval
7938 else
7939   with_symlinks=no
7940 fi;
7941         echo "$as_me:7941: result: $with_symlinks" >&5
7942 echo "${ECHO_T}$with_symlinks" >&6
7943 fi
7944
7945 # If we have hard links and did not choose to use soft links instead, there is
7946 # no reason to make this choice optional - use the hard links.
7947 if test "$with_symlinks" = no ; then
7948         echo "$as_me:7948: checking if tic should use hard links" >&5
7949 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7950         if test "x$ac_cv_func_link" = xyes ; then
7951                 with_links=yes
7952         else
7953                 with_links=no
7954         fi
7955         echo "$as_me:7955: result: $with_links" >&5
7956 echo "${ECHO_T}$with_links" >&6
7957 fi
7958
7959 test "x$with_links" = xyes &&
7960 cat >>confdefs.h <<\EOF
7961 #define USE_LINKS 1
7962 EOF
7963
7964 test "x$with_symlinks" = xyes &&
7965 cat >>confdefs.h <<\EOF
7966 #define USE_SYMLINKS 1
7967 EOF
7968
7969 ###   use option --enable-broken-linker to force on use of broken-linker support
7970 echo "$as_me:7970: checking if you want broken-linker support code" >&5
7971 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7972
7973 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7974 if test "${enable_broken_linker+set}" = set; then
7975   enableval="$enable_broken_linker"
7976   with_broken_linker=$enableval
7977 else
7978   with_broken_linker=${BROKEN_LINKER:-no}
7979 fi;
7980 echo "$as_me:7980: result: $with_broken_linker" >&5
7981 echo "${ECHO_T}$with_broken_linker" >&6
7982
7983 BROKEN_LINKER=0
7984 if test "x$with_broken_linker" = xyes ; then
7985
7986 cat >>confdefs.h <<\EOF
7987 #define BROKEN_LINKER 1
7988 EOF
7989
7990         BROKEN_LINKER=1
7991 elif test "$DFT_LWR_MODEL" = shared ; then
7992         case $cf_cv_system_name in
7993         (cygwin*)
7994
7995 cat >>confdefs.h <<\EOF
7996 #define BROKEN_LINKER 1
7997 EOF
7998
7999                 BROKEN_LINKER=1
8000                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8001
8002 echo "${as_me:-configure}:8002: testing cygwin linker is broken anyway ..." 1>&5
8003
8004                 ;;
8005         esac
8006 fi
8007
8008 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8009 echo "$as_me:8009: checking if tputs should process BSD-style prefix padding" >&5
8010 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8011
8012 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8013 if test "${enable_bsdpad+set}" = set; then
8014   enableval="$enable_bsdpad"
8015   with_bsdpad=$enableval
8016 else
8017   with_bsdpad=no
8018 fi;
8019 echo "$as_me:8019: result: $with_bsdpad" >&5
8020 echo "${ECHO_T}$with_bsdpad" >&6
8021 test "x$with_bsdpad" = xyes &&
8022 cat >>confdefs.h <<\EOF
8023 #define BSD_TPUTS 1
8024 EOF
8025
8026 ###   use option --enable-widec to turn on use of wide-character support
8027 NCURSES_CH_T=chtype
8028 NCURSES_LIBUTF8=0
8029
8030 NEED_WCHAR_H=0
8031 NCURSES_MBSTATE_T=0
8032 NCURSES_WCHAR_T=0
8033 NCURSES_WINT_T=0
8034
8035 # Check to define _XOPEN_SOURCE "automatically"
8036 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8037
8038 cf_XOPEN_SOURCE=500
8039 cf_POSIX_C_SOURCE=199506L
8040 cf_xopen_source=
8041
8042 case $host_os in
8043 (aix[4-7]*)
8044         cf_xopen_source="-D_ALL_SOURCE"
8045         ;;
8046 (msys)
8047         cf_XOPEN_SOURCE=600
8048         ;;
8049 (darwin[0-8].*)
8050         cf_xopen_source="-D_APPLE_C_SOURCE"
8051         ;;
8052 (darwin*)
8053         cf_xopen_source="-D_DARWIN_C_SOURCE"
8054         cf_XOPEN_SOURCE=
8055         ;;
8056 (freebsd*|dragonfly*)
8057         # 5.x headers associate
8058         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8059         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8060         cf_POSIX_C_SOURCE=200112L
8061         cf_XOPEN_SOURCE=600
8062         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8063         ;;
8064 (hpux11*)
8065         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8066         ;;
8067 (hpux*)
8068         cf_xopen_source="-D_HPUX_SOURCE"
8069         ;;
8070 (irix[56].*)
8071         cf_xopen_source="-D_SGI_SOURCE"
8072         cf_XOPEN_SOURCE=
8073         ;;
8074 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8075
8076 echo "$as_me:8076: checking if we must define _GNU_SOURCE" >&5
8077 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8078 if test "${cf_cv_gnu_source+set}" = set; then
8079   echo $ECHO_N "(cached) $ECHO_C" >&6
8080 else
8081
8082 cat >conftest.$ac_ext <<_ACEOF
8083 #line 8083 "configure"
8084 #include "confdefs.h"
8085 #include <sys/types.h>
8086 int
8087 main (void)
8088 {
8089
8090 #ifndef _XOPEN_SOURCE
8091 make an error
8092 #endif
8093   ;
8094   return 0;
8095 }
8096 _ACEOF
8097 rm -f conftest.$ac_objext
8098 if { (eval echo "$as_me:8098: \"$ac_compile\"") >&5
8099   (eval $ac_compile) 2>&5
8100   ac_status=$?
8101   echo "$as_me:8101: \$? = $ac_status" >&5
8102   (exit $ac_status); } &&
8103          { ac_try='test -s conftest.$ac_objext'
8104   { (eval echo "$as_me:8104: \"$ac_try\"") >&5
8105   (eval $ac_try) 2>&5
8106   ac_status=$?
8107   echo "$as_me:8107: \$? = $ac_status" >&5
8108   (exit $ac_status); }; }; then
8109   cf_cv_gnu_source=no
8110 else
8111   echo "$as_me: failed program was:" >&5
8112 cat conftest.$ac_ext >&5
8113 cf_save="$CPPFLAGS"
8114          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8115          cat >conftest.$ac_ext <<_ACEOF
8116 #line 8116 "configure"
8117 #include "confdefs.h"
8118 #include <sys/types.h>
8119 int
8120 main (void)
8121 {
8122
8123 #ifdef _XOPEN_SOURCE
8124 make an error
8125 #endif
8126   ;
8127   return 0;
8128 }
8129 _ACEOF
8130 rm -f conftest.$ac_objext
8131 if { (eval echo "$as_me:8131: \"$ac_compile\"") >&5
8132   (eval $ac_compile) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); } &&
8136          { ac_try='test -s conftest.$ac_objext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142   cf_cv_gnu_source=no
8143 else
8144   echo "$as_me: failed program was:" >&5
8145 cat conftest.$ac_ext >&5
8146 cf_cv_gnu_source=yes
8147 fi
8148 rm -f conftest.$ac_objext conftest.$ac_ext
8149         CPPFLAGS="$cf_save"
8150
8151 fi
8152 rm -f conftest.$ac_objext conftest.$ac_ext
8153
8154 fi
8155 echo "$as_me:8155: result: $cf_cv_gnu_source" >&5
8156 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8157
8158 if test "$cf_cv_gnu_source" = yes
8159 then
8160 echo "$as_me:8160: checking if we should also define _DEFAULT_SOURCE" >&5
8161 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8162 if test "${cf_cv_default_source+set}" = set; then
8163   echo $ECHO_N "(cached) $ECHO_C" >&6
8164 else
8165
8166 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8167         cat >conftest.$ac_ext <<_ACEOF
8168 #line 8168 "configure"
8169 #include "confdefs.h"
8170 #include <sys/types.h>
8171 int
8172 main (void)
8173 {
8174
8175 #ifdef _DEFAULT_SOURCE
8176 make an error
8177 #endif
8178   ;
8179   return 0;
8180 }
8181 _ACEOF
8182 rm -f conftest.$ac_objext
8183 if { (eval echo "$as_me:8183: \"$ac_compile\"") >&5
8184   (eval $ac_compile) 2>&5
8185   ac_status=$?
8186   echo "$as_me:8186: \$? = $ac_status" >&5
8187   (exit $ac_status); } &&
8188          { ac_try='test -s conftest.$ac_objext'
8189   { (eval echo "$as_me:8189: \"$ac_try\"") >&5
8190   (eval $ac_try) 2>&5
8191   ac_status=$?
8192   echo "$as_me:8192: \$? = $ac_status" >&5
8193   (exit $ac_status); }; }; then
8194   cf_cv_default_source=no
8195 else
8196   echo "$as_me: failed program was:" >&5
8197 cat conftest.$ac_ext >&5
8198 cf_cv_default_source=yes
8199 fi
8200 rm -f conftest.$ac_objext conftest.$ac_ext
8201
8202 fi
8203 echo "$as_me:8203: result: $cf_cv_default_source" >&5
8204 echo "${ECHO_T}$cf_cv_default_source" >&6
8205 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8206 fi
8207
8208         ;;
8209 (minix*)
8210         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8211         ;;
8212 (mirbsd*)
8213         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8214         cf_XOPEN_SOURCE=
8215
8216 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8217
8218 cf_save_CFLAGS="$CFLAGS"
8219 cf_save_CPPFLAGS="$CPPFLAGS"
8220
8221 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8222         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8223                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8224
8225 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8226         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8227                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8228
8229 echo "$as_me:8229: checking if we should define _POSIX_C_SOURCE" >&5
8230 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8231 if test "${cf_cv_posix_c_source+set}" = set; then
8232   echo $ECHO_N "(cached) $ECHO_C" >&6
8233 else
8234
8235 echo "${as_me:-configure}:8235: testing if the symbol is already defined go no further ..." 1>&5
8236
8237         cat >conftest.$ac_ext <<_ACEOF
8238 #line 8238 "configure"
8239 #include "confdefs.h"
8240 #include <sys/types.h>
8241 int
8242 main (void)
8243 {
8244
8245 #ifndef _POSIX_C_SOURCE
8246 make an error
8247 #endif
8248   ;
8249   return 0;
8250 }
8251 _ACEOF
8252 rm -f conftest.$ac_objext
8253 if { (eval echo "$as_me:8253: \"$ac_compile\"") >&5
8254   (eval $ac_compile) 2>&5
8255   ac_status=$?
8256   echo "$as_me:8256: \$? = $ac_status" >&5
8257   (exit $ac_status); } &&
8258          { ac_try='test -s conftest.$ac_objext'
8259   { (eval echo "$as_me:8259: \"$ac_try\"") >&5
8260   (eval $ac_try) 2>&5
8261   ac_status=$?
8262   echo "$as_me:8262: \$? = $ac_status" >&5
8263   (exit $ac_status); }; }; then
8264   cf_cv_posix_c_source=no
8265 else
8266   echo "$as_me: failed program was:" >&5
8267 cat conftest.$ac_ext >&5
8268 cf_want_posix_source=no
8269          case .$cf_POSIX_C_SOURCE in
8270          (.[12]??*)
8271                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8272                 ;;
8273          (.2)
8274                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8275                 cf_want_posix_source=yes
8276                 ;;
8277          (.*)
8278                 cf_want_posix_source=yes
8279                 ;;
8280          esac
8281          if test "$cf_want_posix_source" = yes ; then
8282                 cat >conftest.$ac_ext <<_ACEOF
8283 #line 8283 "configure"
8284 #include "confdefs.h"
8285 #include <sys/types.h>
8286 int
8287 main (void)
8288 {
8289
8290 #ifdef _POSIX_SOURCE
8291 make an error
8292 #endif
8293   ;
8294   return 0;
8295 }
8296 _ACEOF
8297 rm -f conftest.$ac_objext
8298 if { (eval echo "$as_me:8298: \"$ac_compile\"") >&5
8299   (eval $ac_compile) 2>&5
8300   ac_status=$?
8301   echo "$as_me:8301: \$? = $ac_status" >&5
8302   (exit $ac_status); } &&
8303          { ac_try='test -s conftest.$ac_objext'
8304   { (eval echo "$as_me:8304: \"$ac_try\"") >&5
8305   (eval $ac_try) 2>&5
8306   ac_status=$?
8307   echo "$as_me:8307: \$? = $ac_status" >&5
8308   (exit $ac_status); }; }; then
8309   :
8310 else
8311   echo "$as_me: failed program was:" >&5
8312 cat conftest.$ac_ext >&5
8313 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8314 fi
8315 rm -f conftest.$ac_objext conftest.$ac_ext
8316          fi
8317
8318 echo "${as_me:-configure}:8318: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8319
8320          CFLAGS="$cf_trim_CFLAGS"
8321          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8322
8323 echo "${as_me:-configure}:8323: testing if the second compile does not leave our definition intact error ..." 1>&5
8324
8325          cat >conftest.$ac_ext <<_ACEOF
8326 #line 8326 "configure"
8327 #include "confdefs.h"
8328 #include <sys/types.h>
8329 int
8330 main (void)
8331 {
8332
8333 #ifndef _POSIX_C_SOURCE
8334 make an error
8335 #endif
8336   ;
8337   return 0;
8338 }
8339 _ACEOF
8340 rm -f conftest.$ac_objext
8341 if { (eval echo "$as_me:8341: \"$ac_compile\"") >&5
8342   (eval $ac_compile) 2>&5
8343   ac_status=$?
8344   echo "$as_me:8344: \$? = $ac_status" >&5
8345   (exit $ac_status); } &&
8346          { ac_try='test -s conftest.$ac_objext'
8347   { (eval echo "$as_me:8347: \"$ac_try\"") >&5
8348   (eval $ac_try) 2>&5
8349   ac_status=$?
8350   echo "$as_me:8350: \$? = $ac_status" >&5
8351   (exit $ac_status); }; }; then
8352   :
8353 else
8354   echo "$as_me: failed program was:" >&5
8355 cat conftest.$ac_ext >&5
8356 cf_cv_posix_c_source=no
8357 fi
8358 rm -f conftest.$ac_objext conftest.$ac_ext
8359          CFLAGS="$cf_save_CFLAGS"
8360          CPPFLAGS="$cf_save_CPPFLAGS"
8361
8362 fi
8363 rm -f conftest.$ac_objext conftest.$ac_ext
8364
8365 fi
8366 echo "$as_me:8366: result: $cf_cv_posix_c_source" >&5
8367 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8368
8369 if test "$cf_cv_posix_c_source" != no ; then
8370         CFLAGS="$cf_trim_CFLAGS"
8371         CPPFLAGS="$cf_trim_CPPFLAGS"
8372
8373 cf_fix_cppflags=no
8374 cf_new_cflags=
8375 cf_new_cppflags=
8376 cf_new_extra_cppflags=
8377
8378 for cf_add_cflags in $cf_cv_posix_c_source
8379 do
8380 case $cf_fix_cppflags in
8381 (no)
8382         case $cf_add_cflags in
8383         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8384                 case $cf_add_cflags in
8385                 (-D*)
8386                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8387
8388                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8389                                 && test -z "${cf_tst_cflags}" \
8390                                 && cf_fix_cppflags=yes
8391
8392                         if test $cf_fix_cppflags = yes ; then
8393
8394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8396
8397                                 continue
8398                         elif test "${cf_tst_cflags}" = "\"'" ; then
8399
8400         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8401         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8402
8403                                 continue
8404                         fi
8405                         ;;
8406                 esac
8407                 case "$CPPFLAGS" in
8408                 (*$cf_add_cflags)
8409                         ;;
8410                 (*)
8411                         case $cf_add_cflags in
8412                         (-D*)
8413                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8414
8415 CPPFLAGS=`echo "$CPPFLAGS" | \
8416         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8417                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8418
8419                                 ;;
8420                         esac
8421
8422         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8423         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8424
8425                         ;;
8426                 esac
8427                 ;;
8428         (*)
8429
8430         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8431         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8432
8433                 ;;
8434         esac
8435         ;;
8436 (yes)
8437
8438         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8439         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8440
8441         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8442
8443         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8444                 && test -z "${cf_tst_cflags}" \
8445                 && cf_fix_cppflags=no
8446         ;;
8447 esac
8448 done
8449
8450 if test -n "$cf_new_cflags" ; then
8451
8452         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8453         CFLAGS="${CFLAGS}$cf_new_cflags"
8454
8455 fi
8456
8457 if test -n "$cf_new_cppflags" ; then
8458
8459         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8460         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8461
8462 fi
8463
8464 if test -n "$cf_new_extra_cppflags" ; then
8465
8466         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8467         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8468
8469 fi
8470
8471 fi
8472
8473         ;;
8474 (netbsd*)
8475         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8476         ;;
8477 (openbsd[4-9]*)
8478         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8479         cf_xopen_source="-D_BSD_SOURCE"
8480         cf_XOPEN_SOURCE=600
8481         ;;
8482 (openbsd*)
8483         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8484         ;;
8485 (osf[45]*)
8486         cf_xopen_source="-D_OSF_SOURCE"
8487         ;;
8488 (nto-qnx*)
8489         cf_xopen_source="-D_QNX_SOURCE"
8490         ;;
8491 (sco*)
8492         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8493         ;;
8494 (solaris2.*)
8495         cf_xopen_source="-D__EXTENSIONS__"
8496         cf_cv_xopen_source=broken
8497         ;;
8498 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8499         cf_XOPEN_SOURCE=
8500         cf_POSIX_C_SOURCE=
8501         ;;
8502 (*)
8503
8504 echo "$as_me:8504: checking if we should define _XOPEN_SOURCE" >&5
8505 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8506 if test "${cf_cv_xopen_source+set}" = set; then
8507   echo $ECHO_N "(cached) $ECHO_C" >&6
8508 else
8509
8510         cat >conftest.$ac_ext <<_ACEOF
8511 #line 8511 "configure"
8512 #include "confdefs.h"
8513
8514 #include <stdlib.h>
8515 #include <string.h>
8516 #include <sys/types.h>
8517
8518 int
8519 main (void)
8520 {
8521
8522 #ifndef _XOPEN_SOURCE
8523 make an error
8524 #endif
8525   ;
8526   return 0;
8527 }
8528 _ACEOF
8529 rm -f conftest.$ac_objext
8530 if { (eval echo "$as_me:8530: \"$ac_compile\"") >&5
8531   (eval $ac_compile) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit $ac_status); } &&
8535          { ac_try='test -s conftest.$ac_objext'
8536   { (eval echo "$as_me:8536: \"$ac_try\"") >&5
8537   (eval $ac_try) 2>&5
8538   ac_status=$?
8539   echo "$as_me:8539: \$? = $ac_status" >&5
8540   (exit $ac_status); }; }; then
8541   cf_cv_xopen_source=no
8542 else
8543   echo "$as_me: failed program was:" >&5
8544 cat conftest.$ac_ext >&5
8545 cf_save="$CPPFLAGS"
8546          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8547          cat >conftest.$ac_ext <<_ACEOF
8548 #line 8548 "configure"
8549 #include "confdefs.h"
8550
8551 #include <stdlib.h>
8552 #include <string.h>
8553 #include <sys/types.h>
8554
8555 int
8556 main (void)
8557 {
8558
8559 #ifdef _XOPEN_SOURCE
8560 make an error
8561 #endif
8562   ;
8563   return 0;
8564 }
8565 _ACEOF
8566 rm -f conftest.$ac_objext
8567 if { (eval echo "$as_me:8567: \"$ac_compile\"") >&5
8568   (eval $ac_compile) 2>&5
8569   ac_status=$?
8570   echo "$as_me:8570: \$? = $ac_status" >&5
8571   (exit $ac_status); } &&
8572          { ac_try='test -s conftest.$ac_objext'
8573   { (eval echo "$as_me:8573: \"$ac_try\"") >&5
8574   (eval $ac_try) 2>&5
8575   ac_status=$?
8576   echo "$as_me:8576: \$? = $ac_status" >&5
8577   (exit $ac_status); }; }; then
8578   cf_cv_xopen_source=no
8579 else
8580   echo "$as_me: failed program was:" >&5
8581 cat conftest.$ac_ext >&5
8582 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8583 fi
8584 rm -f conftest.$ac_objext conftest.$ac_ext
8585         CPPFLAGS="$cf_save"
8586
8587 fi
8588 rm -f conftest.$ac_objext conftest.$ac_ext
8589
8590 fi
8591 echo "$as_me:8591: result: $cf_cv_xopen_source" >&5
8592 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8593
8594 if test "$cf_cv_xopen_source" != no ; then
8595
8596 CFLAGS=`echo "$CFLAGS" | \
8597         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8598                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8599
8600 CPPFLAGS=`echo "$CPPFLAGS" | \
8601         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8602                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8603
8604         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8605
8606 cf_fix_cppflags=no
8607 cf_new_cflags=
8608 cf_new_cppflags=
8609 cf_new_extra_cppflags=
8610
8611 for cf_add_cflags in $cf_temp_xopen_source
8612 do
8613 case $cf_fix_cppflags in
8614 (no)
8615         case $cf_add_cflags in
8616         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8617                 case $cf_add_cflags in
8618                 (-D*)
8619                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8620
8621                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8622                                 && test -z "${cf_tst_cflags}" \
8623                                 && cf_fix_cppflags=yes
8624
8625                         if test $cf_fix_cppflags = yes ; then
8626
8627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8629
8630                                 continue
8631                         elif test "${cf_tst_cflags}" = "\"'" ; then
8632
8633         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8634         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8635
8636                                 continue
8637                         fi
8638                         ;;
8639                 esac
8640                 case "$CPPFLAGS" in
8641                 (*$cf_add_cflags)
8642                         ;;
8643                 (*)
8644                         case $cf_add_cflags in
8645                         (-D*)
8646                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8647
8648 CPPFLAGS=`echo "$CPPFLAGS" | \
8649         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8650                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8651
8652                                 ;;
8653                         esac
8654
8655         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8656         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8657
8658                         ;;
8659                 esac
8660                 ;;
8661         (*)
8662
8663         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8664         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8665
8666                 ;;
8667         esac
8668         ;;
8669 (yes)
8670
8671         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8672         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8673
8674         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8675
8676         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8677                 && test -z "${cf_tst_cflags}" \
8678                 && cf_fix_cppflags=no
8679         ;;
8680 esac
8681 done
8682
8683 if test -n "$cf_new_cflags" ; then
8684
8685         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8686         CFLAGS="${CFLAGS}$cf_new_cflags"
8687
8688 fi
8689
8690 if test -n "$cf_new_cppflags" ; then
8691
8692         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8693         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8694
8695 fi
8696
8697 if test -n "$cf_new_extra_cppflags" ; then
8698
8699         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8700         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8701
8702 fi
8703
8704 fi
8705
8706 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8707
8708 cf_save_CFLAGS="$CFLAGS"
8709 cf_save_CPPFLAGS="$CPPFLAGS"
8710
8711 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8712         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8713                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8714
8715 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8716         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8717                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8718
8719 echo "$as_me:8719: checking if we should define _POSIX_C_SOURCE" >&5
8720 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8721 if test "${cf_cv_posix_c_source+set}" = set; then
8722   echo $ECHO_N "(cached) $ECHO_C" >&6
8723 else
8724
8725 echo "${as_me:-configure}:8725: testing if the symbol is already defined go no further ..." 1>&5
8726
8727         cat >conftest.$ac_ext <<_ACEOF
8728 #line 8728 "configure"
8729 #include "confdefs.h"
8730 #include <sys/types.h>
8731 int
8732 main (void)
8733 {
8734
8735 #ifndef _POSIX_C_SOURCE
8736 make an error
8737 #endif
8738   ;
8739   return 0;
8740 }
8741 _ACEOF
8742 rm -f conftest.$ac_objext
8743 if { (eval echo "$as_me:8743: \"$ac_compile\"") >&5
8744   (eval $ac_compile) 2>&5
8745   ac_status=$?
8746   echo "$as_me:8746: \$? = $ac_status" >&5
8747   (exit $ac_status); } &&
8748          { ac_try='test -s conftest.$ac_objext'
8749   { (eval echo "$as_me:8749: \"$ac_try\"") >&5
8750   (eval $ac_try) 2>&5
8751   ac_status=$?
8752   echo "$as_me:8752: \$? = $ac_status" >&5
8753   (exit $ac_status); }; }; then
8754   cf_cv_posix_c_source=no
8755 else
8756   echo "$as_me: failed program was:" >&5
8757 cat conftest.$ac_ext >&5
8758 cf_want_posix_source=no
8759          case .$cf_POSIX_C_SOURCE in
8760          (.[12]??*)
8761                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8762                 ;;
8763          (.2)
8764                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8765                 cf_want_posix_source=yes
8766                 ;;
8767          (.*)
8768                 cf_want_posix_source=yes
8769                 ;;
8770          esac
8771          if test "$cf_want_posix_source" = yes ; then
8772                 cat >conftest.$ac_ext <<_ACEOF
8773 #line 8773 "configure"
8774 #include "confdefs.h"
8775 #include <sys/types.h>
8776 int
8777 main (void)
8778 {
8779
8780 #ifdef _POSIX_SOURCE
8781 make an error
8782 #endif
8783   ;
8784   return 0;
8785 }
8786 _ACEOF
8787 rm -f conftest.$ac_objext
8788 if { (eval echo "$as_me:8788: \"$ac_compile\"") >&5
8789   (eval $ac_compile) 2>&5
8790   ac_status=$?
8791   echo "$as_me:8791: \$? = $ac_status" >&5
8792   (exit $ac_status); } &&
8793          { ac_try='test -s conftest.$ac_objext'
8794   { (eval echo "$as_me:8794: \"$ac_try\"") >&5
8795   (eval $ac_try) 2>&5
8796   ac_status=$?
8797   echo "$as_me:8797: \$? = $ac_status" >&5
8798   (exit $ac_status); }; }; then
8799   :
8800 else
8801   echo "$as_me: failed program was:" >&5
8802 cat conftest.$ac_ext >&5
8803 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8804 fi
8805 rm -f conftest.$ac_objext conftest.$ac_ext
8806          fi
8807
8808 echo "${as_me:-configure}:8808: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8809
8810          CFLAGS="$cf_trim_CFLAGS"
8811          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8812
8813 echo "${as_me:-configure}:8813: testing if the second compile does not leave our definition intact error ..." 1>&5
8814
8815          cat >conftest.$ac_ext <<_ACEOF
8816 #line 8816 "configure"
8817 #include "confdefs.h"
8818 #include <sys/types.h>
8819 int
8820 main (void)
8821 {
8822
8823 #ifndef _POSIX_C_SOURCE
8824 make an error
8825 #endif
8826   ;
8827   return 0;
8828 }
8829 _ACEOF
8830 rm -f conftest.$ac_objext
8831 if { (eval echo "$as_me:8831: \"$ac_compile\"") >&5
8832   (eval $ac_compile) 2>&5
8833   ac_status=$?
8834   echo "$as_me:8834: \$? = $ac_status" >&5
8835   (exit $ac_status); } &&
8836          { ac_try='test -s conftest.$ac_objext'
8837   { (eval echo "$as_me:8837: \"$ac_try\"") >&5
8838   (eval $ac_try) 2>&5
8839   ac_status=$?
8840   echo "$as_me:8840: \$? = $ac_status" >&5
8841   (exit $ac_status); }; }; then
8842   :
8843 else
8844   echo "$as_me: failed program was:" >&5
8845 cat conftest.$ac_ext >&5
8846 cf_cv_posix_c_source=no
8847 fi
8848 rm -f conftest.$ac_objext conftest.$ac_ext
8849          CFLAGS="$cf_save_CFLAGS"
8850          CPPFLAGS="$cf_save_CPPFLAGS"
8851
8852 fi
8853 rm -f conftest.$ac_objext conftest.$ac_ext
8854
8855 fi
8856 echo "$as_me:8856: result: $cf_cv_posix_c_source" >&5
8857 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8858
8859 if test "$cf_cv_posix_c_source" != no ; then
8860         CFLAGS="$cf_trim_CFLAGS"
8861         CPPFLAGS="$cf_trim_CPPFLAGS"
8862
8863 cf_fix_cppflags=no
8864 cf_new_cflags=
8865 cf_new_cppflags=
8866 cf_new_extra_cppflags=
8867
8868 for cf_add_cflags in $cf_cv_posix_c_source
8869 do
8870 case $cf_fix_cppflags in
8871 (no)
8872         case $cf_add_cflags in
8873         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8874                 case $cf_add_cflags in
8875                 (-D*)
8876                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8877
8878                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8879                                 && test -z "${cf_tst_cflags}" \
8880                                 && cf_fix_cppflags=yes
8881
8882                         if test $cf_fix_cppflags = yes ; then
8883
8884         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8885         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8886
8887                                 continue
8888                         elif test "${cf_tst_cflags}" = "\"'" ; then
8889
8890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8892
8893                                 continue
8894                         fi
8895                         ;;
8896                 esac
8897                 case "$CPPFLAGS" in
8898                 (*$cf_add_cflags)
8899                         ;;
8900                 (*)
8901                         case $cf_add_cflags in
8902                         (-D*)
8903                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8904
8905 CPPFLAGS=`echo "$CPPFLAGS" | \
8906         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8907                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8908
8909                                 ;;
8910                         esac
8911
8912         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8913         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8914
8915                         ;;
8916                 esac
8917                 ;;
8918         (*)
8919
8920         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8921         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8922
8923                 ;;
8924         esac
8925         ;;
8926 (yes)
8927
8928         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8929         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8930
8931         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8932
8933         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8934                 && test -z "${cf_tst_cflags}" \
8935                 && cf_fix_cppflags=no
8936         ;;
8937 esac
8938 done
8939
8940 if test -n "$cf_new_cflags" ; then
8941
8942         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8943         CFLAGS="${CFLAGS}$cf_new_cflags"
8944
8945 fi
8946
8947 if test -n "$cf_new_cppflags" ; then
8948
8949         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8950         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8951
8952 fi
8953
8954 if test -n "$cf_new_extra_cppflags" ; then
8955
8956         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8957         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8958
8959 fi
8960
8961 fi
8962
8963         ;;
8964 esac
8965
8966 if test -n "$cf_xopen_source" ; then
8967
8968 cf_fix_cppflags=no
8969 cf_new_cflags=
8970 cf_new_cppflags=
8971 cf_new_extra_cppflags=
8972
8973 for cf_add_cflags in $cf_xopen_source
8974 do
8975 case $cf_fix_cppflags in
8976 (no)
8977         case $cf_add_cflags in
8978         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8979                 case $cf_add_cflags in
8980                 (-D*)
8981                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8982
8983                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8984                                 && test -z "${cf_tst_cflags}" \
8985                                 && cf_fix_cppflags=yes
8986
8987                         if test $cf_fix_cppflags = yes ; then
8988
8989         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8990         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8991
8992                                 continue
8993                         elif test "${cf_tst_cflags}" = "\"'" ; then
8994
8995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8997
8998                                 continue
8999                         fi
9000                         ;;
9001                 esac
9002                 case "$CPPFLAGS" in
9003                 (*$cf_add_cflags)
9004                         ;;
9005                 (*)
9006                         case $cf_add_cflags in
9007                         (-D*)
9008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9009
9010 CPPFLAGS=`echo "$CPPFLAGS" | \
9011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9013
9014                                 ;;
9015                         esac
9016
9017         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9018         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9019
9020                         ;;
9021                 esac
9022                 ;;
9023         (*)
9024
9025         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9026         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9027
9028                 ;;
9029         esac
9030         ;;
9031 (yes)
9032
9033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9035
9036         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9037
9038         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9039                 && test -z "${cf_tst_cflags}" \
9040                 && cf_fix_cppflags=no
9041         ;;
9042 esac
9043 done
9044
9045 if test -n "$cf_new_cflags" ; then
9046         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9047
9048 echo "${as_me:-configure}:9048: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9049
9050         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9051         CFLAGS="${CFLAGS}$cf_new_cflags"
9052
9053 fi
9054
9055 if test -n "$cf_new_cppflags" ; then
9056         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9057
9058 echo "${as_me:-configure}:9058: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9059
9060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9061         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9062
9063 fi
9064
9065 if test -n "$cf_new_extra_cppflags" ; then
9066         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9067
9068 echo "${as_me:-configure}:9068: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9069
9070         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9071         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9072
9073 fi
9074
9075 fi
9076
9077 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9078         echo "$as_me:9078: checking if _XOPEN_SOURCE really is set" >&5
9079 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9080         cat >conftest.$ac_ext <<_ACEOF
9081 #line 9081 "configure"
9082 #include "confdefs.h"
9083 #include <stdlib.h>
9084 int
9085 main (void)
9086 {
9087
9088 #ifndef _XOPEN_SOURCE
9089 make an error
9090 #endif
9091   ;
9092   return 0;
9093 }
9094 _ACEOF
9095 rm -f conftest.$ac_objext
9096 if { (eval echo "$as_me:9096: \"$ac_compile\"") >&5
9097   (eval $ac_compile) 2>&5
9098   ac_status=$?
9099   echo "$as_me:9099: \$? = $ac_status" >&5
9100   (exit $ac_status); } &&
9101          { ac_try='test -s conftest.$ac_objext'
9102   { (eval echo "$as_me:9102: \"$ac_try\"") >&5
9103   (eval $ac_try) 2>&5
9104   ac_status=$?
9105   echo "$as_me:9105: \$? = $ac_status" >&5
9106   (exit $ac_status); }; }; then
9107   cf_XOPEN_SOURCE_set=yes
9108 else
9109   echo "$as_me: failed program was:" >&5
9110 cat conftest.$ac_ext >&5
9111 cf_XOPEN_SOURCE_set=no
9112 fi
9113 rm -f conftest.$ac_objext conftest.$ac_ext
9114         echo "$as_me:9114: result: $cf_XOPEN_SOURCE_set" >&5
9115 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9116         if test $cf_XOPEN_SOURCE_set = yes
9117         then
9118                 cat >conftest.$ac_ext <<_ACEOF
9119 #line 9119 "configure"
9120 #include "confdefs.h"
9121 #include <stdlib.h>
9122 int
9123 main (void)
9124 {
9125
9126 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9127 make an error
9128 #endif
9129   ;
9130   return 0;
9131 }
9132 _ACEOF
9133 rm -f conftest.$ac_objext
9134 if { (eval echo "$as_me:9134: \"$ac_compile\"") >&5
9135   (eval $ac_compile) 2>&5
9136   ac_status=$?
9137   echo "$as_me:9137: \$? = $ac_status" >&5
9138   (exit $ac_status); } &&
9139          { ac_try='test -s conftest.$ac_objext'
9140   { (eval echo "$as_me:9140: \"$ac_try\"") >&5
9141   (eval $ac_try) 2>&5
9142   ac_status=$?
9143   echo "$as_me:9143: \$? = $ac_status" >&5
9144   (exit $ac_status); }; }; then
9145   cf_XOPEN_SOURCE_set_ok=yes
9146 else
9147   echo "$as_me: failed program was:" >&5
9148 cat conftest.$ac_ext >&5
9149 cf_XOPEN_SOURCE_set_ok=no
9150 fi
9151 rm -f conftest.$ac_objext conftest.$ac_ext
9152                 if test $cf_XOPEN_SOURCE_set_ok = no
9153                 then
9154                         { echo "$as_me:9154: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9155 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9156                 fi
9157         else
9158
9159 echo "$as_me:9159: checking if we should define _XOPEN_SOURCE" >&5
9160 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9161 if test "${cf_cv_xopen_source+set}" = set; then
9162   echo $ECHO_N "(cached) $ECHO_C" >&6
9163 else
9164
9165         cat >conftest.$ac_ext <<_ACEOF
9166 #line 9166 "configure"
9167 #include "confdefs.h"
9168
9169 #include <stdlib.h>
9170 #include <string.h>
9171 #include <sys/types.h>
9172
9173 int
9174 main (void)
9175 {
9176
9177 #ifndef _XOPEN_SOURCE
9178 make an error
9179 #endif
9180   ;
9181   return 0;
9182 }
9183 _ACEOF
9184 rm -f conftest.$ac_objext
9185 if { (eval echo "$as_me:9185: \"$ac_compile\"") >&5
9186   (eval $ac_compile) 2>&5
9187   ac_status=$?
9188   echo "$as_me:9188: \$? = $ac_status" >&5
9189   (exit $ac_status); } &&
9190          { ac_try='test -s conftest.$ac_objext'
9191   { (eval echo "$as_me:9191: \"$ac_try\"") >&5
9192   (eval $ac_try) 2>&5
9193   ac_status=$?
9194   echo "$as_me:9194: \$? = $ac_status" >&5
9195   (exit $ac_status); }; }; then
9196   cf_cv_xopen_source=no
9197 else
9198   echo "$as_me: failed program was:" >&5
9199 cat conftest.$ac_ext >&5
9200 cf_save="$CPPFLAGS"
9201          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9202          cat >conftest.$ac_ext <<_ACEOF
9203 #line 9203 "configure"
9204 #include "confdefs.h"
9205
9206 #include <stdlib.h>
9207 #include <string.h>
9208 #include <sys/types.h>
9209
9210 int
9211 main (void)
9212 {
9213
9214 #ifdef _XOPEN_SOURCE
9215 make an error
9216 #endif
9217   ;
9218   return 0;
9219 }
9220 _ACEOF
9221 rm -f conftest.$ac_objext
9222 if { (eval echo "$as_me:9222: \"$ac_compile\"") >&5
9223   (eval $ac_compile) 2>&5
9224   ac_status=$?
9225   echo "$as_me:9225: \$? = $ac_status" >&5
9226   (exit $ac_status); } &&
9227          { ac_try='test -s conftest.$ac_objext'
9228   { (eval echo "$as_me:9228: \"$ac_try\"") >&5
9229   (eval $ac_try) 2>&5
9230   ac_status=$?
9231   echo "$as_me:9231: \$? = $ac_status" >&5
9232   (exit $ac_status); }; }; then
9233   cf_cv_xopen_source=no
9234 else
9235   echo "$as_me: failed program was:" >&5
9236 cat conftest.$ac_ext >&5
9237 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9238 fi
9239 rm -f conftest.$ac_objext conftest.$ac_ext
9240         CPPFLAGS="$cf_save"
9241
9242 fi
9243 rm -f conftest.$ac_objext conftest.$ac_ext
9244
9245 fi
9246 echo "$as_me:9246: result: $cf_cv_xopen_source" >&5
9247 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9248
9249 if test "$cf_cv_xopen_source" != no ; then
9250
9251 CFLAGS=`echo "$CFLAGS" | \
9252         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9253                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9254
9255 CPPFLAGS=`echo "$CPPFLAGS" | \
9256         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9257                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9258
9259         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9260
9261 cf_fix_cppflags=no
9262 cf_new_cflags=
9263 cf_new_cppflags=
9264 cf_new_extra_cppflags=
9265
9266 for cf_add_cflags in $cf_temp_xopen_source
9267 do
9268 case $cf_fix_cppflags in
9269 (no)
9270         case $cf_add_cflags in
9271         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9272                 case $cf_add_cflags in
9273                 (-D*)
9274                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9275
9276                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9277                                 && test -z "${cf_tst_cflags}" \
9278                                 && cf_fix_cppflags=yes
9279
9280                         if test $cf_fix_cppflags = yes ; then
9281
9282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9284
9285                                 continue
9286                         elif test "${cf_tst_cflags}" = "\"'" ; then
9287
9288         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9289         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9290
9291                                 continue
9292                         fi
9293                         ;;
9294                 esac
9295                 case "$CPPFLAGS" in
9296                 (*$cf_add_cflags)
9297                         ;;
9298                 (*)
9299                         case $cf_add_cflags in
9300                         (-D*)
9301                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9302
9303 CPPFLAGS=`echo "$CPPFLAGS" | \
9304         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9305                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9306
9307                                 ;;
9308                         esac
9309
9310         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9311         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9312
9313                         ;;
9314                 esac
9315                 ;;
9316         (*)
9317
9318         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9319         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9320
9321                 ;;
9322         esac
9323         ;;
9324 (yes)
9325
9326         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9327         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9328
9329         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9330
9331         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9332                 && test -z "${cf_tst_cflags}" \
9333                 && cf_fix_cppflags=no
9334         ;;
9335 esac
9336 done
9337
9338 if test -n "$cf_new_cflags" ; then
9339
9340         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9341         CFLAGS="${CFLAGS}$cf_new_cflags"
9342
9343 fi
9344
9345 if test -n "$cf_new_cppflags" ; then
9346
9347         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9348         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9349
9350 fi
9351
9352 if test -n "$cf_new_extra_cppflags" ; then
9353
9354         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9355         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9356
9357 fi
9358
9359 fi
9360
9361         fi
9362 fi
9363
9364 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9365
9366 # Work around breakage on OS X
9367
9368 echo "$as_me:9368: checking if SIGWINCH is defined" >&5
9369 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9370 if test "${cf_cv_define_sigwinch+set}" = set; then
9371   echo $ECHO_N "(cached) $ECHO_C" >&6
9372 else
9373
9374         cat >conftest.$ac_ext <<_ACEOF
9375 #line 9375 "configure"
9376 #include "confdefs.h"
9377
9378 #include <sys/types.h>
9379 #include <sys/signal.h>
9380
9381 int
9382 main (void)
9383 {
9384 int x = SIGWINCH
9385   ;
9386   return 0;
9387 }
9388 _ACEOF
9389 rm -f conftest.$ac_objext
9390 if { (eval echo "$as_me:9390: \"$ac_compile\"") >&5
9391   (eval $ac_compile) 2>&5
9392   ac_status=$?
9393   echo "$as_me:9393: \$? = $ac_status" >&5
9394   (exit $ac_status); } &&
9395          { ac_try='test -s conftest.$ac_objext'
9396   { (eval echo "$as_me:9396: \"$ac_try\"") >&5
9397   (eval $ac_try) 2>&5
9398   ac_status=$?
9399   echo "$as_me:9399: \$? = $ac_status" >&5
9400   (exit $ac_status); }; }; then
9401   cf_cv_define_sigwinch=yes
9402 else
9403   echo "$as_me: failed program was:" >&5
9404 cat conftest.$ac_ext >&5
9405 cat >conftest.$ac_ext <<_ACEOF
9406 #line 9406 "configure"
9407 #include "confdefs.h"
9408
9409 #undef _XOPEN_SOURCE
9410 #undef _POSIX_SOURCE
9411 #undef _POSIX_C_SOURCE
9412 #include <sys/types.h>
9413 #include <sys/signal.h>
9414
9415 int
9416 main (void)
9417 {
9418 int x = SIGWINCH
9419   ;
9420   return 0;
9421 }
9422 _ACEOF
9423 rm -f conftest.$ac_objext
9424 if { (eval echo "$as_me:9424: \"$ac_compile\"") >&5
9425   (eval $ac_compile) 2>&5
9426   ac_status=$?
9427   echo "$as_me:9427: \$? = $ac_status" >&5
9428   (exit $ac_status); } &&
9429          { ac_try='test -s conftest.$ac_objext'
9430   { (eval echo "$as_me:9430: \"$ac_try\"") >&5
9431   (eval $ac_try) 2>&5
9432   ac_status=$?
9433   echo "$as_me:9433: \$? = $ac_status" >&5
9434   (exit $ac_status); }; }; then
9435   cf_cv_define_sigwinch=maybe
9436 else
9437   echo "$as_me: failed program was:" >&5
9438 cat conftest.$ac_ext >&5
9439 cf_cv_define_sigwinch=no
9440 fi
9441 rm -f conftest.$ac_objext conftest.$ac_ext
9442
9443 fi
9444 rm -f conftest.$ac_objext conftest.$ac_ext
9445
9446 fi
9447 echo "$as_me:9447: result: $cf_cv_define_sigwinch" >&5
9448 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9449
9450 if test "$cf_cv_define_sigwinch" = maybe ; then
9451 echo "$as_me:9451: checking for actual SIGWINCH definition" >&5
9452 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9453 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9454   echo $ECHO_N "(cached) $ECHO_C" >&6
9455 else
9456
9457 cf_cv_fixup_sigwinch=unknown
9458 cf_sigwinch=32
9459 while test $cf_sigwinch != 1
9460 do
9461         cat >conftest.$ac_ext <<_ACEOF
9462 #line 9462 "configure"
9463 #include "confdefs.h"
9464
9465 #undef _XOPEN_SOURCE
9466 #undef _POSIX_SOURCE
9467 #undef _POSIX_C_SOURCE
9468 #include <sys/types.h>
9469 #include <sys/signal.h>
9470
9471 int
9472 main (void)
9473 {
9474
9475 #if SIGWINCH != $cf_sigwinch
9476 make an error
9477 #endif
9478 int x = SIGWINCH
9479   ;
9480   return 0;
9481 }
9482 _ACEOF
9483 rm -f conftest.$ac_objext
9484 if { (eval echo "$as_me:9484: \"$ac_compile\"") >&5
9485   (eval $ac_compile) 2>&5
9486   ac_status=$?
9487   echo "$as_me:9487: \$? = $ac_status" >&5
9488   (exit $ac_status); } &&
9489          { ac_try='test -s conftest.$ac_objext'
9490   { (eval echo "$as_me:9490: \"$ac_try\"") >&5
9491   (eval $ac_try) 2>&5
9492   ac_status=$?
9493   echo "$as_me:9493: \$? = $ac_status" >&5
9494   (exit $ac_status); }; }; then
9495   cf_cv_fixup_sigwinch=$cf_sigwinch
9496          break
9497 else
9498   echo "$as_me: failed program was:" >&5
9499 cat conftest.$ac_ext >&5
9500 fi
9501 rm -f conftest.$ac_objext conftest.$ac_ext
9502
9503 cf_sigwinch=`expr $cf_sigwinch - 1`
9504 done
9505
9506 fi
9507 echo "$as_me:9507: result: $cf_cv_fixup_sigwinch" >&5
9508 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9509
9510         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9511                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9512         fi
9513 fi
9514
9515 # Checks for CODESET support.
9516
9517 echo "$as_me:9517: checking for nl_langinfo and CODESET" >&5
9518 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9519 if test "${am_cv_langinfo_codeset+set}" = set; then
9520   echo $ECHO_N "(cached) $ECHO_C" >&6
9521 else
9522   cat >conftest.$ac_ext <<_ACEOF
9523 #line 9523 "configure"
9524 #include "confdefs.h"
9525 #include <langinfo.h>
9526 int
9527 main (void)
9528 {
9529 char* cs = nl_langinfo(CODESET);
9530   ;
9531   return 0;
9532 }
9533 _ACEOF
9534 rm -f conftest.$ac_objext conftest$ac_exeext
9535 if { (eval echo "$as_me:9535: \"$ac_link\"") >&5
9536   (eval $ac_link) 2>&5
9537   ac_status=$?
9538   echo "$as_me:9538: \$? = $ac_status" >&5
9539   (exit $ac_status); } &&
9540          { ac_try='test -s conftest$ac_exeext'
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   am_cv_langinfo_codeset=yes
9547 else
9548   echo "$as_me: failed program was:" >&5
9549 cat conftest.$ac_ext >&5
9550 am_cv_langinfo_codeset=no
9551 fi
9552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9553
9554 fi
9555 echo "$as_me:9555: result: $am_cv_langinfo_codeset" >&5
9556 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9557         if test $am_cv_langinfo_codeset = yes; then
9558
9559 cat >>confdefs.h <<\EOF
9560 #define HAVE_LANGINFO_CODESET 1
9561 EOF
9562
9563         fi
9564
9565 # use these variables to work around a defect in gcc's fixincludes.
9566 NCURSES_OK_WCHAR_T=
9567 NCURSES_OK_WINT_T=
9568
9569 echo "$as_me:9569: checking if you want wide-character code" >&5
9570 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9571
9572 # Check whether --enable-widec or --disable-widec was given.
9573 if test "${enable_widec+set}" = set; then
9574   enableval="$enable_widec"
9575   with_widec=$enableval
9576 else
9577   with_widec=no
9578 fi;
9579 echo "$as_me:9579: result: $with_widec" >&5
9580 echo "${ECHO_T}$with_widec" >&6
9581
9582 NCURSES_WCWIDTH_GRAPHICS=1
9583
9584 if test "x$with_widec" = xyes ; then
9585         if test "x$disable_lib_suffixes" = xno ; then
9586                 LIB_SUFFIX="w${LIB_SUFFIX}"
9587         fi
9588
9589 cat >>confdefs.h <<\EOF
9590 #define USE_WIDEC_SUPPORT 1
9591 EOF
9592
9593 cat >>confdefs.h <<\EOF
9594 #define NCURSES_WIDECHAR 1
9595 EOF
9596
9597 for ac_header in \
9598 wchar.h \
9599 wctype.h \
9600
9601 do
9602 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9603 echo "$as_me:9603: checking for $ac_header" >&5
9604 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9605 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9606   echo $ECHO_N "(cached) $ECHO_C" >&6
9607 else
9608   cat >conftest.$ac_ext <<_ACEOF
9609 #line 9609 "configure"
9610 #include "confdefs.h"
9611 #include <$ac_header>
9612 _ACEOF
9613 if { (eval echo "$as_me:9613: \"$ac_cpp conftest.$ac_ext\"") >&5
9614   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9615   ac_status=$?
9616   egrep -v '^ *\+' conftest.er1 >conftest.err
9617   rm -f conftest.er1
9618   cat conftest.err >&5
9619   echo "$as_me:9619: \$? = $ac_status" >&5
9620   (exit $ac_status); } >/dev/null; then
9621   if test -s conftest.err; then
9622     ac_cpp_err=$ac_c_preproc_warn_flag
9623   else
9624     ac_cpp_err=
9625   fi
9626 else
9627   ac_cpp_err=yes
9628 fi
9629 if test -z "$ac_cpp_err"; then
9630   eval "$as_ac_Header=yes"
9631 else
9632   echo "$as_me: failed program was:" >&5
9633   cat conftest.$ac_ext >&5
9634   eval "$as_ac_Header=no"
9635 fi
9636 rm -f conftest.err conftest.$ac_ext
9637 fi
9638 echo "$as_me:9638: result: `eval echo '${'$as_ac_Header'}'`" >&5
9639 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9640 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9641   cat >>confdefs.h <<EOF
9642 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9643 EOF
9644
9645 fi
9646 done
9647
9648 echo "$as_me:9648: checking if wchar.h can be used as is" >&5
9649 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9650 if test "${cf_cv_wchar_h_okay+set}" = set; then
9651   echo $ECHO_N "(cached) $ECHO_C" >&6
9652 else
9653
9654 cat >conftest.$ac_ext <<_ACEOF
9655 #line 9655 "configure"
9656 #include "confdefs.h"
9657
9658 #include <stdlib.h>
9659 #ifdef HAVE_WCHAR_H
9660 #include <wchar.h>
9661 #endif
9662 #ifdef HAVE_WCTYPE_H
9663 #include <wctype.h>
9664 #endif
9665
9666 int
9667 main (void)
9668 {
9669
9670         wint_t foo = 0;
9671         int bar = iswpunct(foo)
9672   ;
9673   return 0;
9674 }
9675 _ACEOF
9676 rm -f conftest.$ac_objext
9677 if { (eval echo "$as_me:9677: \"$ac_compile\"") >&5
9678   (eval $ac_compile) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit $ac_status); } &&
9682          { ac_try='test -s conftest.$ac_objext'
9683   { (eval echo "$as_me:9683: \"$ac_try\"") >&5
9684   (eval $ac_try) 2>&5
9685   ac_status=$?
9686   echo "$as_me:9686: \$? = $ac_status" >&5
9687   (exit $ac_status); }; }; then
9688   cf_cv_wchar_h_okay=yes
9689 else
9690   echo "$as_me: failed program was:" >&5
9691 cat conftest.$ac_ext >&5
9692 cf_cv_wchar_h_okay=no
9693 fi
9694 rm -f conftest.$ac_objext conftest.$ac_ext
9695 fi
9696 echo "$as_me:9696: result: $cf_cv_wchar_h_okay" >&5
9697 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9698
9699 if test $cf_cv_wchar_h_okay = no
9700 then
9701
9702 echo "$as_me:9702: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9703 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9704 cat >conftest.$ac_ext <<_ACEOF
9705 #line 9705 "configure"
9706 #include "confdefs.h"
9707 #include <sys/types.h>
9708
9709 int
9710 main (void)
9711 {
9712
9713 #ifndef _XOPEN_SOURCE_EXTENDED
9714 make an error
9715 #endif
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 rm -f conftest.$ac_objext
9721 if { (eval echo "$as_me:9721: \"$ac_compile\"") >&5
9722   (eval $ac_compile) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -s conftest.$ac_objext'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); }; }; then
9732   cf_result=no
9733 else
9734   echo "$as_me: failed program was:" >&5
9735 cat conftest.$ac_ext >&5
9736 cf_result=yes
9737 fi
9738 rm -f conftest.$ac_objext conftest.$ac_ext
9739 echo "$as_me:9739: result: $cf_result" >&5
9740 echo "${ECHO_T}$cf_result" >&6
9741
9742 if test "$cf_result" = yes ; then
9743         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9744 elif test "x" != "x" ; then
9745         echo "$as_me:9745: checking checking for compatible value versus " >&5
9746 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9747         cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #include <sys/types.h>
9751
9752 int
9753 main (void)
9754 {
9755
9756 #if _XOPEN_SOURCE_EXTENDED- < 0
9757 make an error
9758 #endif
9759   ;
9760   return 0;
9761 }
9762 _ACEOF
9763 rm -f conftest.$ac_objext
9764 if { (eval echo "$as_me:9764: \"$ac_compile\"") >&5
9765   (eval $ac_compile) 2>&5
9766   ac_status=$?
9767   echo "$as_me:9767: \$? = $ac_status" >&5
9768   (exit $ac_status); } &&
9769          { ac_try='test -s conftest.$ac_objext'
9770   { (eval echo "$as_me:9770: \"$ac_try\"") >&5
9771   (eval $ac_try) 2>&5
9772   ac_status=$?
9773   echo "$as_me:9773: \$? = $ac_status" >&5
9774   (exit $ac_status); }; }; then
9775   cf_result=yes
9776 else
9777   echo "$as_me: failed program was:" >&5
9778 cat conftest.$ac_ext >&5
9779 cf_result=no
9780 fi
9781 rm -f conftest.$ac_objext conftest.$ac_ext
9782         echo "$as_me:9782: result: $cf_result" >&5
9783 echo "${ECHO_T}$cf_result" >&6
9784         if test "$cf_result" = no ; then
9785                 # perhaps we can override it - try...
9786                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9787         fi
9788 fi
9789
9790 fi
9791
9792 echo "$as_me:9792: checking if wcwidth agrees graphics are single-width" >&5
9793 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9794 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9795   echo $ECHO_N "(cached) $ECHO_C" >&6
9796 else
9797
9798 cat >conftest.in <<CF_EOF
9799 -       VT100 symbols
9800 0x250c  upper left corner
9801 0x2514  lower left corner
9802 0x2510  upper right corner
9803 0x2518  lower right corner
9804 0x251c  tee pointing left
9805 0x2524  tee pointing right
9806 0x2534  tee pointing up
9807 0x252c  tee pointing down
9808 0x2500  horizontal line
9809 0x2502  vertical line
9810 0x253c  large plus or crossover
9811 0x23ba  scan line 1
9812 0x23bd  scan line 9
9813 0x25c6  diamond
9814 0x2592  checker board (stipple)
9815 0x00b0  degree symbol
9816 0x00b1  plus/minus
9817 0x00b7  bullet
9818 -       Teletype 5410v1 symbols
9819 0x2190  arrow pointing left
9820 0x2192  arrow pointing right
9821 0x2193  arrow pointing down
9822 0x2191  arrow pointing up
9823 0x2592  board of squares
9824 0x2603  lantern symbol
9825 0x25ae  solid square block
9826 -       these defaults were invented for ncurses
9827 0x23bb  scan line 3
9828 0x23bc  scan line 7
9829 0x2264  less-than-or-equal-to
9830 0x2265  greater-than-or-equal-to
9831 0x03c0  greek pi
9832 0x2260  not-equal
9833 0x00a3  pound-sterling symbol
9834 -       thick-line-drawing
9835 0x250f  upper left corner
9836 0x2517  lower left corner
9837 0x2513  upper right corner
9838 0x251b  lower right corner
9839 0x2523  tee pointing left
9840 0x252b  tee pointing right
9841 0x253b  tee pointing up
9842 0x2533  tee pointing down
9843 0x2501  horizontal line
9844 0x2503  vertical line
9845 0x254b  large plus or crossover
9846 -       double-line-drawing
9847 0x2554  upper left corner
9848 0x255a  lower left corner
9849 0x2557  upper right corner
9850 0x255d  lower right corner
9851 0x2563  tee pointing left
9852 0x2560  tee pointing right
9853 0x2569  tee pointing up
9854 0x2566  tee pointing down
9855 0x2550  horizontal line
9856 0x2551  vertical line
9857 0x256c  large plus or crossover
9858 CF_EOF
9859 if test "$cross_compiling" = yes; then
9860   cf_cv_wcwidth_graphics=unknown
9861 else
9862   cat >conftest.$ac_ext <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865
9866 #include <locale.h>
9867 #include <stdio.h>
9868 #include <wchar.h>
9869
9870 #define MY_LEN 80
9871
9872 int
9873 main(void)
9874 {
9875         FILE *fp;
9876         int value;
9877         char buffer[MY_LEN + 1];
9878         char notes[MY_LEN + 1];
9879         int totals = 0;
9880         int passed = 0;
9881
9882         if (setlocale(LC_ALL, "en_US.UTF8") ||
9883                 setlocale(LC_ALL, "en_US.UTF-8") ||
9884                 setlocale(LC_ALL, "en_US.utf8") ||
9885                 setlocale(LC_ALL, "en_US.utf-8")) {
9886                 if ((fp = fopen("conftest.in", "r")) != 0) {
9887                         while (fgets(buffer, MY_LEN, fp) != 0) {
9888                                 if (*buffer == '-') {
9889                                         fprintf(stderr, "\t%s", buffer);
9890                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9891                                         ++totals;
9892                                         if (wcwidth(value) == 1)
9893                                                 ++passed;
9894                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9895                                 } else {
9896                                         fprintf(stderr, "?\t%s", buffer);
9897                                 }
9898                         }
9899                 }
9900         }
9901         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9902         return (totals == passed) ? 0 : 1;
9903 }
9904
9905 _ACEOF
9906 rm -f conftest$ac_exeext
9907 if { (eval echo "$as_me:9907: \"$ac_link\"") >&5
9908   (eval $ac_link) 2>&5
9909   ac_status=$?
9910   echo "$as_me:9910: \$? = $ac_status" >&5
9911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9912   { (eval echo "$as_me:9912: \"$ac_try\"") >&5
9913   (eval $ac_try) 2>&5
9914   ac_status=$?
9915   echo "$as_me:9915: \$? = $ac_status" >&5
9916   (exit $ac_status); }; }; then
9917   cf_cv_wcwidth_graphics=yes
9918 else
9919   echo "$as_me: program exited with status $ac_status" >&5
9920 echo "$as_me: failed program was:" >&5
9921 cat conftest.$ac_ext >&5
9922 cf_cv_wcwidth_graphics=no
9923 fi
9924 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9925 fi
9926
9927 fi
9928 echo "$as_me:9928: result: $cf_cv_wcwidth_graphics" >&5
9929 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9930
9931         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9932
9933         # with_overwrite=no
9934         NCURSES_CH_T=cchar_t
9935
9936 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9937 do
9938 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9939 echo "$as_me:9939: checking for $ac_func" >&5
9940 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9941 if eval "test \"\${$as_ac_var+set}\" = set"; then
9942   echo $ECHO_N "(cached) $ECHO_C" >&6
9943 else
9944   cat >conftest.$ac_ext <<_ACEOF
9945 #line 9945 "configure"
9946 #include "confdefs.h"
9947 /* System header to define __stub macros and hopefully few prototypes,
9948     which can conflict with char $ac_func (); below.  */
9949 #include <assert.h>
9950 /* Override any gcc2 internal prototype to avoid an error.  */
9951 #ifdef __cplusplus
9952 extern "C"
9953 #endif
9954 /* We use char because int might match the return type of a gcc2
9955    builtin and then its argument prototype would still apply.  */
9956 char $ac_func ();
9957 char (*f) ();
9958
9959 int
9960 main (void)
9961 {
9962 /* The GNU C library defines this for functions which it implements
9963     to always fail with ENOSYS.  Some functions are actually named
9964     something starting with __ and the normal name is an alias.  */
9965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9966 choke me
9967 #else
9968 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9969 #endif
9970
9971   ;
9972   return 0;
9973 }
9974 _ACEOF
9975 rm -f conftest.$ac_objext conftest$ac_exeext
9976 if { (eval echo "$as_me:9976: \"$ac_link\"") >&5
9977   (eval $ac_link) 2>&5
9978   ac_status=$?
9979   echo "$as_me:9979: \$? = $ac_status" >&5
9980   (exit $ac_status); } &&
9981          { ac_try='test -s conftest$ac_exeext'
9982   { (eval echo "$as_me:9982: \"$ac_try\"") >&5
9983   (eval $ac_try) 2>&5
9984   ac_status=$?
9985   echo "$as_me:9985: \$? = $ac_status" >&5
9986   (exit $ac_status); }; }; then
9987   eval "$as_ac_var=yes"
9988 else
9989   echo "$as_me: failed program was:" >&5
9990 cat conftest.$ac_ext >&5
9991 eval "$as_ac_var=no"
9992 fi
9993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9994 fi
9995 echo "$as_me:9995: result: `eval echo '${'$as_ac_var'}'`" >&5
9996 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9997 if test `eval echo '${'$as_ac_var'}'` = yes; then
9998   cat >>confdefs.h <<EOF
9999 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10000 EOF
10001
10002 fi
10003 done
10004
10005         if test "x$ac_cv_func_putwc" != xyes ; then
10006
10007 echo "$as_me:10007: checking for multibyte character support" >&5
10008 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10009 if test "${cf_cv_utf8_lib+set}" = set; then
10010   echo $ECHO_N "(cached) $ECHO_C" >&6
10011 else
10012
10013         cf_save_LIBS="$LIBS"
10014         cat >conftest.$ac_ext <<_ACEOF
10015 #line 10015 "configure"
10016 #include "confdefs.h"
10017
10018 #include <stdlib.h>
10019 int
10020 main (void)
10021 {
10022 putwc(0,0);
10023   ;
10024   return 0;
10025 }
10026 _ACEOF
10027 rm -f conftest.$ac_objext conftest$ac_exeext
10028 if { (eval echo "$as_me:10028: \"$ac_link\"") >&5
10029   (eval $ac_link) 2>&5
10030   ac_status=$?
10031   echo "$as_me:10031: \$? = $ac_status" >&5
10032   (exit $ac_status); } &&
10033          { ac_try='test -s conftest$ac_exeext'
10034   { (eval echo "$as_me:10034: \"$ac_try\"") >&5
10035   (eval $ac_try) 2>&5
10036   ac_status=$?
10037   echo "$as_me:10037: \$? = $ac_status" >&5
10038   (exit $ac_status); }; }; then
10039   cf_cv_utf8_lib=yes
10040 else
10041   echo "$as_me: failed program was:" >&5
10042 cat conftest.$ac_ext >&5
10043
10044 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10045 # will be set on completion of the AC_TRY_LINK below.
10046 cf_cv_header_path_utf8=
10047 cf_cv_library_path_utf8=
10048
10049 echo "${as_me:-configure}:10049: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10050
10051 cf_save_LIBS="$LIBS"
10052
10053 cat >conftest.$ac_ext <<_ACEOF
10054 #line 10054 "configure"
10055 #include "confdefs.h"
10056
10057 #include <libutf8.h>
10058 int
10059 main (void)
10060 {
10061 putwc(0,0);
10062   ;
10063   return 0;
10064 }
10065 _ACEOF
10066 rm -f conftest.$ac_objext conftest$ac_exeext
10067 if { (eval echo "$as_me:10067: \"$ac_link\"") >&5
10068   (eval $ac_link) 2>&5
10069   ac_status=$?
10070   echo "$as_me:10070: \$? = $ac_status" >&5
10071   (exit $ac_status); } &&
10072          { ac_try='test -s conftest$ac_exeext'
10073   { (eval echo "$as_me:10073: \"$ac_try\"") >&5
10074   (eval $ac_try) 2>&5
10075   ac_status=$?
10076   echo "$as_me:10076: \$? = $ac_status" >&5
10077   (exit $ac_status); }; }; then
10078
10079         cf_cv_find_linkage_utf8=yes
10080         cf_cv_header_path_utf8=/usr/include
10081         cf_cv_library_path_utf8=/usr/lib
10082
10083 else
10084   echo "$as_me: failed program was:" >&5
10085 cat conftest.$ac_ext >&5
10086
10087 LIBS="-lutf8  $cf_save_LIBS"
10088
10089 cat >conftest.$ac_ext <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092
10093 #include <libutf8.h>
10094 int
10095 main (void)
10096 {
10097 putwc(0,0);
10098   ;
10099   return 0;
10100 }
10101 _ACEOF
10102 rm -f conftest.$ac_objext conftest$ac_exeext
10103 if { (eval echo "$as_me:10103: \"$ac_link\"") >&5
10104   (eval $ac_link) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit $ac_status); } &&
10108          { ac_try='test -s conftest$ac_exeext'
10109   { (eval echo "$as_me:10109: \"$ac_try\"") >&5
10110   (eval $ac_try) 2>&5
10111   ac_status=$?
10112   echo "$as_me:10112: \$? = $ac_status" >&5
10113   (exit $ac_status); }; }; then
10114
10115         cf_cv_find_linkage_utf8=yes
10116         cf_cv_header_path_utf8=/usr/include
10117         cf_cv_library_path_utf8=/usr/lib
10118         cf_cv_library_file_utf8="-lutf8"
10119
10120 else
10121   echo "$as_me: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10123
10124         cf_cv_find_linkage_utf8=no
10125         LIBS="$cf_save_LIBS"
10126
10127         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10128
10129 echo "${as_me:-configure}:10129: testing find linkage for utf8 library ..." 1>&5
10130
10131 echo "${as_me:-configure}:10131: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10132
10133         cf_save_CPPFLAGS="$CPPFLAGS"
10134         cf_test_CPPFLAGS="$CPPFLAGS"
10135
10136 cf_search=
10137
10138 # collect the current set of include-directories from compiler flags
10139 cf_header_path_list=""
10140 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10141         for cf_header_path in $CPPFLAGS $CFLAGS
10142         do
10143                 case $cf_header_path in
10144                 (-I*)
10145                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10146
10147 test "x$cf_header_path" != "xNONE" && \
10148 test -d "$cf_header_path" && \
10149  {
10150         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10151         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10152         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10153         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10154         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10155         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10156 }
10157
10158                         cf_header_path_list="$cf_header_path_list $cf_search"
10159                         ;;
10160                 esac
10161         done
10162 fi
10163
10164 # add the variations for the package we are looking for
10165
10166 cf_search=
10167
10168 test "x$prefix" != "xNONE" && \
10169 test -d "$prefix" && \
10170  {
10171         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10172         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10173         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10174         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10175         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10176         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10177 }
10178
10179 for cf_subdir_prefix in \
10180         /usr \
10181         /usr/local \
10182         /usr/pkg \
10183         /opt \
10184         /opt/local \
10185         $HOME
10186 do
10187
10188 test "x$cf_subdir_prefix" != "x$prefix" && \
10189 test -d "$cf_subdir_prefix" && \
10190 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10191         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10192         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10193         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10194         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10195         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10196         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10197 }
10198
10199 done
10200
10201 test "$includedir" != NONE && \
10202 test "$includedir" != "/usr/include" && \
10203 test -d "$includedir" && {
10204         test -d $includedir &&    cf_search="$cf_search $includedir"
10205         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10206 }
10207
10208 test "$oldincludedir" != NONE && \
10209 test "$oldincludedir" != "/usr/include" && \
10210 test -d "$oldincludedir" && {
10211         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10212         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10213 }
10214
10215 cf_search="$cf_search $cf_header_path_list"
10216
10217         for cf_cv_header_path_utf8 in $cf_search
10218         do
10219                 if test -d $cf_cv_header_path_utf8 ; then
10220                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10221
10222 echo "${as_me:-configure}:10222: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10223
10224                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10225                         cat >conftest.$ac_ext <<_ACEOF
10226 #line 10226 "configure"
10227 #include "confdefs.h"
10228
10229 #include <libutf8.h>
10230 int
10231 main (void)
10232 {
10233 putwc(0,0);
10234   ;
10235   return 0;
10236 }
10237 _ACEOF
10238 rm -f conftest.$ac_objext
10239 if { (eval echo "$as_me:10239: \"$ac_compile\"") >&5
10240   (eval $ac_compile) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit $ac_status); } &&
10244          { ac_try='test -s conftest.$ac_objext'
10245   { (eval echo "$as_me:10245: \"$ac_try\"") >&5
10246   (eval $ac_try) 2>&5
10247   ac_status=$?
10248   echo "$as_me:10248: \$? = $ac_status" >&5
10249   (exit $ac_status); }; }; then
10250
10251                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10252
10253 echo "${as_me:-configure}:10253: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10254
10255                                 cf_cv_find_linkage_utf8=maybe
10256                                 cf_test_CPPFLAGS="$CPPFLAGS"
10257                                 break
10258 else
10259   echo "$as_me: failed program was:" >&5
10260 cat conftest.$ac_ext >&5
10261
10262                                 CPPFLAGS="$cf_save_CPPFLAGS"
10263
10264 fi
10265 rm -f conftest.$ac_objext conftest.$ac_ext
10266                 fi
10267         done
10268
10269         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10270
10271 echo "${as_me:-configure}:10271: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10272
10273                 cf_save_LIBS="$LIBS"
10274                 cf_save_LDFLAGS="$LDFLAGS"
10275
10276                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10277
10278 cf_search=
10279 cf_library_path_list=""
10280 if test -n "${LDFLAGS}${LIBS}" ; then
10281         for cf_library_path in $LDFLAGS $LIBS
10282         do
10283                 case $cf_library_path in
10284                 (-L*)
10285                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10286
10287 test "x$cf_library_path" != "xNONE" && \
10288 test -d "$cf_library_path" && \
10289  {
10290         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10291         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10292         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10293         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10294         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10295         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10296 }
10297
10298                         cf_library_path_list="$cf_library_path_list $cf_search"
10299                         ;;
10300                 esac
10301         done
10302 fi
10303
10304 cf_search=
10305
10306 test "x$prefix" != "xNONE" && \
10307 test -d "$prefix" && \
10308  {
10309         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10310         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10311         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10312         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10313         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10314         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10315 }
10316
10317 for cf_subdir_prefix in \
10318         /usr \
10319         /usr/local \
10320         /usr/pkg \
10321         /opt \
10322         /opt/local \
10323         $HOME
10324 do
10325
10326 test "x$cf_subdir_prefix" != "x$prefix" && \
10327 test -d "$cf_subdir_prefix" && \
10328 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10329         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10330         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10331         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10332         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10333         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10334         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10335 }
10336
10337 done
10338
10339 cf_search="$cf_library_path_list $cf_search"
10340
10341                         for cf_cv_library_path_utf8 in $cf_search
10342                         do
10343                                 if test -d $cf_cv_library_path_utf8 ; then
10344                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10345
10346 echo "${as_me:-configure}:10346: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10347
10348                                         CPPFLAGS="$cf_test_CPPFLAGS"
10349                                         LIBS="-lutf8  $cf_save_LIBS"
10350                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10351                                         cat >conftest.$ac_ext <<_ACEOF
10352 #line 10352 "configure"
10353 #include "confdefs.h"
10354
10355 #include <libutf8.h>
10356 int
10357 main (void)
10358 {
10359 putwc(0,0);
10360   ;
10361   return 0;
10362 }
10363 _ACEOF
10364 rm -f conftest.$ac_objext conftest$ac_exeext
10365 if { (eval echo "$as_me:10365: \"$ac_link\"") >&5
10366   (eval $ac_link) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit $ac_status); } &&
10370          { ac_try='test -s conftest$ac_exeext'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit $ac_status); }; }; then
10376
10377                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10378
10379 echo "${as_me:-configure}:10379: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10380
10381                                         cf_cv_find_linkage_utf8=yes
10382                                         cf_cv_library_file_utf8="-lutf8"
10383                                         break
10384 else
10385   echo "$as_me: failed program was:" >&5
10386 cat conftest.$ac_ext >&5
10387
10388                                         CPPFLAGS="$cf_save_CPPFLAGS"
10389                                         LIBS="$cf_save_LIBS"
10390                                         LDFLAGS="$cf_save_LDFLAGS"
10391
10392 fi
10393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10394                                 fi
10395                         done
10396                         CPPFLAGS="$cf_save_CPPFLAGS"
10397                         LDFLAGS="$cf_save_LDFLAGS"
10398                 fi
10399
10400         else
10401                 cf_cv_find_linkage_utf8=no
10402         fi
10403
10404 fi
10405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10406
10407 fi
10408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10409
10410 LIBS="$cf_save_LIBS"
10411
10412 if test "$cf_cv_find_linkage_utf8" = yes ; then
10413 cf_cv_utf8_lib=add-on
10414 else
10415 cf_cv_utf8_lib=no
10416 fi
10417
10418 fi
10419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10420 fi
10421 echo "$as_me:10421: result: $cf_cv_utf8_lib" >&5
10422 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10423
10424 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10425 # ncurses/ncursesw:
10426 if test "$cf_cv_utf8_lib" = "add-on" ; then
10427
10428 cat >>confdefs.h <<\EOF
10429 #define HAVE_LIBUTF8_H 1
10430 EOF
10431
10432 if test -n "$cf_cv_header_path_utf8" ; then
10433   for cf_add_incdir in $cf_cv_header_path_utf8
10434   do
10435         while test $cf_add_incdir != /usr/include
10436         do
10437           if test -d $cf_add_incdir
10438           then
10439                 cf_have_incdir=no
10440                 if test -n "$CFLAGS$CPPFLAGS" ; then
10441                   # a loop is needed to ensure we can add subdirs of existing dirs
10442                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10443                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10444                           cf_have_incdir=yes; break
10445                         fi
10446                   done
10447                 fi
10448
10449                 if test "$cf_have_incdir" = no ; then
10450                   if test "$cf_add_incdir" = /usr/local/include ; then
10451                         if test "$GCC" = yes
10452                         then
10453                           cf_save_CPPFLAGS=$CPPFLAGS
10454                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10455                           cat >conftest.$ac_ext <<_ACEOF
10456 #line 10456 "configure"
10457 #include "confdefs.h"
10458 #include <stdio.h>
10459 int
10460 main (void)
10461 {
10462 printf("Hello")
10463   ;
10464   return 0;
10465 }
10466 _ACEOF
10467 rm -f conftest.$ac_objext
10468 if { (eval echo "$as_me:10468: \"$ac_compile\"") >&5
10469   (eval $ac_compile) 2>&5
10470   ac_status=$?
10471   echo "$as_me:10471: \$? = $ac_status" >&5
10472   (exit $ac_status); } &&
10473          { ac_try='test -s conftest.$ac_objext'
10474   { (eval echo "$as_me:10474: \"$ac_try\"") >&5
10475   (eval $ac_try) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); }; }; then
10479   :
10480 else
10481   echo "$as_me: failed program was:" >&5
10482 cat conftest.$ac_ext >&5
10483 cf_have_incdir=yes
10484 fi
10485 rm -f conftest.$ac_objext conftest.$ac_ext
10486                           CPPFLAGS=$cf_save_CPPFLAGS
10487                         fi
10488                   fi
10489                 fi
10490
10491                 if test "$cf_have_incdir" = no ; then
10492                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10493
10494 echo "${as_me:-configure}:10494: testing adding $cf_add_incdir to include-path ..." 1>&5
10495
10496                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10497
10498                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10499                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10500                   cf_add_incdir="$cf_top_incdir"
10501                 else
10502                   break
10503                 fi
10504           else
10505                 break
10506           fi
10507         done
10508   done
10509 fi
10510
10511 if test -n "$cf_cv_library_path_utf8" ; then
10512         for cf_add_libdir in $cf_cv_library_path_utf8
10513         do
10514                 if test $cf_add_libdir = /usr/lib ; then
10515                         :
10516                 elif test -d $cf_add_libdir
10517                 then
10518                         cf_have_libdir=no
10519                         if test -n "$LDFLAGS$LIBS" ; then
10520                                 # a loop is needed to ensure we can add subdirs of existing dirs
10521                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10522                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10523                                                 cf_have_libdir=yes; break
10524                                         fi
10525                                 done
10526                         fi
10527                         if test "$cf_have_libdir" = no ; then
10528                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10529
10530 echo "${as_me:-configure}:10530: testing adding $cf_add_libdir to library-path ..." 1>&5
10531
10532                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10533                         fi
10534                 fi
10535         done
10536 fi
10537
10538 cf_add_libs="$cf_cv_library_file_utf8"
10539 # Filter out duplicates - this happens with badly-designed ".pc" files...
10540 for cf_add_1lib in $LIBS
10541 do
10542         for cf_add_2lib in $cf_add_libs
10543         do
10544                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10545                 then
10546                         cf_add_1lib=
10547                         break
10548                 fi
10549         done
10550         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10551 done
10552 LIBS="$cf_add_libs"
10553
10554 fi
10555
10556                 if test "$cf_cv_utf8_lib" != no ; then
10557                         NCURSES_LIBUTF8=1
10558                 fi
10559         fi
10560
10561 # This is needed on Tru64 5.0 to declare mbstate_t
10562 echo "$as_me:10562: checking if we must include wchar.h to declare mbstate_t" >&5
10563 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10564 if test "${cf_cv_mbstate_t+set}" = set; then
10565   echo $ECHO_N "(cached) $ECHO_C" >&6
10566 else
10567
10568 cat >conftest.$ac_ext <<_ACEOF
10569 #line 10569 "configure"
10570 #include "confdefs.h"
10571
10572 #include <stdlib.h>
10573 #include <stdarg.h>
10574 #include <stdio.h>
10575 #ifdef HAVE_LIBUTF8_H
10576 #include <libutf8.h>
10577 #endif
10578 int
10579 main (void)
10580 {
10581 mbstate_t state
10582   ;
10583   return 0;
10584 }
10585 _ACEOF
10586 rm -f conftest.$ac_objext
10587 if { (eval echo "$as_me:10587: \"$ac_compile\"") >&5
10588   (eval $ac_compile) 2>&5
10589   ac_status=$?
10590   echo "$as_me:10590: \$? = $ac_status" >&5
10591   (exit $ac_status); } &&
10592          { ac_try='test -s conftest.$ac_objext'
10593   { (eval echo "$as_me:10593: \"$ac_try\"") >&5
10594   (eval $ac_try) 2>&5
10595   ac_status=$?
10596   echo "$as_me:10596: \$? = $ac_status" >&5
10597   (exit $ac_status); }; }; then
10598   cf_cv_mbstate_t=no
10599 else
10600   echo "$as_me: failed program was:" >&5
10601 cat conftest.$ac_ext >&5
10602 cat >conftest.$ac_ext <<_ACEOF
10603 #line 10603 "configure"
10604 #include "confdefs.h"
10605
10606 #include <stdlib.h>
10607 #include <stdarg.h>
10608 #include <stdio.h>
10609 #include <wchar.h>
10610 #ifdef HAVE_LIBUTF8_H
10611 #include <libutf8.h>
10612 #endif
10613 int
10614 main (void)
10615 {
10616 mbstate_t value
10617   ;
10618   return 0;
10619 }
10620 _ACEOF
10621 rm -f conftest.$ac_objext
10622 if { (eval echo "$as_me:10622: \"$ac_compile\"") >&5
10623   (eval $ac_compile) 2>&5
10624   ac_status=$?
10625   echo "$as_me:10625: \$? = $ac_status" >&5
10626   (exit $ac_status); } &&
10627          { ac_try='test -s conftest.$ac_objext'
10628   { (eval echo "$as_me:10628: \"$ac_try\"") >&5
10629   (eval $ac_try) 2>&5
10630   ac_status=$?
10631   echo "$as_me:10631: \$? = $ac_status" >&5
10632   (exit $ac_status); }; }; then
10633   cf_cv_mbstate_t=yes
10634 else
10635   echo "$as_me: failed program was:" >&5
10636 cat conftest.$ac_ext >&5
10637 cf_cv_mbstate_t=unknown
10638 fi
10639 rm -f conftest.$ac_objext conftest.$ac_ext
10640 fi
10641 rm -f conftest.$ac_objext conftest.$ac_ext
10642 fi
10643 echo "$as_me:10643: result: $cf_cv_mbstate_t" >&5
10644 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10645
10646 if test "$cf_cv_mbstate_t" = yes ; then
10647
10648 cat >>confdefs.h <<\EOF
10649 #define NEED_WCHAR_H 1
10650 EOF
10651
10652         NEED_WCHAR_H=1
10653 fi
10654
10655 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10656 if test "$cf_cv_mbstate_t" = unknown ; then
10657         NCURSES_MBSTATE_T=1
10658 fi
10659
10660 # This is needed on Tru64 5.0 to declare wchar_t
10661 echo "$as_me:10661: checking if we must include wchar.h to declare wchar_t" >&5
10662 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10663 if test "${cf_cv_wchar_t+set}" = set; then
10664   echo $ECHO_N "(cached) $ECHO_C" >&6
10665 else
10666
10667 cat >conftest.$ac_ext <<_ACEOF
10668 #line 10668 "configure"
10669 #include "confdefs.h"
10670
10671 #include <stdlib.h>
10672 #include <stdarg.h>
10673 #include <stdio.h>
10674 #ifdef HAVE_LIBUTF8_H
10675 #include <libutf8.h>
10676 #endif
10677 int
10678 main (void)
10679 {
10680 wchar_t state
10681   ;
10682   return 0;
10683 }
10684 _ACEOF
10685 rm -f conftest.$ac_objext
10686 if { (eval echo "$as_me:10686: \"$ac_compile\"") >&5
10687   (eval $ac_compile) 2>&5
10688   ac_status=$?
10689   echo "$as_me:10689: \$? = $ac_status" >&5
10690   (exit $ac_status); } &&
10691          { ac_try='test -s conftest.$ac_objext'
10692   { (eval echo "$as_me:10692: \"$ac_try\"") >&5
10693   (eval $ac_try) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); }; }; then
10697   cf_cv_wchar_t=no
10698 else
10699   echo "$as_me: failed program was:" >&5
10700 cat conftest.$ac_ext >&5
10701 cat >conftest.$ac_ext <<_ACEOF
10702 #line 10702 "configure"
10703 #include "confdefs.h"
10704
10705 #include <stdlib.h>
10706 #include <stdarg.h>
10707 #include <stdio.h>
10708 #include <wchar.h>
10709 #ifdef HAVE_LIBUTF8_H
10710 #include <libutf8.h>
10711 #endif
10712 int
10713 main (void)
10714 {
10715 wchar_t value
10716   ;
10717   return 0;
10718 }
10719 _ACEOF
10720 rm -f conftest.$ac_objext
10721 if { (eval echo "$as_me:10721: \"$ac_compile\"") >&5
10722   (eval $ac_compile) 2>&5
10723   ac_status=$?
10724   echo "$as_me:10724: \$? = $ac_status" >&5
10725   (exit $ac_status); } &&
10726          { ac_try='test -s conftest.$ac_objext'
10727   { (eval echo "$as_me:10727: \"$ac_try\"") >&5
10728   (eval $ac_try) 2>&5
10729   ac_status=$?
10730   echo "$as_me:10730: \$? = $ac_status" >&5
10731   (exit $ac_status); }; }; then
10732   cf_cv_wchar_t=yes
10733 else
10734   echo "$as_me: failed program was:" >&5
10735 cat conftest.$ac_ext >&5
10736 cf_cv_wchar_t=unknown
10737 fi
10738 rm -f conftest.$ac_objext conftest.$ac_ext
10739 fi
10740 rm -f conftest.$ac_objext conftest.$ac_ext
10741 fi
10742 echo "$as_me:10742: result: $cf_cv_wchar_t" >&5
10743 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10744
10745 if test "$cf_cv_wchar_t" = yes ; then
10746
10747 cat >>confdefs.h <<\EOF
10748 #define NEED_WCHAR_H 1
10749 EOF
10750
10751         NEED_WCHAR_H=1
10752 fi
10753
10754 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10755 if test "$cf_cv_wchar_t" = unknown ; then
10756         NCURSES_WCHAR_T=1
10757 fi
10758
10759 # if we find wchar_t in either place, use substitution to provide a fallback.
10760 if test "$cf_cv_wchar_t" != unknown ; then
10761         NCURSES_OK_WCHAR_T=1
10762 fi
10763
10764 # This is needed on Tru64 5.0 to declare wint_t
10765 echo "$as_me:10765: checking if we must include wchar.h to declare wint_t" >&5
10766 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10767 if test "${cf_cv_wint_t+set}" = set; then
10768   echo $ECHO_N "(cached) $ECHO_C" >&6
10769 else
10770
10771 cat >conftest.$ac_ext <<_ACEOF
10772 #line 10772 "configure"
10773 #include "confdefs.h"
10774
10775 #include <stdlib.h>
10776 #include <stdarg.h>
10777 #include <stdio.h>
10778 #ifdef HAVE_LIBUTF8_H
10779 #include <libutf8.h>
10780 #endif
10781 int
10782 main (void)
10783 {
10784 wint_t state
10785   ;
10786   return 0;
10787 }
10788 _ACEOF
10789 rm -f conftest.$ac_objext
10790 if { (eval echo "$as_me:10790: \"$ac_compile\"") >&5
10791   (eval $ac_compile) 2>&5
10792   ac_status=$?
10793   echo "$as_me:10793: \$? = $ac_status" >&5
10794   (exit $ac_status); } &&
10795          { ac_try='test -s conftest.$ac_objext'
10796   { (eval echo "$as_me:10796: \"$ac_try\"") >&5
10797   (eval $ac_try) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit $ac_status); }; }; then
10801   cf_cv_wint_t=no
10802 else
10803   echo "$as_me: failed program was:" >&5
10804 cat conftest.$ac_ext >&5
10805 cat >conftest.$ac_ext <<_ACEOF
10806 #line 10806 "configure"
10807 #include "confdefs.h"
10808
10809 #include <stdlib.h>
10810 #include <stdarg.h>
10811 #include <stdio.h>
10812 #include <wchar.h>
10813 #ifdef HAVE_LIBUTF8_H
10814 #include <libutf8.h>
10815 #endif
10816 int
10817 main (void)
10818 {
10819 wint_t value
10820   ;
10821   return 0;
10822 }
10823 _ACEOF
10824 rm -f conftest.$ac_objext
10825 if { (eval echo "$as_me:10825: \"$ac_compile\"") >&5
10826   (eval $ac_compile) 2>&5
10827   ac_status=$?
10828   echo "$as_me:10828: \$? = $ac_status" >&5
10829   (exit $ac_status); } &&
10830          { ac_try='test -s conftest.$ac_objext'
10831   { (eval echo "$as_me:10831: \"$ac_try\"") >&5
10832   (eval $ac_try) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit $ac_status); }; }; then
10836   cf_cv_wint_t=yes
10837 else
10838   echo "$as_me: failed program was:" >&5
10839 cat conftest.$ac_ext >&5
10840 cf_cv_wint_t=unknown
10841 fi
10842 rm -f conftest.$ac_objext conftest.$ac_ext
10843 fi
10844 rm -f conftest.$ac_objext conftest.$ac_ext
10845 fi
10846 echo "$as_me:10846: result: $cf_cv_wint_t" >&5
10847 echo "${ECHO_T}$cf_cv_wint_t" >&6
10848
10849 if test "$cf_cv_wint_t" = yes ; then
10850
10851 cat >>confdefs.h <<\EOF
10852 #define NEED_WCHAR_H 1
10853 EOF
10854
10855         NEED_WCHAR_H=1
10856 fi
10857
10858 # if we do not find wint_t in either place, use substitution to provide a fallback.
10859 if test "$cf_cv_wint_t" = unknown ; then
10860         NCURSES_WINT_T=1
10861 fi
10862
10863 # if we find wint_t in either place, use substitution to provide a fallback.
10864 if test "$cf_cv_wint_t" != unknown ; then
10865         NCURSES_OK_WINT_T=1
10866 fi
10867
10868         if test "$NCURSES_MBSTATE_T" != 0; then
10869
10870 cat >>confdefs.h <<\EOF
10871 #define NEED_MBSTATE_T_DEF 1
10872 EOF
10873
10874         fi
10875 fi
10876
10877 ###   use option --disable-lp64 to allow long chtype
10878 echo "$as_me:10878: checking whether to enable _LP64 definition in curses.h" >&5
10879 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10880
10881 # Check whether --enable-lp64 or --disable-lp64 was given.
10882 if test "${enable_lp64+set}" = set; then
10883   enableval="$enable_lp64"
10884   with_lp64=$enableval
10885 else
10886   with_lp64=$cf_dft_with_lp64
10887 fi;
10888 echo "$as_me:10888: result: $with_lp64" >&5
10889 echo "${ECHO_T}$with_lp64" >&6
10890
10891 if test "x$with_lp64" = xyes ; then
10892         cf_cv_enable_lp64=1
10893 else
10894         cf_cv_enable_lp64=0
10895 fi
10896
10897 # Check whether --enable-largefile or --disable-largefile was given.
10898 if test "${enable_largefile+set}" = set; then
10899   enableval="$enable_largefile"
10900
10901 fi;
10902 if test "$enable_largefile" != no; then
10903
10904   echo "$as_me:10904: checking for special C compiler options needed for large files" >&5
10905 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10906 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10907   echo $ECHO_N "(cached) $ECHO_C" >&6
10908 else
10909   ac_cv_sys_largefile_CC=no
10910      if test "$GCC" != yes; then
10911        ac_save_CC=$CC
10912        while :; do
10913          # IRIX 6.2 and later do not support large files by default,
10914          # so use the C compiler's -n32 option if that helps.
10915          cat >conftest.$ac_ext <<_ACEOF
10916 #line 10916 "configure"
10917 #include "confdefs.h"
10918 #include <sys/types.h>
10919  /* Check that off_t can represent 2**63 - 1 correctly.
10920     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10921     since some C++ compilers masquerading as C compilers
10922     incorrectly reject 9223372036854775807.  */
10923 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10924   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10925                        && LARGE_OFF_T % 2147483647 == 1)
10926                       ? 1 : -1];
10927 int
10928 main (void)
10929 {
10930
10931   ;
10932   return 0;
10933 }
10934 _ACEOF
10935          rm -f conftest.$ac_objext
10936 if { (eval echo "$as_me:10936: \"$ac_compile\"") >&5
10937   (eval $ac_compile) 2>&5
10938   ac_status=$?
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); } &&
10941          { ac_try='test -s conftest.$ac_objext'
10942   { (eval echo "$as_me:10942: \"$ac_try\"") >&5
10943   (eval $ac_try) 2>&5
10944   ac_status=$?
10945   echo "$as_me:10945: \$? = $ac_status" >&5
10946   (exit $ac_status); }; }; then
10947   break
10948 else
10949   echo "$as_me: failed program was:" >&5
10950 cat conftest.$ac_ext >&5
10951 fi
10952 rm -f conftest.$ac_objext
10953          CC="$CC -n32"
10954          rm -f conftest.$ac_objext
10955 if { (eval echo "$as_me:10955: \"$ac_compile\"") >&5
10956   (eval $ac_compile) 2>&5
10957   ac_status=$?
10958   echo "$as_me:10958: \$? = $ac_status" >&5
10959   (exit $ac_status); } &&
10960          { ac_try='test -s conftest.$ac_objext'
10961   { (eval echo "$as_me:10961: \"$ac_try\"") >&5
10962   (eval $ac_try) 2>&5
10963   ac_status=$?
10964   echo "$as_me:10964: \$? = $ac_status" >&5
10965   (exit $ac_status); }; }; then
10966   ac_cv_sys_largefile_CC=' -n32'; break
10967 else
10968   echo "$as_me: failed program was:" >&5
10969 cat conftest.$ac_ext >&5
10970 fi
10971 rm -f conftest.$ac_objext
10972          break
10973        done
10974        CC=$ac_save_CC
10975        rm -f conftest.$ac_ext
10976     fi
10977 fi
10978 echo "$as_me:10978: result: $ac_cv_sys_largefile_CC" >&5
10979 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10980   if test "$ac_cv_sys_largefile_CC" != no; then
10981     CC=$CC$ac_cv_sys_largefile_CC
10982   fi
10983
10984   echo "$as_me:10984: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10985 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10986 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10987   echo $ECHO_N "(cached) $ECHO_C" >&6
10988 else
10989   while :; do
10990   ac_cv_sys_file_offset_bits=no
10991   cat >conftest.$ac_ext <<_ACEOF
10992 #line 10992 "configure"
10993 #include "confdefs.h"
10994 #include <sys/types.h>
10995  /* Check that off_t can represent 2**63 - 1 correctly.
10996     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10997     since some C++ compilers masquerading as C compilers
10998     incorrectly reject 9223372036854775807.  */
10999 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11000   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11001                        && LARGE_OFF_T % 2147483647 == 1)
11002                       ? 1 : -1];
11003 int
11004 main (void)
11005 {
11006
11007   ;
11008   return 0;
11009 }
11010 _ACEOF
11011 rm -f conftest.$ac_objext
11012 if { (eval echo "$as_me:11012: \"$ac_compile\"") >&5
11013   (eval $ac_compile) 2>&5
11014   ac_status=$?
11015   echo "$as_me:11015: \$? = $ac_status" >&5
11016   (exit $ac_status); } &&
11017          { ac_try='test -s conftest.$ac_objext'
11018   { (eval echo "$as_me:11018: \"$ac_try\"") >&5
11019   (eval $ac_try) 2>&5
11020   ac_status=$?
11021   echo "$as_me:11021: \$? = $ac_status" >&5
11022   (exit $ac_status); }; }; then
11023   break
11024 else
11025   echo "$as_me: failed program was:" >&5
11026 cat conftest.$ac_ext >&5
11027 fi
11028 rm -f conftest.$ac_objext conftest.$ac_ext
11029   cat >conftest.$ac_ext <<_ACEOF
11030 #line 11030 "configure"
11031 #include "confdefs.h"
11032 #define _FILE_OFFSET_BITS 64
11033 #include <sys/types.h>
11034  /* Check that off_t can represent 2**63 - 1 correctly.
11035     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11036     since some C++ compilers masquerading as C compilers
11037     incorrectly reject 9223372036854775807.  */
11038 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11039   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11040                        && LARGE_OFF_T % 2147483647 == 1)
11041                       ? 1 : -1];
11042 int
11043 main (void)
11044 {
11045
11046   ;
11047   return 0;
11048 }
11049 _ACEOF
11050 rm -f conftest.$ac_objext
11051 if { (eval echo "$as_me:11051: \"$ac_compile\"") >&5
11052   (eval $ac_compile) 2>&5
11053   ac_status=$?
11054   echo "$as_me:11054: \$? = $ac_status" >&5
11055   (exit $ac_status); } &&
11056          { ac_try='test -s conftest.$ac_objext'
11057   { (eval echo "$as_me:11057: \"$ac_try\"") >&5
11058   (eval $ac_try) 2>&5
11059   ac_status=$?
11060   echo "$as_me:11060: \$? = $ac_status" >&5
11061   (exit $ac_status); }; }; then
11062   ac_cv_sys_file_offset_bits=64; break
11063 else
11064   echo "$as_me: failed program was:" >&5
11065 cat conftest.$ac_ext >&5
11066 fi
11067 rm -f conftest.$ac_objext conftest.$ac_ext
11068   break
11069 done
11070 fi
11071 echo "$as_me:11071: result: $ac_cv_sys_file_offset_bits" >&5
11072 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11073 if test "$ac_cv_sys_file_offset_bits" != no; then
11074
11075 cat >>confdefs.h <<EOF
11076 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11077 EOF
11078
11079 fi
11080 rm -rf conftest*
11081   echo "$as_me:11081: checking for _LARGE_FILES value needed for large files" >&5
11082 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11083 if test "${ac_cv_sys_large_files+set}" = set; then
11084   echo $ECHO_N "(cached) $ECHO_C" >&6
11085 else
11086   while :; do
11087   ac_cv_sys_large_files=no
11088   cat >conftest.$ac_ext <<_ACEOF
11089 #line 11089 "configure"
11090 #include "confdefs.h"
11091 #include <sys/types.h>
11092  /* Check that off_t can represent 2**63 - 1 correctly.
11093     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11094     since some C++ compilers masquerading as C compilers
11095     incorrectly reject 9223372036854775807.  */
11096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11097   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11098                        && LARGE_OFF_T % 2147483647 == 1)
11099                       ? 1 : -1];
11100 int
11101 main (void)
11102 {
11103
11104   ;
11105   return 0;
11106 }
11107 _ACEOF
11108 rm -f conftest.$ac_objext
11109 if { (eval echo "$as_me:11109: \"$ac_compile\"") >&5
11110   (eval $ac_compile) 2>&5
11111   ac_status=$?
11112   echo "$as_me:11112: \$? = $ac_status" >&5
11113   (exit $ac_status); } &&
11114          { ac_try='test -s conftest.$ac_objext'
11115   { (eval echo "$as_me:11115: \"$ac_try\"") >&5
11116   (eval $ac_try) 2>&5
11117   ac_status=$?
11118   echo "$as_me:11118: \$? = $ac_status" >&5
11119   (exit $ac_status); }; }; then
11120   break
11121 else
11122   echo "$as_me: failed program was:" >&5
11123 cat conftest.$ac_ext >&5
11124 fi
11125 rm -f conftest.$ac_objext conftest.$ac_ext
11126   cat >conftest.$ac_ext <<_ACEOF
11127 #line 11127 "configure"
11128 #include "confdefs.h"
11129 #define _LARGE_FILES 1
11130 #include <sys/types.h>
11131  /* Check that off_t can represent 2**63 - 1 correctly.
11132     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11133     since some C++ compilers masquerading as C compilers
11134     incorrectly reject 9223372036854775807.  */
11135 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11136   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11137                        && LARGE_OFF_T % 2147483647 == 1)
11138                       ? 1 : -1];
11139 int
11140 main (void)
11141 {
11142
11143   ;
11144   return 0;
11145 }
11146 _ACEOF
11147 rm -f conftest.$ac_objext
11148 if { (eval echo "$as_me:11148: \"$ac_compile\"") >&5
11149   (eval $ac_compile) 2>&5
11150   ac_status=$?
11151   echo "$as_me:11151: \$? = $ac_status" >&5
11152   (exit $ac_status); } &&
11153          { ac_try='test -s conftest.$ac_objext'
11154   { (eval echo "$as_me:11154: \"$ac_try\"") >&5
11155   (eval $ac_try) 2>&5
11156   ac_status=$?
11157   echo "$as_me:11157: \$? = $ac_status" >&5
11158   (exit $ac_status); }; }; then
11159   ac_cv_sys_large_files=1; break
11160 else
11161   echo "$as_me: failed program was:" >&5
11162 cat conftest.$ac_ext >&5
11163 fi
11164 rm -f conftest.$ac_objext conftest.$ac_ext
11165   break
11166 done
11167 fi
11168 echo "$as_me:11168: result: $ac_cv_sys_large_files" >&5
11169 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11170 if test "$ac_cv_sys_large_files" != no; then
11171
11172 cat >>confdefs.h <<EOF
11173 #define _LARGE_FILES $ac_cv_sys_large_files
11174 EOF
11175
11176 fi
11177 rm -rf conftest*
11178 fi
11179
11180         if test "$enable_largefile" != no ; then
11181         echo "$as_me:11181: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11182 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11183 if test "${ac_cv_sys_largefile_source+set}" = set; then
11184   echo $ECHO_N "(cached) $ECHO_C" >&6
11185 else
11186   while :; do
11187   ac_cv_sys_largefile_source=no
11188   cat >conftest.$ac_ext <<_ACEOF
11189 #line 11189 "configure"
11190 #include "confdefs.h"
11191 #include <stdio.h>
11192 int
11193 main (void)
11194 {
11195 return !fseeko;
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 rm -f conftest.$ac_objext
11201 if { (eval echo "$as_me:11201: \"$ac_compile\"") >&5
11202   (eval $ac_compile) 2>&5
11203   ac_status=$?
11204   echo "$as_me:11204: \$? = $ac_status" >&5
11205   (exit $ac_status); } &&
11206          { ac_try='test -s conftest.$ac_objext'
11207   { (eval echo "$as_me:11207: \"$ac_try\"") >&5
11208   (eval $ac_try) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); }; }; then
11212   break
11213 else
11214   echo "$as_me: failed program was:" >&5
11215 cat conftest.$ac_ext >&5
11216 fi
11217 rm -f conftest.$ac_objext conftest.$ac_ext
11218   cat >conftest.$ac_ext <<_ACEOF
11219 #line 11219 "configure"
11220 #include "confdefs.h"
11221 #define _LARGEFILE_SOURCE 1
11222 #include <stdio.h>
11223 int
11224 main (void)
11225 {
11226 return !fseeko;
11227   ;
11228   return 0;
11229 }
11230 _ACEOF
11231 rm -f conftest.$ac_objext
11232 if { (eval echo "$as_me:11232: \"$ac_compile\"") >&5
11233   (eval $ac_compile) 2>&5
11234   ac_status=$?
11235   echo "$as_me:11235: \$? = $ac_status" >&5
11236   (exit $ac_status); } &&
11237          { ac_try='test -s conftest.$ac_objext'
11238   { (eval echo "$as_me:11238: \"$ac_try\"") >&5
11239   (eval $ac_try) 2>&5
11240   ac_status=$?
11241   echo "$as_me:11241: \$? = $ac_status" >&5
11242   (exit $ac_status); }; }; then
11243   ac_cv_sys_largefile_source=1; break
11244 else
11245   echo "$as_me: failed program was:" >&5
11246 cat conftest.$ac_ext >&5
11247 fi
11248 rm -f conftest.$ac_objext conftest.$ac_ext
11249   break
11250 done
11251 fi
11252 echo "$as_me:11252: result: $ac_cv_sys_largefile_source" >&5
11253 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11254 if test "$ac_cv_sys_largefile_source" != no; then
11255
11256 cat >>confdefs.h <<EOF
11257 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11258 EOF
11259
11260 fi
11261 rm -rf conftest*
11262
11263 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11264 # in glibc 2.1.3, but that breaks too many other things.
11265 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11266 echo "$as_me:11266: checking for fseeko" >&5
11267 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11268 if test "${ac_cv_func_fseeko+set}" = set; then
11269   echo $ECHO_N "(cached) $ECHO_C" >&6
11270 else
11271   cat >conftest.$ac_ext <<_ACEOF
11272 #line 11272 "configure"
11273 #include "confdefs.h"
11274 #include <stdio.h>
11275 int
11276 main (void)
11277 {
11278 return fseeko && fseeko (stdin, 0, 0);
11279   ;
11280   return 0;
11281 }
11282 _ACEOF
11283 rm -f conftest.$ac_objext conftest$ac_exeext
11284 if { (eval echo "$as_me:11284: \"$ac_link\"") >&5
11285   (eval $ac_link) 2>&5
11286   ac_status=$?
11287   echo "$as_me:11287: \$? = $ac_status" >&5
11288   (exit $ac_status); } &&
11289          { ac_try='test -s conftest$ac_exeext'
11290   { (eval echo "$as_me:11290: \"$ac_try\"") >&5
11291   (eval $ac_try) 2>&5
11292   ac_status=$?
11293   echo "$as_me:11293: \$? = $ac_status" >&5
11294   (exit $ac_status); }; }; then
11295   ac_cv_func_fseeko=yes
11296 else
11297   echo "$as_me: failed program was:" >&5
11298 cat conftest.$ac_ext >&5
11299 ac_cv_func_fseeko=no
11300 fi
11301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11302 fi
11303 echo "$as_me:11303: result: $ac_cv_func_fseeko" >&5
11304 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11305 if test $ac_cv_func_fseeko = yes; then
11306
11307 cat >>confdefs.h <<\EOF
11308 #define HAVE_FSEEKO 1
11309 EOF
11310
11311 fi
11312
11313         # Normally we would collect these definitions in the config.h,
11314         # but (like _XOPEN_SOURCE), some environments rely on having these
11315         # defined before any of the system headers are included.  Another
11316         # case comes up with C++, e.g., on AIX the compiler compiles the
11317         # header files by themselves before looking at the body files it is
11318         # told to compile.  For ncurses, those header files do not include
11319         # the config.h
11320         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11321         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11322         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11323
11324         echo "$as_me:11324: checking whether to use struct dirent64" >&5
11325 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11326 if test "${cf_cv_struct_dirent64+set}" = set; then
11327   echo $ECHO_N "(cached) $ECHO_C" >&6
11328 else
11329
11330                 cat >conftest.$ac_ext <<_ACEOF
11331 #line 11331 "configure"
11332 #include "confdefs.h"
11333
11334 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11335 #include <sys/types.h>
11336 #include <dirent.h>
11337
11338 int
11339 main (void)
11340 {
11341
11342                 /* if transitional largefile support is setup, this is true */
11343                 extern struct dirent64 * readdir(DIR *);
11344                 struct dirent64 *x = readdir((DIR *)0);
11345                 struct dirent *y = readdir((DIR *)0);
11346                 int z = x - y;
11347
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 rm -f conftest.$ac_objext
11353 if { (eval echo "$as_me:11353: \"$ac_compile\"") >&5
11354   (eval $ac_compile) 2>&5
11355   ac_status=$?
11356   echo "$as_me:11356: \$? = $ac_status" >&5
11357   (exit $ac_status); } &&
11358          { ac_try='test -s conftest.$ac_objext'
11359   { (eval echo "$as_me:11359: \"$ac_try\"") >&5
11360   (eval $ac_try) 2>&5
11361   ac_status=$?
11362   echo "$as_me:11362: \$? = $ac_status" >&5
11363   (exit $ac_status); }; }; then
11364   cf_cv_struct_dirent64=yes
11365 else
11366   echo "$as_me: failed program was:" >&5
11367 cat conftest.$ac_ext >&5
11368 cf_cv_struct_dirent64=no
11369 fi
11370 rm -f conftest.$ac_objext conftest.$ac_ext
11371
11372 fi
11373 echo "$as_me:11373: result: $cf_cv_struct_dirent64" >&5
11374 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11375         test "$cf_cv_struct_dirent64" = yes &&
11376 cat >>confdefs.h <<\EOF
11377 #define HAVE_STRUCT_DIRENT64 1
11378 EOF
11379
11380         fi
11381
11382 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11383 echo "$as_me:11383: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11384 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11385
11386 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11387 if test "${enable_tparm_varargs+set}" = set; then
11388   enableval="$enable_tparm_varargs"
11389   with_tparm_varargs=$enableval
11390 else
11391   with_tparm_varargs=yes
11392 fi;
11393 echo "$as_me:11393: result: $with_tparm_varargs" >&5
11394 echo "${ECHO_T}$with_tparm_varargs" >&6
11395 NCURSES_TPARM_VARARGS=0
11396 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11397
11398 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11399 if test "$with_ticlib" != no ; then
11400 echo "$as_me:11400: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11401 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11402
11403 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11404 if test "${enable_tic_depends+set}" = set; then
11405   enableval="$enable_tic_depends"
11406   with_tic_depends=$enableval
11407 else
11408   with_tic_depends=yes
11409 fi;
11410 echo "$as_me:11410: result: $with_tic_depends" >&5
11411 echo "${ECHO_T}$with_tic_depends" >&6
11412 else
11413         with_tic_depends=no
11414 fi
11415
11416 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11417 echo "$as_me:11417: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11418 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11419
11420 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11421 if test "${enable_wattr_macros+set}" = set; then
11422   enableval="$enable_wattr_macros"
11423   with_wattr_macros=$enableval
11424 else
11425   with_wattr_macros=yes
11426 fi;
11427 if [ "x$with_wattr_macros" != xyes ]; then
11428         NCURSES_WATTR_MACROS=0
11429         echo "$as_me:11429: result: yes" >&5
11430 echo "${ECHO_T}yes" >&6
11431 else
11432         NCURSES_WATTR_MACROS=1
11433         echo "$as_me:11433: result: no" >&5
11434 echo "${ECHO_T}no" >&6
11435 fi
11436
11437 ###   use option --with-bool to override bool's type
11438 echo "$as_me:11438: checking for type of bool" >&5
11439 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11440
11441 # Check whether --with-bool or --without-bool was given.
11442 if test "${with_bool+set}" = set; then
11443   withval="$with_bool"
11444   NCURSES_BOOL="$withval"
11445 else
11446   NCURSES_BOOL=auto
11447 fi;
11448 echo "$as_me:11448: result: $NCURSES_BOOL" >&5
11449 echo "${ECHO_T}$NCURSES_BOOL" >&6
11450
11451 echo "$as_me:11451: checking for alternate terminal capabilities file" >&5
11452 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11453
11454 # Check whether --with-caps or --without-caps was given.
11455 if test "${with_caps+set}" = set; then
11456   withval="$with_caps"
11457   TERMINFO_CAPS=Caps.$withval
11458 else
11459   TERMINFO_CAPS=Caps
11460 fi;
11461 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11462 echo "$as_me:11462: result: $TERMINFO_CAPS" >&5
11463 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11464
11465 ###   use option --with-chtype to override chtype's type
11466 echo "$as_me:11466: checking for type of chtype" >&5
11467 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11468
11469 # Check whether --with-chtype or --without-chtype was given.
11470 if test "${with_chtype+set}" = set; then
11471   withval="$with_chtype"
11472   NCURSES_CHTYPE="$withval"
11473 else
11474   NCURSES_CHTYPE=$cf_dft_chtype
11475 fi;
11476 echo "$as_me:11476: result: $NCURSES_CHTYPE" >&5
11477 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11478
11479 ###   use option --with-ospeed to override ospeed's type
11480 echo "$as_me:11480: checking for type of ospeed" >&5
11481 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11482
11483 # Check whether --with-ospeed or --without-ospeed was given.
11484 if test "${with_ospeed+set}" = set; then
11485   withval="$with_ospeed"
11486   NCURSES_OSPEED="$withval"
11487 else
11488   NCURSES_OSPEED=short
11489 fi;
11490 echo "$as_me:11490: result: $NCURSES_OSPEED" >&5
11491 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11492
11493 ###   use option --with-mmask-t to override mmask_t's type
11494 echo "$as_me:11494: checking for type of mmask_t" >&5
11495 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11496
11497 # Check whether --with-mmask-t or --without-mmask-t was given.
11498 if test "${with_mmask_t+set}" = set; then
11499   withval="$with_mmask_t"
11500   NCURSES_MMASK_T="$withval"
11501 else
11502   NCURSES_MMASK_T=$cf_dft_mmask_t
11503 fi;
11504 echo "$as_me:11504: result: $NCURSES_MMASK_T" >&5
11505 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11506
11507 ###   use option --with-ccharw-max to override CCHARW_MAX size
11508 echo "$as_me:11508: checking for size CCHARW_MAX" >&5
11509 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11510
11511 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11512 if test "${with_ccharw_max+set}" = set; then
11513   withval="$with_ccharw_max"
11514   NCURSES_CCHARW_MAX="$withval"
11515 else
11516   NCURSES_CCHARW_MAX=5
11517 fi;
11518 echo "$as_me:11518: result: $NCURSES_CCHARW_MAX" >&5
11519 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11520
11521 ###   use option --with-tparm-arg to override tparm's argument type
11522 echo "$as_me:11522: checking for type of tparm args" >&5
11523 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11524
11525 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11526 if test "${with_tparm_arg+set}" = set; then
11527   withval="$with_tparm_arg"
11528   NCURSES_TPARM_ARG="$withval"
11529 else
11530   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11531 fi;
11532 echo "$as_me:11532: result: $NCURSES_TPARM_ARG" >&5
11533 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11534
11535 ### Enable compiling-in rcs id's
11536 echo "$as_me:11536: checking if RCS identifiers should be compiled-in" >&5
11537 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11538
11539 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11540 if test "${with_rcs_ids+set}" = set; then
11541   withval="$with_rcs_ids"
11542   with_rcs_ids=$withval
11543 else
11544   with_rcs_ids=no
11545 fi;
11546 echo "$as_me:11546: result: $with_rcs_ids" >&5
11547 echo "${ECHO_T}$with_rcs_ids" >&6
11548 test "x$with_rcs_ids" = xyes &&
11549 cat >>confdefs.h <<\EOF
11550 #define USE_RCS_IDS 1
11551 EOF
11552
11553 ###############################################################################
11554
11555 echo "$as_me:11555: checking format of man-pages" >&5
11556 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11557
11558 # Check whether --with-manpage-format or --without-manpage-format was given.
11559 if test "${with_manpage_format+set}" = set; then
11560   withval="$with_manpage_format"
11561   MANPAGE_FORMAT=$withval
11562 else
11563   MANPAGE_FORMAT=unknown
11564 fi;
11565
11566 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11567 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11568
11569 cf_unknown=
11570
11571 case $MANPAGE_FORMAT in
11572 (unknown)
11573         if test -z "$MANPATH" ; then
11574                 MANPATH="/usr/man:/usr/share/man"
11575         fi
11576
11577         # look for the 'date' man-page (it's most likely to be installed!)
11578         MANPAGE_FORMAT=
11579         cf_preform=no
11580         cf_catonly=yes
11581         cf_example=date
11582
11583         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11584         for cf_dir in $MANPATH; do
11585                 test -z "$cf_dir" && cf_dir=/usr/man
11586                 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
11587                 do
11588                         cf_test=`echo $cf_name | sed -e 's/*//'`
11589                         if test "x$cf_test" = "x$cf_name" ; then
11590
11591                                 case "$cf_name" in
11592                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11593                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11594                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11595                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11596                                 esac
11597
11598                                 case "$cf_name" in
11599                                 ($cf_dir/man*)
11600                                         cf_catonly=no
11601                                         ;;
11602                                 ($cf_dir/cat*)
11603                                         cf_preform=yes
11604                                         ;;
11605                                 esac
11606                                 break
11607                         fi
11608
11609                         # if we found a match in either man* or cat*, stop looking
11610                         if test -n "$MANPAGE_FORMAT" ; then
11611                                 cf_found=no
11612                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11613                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11614                                 case "$cf_name" in
11615                                 ($cf_dir/cat*)
11616                                         cf_found=yes
11617                                         ;;
11618                                 esac
11619                                 test $cf_found=yes && break
11620                         fi
11621                 done
11622                 # only check the first directory in $MANPATH where we find manpages
11623                 if test -n "$MANPAGE_FORMAT" ; then
11624                         break
11625                 fi
11626         done
11627         # if we did not find the example, just assume it is normal
11628         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11629         IFS="$ac_save_ifs"
11630         ;;
11631 (*)
11632         for cf_option in $MANPAGE_FORMAT; do
11633         case $cf_option in
11634         (gzip|compress|BSDI|normal|formatted|catonly)
11635                 ;;
11636         (*)
11637                 cf_unknown="$cf_unknown $cf_option"
11638                 ;;
11639         esac
11640         done
11641         ;;
11642 esac
11643
11644 echo "$as_me:11644: result: $MANPAGE_FORMAT" >&5
11645 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11646 if test -n "$cf_unknown" ; then
11647         { echo "$as_me:11647: WARNING: Unexpected manpage-format $cf_unknown" >&5
11648 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11649 fi
11650
11651 echo "$as_me:11651: checking for manpage renaming" >&5
11652 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11653
11654 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11655 if test "${with_manpage_renames+set}" = set; then
11656   withval="$with_manpage_renames"
11657   MANPAGE_RENAMES=$withval
11658 else
11659   MANPAGE_RENAMES=yes
11660 fi;
11661
11662 case ".$MANPAGE_RENAMES" in
11663 (.no)
11664         ;;
11665 (.|.yes)
11666         # Debian 'man' program?
11667         if test -f /etc/debian_version ; then
11668                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11669         else
11670                 MANPAGE_RENAMES=no
11671         fi
11672         ;;
11673 esac
11674
11675 if test "$MANPAGE_RENAMES" != no ; then
11676         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11677                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11678         elif test ! -f $MANPAGE_RENAMES ; then
11679                 { { echo "$as_me:11679: error: not a filename: $MANPAGE_RENAMES" >&5
11680 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11681    { (exit 1); exit 1; }; }
11682         fi
11683
11684         test ! -d man && mkdir man
11685
11686         # Construct a sed-script to perform renaming within man-pages
11687         if test -n "$MANPAGE_RENAMES" ; then
11688                 test ! -d man && mkdir man
11689                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11690         fi
11691 fi
11692
11693 echo "$as_me:11693: result: $MANPAGE_RENAMES" >&5
11694 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11695
11696 echo "$as_me:11696: checking if manpage aliases will be installed" >&5
11697 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11698
11699 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11700 if test "${with_manpage_aliases+set}" = set; then
11701   withval="$with_manpage_aliases"
11702   MANPAGE_ALIASES=$withval
11703 else
11704   MANPAGE_ALIASES=yes
11705 fi;
11706
11707 echo "$as_me:11707: result: $MANPAGE_ALIASES" >&5
11708 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11709
11710 case "x$LN_S" in
11711 (xln*)
11712         cf_use_symlinks=yes
11713         ;;
11714 (*)
11715         cf_use_symlinks=no
11716         ;;
11717 esac
11718
11719 MANPAGE_SYMLINKS=no
11720 if test "$MANPAGE_ALIASES" = yes ; then
11721 echo "$as_me:11721: checking if manpage symlinks should be used" >&5
11722 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11723
11724 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11725 if test "${with_manpage_symlinks+set}" = set; then
11726   withval="$with_manpage_symlinks"
11727   MANPAGE_SYMLINKS=$withval
11728 else
11729   MANPAGE_SYMLINKS=$cf_use_symlinks
11730 fi;
11731
11732 if test "$$cf_use_symlinks" = no; then
11733 if test "$MANPAGE_SYMLINKS" = yes ; then
11734         { echo "$as_me:11734: WARNING: cannot make symlinks" >&5
11735 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11736         MANPAGE_SYMLINKS=no
11737 fi
11738 fi
11739
11740 echo "$as_me:11740: result: $MANPAGE_SYMLINKS" >&5
11741 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11742 fi
11743
11744 echo "$as_me:11744: checking for manpage tbl" >&5
11745 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11746
11747 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11748 if test "${with_manpage_tbl+set}" = set; then
11749   withval="$with_manpage_tbl"
11750   MANPAGE_TBL=$withval
11751 else
11752   MANPAGE_TBL=no
11753 fi;
11754
11755 echo "$as_me:11755: result: $MANPAGE_TBL" >&5
11756 echo "${ECHO_T}$MANPAGE_TBL" >&6
11757
11758 if test "$prefix" = "NONE" ; then
11759         cf_prefix="$ac_default_prefix"
11760 else
11761         cf_prefix="$prefix"
11762 fi
11763
11764 case "$MANPAGE_FORMAT" in
11765 (*catonly*)
11766         cf_format=yes
11767         cf_inboth=no
11768         ;;
11769 (*formatted*)
11770         cf_format=yes
11771         cf_inboth=yes
11772         ;;
11773 (*)
11774         cf_format=no
11775         cf_inboth=no
11776         ;;
11777 esac
11778
11779 test ! -d man && mkdir man
11780
11781 cf_so_strip=
11782 cf_compress=
11783 case "$MANPAGE_FORMAT" in
11784 (*compress*)
11785         cf_so_strip="Z"
11786         cf_compress=compress
11787         ;;
11788 (*gzip*)
11789         cf_so_strip="gz"
11790         cf_compress=gzip
11791         ;;
11792 esac
11793
11794 cf_edit_man=./edit_man.sh
11795 cf_man_alias=`pwd`/man_alias.sed
11796
11797 cat >$cf_edit_man <<CF_EOF
11798 #! $SHELL
11799 # this script is generated by the configure-script CF_MAN_PAGES macro.
11800
11801 prefix="$cf_prefix"
11802 datarootdir="$datarootdir"
11803 datadir="$datadir"
11804
11805 NCURSES_MAJOR="$NCURSES_MAJOR"
11806 NCURSES_MINOR="$NCURSES_MINOR"
11807 NCURSES_PATCH="$NCURSES_PATCH"
11808
11809 NCURSES_OSPEED="$NCURSES_OSPEED"
11810 TERMINFO="$TERMINFO"
11811
11812 INSTALL="$INSTALL"
11813 INSTALL_DATA="$INSTALL_DATA"
11814
11815 transform="$program_transform_name"
11816
11817 TMP=\${TMPDIR:=/tmp}/man\$\$
11818 trap "rm -f \$TMP" 0 1 2 3 15
11819
11820 form=\$1
11821 shift || exit 1
11822
11823 verb=\$1
11824 shift || exit 1
11825
11826 mandir=\$1
11827 shift || exit 1
11828
11829 srcdir=\$1
11830 top_srcdir=\$srcdir/..
11831 shift || exit 1
11832
11833 if test "\$form" = normal ; then
11834         if test "$cf_format" = yes ; then
11835         if test "$cf_inboth" = no ; then
11836                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11837                 exit $?
11838         fi
11839         fi
11840         cf_subdir=\$mandir/man
11841         cf_tables=$MANPAGE_TBL
11842 else
11843         cf_subdir=\$mandir/cat
11844         cf_tables=yes
11845 fi
11846
11847 # process the list of source-files
11848 for i in \$* ; do
11849 case \$i in
11850 (*.orig|*.rej) ;;
11851 (*.[0-9]*)
11852         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11853         if test \$verb = installing ; then
11854         if test ! -d \$cf_subdir\${section} ; then
11855                 mkdir -p \$cf_subdir\$section
11856         fi
11857         fi
11858
11859         # replace variables in man page
11860         if test ! -f $cf_man_alias ; then
11861 cat >>$cf_man_alias <<-CF_EOF2
11862                 s,@DATADIR@,\$datadir,g
11863                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11864                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11865                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11866                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11867                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11868                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11869 CF_EOF
11870
11871         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11872         do
11873                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11874                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11875 cat >>$cf_edit_man <<-CF_EOF
11876                 s,@$cf_NAME@,$cf_name,g
11877 CF_EOF
11878         done
11879
11880 cat >>$cf_edit_man <<CF_EOF
11881 CF_EOF2
11882                 echo "...made $cf_man_alias"
11883         fi
11884
11885         aliases=
11886         cf_source=\`basename \$i\`
11887         inalias=\$cf_source
11888         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11889         if test ! -f \$inalias ; then
11890                 echo .. skipped \$cf_source
11891                 continue
11892         fi
11893 CF_EOF
11894
11895 if test "$MANPAGE_ALIASES" != no ; then
11896 cat >>$cf_edit_man <<CF_EOF
11897         nCurses=ignore.3x
11898         test $with_curses_h = yes && nCurses=ncurses.3x
11899         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11900 CF_EOF
11901 fi
11902
11903 if test "$MANPAGE_RENAMES" = no ; then
11904 cat >>$cf_edit_man <<CF_EOF
11905         # perform program transformations for section 1 man pages
11906         if test \$section = 1 ; then
11907                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11908         else
11909                 cf_target=\$cf_subdir\${section}/\$cf_source
11910         fi
11911 CF_EOF
11912 else
11913 cat >>$cf_edit_man <<CF_EOF
11914         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11915         if test -z "\$cf_target" ; then
11916                 echo '? missing rename for '\$cf_source
11917                 cf_target="\$cf_source"
11918         fi
11919         cf_target="\$cf_subdir\${section}/\${cf_target}"
11920
11921 CF_EOF
11922 fi
11923
11924 cat >>$cf_edit_man <<CF_EOF
11925         sed     -f $cf_man_alias \\
11926 CF_EOF
11927
11928 if test -f $MANPAGE_RENAMES ; then
11929 cat >>$cf_edit_man <<CF_EOF
11930                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11931 CF_EOF
11932 else
11933 cat >>$cf_edit_man <<CF_EOF
11934                 < \$i >\$TMP
11935 CF_EOF
11936 fi
11937
11938 cat >>$cf_edit_man <<CF_EOF
11939 if test \$cf_tables = yes ; then
11940         tbl \$TMP >\$TMP.out
11941         mv \$TMP.out \$TMP
11942 fi
11943 CF_EOF
11944
11945 if test $with_overwrite != yes ; then
11946 cat >>$cf_edit_man <<CF_EOF
11947         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11948         mv \$TMP.out \$TMP
11949 CF_EOF
11950 fi
11951
11952 if test $with_curses_h != yes ; then
11953 cat >>$cf_edit_man <<CF_EOF
11954         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11955         mv \$TMP.out \$TMP
11956 CF_EOF
11957 fi
11958
11959 cat >>$cf_edit_man <<CF_EOF
11960         if test \$form = format ; then
11961                 nroff -man \$TMP >\$TMP.out
11962                 mv \$TMP.out \$TMP
11963         fi
11964 CF_EOF
11965
11966 if test -n "$cf_compress" ; then
11967 cat >>$cf_edit_man <<CF_EOF
11968         if test \$verb = installing ; then
11969         if ( $cf_compress -f \$TMP )
11970         then
11971                 mv \$TMP.$cf_so_strip \$TMP
11972         fi
11973         fi
11974         cf_target="\$cf_target.$cf_so_strip"
11975 CF_EOF
11976 fi
11977
11978 case "$MANPAGE_FORMAT" in
11979 (*BSDI*)
11980 cat >>$cf_edit_man <<CF_EOF
11981         if test \$form = format ; then
11982                 # BSDI installs only .0 suffixes in the cat directories
11983                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11984         fi
11985 CF_EOF
11986   ;;
11987 esac
11988
11989 cat >>$cf_edit_man <<CF_EOF
11990         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11991         if test \$verb = installing ; then
11992                 echo \$verb \$cf_target
11993                 \$INSTALL_DATA \$TMP \$cf_target
11994                 test -d \$cf_subdir\${section} &&
11995                 test -n "\$aliases" && (
11996                         cd \$cf_subdir\${section} && (
11997                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11998                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11999                                 cf_target=\`basename \$cf_target\`
12000                                 for cf_alias in \$aliases
12001                                 do
12002                                         if test \$section = 1 ; then
12003                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12004                                         fi
12005
12006                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12007                                                 if test -f \$cf_alias\${suffix} ; then
12008                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12009                                                         then
12010                                                                 continue
12011                                                         fi
12012                                                 fi
12013                                                 echo .. \$verb alias \$cf_alias\${suffix}
12014 CF_EOF
12015 case "x$LN_S" in
12016 (*-f)
12017 cat >>$cf_edit_man <<CF_EOF
12018                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12019 CF_EOF
12020         ;;
12021 (*)
12022 cat >>$cf_edit_man <<CF_EOF
12023                                                 rm -f \$cf_alias\${suffix}
12024                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12025 CF_EOF
12026         ;;
12027 esac
12028 cat >>$cf_edit_man <<CF_EOF
12029                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12030                                                 echo ".so \$cf_source" >\$TMP
12031 CF_EOF
12032 if test -n "$cf_compress" ; then
12033 cat >>$cf_edit_man <<CF_EOF
12034                                                 if test -n "$cf_so_strip" ; then
12035                                                         $cf_compress -f \$TMP
12036                                                         mv \$TMP.$cf_so_strip \$TMP
12037                                                 fi
12038 CF_EOF
12039 fi
12040 cat >>$cf_edit_man <<CF_EOF
12041                                                 echo .. \$verb alias \$cf_alias\${suffix}
12042                                                 rm -f \$cf_alias\${suffix}
12043                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12044                                         fi
12045                                 done
12046                         )
12047                 )
12048         elif test \$verb = removing ; then
12049                 test -f \$cf_target && (
12050                         echo \$verb \$cf_target
12051                         rm -f \$cf_target
12052                 )
12053                 test -d \$cf_subdir\${section} &&
12054                 test -n "\$aliases" && (
12055                         cd \$cf_subdir\${section} && (
12056                                 for cf_alias in \$aliases
12057                                 do
12058                                         if test \$section = 1 ; then
12059                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12060                                         fi
12061
12062                                         echo .. \$verb alias \$cf_alias\${suffix}
12063                                         rm -f \$cf_alias\${suffix}
12064                                 done
12065                         )
12066                 )
12067         else
12068 #               echo ".hy 0"
12069                 cat \$TMP
12070         fi
12071         ;;
12072 esac
12073 done
12074
12075 if test $cf_inboth = yes ; then
12076 if test \$form != format ; then
12077         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12078 fi
12079 fi
12080
12081 exit 0
12082 CF_EOF
12083 chmod 755 $cf_edit_man
12084
12085 ###############################################################################
12086
12087 ### Note that some functions (such as const) are normally disabled anyway.
12088 echo "$as_me:12088: checking if you want to build with function extensions" >&5
12089 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12090
12091 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12092 if test "${enable_ext_funcs+set}" = set; then
12093   enableval="$enable_ext_funcs"
12094   with_ext_funcs=$enableval
12095 else
12096   with_ext_funcs=yes
12097 fi;
12098 echo "$as_me:12098: result: $with_ext_funcs" >&5
12099 echo "${ECHO_T}$with_ext_funcs" >&6
12100 if test "x$with_ext_funcs" = xyes ; then
12101         NCURSES_EXT_FUNCS=1
12102
12103 cat >>confdefs.h <<\EOF
12104 #define NCURSES_EXT_FUNCS 1
12105 EOF
12106
12107 cat >>confdefs.h <<\EOF
12108 #define HAVE_ASSUME_DEFAULT_COLORS 1
12109 EOF
12110
12111 cat >>confdefs.h <<\EOF
12112 #define HAVE_CURSES_VERSION 1
12113 EOF
12114
12115 cat >>confdefs.h <<\EOF
12116 #define HAVE_HAS_KEY 1
12117 EOF
12118
12119 cat >>confdefs.h <<\EOF
12120 #define HAVE_RESIZETERM 1
12121 EOF
12122
12123 cat >>confdefs.h <<\EOF
12124 #define HAVE_RESIZE_TERM 1
12125 EOF
12126
12127 cat >>confdefs.h <<\EOF
12128 #define HAVE_TERM_ENTRY_H 1
12129 EOF
12130
12131 cat >>confdefs.h <<\EOF
12132 #define HAVE_USE_DEFAULT_COLORS 1
12133 EOF
12134
12135 cat >>confdefs.h <<\EOF
12136 #define HAVE_USE_EXTENDED_NAMES 1
12137 EOF
12138
12139 cat >>confdefs.h <<\EOF
12140 #define HAVE_USE_SCREEN 1
12141 EOF
12142
12143 cat >>confdefs.h <<\EOF
12144 #define HAVE_USE_WINDOW 1
12145 EOF
12146
12147 cat >>confdefs.h <<\EOF
12148 #define HAVE_WRESIZE 1
12149 EOF
12150
12151         GENERATED_EXT_FUNCS=generated
12152         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12153 else
12154         NCURSES_EXT_FUNCS=0
12155         GENERATED_EXT_FUNCS=
12156 fi
12157
12158 echo "$as_me:12158: checking if you want to build with SCREEN extensions" >&5
12159 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12160
12161 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12162 if test "${enable_sp_funcs+set}" = set; then
12163   enableval="$enable_sp_funcs"
12164   with_sp_funcs=$enableval
12165 else
12166   with_sp_funcs=$cf_dft_ext_spfuncs
12167 fi;
12168 echo "$as_me:12168: result: $with_sp_funcs" >&5
12169 echo "${ECHO_T}$with_sp_funcs" >&6
12170 if test "x$with_sp_funcs" = xyes ; then
12171         NCURSES_SP_FUNCS=1
12172
12173 cat >>confdefs.h <<\EOF
12174 #define NCURSES_SP_FUNCS 1
12175 EOF
12176
12177 cat >>confdefs.h <<\EOF
12178 #define HAVE_TPUTS_SP 1
12179 EOF
12180
12181         GENERATED_SP_FUNCS=generated
12182 else
12183         NCURSES_SP_FUNCS=0
12184         GENERATED_SP_FUNCS=
12185 fi
12186
12187 echo "$as_me:12187: checking if you want to build with terminal-driver" >&5
12188 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12189
12190 # Check whether --enable-term-driver or --disable-term-driver was given.
12191 if test "${enable_term_driver+set}" = set; then
12192   enableval="$enable_term_driver"
12193   with_term_driver=$enableval
12194 else
12195   with_term_driver=no
12196 fi;
12197 echo "$as_me:12197: result: $with_term_driver" >&5
12198 echo "${ECHO_T}$with_term_driver" >&6
12199 if test "x$with_term_driver" = xyes ; then
12200
12201 cat >>confdefs.h <<\EOF
12202 #define USE_TERM_DRIVER 1
12203 EOF
12204
12205         if test "x$with_termlib" != xno ; then
12206                 { { echo "$as_me:12206: error: The term-driver option conflicts with the termlib option" >&5
12207 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12208    { (exit 1); exit 1; }; }
12209         fi
12210         if test "x$with_sp_funcs" != xyes ; then
12211                 { { echo "$as_me:12211: error: The term-driver option relies upon sp-funcs" >&5
12212 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12213    { (exit 1); exit 1; }; }
12214         fi
12215 fi
12216
12217 ###   use option --enable-const to turn on use of const beyond that in XSI.
12218 echo "$as_me:12218: checking for extended use of const keyword" >&5
12219 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12220
12221 # Check whether --enable-const or --disable-const was given.
12222 if test "${enable_const+set}" = set; then
12223   enableval="$enable_const"
12224   with_ext_const=$enableval
12225 else
12226   with_ext_const=$cf_dft_ext_const
12227 fi;
12228 echo "$as_me:12228: result: $with_ext_const" >&5
12229 echo "${ECHO_T}$with_ext_const" >&6
12230 NCURSES_CONST='/*nothing*/'
12231 if test "x$with_ext_const" = xyes ; then
12232         NCURSES_CONST=const
12233 fi
12234
12235 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12236 echo "$as_me:12236: checking if you want to use extended colors" >&5
12237 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12238
12239 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12240 if test "${enable_ext_colors+set}" = set; then
12241   enableval="$enable_ext_colors"
12242   with_ext_colors=$enableval
12243 else
12244   with_ext_colors=$cf_dft_ext_colors
12245 fi;
12246 echo "$as_me:12246: result: $with_ext_colors" >&5
12247 echo "${ECHO_T}$with_ext_colors" >&6
12248 NCURSES_EXT_COLORS=0
12249 if test "x$with_ext_colors" = xyes ; then
12250         if test "x$with_widec" != xyes ; then
12251                 { echo "$as_me:12251: WARNING: This option applies only to wide-character library" >&5
12252 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12253         else
12254                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12255
12256 if test "${with_abi_version+set}" != set; then
12257         case $cf_cv_rel_version in
12258         (5.*)
12259                 cf_cv_rel_version=6.0
12260                 cf_cv_abi_version=6
12261                 { echo "$as_me:12261: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12262 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12263                 ;;
12264         esac
12265 fi
12266
12267                 NCURSES_EXT_COLORS=1
12268
12269 cat >>confdefs.h <<\EOF
12270 #define NCURSES_EXT_COLORS 1
12271 EOF
12272
12273 cat >>confdefs.h <<\EOF
12274 #define HAVE_ALLOC_PAIR 1
12275 EOF
12276
12277 cat >>confdefs.h <<\EOF
12278 #define HAVE_INIT_EXTENDED_COLOR 1
12279 EOF
12280
12281         fi
12282 fi
12283
12284 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12285 echo "$as_me:12285: checking if you want to use extended mouse encoding" >&5
12286 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12287
12288 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12289 if test "${enable_ext_mouse+set}" = set; then
12290   enableval="$enable_ext_mouse"
12291   with_ext_mouse=$enableval
12292 else
12293   with_ext_mouse=$cf_dft_ext_mouse
12294 fi;
12295 echo "$as_me:12295: result: $with_ext_mouse" >&5
12296 echo "${ECHO_T}$with_ext_mouse" >&6
12297 NCURSES_MOUSE_VERSION=1
12298 if test "x$with_ext_mouse" = xyes ; then
12299         NCURSES_MOUSE_VERSION=2
12300
12301 if test "${with_abi_version+set}" != set; then
12302         case $cf_cv_rel_version in
12303         (5.*)
12304                 cf_cv_rel_version=6.0
12305                 cf_cv_abi_version=6
12306                 { echo "$as_me:12306: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12307 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12308                 ;;
12309         esac
12310 fi
12311
12312 fi
12313
12314 ###   use option --enable-ext-putwin to turn on extended screendumps
12315 echo "$as_me:12315: checking if you want to use extended putwin/screendump" >&5
12316 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12317
12318 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12319 if test "${enable_ext_putwin+set}" = set; then
12320   enableval="$enable_ext_putwin"
12321   with_ext_putwin=$enableval
12322 else
12323   with_ext_putwin=$cf_dft_ext_putwin
12324 fi;
12325 echo "$as_me:12325: result: $with_ext_putwin" >&5
12326 echo "${ECHO_T}$with_ext_putwin" >&6
12327 if test "x$with_ext_putwin" = xyes ; then
12328
12329 cat >>confdefs.h <<\EOF
12330 #define NCURSES_EXT_PUTWIN 1
12331 EOF
12332
12333 fi
12334
12335 echo "$as_me:12335: checking if you want \$NCURSES_NO_PADDING code" >&5
12336 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12337
12338 # Check whether --enable-no-padding or --disable-no-padding was given.
12339 if test "${enable_no_padding+set}" = set; then
12340   enableval="$enable_no_padding"
12341   with_no_padding=$enableval
12342 else
12343   with_no_padding=$with_ext_funcs
12344 fi;
12345 echo "$as_me:12345: result: $with_no_padding" >&5
12346 echo "${ECHO_T}$with_no_padding" >&6
12347 test "x$with_no_padding" = xyes &&
12348 cat >>confdefs.h <<\EOF
12349 #define NCURSES_NO_PADDING 1
12350 EOF
12351
12352 echo "$as_me:12352: checking for ANSI C header files" >&5
12353 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12354 if test "${ac_cv_header_stdc+set}" = set; then
12355   echo $ECHO_N "(cached) $ECHO_C" >&6
12356 else
12357   cat >conftest.$ac_ext <<_ACEOF
12358 #line 12358 "configure"
12359 #include "confdefs.h"
12360 #include <stdlib.h>
12361 #include <stdarg.h>
12362 #include <string.h>
12363 #include <float.h>
12364
12365 _ACEOF
12366 if { (eval echo "$as_me:12366: \"$ac_cpp conftest.$ac_ext\"") >&5
12367   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12368   ac_status=$?
12369   egrep -v '^ *\+' conftest.er1 >conftest.err
12370   rm -f conftest.er1
12371   cat conftest.err >&5
12372   echo "$as_me:12372: \$? = $ac_status" >&5
12373   (exit $ac_status); } >/dev/null; then
12374   if test -s conftest.err; then
12375     ac_cpp_err=$ac_c_preproc_warn_flag
12376   else
12377     ac_cpp_err=
12378   fi
12379 else
12380   ac_cpp_err=yes
12381 fi
12382 if test -z "$ac_cpp_err"; then
12383   ac_cv_header_stdc=yes
12384 else
12385   echo "$as_me: failed program was:" >&5
12386   cat conftest.$ac_ext >&5
12387   ac_cv_header_stdc=no
12388 fi
12389 rm -f conftest.err conftest.$ac_ext
12390
12391 if test $ac_cv_header_stdc = yes; then
12392   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12393   cat >conftest.$ac_ext <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396 #include <string.h>
12397
12398 _ACEOF
12399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12400   egrep "memchr" >/dev/null 2>&1; then
12401   :
12402 else
12403   ac_cv_header_stdc=no
12404 fi
12405 rm -rf conftest*
12406
12407 fi
12408
12409 if test $ac_cv_header_stdc = yes; then
12410   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12411   cat >conftest.$ac_ext <<_ACEOF
12412 #line 12412 "configure"
12413 #include "confdefs.h"
12414 #include <stdlib.h>
12415
12416 _ACEOF
12417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12418   egrep "free" >/dev/null 2>&1; then
12419   :
12420 else
12421   ac_cv_header_stdc=no
12422 fi
12423 rm -rf conftest*
12424
12425 fi
12426
12427 if test $ac_cv_header_stdc = yes; then
12428   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12429   if test "$cross_compiling" = yes; then
12430   :
12431 else
12432   cat >conftest.$ac_ext <<_ACEOF
12433 #line 12433 "configure"
12434 #include "confdefs.h"
12435 #include <ctype.h>
12436 #if ((' ' & 0x0FF) == 0x020)
12437 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12438 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12439 #else
12440 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12441                      || ('j' <= (c) && (c) <= 'r') \
12442                      || ('s' <= (c) && (c) <= 'z'))
12443 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12444 #endif
12445
12446 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12447 int
12448 main (void)
12449 {
12450   int i;
12451   for (i = 0; i < 256; i++)
12452     if (XOR (islower (i), ISLOWER (i))
12453         || toupper (i) != TOUPPER (i))
12454       $ac_main_return(2);
12455   $ac_main_return (0);
12456 }
12457 _ACEOF
12458 rm -f conftest$ac_exeext
12459 if { (eval echo "$as_me:12459: \"$ac_link\"") >&5
12460   (eval $ac_link) 2>&5
12461   ac_status=$?
12462   echo "$as_me:12462: \$? = $ac_status" >&5
12463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12464   { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465   (eval $ac_try) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); }; }; then
12469   :
12470 else
12471   echo "$as_me: program exited with status $ac_status" >&5
12472 echo "$as_me: failed program was:" >&5
12473 cat conftest.$ac_ext >&5
12474 ac_cv_header_stdc=no
12475 fi
12476 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12477 fi
12478 fi
12479 fi
12480 echo "$as_me:12480: result: $ac_cv_header_stdc" >&5
12481 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12482 if test $ac_cv_header_stdc = yes; then
12483
12484 cat >>confdefs.h <<\EOF
12485 #define STDC_HEADERS 1
12486 EOF
12487
12488 fi
12489
12490 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12491
12492 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12493                   inttypes.h stdint.h unistd.h
12494 do
12495 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12496 echo "$as_me:12496: checking for $ac_header" >&5
12497 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12498 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12499   echo $ECHO_N "(cached) $ECHO_C" >&6
12500 else
12501   cat >conftest.$ac_ext <<_ACEOF
12502 #line 12502 "configure"
12503 #include "confdefs.h"
12504 $ac_includes_default
12505 #include <$ac_header>
12506 _ACEOF
12507 rm -f conftest.$ac_objext
12508 if { (eval echo "$as_me:12508: \"$ac_compile\"") >&5
12509   (eval $ac_compile) 2>&5
12510   ac_status=$?
12511   echo "$as_me:12511: \$? = $ac_status" >&5
12512   (exit $ac_status); } &&
12513          { ac_try='test -s conftest.$ac_objext'
12514   { (eval echo "$as_me:12514: \"$ac_try\"") >&5
12515   (eval $ac_try) 2>&5
12516   ac_status=$?
12517   echo "$as_me:12517: \$? = $ac_status" >&5
12518   (exit $ac_status); }; }; then
12519   eval "$as_ac_Header=yes"
12520 else
12521   echo "$as_me: failed program was:" >&5
12522 cat conftest.$ac_ext >&5
12523 eval "$as_ac_Header=no"
12524 fi
12525 rm -f conftest.$ac_objext conftest.$ac_ext
12526 fi
12527 echo "$as_me:12527: result: `eval echo '${'$as_ac_Header'}'`" >&5
12528 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12529 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12530   cat >>confdefs.h <<EOF
12531 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12532 EOF
12533
12534 fi
12535 done
12536
12537 echo "$as_me:12537: checking for signed char" >&5
12538 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12539 if test "${ac_cv_type_signed_char+set}" = set; then
12540   echo $ECHO_N "(cached) $ECHO_C" >&6
12541 else
12542   cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545 $ac_includes_default
12546 int
12547 main (void)
12548 {
12549 if ((signed char *) 0)
12550   return 0;
12551 if (sizeof (signed char))
12552   return 0;
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557 rm -f conftest.$ac_objext
12558 if { (eval echo "$as_me:12558: \"$ac_compile\"") >&5
12559   (eval $ac_compile) 2>&5
12560   ac_status=$?
12561   echo "$as_me:12561: \$? = $ac_status" >&5
12562   (exit $ac_status); } &&
12563          { ac_try='test -s conftest.$ac_objext'
12564   { (eval echo "$as_me:12564: \"$ac_try\"") >&5
12565   (eval $ac_try) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); }; }; then
12569   ac_cv_type_signed_char=yes
12570 else
12571   echo "$as_me: failed program was:" >&5
12572 cat conftest.$ac_ext >&5
12573 ac_cv_type_signed_char=no
12574 fi
12575 rm -f conftest.$ac_objext conftest.$ac_ext
12576 fi
12577 echo "$as_me:12577: result: $ac_cv_type_signed_char" >&5
12578 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12579
12580 echo "$as_me:12580: checking size of signed char" >&5
12581 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12582 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12583   echo $ECHO_N "(cached) $ECHO_C" >&6
12584 else
12585   if test "$ac_cv_type_signed_char" = yes; then
12586   if test "$cross_compiling" = yes; then
12587   # Depending upon the size, compute the lo and hi bounds.
12588 cat >conftest.$ac_ext <<_ACEOF
12589 #line 12589 "configure"
12590 #include "confdefs.h"
12591 $ac_includes_default
12592 int
12593 main (void)
12594 {
12595 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12596   ;
12597   return 0;
12598 }
12599 _ACEOF
12600 rm -f conftest.$ac_objext
12601 if { (eval echo "$as_me:12601: \"$ac_compile\"") >&5
12602   (eval $ac_compile) 2>&5
12603   ac_status=$?
12604   echo "$as_me:12604: \$? = $ac_status" >&5
12605   (exit $ac_status); } &&
12606          { ac_try='test -s conftest.$ac_objext'
12607   { (eval echo "$as_me:12607: \"$ac_try\"") >&5
12608   (eval $ac_try) 2>&5
12609   ac_status=$?
12610   echo "$as_me:12610: \$? = $ac_status" >&5
12611   (exit $ac_status); }; }; then
12612   ac_lo=0 ac_mid=0
12613   while :; do
12614     cat >conftest.$ac_ext <<_ACEOF
12615 #line 12615 "configure"
12616 #include "confdefs.h"
12617 $ac_includes_default
12618 int
12619 main (void)
12620 {
12621 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12622   ;
12623   return 0;
12624 }
12625 _ACEOF
12626 rm -f conftest.$ac_objext
12627 if { (eval echo "$as_me:12627: \"$ac_compile\"") >&5
12628   (eval $ac_compile) 2>&5
12629   ac_status=$?
12630   echo "$as_me:12630: \$? = $ac_status" >&5
12631   (exit $ac_status); } &&
12632          { ac_try='test -s conftest.$ac_objext'
12633   { (eval echo "$as_me:12633: \"$ac_try\"") >&5
12634   (eval $ac_try) 2>&5
12635   ac_status=$?
12636   echo "$as_me:12636: \$? = $ac_status" >&5
12637   (exit $ac_status); }; }; then
12638   ac_hi=$ac_mid; break
12639 else
12640   echo "$as_me: failed program was:" >&5
12641 cat conftest.$ac_ext >&5
12642 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12643 fi
12644 rm -f conftest.$ac_objext conftest.$ac_ext
12645   done
12646 else
12647   echo "$as_me: failed program was:" >&5
12648 cat conftest.$ac_ext >&5
12649 ac_hi=-1 ac_mid=-1
12650   while :; do
12651     cat >conftest.$ac_ext <<_ACEOF
12652 #line 12652 "configure"
12653 #include "confdefs.h"
12654 $ac_includes_default
12655 int
12656 main (void)
12657 {
12658 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12659   ;
12660   return 0;
12661 }
12662 _ACEOF
12663 rm -f conftest.$ac_objext
12664 if { (eval echo "$as_me:12664: \"$ac_compile\"") >&5
12665   (eval $ac_compile) 2>&5
12666   ac_status=$?
12667   echo "$as_me:12667: \$? = $ac_status" >&5
12668   (exit $ac_status); } &&
12669          { ac_try='test -s conftest.$ac_objext'
12670   { (eval echo "$as_me:12670: \"$ac_try\"") >&5
12671   (eval $ac_try) 2>&5
12672   ac_status=$?
12673   echo "$as_me:12673: \$? = $ac_status" >&5
12674   (exit $ac_status); }; }; then
12675   ac_lo=$ac_mid; break
12676 else
12677   echo "$as_me: failed program was:" >&5
12678 cat conftest.$ac_ext >&5
12679 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12680 fi
12681 rm -f conftest.$ac_objext conftest.$ac_ext
12682   done
12683 fi
12684 rm -f conftest.$ac_objext conftest.$ac_ext
12685 # Binary search between lo and hi bounds.
12686 while test "x$ac_lo" != "x$ac_hi"; do
12687   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12688   cat >conftest.$ac_ext <<_ACEOF
12689 #line 12689 "configure"
12690 #include "confdefs.h"
12691 $ac_includes_default
12692 int
12693 main (void)
12694 {
12695 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12696   ;
12697   return 0;
12698 }
12699 _ACEOF
12700 rm -f conftest.$ac_objext
12701 if { (eval echo "$as_me:12701: \"$ac_compile\"") >&5
12702   (eval $ac_compile) 2>&5
12703   ac_status=$?
12704   echo "$as_me:12704: \$? = $ac_status" >&5
12705   (exit $ac_status); } &&
12706          { ac_try='test -s conftest.$ac_objext'
12707   { (eval echo "$as_me:12707: \"$ac_try\"") >&5
12708   (eval $ac_try) 2>&5
12709   ac_status=$?
12710   echo "$as_me:12710: \$? = $ac_status" >&5
12711   (exit $ac_status); }; }; then
12712   ac_hi=$ac_mid
12713 else
12714   echo "$as_me: failed program was:" >&5
12715 cat conftest.$ac_ext >&5
12716 ac_lo=`expr $ac_mid + 1`
12717 fi
12718 rm -f conftest.$ac_objext conftest.$ac_ext
12719 done
12720 ac_cv_sizeof_signed_char=$ac_lo
12721 else
12722   if test "$cross_compiling" = yes; then
12723   { { echo "$as_me:12723: error: cannot run test program while cross compiling" >&5
12724 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12725    { (exit 1); exit 1; }; }
12726 else
12727   cat >conftest.$ac_ext <<_ACEOF
12728 #line 12728 "configure"
12729 #include "confdefs.h"
12730 $ac_includes_default
12731 int
12732 main (void)
12733 {
12734 FILE *f = fopen ("conftest.val", "w");
12735 if (!f)
12736   $ac_main_return (1);
12737 fprintf (f, "%d", (sizeof (signed char)));
12738 fclose (f);
12739   ;
12740   return 0;
12741 }
12742 _ACEOF
12743 rm -f conftest$ac_exeext
12744 if { (eval echo "$as_me:12744: \"$ac_link\"") >&5
12745   (eval $ac_link) 2>&5
12746   ac_status=$?
12747   echo "$as_me:12747: \$? = $ac_status" >&5
12748   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12749   { (eval echo "$as_me:12749: \"$ac_try\"") >&5
12750   (eval $ac_try) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); }; }; then
12754   ac_cv_sizeof_signed_char=`cat conftest.val`
12755 else
12756   echo "$as_me: program exited with status $ac_status" >&5
12757 echo "$as_me: failed program was:" >&5
12758 cat conftest.$ac_ext >&5
12759 fi
12760 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12761 fi
12762 fi
12763 rm -f conftest.val
12764 else
12765   ac_cv_sizeof_signed_char=0
12766 fi
12767 fi
12768 echo "$as_me:12768: result: $ac_cv_sizeof_signed_char" >&5
12769 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12770 cat >>confdefs.h <<EOF
12771 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12772 EOF
12773
12774 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12775         NCURSES_SBOOL="signed char"
12776 else
12777         NCURSES_SBOOL="char"
12778 fi
12779 echo "$as_me:12779: checking if you want to use signed Boolean array in term.h" >&5
12780 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12781
12782 # Check whether --enable-signed-char or --disable-signed-char was given.
12783 if test "${enable_signed_char+set}" = set; then
12784   enableval="$enable_signed_char"
12785   with_signed_char=$enableval
12786 else
12787   with_signed_char=no
12788 fi;
12789 echo "$as_me:12789: result: $with_signed_char" >&5
12790 echo "${ECHO_T}$with_signed_char" >&6
12791 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12792
12793 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12794 echo "$as_me:12794: checking if you want SIGWINCH handler" >&5
12795 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12796
12797 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12798 if test "${enable_sigwinch+set}" = set; then
12799   enableval="$enable_sigwinch"
12800   with_sigwinch=$enableval
12801 else
12802   with_sigwinch=$with_ext_funcs
12803 fi;
12804 echo "$as_me:12804: result: $with_sigwinch" >&5
12805 echo "${ECHO_T}$with_sigwinch" >&6
12806 test "x$with_sigwinch" = xyes &&
12807 cat >>confdefs.h <<\EOF
12808 #define USE_SIGWINCH 1
12809 EOF
12810
12811 ###   use option --enable-tcap-names to allow user to define new capabilities
12812 echo "$as_me:12812: checking if you want user-definable terminal capabilities like termcap" >&5
12813 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12814
12815 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12816 if test "${enable_tcap_names+set}" = set; then
12817   enableval="$enable_tcap_names"
12818   with_tcap_names=$enableval
12819 else
12820   with_tcap_names=$with_ext_funcs
12821 fi;
12822 echo "$as_me:12822: result: $with_tcap_names" >&5
12823 echo "${ECHO_T}$with_tcap_names" >&6
12824 NCURSES_XNAMES=0
12825 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12826
12827 ##############################################################################
12828
12829 echo "$as_me:12829: checking if you want to link with the pthread library" >&5
12830 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12831
12832 # Check whether --with-pthread or --without-pthread was given.
12833 if test "${with_pthread+set}" = set; then
12834   withval="$with_pthread"
12835   with_pthread=$withval
12836 else
12837   with_pthread=no
12838 fi;
12839 echo "$as_me:12839: result: $with_pthread" >&5
12840 echo "${ECHO_T}$with_pthread" >&6
12841
12842 if test "$with_pthread" != no ; then
12843         echo "$as_me:12843: checking for pthread.h" >&5
12844 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12845 if test "${ac_cv_header_pthread_h+set}" = set; then
12846   echo $ECHO_N "(cached) $ECHO_C" >&6
12847 else
12848   cat >conftest.$ac_ext <<_ACEOF
12849 #line 12849 "configure"
12850 #include "confdefs.h"
12851 #include <pthread.h>
12852 _ACEOF
12853 if { (eval echo "$as_me:12853: \"$ac_cpp conftest.$ac_ext\"") >&5
12854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12855   ac_status=$?
12856   egrep -v '^ *\+' conftest.er1 >conftest.err
12857   rm -f conftest.er1
12858   cat conftest.err >&5
12859   echo "$as_me:12859: \$? = $ac_status" >&5
12860   (exit $ac_status); } >/dev/null; then
12861   if test -s conftest.err; then
12862     ac_cpp_err=$ac_c_preproc_warn_flag
12863   else
12864     ac_cpp_err=
12865   fi
12866 else
12867   ac_cpp_err=yes
12868 fi
12869 if test -z "$ac_cpp_err"; then
12870   ac_cv_header_pthread_h=yes
12871 else
12872   echo "$as_me: failed program was:" >&5
12873   cat conftest.$ac_ext >&5
12874   ac_cv_header_pthread_h=no
12875 fi
12876 rm -f conftest.err conftest.$ac_ext
12877 fi
12878 echo "$as_me:12878: result: $ac_cv_header_pthread_h" >&5
12879 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12880 if test $ac_cv_header_pthread_h = yes; then
12881
12882 cat >>confdefs.h <<\EOF
12883 #define HAVE_PTHREADS_H 1
12884 EOF
12885
12886         for cf_lib_pthread in pthread c_r
12887         do
12888             echo "$as_me:12888: checking if we can link with the $cf_lib_pthread library" >&5
12889 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12890             cf_save_LIBS="$LIBS"
12891
12892 cf_add_libs="-l$cf_lib_pthread"
12893 # Filter out duplicates - this happens with badly-designed ".pc" files...
12894 for cf_add_1lib in $LIBS
12895 do
12896         for cf_add_2lib in $cf_add_libs
12897         do
12898                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12899                 then
12900                         cf_add_1lib=
12901                         break
12902                 fi
12903         done
12904         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12905 done
12906 LIBS="$cf_add_libs"
12907
12908             cat >conftest.$ac_ext <<_ACEOF
12909 #line 12909 "configure"
12910 #include "confdefs.h"
12911
12912 #include <pthread.h>
12913
12914 int
12915 main (void)
12916 {
12917
12918                 int rc = pthread_create(0,0,0,0);
12919                 int r2 = pthread_mutexattr_settype(0, 0);
12920
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925 rm -f conftest.$ac_objext conftest$ac_exeext
12926 if { (eval echo "$as_me:12926: \"$ac_link\"") >&5
12927   (eval $ac_link) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit $ac_status); } &&
12931          { ac_try='test -s conftest$ac_exeext'
12932   { (eval echo "$as_me:12932: \"$ac_try\"") >&5
12933   (eval $ac_try) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); }; }; then
12937   with_pthread=yes
12938 else
12939   echo "$as_me: failed program was:" >&5
12940 cat conftest.$ac_ext >&5
12941 with_pthread=no
12942 fi
12943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12944             LIBS="$cf_save_LIBS"
12945             echo "$as_me:12945: result: $with_pthread" >&5
12946 echo "${ECHO_T}$with_pthread" >&6
12947             test "$with_pthread" = yes && break
12948         done
12949
12950         if test "$with_pthread" = yes ; then
12951
12952 cf_add_libs="-l$cf_lib_pthread"
12953 # Filter out duplicates - this happens with badly-designed ".pc" files...
12954 for cf_add_1lib in $LIBS
12955 do
12956         for cf_add_2lib in $cf_add_libs
12957         do
12958                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12959                 then
12960                         cf_add_1lib=
12961                         break
12962                 fi
12963         done
12964         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12965 done
12966 LIBS="$cf_add_libs"
12967
12968 cat >>confdefs.h <<\EOF
12969 #define HAVE_LIBPTHREADS 1
12970 EOF
12971
12972         else
12973             { { echo "$as_me:12973: error: Cannot link with pthread library" >&5
12974 echo "$as_me: error: Cannot link with pthread library" >&2;}
12975    { (exit 1); exit 1; }; }
12976         fi
12977
12978 fi
12979
12980 fi
12981
12982 if test "x$with_pthread" != xno; then
12983         echo "$as_me:12983: checking for pthread_kill" >&5
12984 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12985 if test "${ac_cv_func_pthread_kill+set}" = set; then
12986   echo $ECHO_N "(cached) $ECHO_C" >&6
12987 else
12988   cat >conftest.$ac_ext <<_ACEOF
12989 #line 12989 "configure"
12990 #include "confdefs.h"
12991 /* System header to define __stub macros and hopefully few prototypes,
12992     which can conflict with char pthread_kill (); below.  */
12993 #include <assert.h>
12994 /* Override any gcc2 internal prototype to avoid an error.  */
12995 #ifdef __cplusplus
12996 extern "C"
12997 #endif
12998 /* We use char because int might match the return type of a gcc2
12999    builtin and then its argument prototype would still apply.  */
13000 char pthread_kill ();
13001 char (*f) ();
13002
13003 int
13004 main (void)
13005 {
13006 /* The GNU C library defines this for functions which it implements
13007     to always fail with ENOSYS.  Some functions are actually named
13008     something starting with __ and the normal name is an alias.  */
13009 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13010 choke me
13011 #else
13012 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13013 #endif
13014
13015   ;
13016   return 0;
13017 }
13018 _ACEOF
13019 rm -f conftest.$ac_objext conftest$ac_exeext
13020 if { (eval echo "$as_me:13020: \"$ac_link\"") >&5
13021   (eval $ac_link) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit $ac_status); } &&
13025          { ac_try='test -s conftest$ac_exeext'
13026   { (eval echo "$as_me:13026: \"$ac_try\"") >&5
13027   (eval $ac_try) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); }; }; then
13031   ac_cv_func_pthread_kill=yes
13032 else
13033   echo "$as_me: failed program was:" >&5
13034 cat conftest.$ac_ext >&5
13035 ac_cv_func_pthread_kill=no
13036 fi
13037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13038 fi
13039 echo "$as_me:13039: result: $ac_cv_func_pthread_kill" >&5
13040 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13041 if test $ac_cv_func_pthread_kill = yes; then
13042
13043                 echo "$as_me:13043: checking if you want to allow EINTR in wgetch with pthreads" >&5
13044 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13045
13046 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13047 if test "${enable_pthreads_eintr+set}" = set; then
13048   enableval="$enable_pthreads_eintr"
13049   use_pthreads_eintr=$enableval
13050 else
13051   use_pthreads_eintr=no
13052 fi;
13053                 echo "$as_me:13053: result: $use_pthreads_eintr" >&5
13054 echo "${ECHO_T}$use_pthreads_eintr" >&6
13055                 if test "x$use_pthreads_eintr" = xyes ; then
13056
13057 cat >>confdefs.h <<\EOF
13058 #define USE_PTHREADS_EINTR 1
13059 EOF
13060
13061                 fi
13062 fi
13063
13064         echo "$as_me:13064: checking if you want to use weak-symbols for pthreads" >&5
13065 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13066
13067 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13068 if test "${enable_weak_symbols+set}" = set; then
13069   enableval="$enable_weak_symbols"
13070   use_weak_symbols=$enableval
13071 else
13072   use_weak_symbols=no
13073 fi;
13074         echo "$as_me:13074: result: $use_weak_symbols" >&5
13075 echo "${ECHO_T}$use_weak_symbols" >&6
13076         if test "x$use_weak_symbols" = xyes ; then
13077
13078 echo "$as_me:13078: checking if $CC supports weak symbols" >&5
13079 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13080 if test "${cf_cv_weak_symbols+set}" = set; then
13081   echo $ECHO_N "(cached) $ECHO_C" >&6
13082 else
13083
13084 cat >conftest.$ac_ext <<_ACEOF
13085 #line 13085 "configure"
13086 #include "confdefs.h"
13087
13088 #include <stdio.h>
13089 int
13090 main (void)
13091 {
13092
13093 #if defined(__GNUC__)
13094 #  if defined __USE_ISOC99
13095 #    define _cat_pragma(exp)    _Pragma(#exp)
13096 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13097 #  else
13098 #    define _weak_pragma(exp)
13099 #  endif
13100 #  define _declare(name)        __extension__ extern __typeof__(name) name
13101 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13102 #endif
13103
13104 weak_symbol(fopen);
13105
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 rm -f conftest.$ac_objext
13111 if { (eval echo "$as_me:13111: \"$ac_compile\"") >&5
13112   (eval $ac_compile) 2>&5
13113   ac_status=$?
13114   echo "$as_me:13114: \$? = $ac_status" >&5
13115   (exit $ac_status); } &&
13116          { ac_try='test -s conftest.$ac_objext'
13117   { (eval echo "$as_me:13117: \"$ac_try\"") >&5
13118   (eval $ac_try) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); }; }; then
13122   cf_cv_weak_symbols=yes
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 cat conftest.$ac_ext >&5
13126 cf_cv_weak_symbols=no
13127 fi
13128 rm -f conftest.$ac_objext conftest.$ac_ext
13129
13130 fi
13131 echo "$as_me:13131: result: $cf_cv_weak_symbols" >&5
13132 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13133
13134         else
13135                 cf_cv_weak_symbols=no
13136         fi
13137
13138         if test "x$cf_cv_weak_symbols" = xyes ; then
13139
13140 cat >>confdefs.h <<\EOF
13141 #define USE_WEAK_SYMBOLS 1
13142 EOF
13143
13144         fi
13145 fi
13146
13147 PTHREAD=
13148 if test "x$with_pthread" = "xyes" ; then
13149
13150 cat >>confdefs.h <<\EOF
13151 #define USE_PTHREADS 1
13152 EOF
13153
13154         enable_reentrant=yes
13155         if test "x$cf_cv_weak_symbols" = xyes ; then
13156                 PTHREAD=-lpthread
13157         fi
13158 fi
13159
13160 # Reentrant code has to be opaque; there's little advantage to making ncurses
13161 # opaque outside of that, so there is no --enable-opaque option.  We can use
13162 # this option without --with-pthreads, but this will be always set for
13163 # pthreads.
13164 echo "$as_me:13164: checking if you want reentrant code" >&5
13165 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13166
13167 # Check whether --enable-reentrant or --disable-reentrant was given.
13168 if test "${enable_reentrant+set}" = set; then
13169   enableval="$enable_reentrant"
13170   with_reentrant=$enableval
13171 else
13172   with_reentrant=no
13173 fi;
13174 echo "$as_me:13174: result: $with_reentrant" >&5
13175 echo "${ECHO_T}$with_reentrant" >&6
13176 if test "x$with_reentrant" = xyes ; then
13177         cf_cv_enable_reentrant=1
13178         cf_cv_enable_opaque="NCURSES_INTERNALS"
13179         NCURSES_SIZE_T=int
13180         if test "x$cf_cv_weak_symbols" = xyes ; then
13181
13182 # remove pthread library from $LIBS
13183 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13184
13185 cf_add_libs="-lpthread"
13186 # Filter out duplicates - this happens with badly-designed ".pc" files...
13187 for cf_add_1lib in $TEST_LIBS
13188 do
13189         for cf_add_2lib in $cf_add_libs
13190         do
13191                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13192                 then
13193                         cf_add_1lib=
13194                         break
13195                 fi
13196         done
13197         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13198 done
13199 TEST_LIBS="$cf_add_libs"
13200
13201 cf_add_libs="-lpthread"
13202 # Filter out duplicates - this happens with badly-designed ".pc" files...
13203 for cf_add_1lib in $TEST_LIBS2
13204 do
13205         for cf_add_2lib in $cf_add_libs
13206         do
13207                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13208                 then
13209                         cf_add_1lib=
13210                         break
13211                 fi
13212         done
13213         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13214 done
13215 TEST_LIBS2="$cf_add_libs"
13216
13217         else
13218                 # when not using weak symbols but with_reentrant,
13219                 # add 't' to the library suffix on all platforms
13220                 # except cygwin, where we only do that if ALSO
13221                 # compiling with full thread support.
13222                 case "$host" in
13223                 (*cygwin* | *msys*)
13224                         if test "$with_pthread" = "yes" ; then
13225                                 if test "x$disable_lib_suffixes" = "xno" ; then
13226                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13227                                 fi
13228                         fi ;;
13229                 (*)
13230                         if test "x$disable_lib_suffixes" = "xno" ; then
13231                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13232                         fi
13233                         ;;
13234                 esac
13235         fi
13236
13237 cat >>confdefs.h <<\EOF
13238 #define USE_REENTRANT 1
13239 EOF
13240
13241 if test "${with_abi_version+set}" != set; then
13242         case $cf_cv_rel_version in
13243         (5.*)
13244                 cf_cv_rel_version=6.0
13245                 cf_cv_abi_version=6
13246                 { echo "$as_me:13246: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13247 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13248                 ;;
13249         esac
13250 fi
13251
13252 else
13253         cf_cv_enable_reentrant=0
13254         cf_cv_enable_opaque="NCURSES_OPAQUE"
13255         NCURSES_SIZE_T=short
13256 fi
13257
13258 echo "$as_me:13258: checking if you want opaque curses-library structures" >&5
13259 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13260
13261 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13262 if test "${enable_opaque_curses+set}" = set; then
13263   enableval="$enable_opaque_curses"
13264   test "$enableval" != yes && enableval=no
13265         if test "$enableval" != "no" ; then
13266     enable_opaque_curses=yes
13267         else
13268
13269          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13270          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13271
13272         fi
13273 else
13274   enableval=no
13275
13276          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13277          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13278
13279 fi;
13280 echo "$as_me:13280: result: $enable_opaque_curses" >&5
13281 echo "${ECHO_T}$enable_opaque_curses" >&6
13282
13283 test "$cf_cv_enable_reentrant" = 1 && \
13284 test "$enable_opaque_curses" = no && \
13285 { { echo "$as_me:13285: error: reentrant configuration requires opaque library" >&5
13286 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13287    { (exit 1); exit 1; }; }
13288
13289 echo "$as_me:13289: checking if you want opaque form-library structures" >&5
13290 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13291
13292 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13293 if test "${enable_opaque_form+set}" = set; then
13294   enableval="$enable_opaque_form"
13295   enable_opaque_form=yes
13296 else
13297   enable_opaque_form=no
13298 fi;
13299 echo "$as_me:13299: result: $enable_opaque_form" >&5
13300 echo "${ECHO_T}$enable_opaque_form" >&6
13301
13302 echo "$as_me:13302: checking if you want opaque menu-library structures" >&5
13303 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13304
13305 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13306 if test "${enable_opaque_menu+set}" = set; then
13307   enableval="$enable_opaque_menu"
13308   enable_opaque_menu=yes
13309 else
13310   enable_opaque_menu=no
13311 fi;
13312 echo "$as_me:13312: result: $enable_opaque_menu" >&5
13313 echo "${ECHO_T}$enable_opaque_menu" >&6
13314
13315 echo "$as_me:13315: checking if you want opaque panel-library structures" >&5
13316 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13317
13318 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13319 if test "${enable_opaque_panel+set}" = set; then
13320   enableval="$enable_opaque_panel"
13321   enable_opaque_panel=yes
13322 else
13323   enable_opaque_panel=no
13324 fi;
13325 echo "$as_me:13325: result: $enable_opaque_panel" >&5
13326 echo "${ECHO_T}$enable_opaque_panel" >&6
13327
13328 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13329 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13330 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13331 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13332
13333 ### Allow using a different wrap-prefix
13334 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13335         echo "$as_me:13335: checking for prefix used to wrap public variables" >&5
13336 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13337
13338 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13339 if test "${with_wrap_prefix+set}" = set; then
13340   withval="$with_wrap_prefix"
13341   NCURSES_WRAP_PREFIX=$withval
13342 else
13343   NCURSES_WRAP_PREFIX=_nc_
13344 fi;
13345         echo "$as_me:13345: result: $NCURSES_WRAP_PREFIX" >&5
13346 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13347 else
13348         NCURSES_WRAP_PREFIX=_nc_
13349 fi
13350
13351 cat >>confdefs.h <<EOF
13352 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13353 EOF
13354
13355 ###############################################################################
13356 # These options are relatively safe to experiment with.
13357
13358 echo "$as_me:13358: checking if you want all development code" >&5
13359 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13360
13361 # Check whether --with-develop or --without-develop was given.
13362 if test "${with_develop+set}" = set; then
13363   withval="$with_develop"
13364   with_develop=$withval
13365 else
13366   with_develop=no
13367 fi;
13368 echo "$as_me:13368: result: $with_develop" >&5
13369 echo "${ECHO_T}$with_develop" >&6
13370
13371 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13372 echo "$as_me:13372: checking if you want hard-tabs code" >&5
13373 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13374
13375 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13376 if test "${enable_hard_tabs+set}" = set; then
13377   enableval="$enable_hard_tabs"
13378
13379 else
13380   enable_hard_tabs=$with_develop
13381 fi;
13382 echo "$as_me:13382: result: $enable_hard_tabs" >&5
13383 echo "${ECHO_T}$enable_hard_tabs" >&6
13384 test "x$enable_hard_tabs" = xyes &&
13385 cat >>confdefs.h <<\EOF
13386 #define USE_HARD_TABS 1
13387 EOF
13388
13389 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13390 echo "$as_me:13390: checking if you want limited support for xmc" >&5
13391 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13392
13393 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13394 if test "${enable_xmc_glitch+set}" = set; then
13395   enableval="$enable_xmc_glitch"
13396
13397 else
13398   enable_xmc_glitch=$with_develop
13399 fi;
13400 echo "$as_me:13400: result: $enable_xmc_glitch" >&5
13401 echo "${ECHO_T}$enable_xmc_glitch" >&6
13402 test "x$enable_xmc_glitch" = xyes &&
13403 cat >>confdefs.h <<\EOF
13404 #define USE_XMC_SUPPORT 1
13405 EOF
13406
13407 ###############################################################################
13408 # These are just experimental, probably should not be in a package:
13409
13410 echo "$as_me:13410: checking if you do not want to assume colors are white-on-black" >&5
13411 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13412
13413 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13414 if test "${enable_assumed_color+set}" = set; then
13415   enableval="$enable_assumed_color"
13416   with_assumed_color=$enableval
13417 else
13418   with_assumed_color=yes
13419 fi;
13420 echo "$as_me:13420: result: $with_assumed_color" >&5
13421 echo "${ECHO_T}$with_assumed_color" >&6
13422 test "x$with_assumed_color" = xyes &&
13423 cat >>confdefs.h <<\EOF
13424 #define USE_ASSUMED_COLOR 1
13425 EOF
13426
13427 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13428 echo "$as_me:13428: checking if you want hashmap scrolling-optimization code" >&5
13429 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13430
13431 # Check whether --enable-hashmap or --disable-hashmap was given.
13432 if test "${enable_hashmap+set}" = set; then
13433   enableval="$enable_hashmap"
13434   with_hashmap=$enableval
13435 else
13436   with_hashmap=yes
13437 fi;
13438 echo "$as_me:13438: result: $with_hashmap" >&5
13439 echo "${ECHO_T}$with_hashmap" >&6
13440 test "x$with_hashmap" = xyes &&
13441 cat >>confdefs.h <<\EOF
13442 #define USE_HASHMAP 1
13443 EOF
13444
13445 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13446 echo "$as_me:13446: checking if you want colorfgbg code" >&5
13447 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13448
13449 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13450 if test "${enable_colorfgbg+set}" = set; then
13451   enableval="$enable_colorfgbg"
13452   with_colorfgbg=$enableval
13453 else
13454   with_colorfgbg=no
13455 fi;
13456 echo "$as_me:13456: result: $with_colorfgbg" >&5
13457 echo "${ECHO_T}$with_colorfgbg" >&6
13458 test "x$with_colorfgbg" = xyes &&
13459 cat >>confdefs.h <<\EOF
13460 #define USE_COLORFGBG 1
13461 EOF
13462
13463 ###   use option --enable-interop to turn on use of bindings used for interop
13464 echo "$as_me:13464: checking if you want interop bindings" >&5
13465 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13466
13467 # Check whether --enable-interop or --disable-interop was given.
13468 if test "${enable_interop+set}" = set; then
13469   enableval="$enable_interop"
13470   with_exp_interop=$enableval
13471 else
13472   with_exp_interop=$cf_dft_interop
13473 fi;
13474 echo "$as_me:13474: result: $with_exp_interop" >&5
13475 echo "${ECHO_T}$with_exp_interop" >&6
13476
13477 NCURSES_INTEROP_FUNCS=0
13478 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13479
13480 echo "$as_me:13480: checking if you want experimental safe-sprintf code" >&5
13481 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13482
13483 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13484 if test "${enable_safe_sprintf+set}" = set; then
13485   enableval="$enable_safe_sprintf"
13486   with_safe_sprintf=$enableval
13487 else
13488   with_safe_sprintf=no
13489 fi;
13490 echo "$as_me:13490: result: $with_safe_sprintf" >&5
13491 echo "${ECHO_T}$with_safe_sprintf" >&6
13492 test "x$with_safe_sprintf" = xyes &&
13493 cat >>confdefs.h <<\EOF
13494 #define USE_SAFE_SPRINTF 1
13495 EOF
13496
13497 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13498 # when hashmap is used scroll hints are useless
13499 if test "$with_hashmap" = no ; then
13500 echo "$as_me:13500: checking if you want to experiment without scrolling-hints code" >&5
13501 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13502
13503 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13504 if test "${enable_scroll_hints+set}" = set; then
13505   enableval="$enable_scroll_hints"
13506   with_scroll_hints=$enableval
13507 else
13508   with_scroll_hints=yes
13509 fi;
13510 echo "$as_me:13510: result: $with_scroll_hints" >&5
13511 echo "${ECHO_T}$with_scroll_hints" >&6
13512 test "x$with_scroll_hints" = xyes &&
13513 cat >>confdefs.h <<\EOF
13514 #define USE_SCROLL_HINTS 1
13515 EOF
13516
13517 fi
13518
13519 echo "$as_me:13519: checking if you want wgetch-events code" >&5
13520 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13521
13522 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13523 if test "${enable_wgetch_events+set}" = set; then
13524   enableval="$enable_wgetch_events"
13525   with_wgetch_events=$enableval
13526 else
13527   with_wgetch_events=no
13528 fi;
13529 echo "$as_me:13529: result: $with_wgetch_events" >&5
13530 echo "${ECHO_T}$with_wgetch_events" >&6
13531 test "x$with_wgetch_events" = xyes &&
13532 cat >>confdefs.h <<\EOF
13533 #define NCURSES_WGETCH_EVENTS 1
13534 EOF
13535
13536 ###############################################################################
13537
13538 ###     use option --disable-echo to suppress full display compiling commands
13539
13540 echo "$as_me:13540: checking if you want to see long compiling messages" >&5
13541 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13542
13543 # Check whether --enable-echo or --disable-echo was given.
13544 if test "${enable_echo+set}" = set; then
13545   enableval="$enable_echo"
13546   test "$enableval" != no && enableval=yes
13547         if test "$enableval" != "yes" ; then
13548
13549         ECHO_LT='--silent'
13550         ECHO_LD='@echo linking $@;'
13551         RULE_CC='@echo compiling $<'
13552         SHOW_CC='@echo compiling $@'
13553         ECHO_CC='@'
13554
13555         else
13556
13557         ECHO_LT=''
13558         ECHO_LD=''
13559         RULE_CC=''
13560         SHOW_CC=''
13561         ECHO_CC=''
13562
13563         fi
13564 else
13565   enableval=yes
13566
13567         ECHO_LT=''
13568         ECHO_LD=''
13569         RULE_CC=''
13570         SHOW_CC=''
13571         ECHO_CC=''
13572
13573 fi;
13574 echo "$as_me:13574: result: $enableval" >&5
13575 echo "${ECHO_T}$enableval" >&6
13576
13577 if test "x$enable_echo" = xyes; then
13578         ECHO_LINK=
13579 else
13580         ECHO_LINK='@ echo linking $@ ... ;'
13581         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13582         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13583 fi
13584
13585 ###     use option --enable-warnings to turn on all gcc warnings
13586 echo "$as_me:13586: checking if you want to see compiler warnings" >&5
13587 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13588
13589 # Check whether --enable-warnings or --disable-warnings was given.
13590 if test "${enable_warnings+set}" = set; then
13591   enableval="$enable_warnings"
13592   with_warnings=$enableval
13593 fi;
13594 echo "$as_me:13594: result: $with_warnings" >&5
13595 echo "${ECHO_T}$with_warnings" >&6
13596
13597 if test "x$with_warnings" = "xyes"; then
13598
13599         ADAFLAGS="$ADAFLAGS -gnatg"
13600
13601 INTEL_COMPILER=no
13602
13603 if test "$GCC" = yes ; then
13604         case $host_os in
13605         (linux*|gnu*)
13606                 echo "$as_me:13606: checking if this is really Intel C compiler" >&5
13607 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13608                 cf_save_CFLAGS="$CFLAGS"
13609                 CFLAGS="$CFLAGS -no-gcc"
13610                 cat >conftest.$ac_ext <<_ACEOF
13611 #line 13611 "configure"
13612 #include "confdefs.h"
13613
13614 int
13615 main (void)
13616 {
13617
13618 #ifdef __INTEL_COMPILER
13619 #else
13620 make an error
13621 #endif
13622
13623   ;
13624   return 0;
13625 }
13626 _ACEOF
13627 rm -f conftest.$ac_objext
13628 if { (eval echo "$as_me:13628: \"$ac_compile\"") >&5
13629   (eval $ac_compile) 2>&5
13630   ac_status=$?
13631   echo "$as_me:13631: \$? = $ac_status" >&5
13632   (exit $ac_status); } &&
13633          { ac_try='test -s conftest.$ac_objext'
13634   { (eval echo "$as_me:13634: \"$ac_try\"") >&5
13635   (eval $ac_try) 2>&5
13636   ac_status=$?
13637   echo "$as_me:13637: \$? = $ac_status" >&5
13638   (exit $ac_status); }; }; then
13639   INTEL_COMPILER=yes
13640 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13641
13642 else
13643   echo "$as_me: failed program was:" >&5
13644 cat conftest.$ac_ext >&5
13645 fi
13646 rm -f conftest.$ac_objext conftest.$ac_ext
13647                 CFLAGS="$cf_save_CFLAGS"
13648                 echo "$as_me:13648: result: $INTEL_COMPILER" >&5
13649 echo "${ECHO_T}$INTEL_COMPILER" >&6
13650                 ;;
13651         esac
13652 fi
13653
13654 CLANG_COMPILER=no
13655
13656 if test "$GCC" = yes ; then
13657         echo "$as_me:13657: checking if this is really Clang C compiler" >&5
13658 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13659         cf_save_CFLAGS="$CFLAGS"
13660         CFLAGS="$CFLAGS -Qunused-arguments"
13661         cat >conftest.$ac_ext <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664
13665 int
13666 main (void)
13667 {
13668
13669 #ifdef __clang__
13670 #else
13671 make an error
13672 #endif
13673
13674   ;
13675   return 0;
13676 }
13677 _ACEOF
13678 rm -f conftest.$ac_objext
13679 if { (eval echo "$as_me:13679: \"$ac_compile\"") >&5
13680   (eval $ac_compile) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit $ac_status); } &&
13684          { ac_try='test -s conftest.$ac_objext'
13685   { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit $ac_status); }; }; then
13690   CLANG_COMPILER=yes
13691 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13692
13693 else
13694   echo "$as_me: failed program was:" >&5
13695 cat conftest.$ac_ext >&5
13696 fi
13697 rm -f conftest.$ac_objext conftest.$ac_ext
13698         CFLAGS="$cf_save_CFLAGS"
13699         echo "$as_me:13699: result: $CLANG_COMPILER" >&5
13700 echo "${ECHO_T}$CLANG_COMPILER" >&6
13701 fi
13702
13703 cat > conftest.$ac_ext <<EOF
13704 #line 13704 "${as_me:-configure}"
13705 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13706 EOF
13707
13708 if test "$INTEL_COMPILER" = yes
13709 then
13710 # The "-wdXXX" options suppress warnings:
13711 # remark #1419: external declaration in primary source file
13712 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13713 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13714 # remark #193: zero used for undefined preprocessing identifier
13715 # remark #593: variable "curs_sb_left_arrow" was set but never used
13716 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13717 # remark #869: parameter "tw" was never referenced
13718 # remark #981: operands are evaluated in unspecified order
13719 # warning #279: controlling expression is constant
13720
13721         { echo "$as_me:13721: checking for $CC warning options..." >&5
13722 echo "$as_me: checking for $CC warning options..." >&6;}
13723         cf_save_CFLAGS="$CFLAGS"
13724         EXTRA_CFLAGS="-Wall"
13725         for cf_opt in \
13726                 wd1419 \
13727                 wd1683 \
13728                 wd1684 \
13729                 wd193 \
13730                 wd593 \
13731                 wd279 \
13732                 wd810 \
13733                 wd869 \
13734                 wd981
13735         do
13736                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13737                 if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
13738   (eval $ac_compile) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); }; then
13742                         test -n "$verbose" && echo "$as_me:13742: result: ... -$cf_opt" >&5
13743 echo "${ECHO_T}... -$cf_opt" >&6
13744                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13745                 fi
13746         done
13747         CFLAGS="$cf_save_CFLAGS"
13748
13749 elif test "$GCC" = yes
13750 then
13751         { echo "$as_me:13751: checking for $CC warning options..." >&5
13752 echo "$as_me: checking for $CC warning options..." >&6;}
13753         cf_save_CFLAGS="$CFLAGS"
13754         EXTRA_CFLAGS=
13755         cf_warn_CONST=""
13756         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13757         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13758         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13759         for cf_opt in W Wall \
13760                 Wbad-function-cast \
13761                 Wcast-align \
13762                 Wcast-qual \
13763                 Wdeclaration-after-statement \
13764                 Wextra \
13765                 Winline \
13766                 Wmissing-declarations \
13767                 Wmissing-prototypes \
13768                 Wnested-externs \
13769                 Wpointer-arith \
13770                 Wshadow \
13771                 Wstrict-prototypes \
13772                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13773         do
13774                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13775                 if { (eval echo "$as_me:13775: \"$ac_compile\"") >&5
13776   (eval $ac_compile) 2>&5
13777   ac_status=$?
13778   echo "$as_me:13778: \$? = $ac_status" >&5
13779   (exit $ac_status); }; then
13780                         test -n "$verbose" && echo "$as_me:13780: result: ... -$cf_opt" >&5
13781 echo "${ECHO_T}... -$cf_opt" >&6
13782                         case $cf_opt in
13783                         (Wcast-qual)
13784                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13785                                 ;;
13786                         (Winline)
13787                                 case $GCC_VERSION in
13788                                 ([34].*)
13789                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13790
13791 echo "${as_me:-configure}:13791: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13792
13793                                         continue;;
13794                                 esac
13795                                 ;;
13796                         (Wpointer-arith)
13797                                 case $GCC_VERSION in
13798                                 ([12].*)
13799                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13800
13801 echo "${as_me:-configure}:13801: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13802
13803                                         continue;;
13804                                 esac
13805                                 ;;
13806                         esac
13807                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13808                 fi
13809         done
13810         CFLAGS="$cf_save_CFLAGS"
13811 fi
13812 rm -rf conftest*
13813
13814         if test "x$cf_with_cxx" = xyes ; then
13815
13816 INTEL_CPLUSPLUS=no
13817
13818 if test "$GCC" = yes ; then
13819         case $host_os in
13820         (linux*|gnu*)
13821                 echo "$as_me:13821: checking if this is really Intel C++ compiler" >&5
13822 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13823                 cf_save_CFLAGS="$CXXFLAGS"
13824                 CXXFLAGS="$CXXFLAGS -no-gcc"
13825                 cat >conftest.$ac_ext <<_ACEOF
13826 #line 13826 "configure"
13827 #include "confdefs.h"
13828
13829 int
13830 main (void)
13831 {
13832
13833 #ifdef __INTEL_COMPILER
13834 #else
13835 make an error
13836 #endif
13837
13838   ;
13839   return 0;
13840 }
13841 _ACEOF
13842 rm -f conftest.$ac_objext
13843 if { (eval echo "$as_me:13843: \"$ac_compile\"") >&5
13844   (eval $ac_compile) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit $ac_status); } &&
13848          { ac_try='test -s conftest.$ac_objext'
13849   { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850   (eval $ac_try) 2>&5
13851   ac_status=$?
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit $ac_status); }; }; then
13854   INTEL_CPLUSPLUS=yes
13855 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13856
13857 else
13858   echo "$as_me: failed program was:" >&5
13859 cat conftest.$ac_ext >&5
13860 fi
13861 rm -f conftest.$ac_objext conftest.$ac_ext
13862                 CXXFLAGS="$cf_save_CFLAGS"
13863                 echo "$as_me:13863: result: $INTEL_CPLUSPLUS" >&5
13864 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13865                 ;;
13866         esac
13867 fi
13868
13869 CLANG_CPLUSPLUS=no
13870
13871 if test "$GCC" = yes ; then
13872         echo "$as_me:13872: checking if this is really Clang C++ compiler" >&5
13873 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13874         cf_save_CFLAGS="$CXXFLAGS"
13875         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13876         cat >conftest.$ac_ext <<_ACEOF
13877 #line 13877 "configure"
13878 #include "confdefs.h"
13879
13880 int
13881 main (void)
13882 {
13883
13884 #ifdef __clang__
13885 #else
13886 make an error
13887 #endif
13888
13889   ;
13890   return 0;
13891 }
13892 _ACEOF
13893 rm -f conftest.$ac_objext
13894 if { (eval echo "$as_me:13894: \"$ac_compile\"") >&5
13895   (eval $ac_compile) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit $ac_status); } &&
13899          { ac_try='test -s conftest.$ac_objext'
13900   { (eval echo "$as_me:13900: \"$ac_try\"") >&5
13901   (eval $ac_try) 2>&5
13902   ac_status=$?
13903   echo "$as_me:13903: \$? = $ac_status" >&5
13904   (exit $ac_status); }; }; then
13905   CLANG_CPLUSPLUS=yes
13906 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13907
13908 else
13909   echo "$as_me: failed program was:" >&5
13910 cat conftest.$ac_ext >&5
13911 fi
13912 rm -f conftest.$ac_objext conftest.$ac_ext
13913         CXXFLAGS="$cf_save_CFLAGS"
13914         echo "$as_me:13914: result: $CLANG_CPLUSPLUS" >&5
13915 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13916 fi
13917
13918 ac_ext=cc
13919 ac_cpp='$CXXCPP $CPPFLAGS'
13920 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13921 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13922 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13923 ac_main_return=return
13924
13925 cat > conftest.$ac_ext <<EOF
13926 #line 13926 "configure"
13927 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13928 EOF
13929
13930 if test "$INTEL_CPLUSPLUS" = yes
13931 then
13932 # The "-wdXXX" options suppress warnings:
13933 # remark #1419: external declaration in primary source file
13934 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13935 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13936 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13937 # remark #193: zero used for undefined preprocessing identifier
13938 # remark #593: variable "curs_sb_left_arrow" was set but never used
13939 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13940 # remark #869: parameter "tw" was never referenced
13941 # remark #981: operands are evaluated in unspecified order
13942 # warning #269: invalid format string conversion
13943
13944         { echo "$as_me:13944: checking for $CC warning options..." >&5
13945 echo "$as_me: checking for $CC warning options..." >&6;}
13946         cf_save_CXXFLAGS="$CXXFLAGS"
13947         EXTRA_CXXFLAGS="-Wall"
13948         for cf_opt in \
13949                 wd1419 \
13950                 wd1682 \
13951                 wd1683 \
13952                 wd1684 \
13953                 wd193 \
13954                 wd279 \
13955                 wd593 \
13956                 wd810 \
13957                 wd869 \
13958                 wd981
13959         do
13960                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13961                 if { (eval echo "$as_me:13961: \"$ac_compile\"") >&5
13962   (eval $ac_compile) 2>&5
13963   ac_status=$?
13964   echo "$as_me:13964: \$? = $ac_status" >&5
13965   (exit $ac_status); }; then
13966                         test -n "$verbose" && echo "$as_me:13966: result: ... -$cf_opt" >&5
13967 echo "${ECHO_T}... -$cf_opt" >&6
13968                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13969                 fi
13970         done
13971         CXXFLAGS="$cf_save_CXXFLAGS"
13972
13973 elif test "$GXX" = yes
13974 then
13975         { echo "$as_me:13975: checking for $CXX warning options..." >&5
13976 echo "$as_me: checking for $CXX warning options..." >&6;}
13977         cf_save_CXXFLAGS="$CXXFLAGS"
13978         EXTRA_CXXFLAGS="-W -Wall"
13979         cf_gxx_extra_warnings=""
13980         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13981         case "$GCC_VERSION" in
13982         ([1-2].*)
13983                 ;;
13984         (*)
13985                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13986                 ;;
13987         esac
13988         for cf_opt in \
13989                 Wabi \
13990                 fabi-version=0 \
13991                 Wextra \
13992                 Wignored-qualifiers \
13993                 Wlogical-op \
13994                 Woverloaded-virtual \
13995                 Wsign-promo \
13996                 Wsynth \
13997                 Wold-style-cast \
13998                 Wcast-align \
13999                 Wcast-qual \
14000                 Wpointer-arith \
14001                 Wshadow \
14002                 Wundef $cf_gxx_extra_warnings Wno-unused
14003         do
14004                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14005                 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006   (eval $ac_compile) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); }; then
14010                         test -n "$verbose" && echo "$as_me:14010: result: ... -$cf_opt" >&5
14011 echo "${ECHO_T}... -$cf_opt" >&6
14012                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14013                 else
14014                         test -n "$verbose" && echo "$as_me:14014: result: ... no -$cf_opt" >&5
14015 echo "${ECHO_T}... no -$cf_opt" >&6
14016                 fi
14017         done
14018         CXXFLAGS="$cf_save_CXXFLAGS"
14019 fi
14020
14021 rm -rf conftest*
14022 ac_ext=c
14023 ac_cpp='$CPP $CPPFLAGS'
14024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14027 ac_main_return=return
14028
14029         fi
14030 fi
14031
14032 if test "$GCC" = yes
14033 then
14034 cat > conftest.i <<EOF
14035 #ifndef GCC_PRINTF
14036 #define GCC_PRINTF 0
14037 #endif
14038 #ifndef GCC_SCANF
14039 #define GCC_SCANF 0
14040 #endif
14041 #ifndef GCC_NORETURN
14042 #define GCC_NORETURN /* nothing */
14043 #endif
14044 #ifndef GCC_UNUSED
14045 #define GCC_UNUSED /* nothing */
14046 #endif
14047 EOF
14048 if test "$GCC" = yes
14049 then
14050         { echo "$as_me:14050: checking for $CC __attribute__ directives..." >&5
14051 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14052 cat > conftest.$ac_ext <<EOF
14053 #line 14053 "${as_me:-configure}"
14054 #include "confdefs.h"
14055 #include "conftest.h"
14056 #include "conftest.i"
14057 #if     GCC_PRINTF
14058 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14059 #else
14060 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14061 #endif
14062 #if     GCC_SCANF
14063 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14064 #else
14065 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14066 #endif
14067 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14068 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14069 extern void foo(void) GCC_NORETURN;
14070 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14071 EOF
14072         cf_printf_attribute=no
14073         cf_scanf_attribute=no
14074         for cf_attribute in scanf printf unused noreturn
14075         do
14076
14077 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14078
14079                 cf_directive="__attribute__(($cf_attribute))"
14080                 echo "checking for $CC $cf_directive" 1>&5
14081
14082                 case $cf_attribute in
14083                 (printf)
14084                         cf_printf_attribute=yes
14085                         cat >conftest.h <<EOF
14086 #define GCC_$cf_ATTRIBUTE 1
14087 EOF
14088                         ;;
14089                 (scanf)
14090                         cf_scanf_attribute=yes
14091                         cat >conftest.h <<EOF
14092 #define GCC_$cf_ATTRIBUTE 1
14093 EOF
14094                         ;;
14095                 (*)
14096                         cat >conftest.h <<EOF
14097 #define GCC_$cf_ATTRIBUTE $cf_directive
14098 EOF
14099                         ;;
14100                 esac
14101
14102                 if { (eval echo "$as_me:14102: \"$ac_compile\"") >&5
14103   (eval $ac_compile) 2>&5
14104   ac_status=$?
14105   echo "$as_me:14105: \$? = $ac_status" >&5
14106   (exit $ac_status); }; then
14107                         test -n "$verbose" && echo "$as_me:14107: result: ... $cf_attribute" >&5
14108 echo "${ECHO_T}... $cf_attribute" >&6
14109                         cat conftest.h >>confdefs.h
14110                         case $cf_attribute in
14111                         (noreturn)
14112
14113 cat >>confdefs.h <<EOF
14114 #define GCC_NORETURN $cf_directive
14115 EOF
14116
14117                                 ;;
14118                         (printf)
14119                                 cf_value='/* nothing */'
14120                                 if test "$cf_printf_attribute" != no ; then
14121                                         cf_value='__attribute__((format(printf,fmt,var)))'
14122
14123 cat >>confdefs.h <<\EOF
14124 #define GCC_PRINTF 1
14125 EOF
14126
14127                                 fi
14128
14129 cat >>confdefs.h <<EOF
14130 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14131 EOF
14132
14133                                 ;;
14134                         (scanf)
14135                                 cf_value='/* nothing */'
14136                                 if test "$cf_scanf_attribute" != no ; then
14137                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14138
14139 cat >>confdefs.h <<\EOF
14140 #define GCC_SCANF 1
14141 EOF
14142
14143                                 fi
14144
14145 cat >>confdefs.h <<EOF
14146 #define GCC_SCANFLIKE(fmt,var) $cf_value
14147 EOF
14148
14149                                 ;;
14150                         (unused)
14151
14152 cat >>confdefs.h <<EOF
14153 #define GCC_UNUSED $cf_directive
14154 EOF
14155
14156                                 ;;
14157                         esac
14158                 fi
14159         done
14160 else
14161         fgrep define conftest.i >>confdefs.h
14162 fi
14163 rm -rf conftest*
14164 fi
14165
14166 echo "$as_me:14166: checking if you want to work around bogus compiler/loader warnings" >&5
14167 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14168
14169 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14170 if test "${enable_string_hacks+set}" = set; then
14171   enableval="$enable_string_hacks"
14172   with_string_hacks=$enableval
14173 else
14174   with_string_hacks=no
14175 fi;
14176 echo "$as_me:14176: result: $with_string_hacks" >&5
14177 echo "${ECHO_T}$with_string_hacks" >&6
14178
14179 if test "x$with_string_hacks" = "xyes"; then
14180
14181 cat >>confdefs.h <<\EOF
14182 #define USE_STRING_HACKS 1
14183 EOF
14184
14185         { echo "$as_me:14185: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14186 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14187         echo "$as_me:14187: checking for strlcat" >&5
14188 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14189 if test "${ac_cv_func_strlcat+set}" = set; then
14190   echo $ECHO_N "(cached) $ECHO_C" >&6
14191 else
14192   cat >conftest.$ac_ext <<_ACEOF
14193 #line 14193 "configure"
14194 #include "confdefs.h"
14195 /* System header to define __stub macros and hopefully few prototypes,
14196     which can conflict with char strlcat (); below.  */
14197 #include <assert.h>
14198 /* Override any gcc2 internal prototype to avoid an error.  */
14199 #ifdef __cplusplus
14200 extern "C"
14201 #endif
14202 /* We use char because int might match the return type of a gcc2
14203    builtin and then its argument prototype would still apply.  */
14204 char strlcat ();
14205 char (*f) ();
14206
14207 int
14208 main (void)
14209 {
14210 /* The GNU C library defines this for functions which it implements
14211     to always fail with ENOSYS.  Some functions are actually named
14212     something starting with __ and the normal name is an alias.  */
14213 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14214 choke me
14215 #else
14216 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14217 #endif
14218
14219   ;
14220   return 0;
14221 }
14222 _ACEOF
14223 rm -f conftest.$ac_objext conftest$ac_exeext
14224 if { (eval echo "$as_me:14224: \"$ac_link\"") >&5
14225   (eval $ac_link) 2>&5
14226   ac_status=$?
14227   echo "$as_me:14227: \$? = $ac_status" >&5
14228   (exit $ac_status); } &&
14229          { ac_try='test -s conftest$ac_exeext'
14230   { (eval echo "$as_me:14230: \"$ac_try\"") >&5
14231   (eval $ac_try) 2>&5
14232   ac_status=$?
14233   echo "$as_me:14233: \$? = $ac_status" >&5
14234   (exit $ac_status); }; }; then
14235   ac_cv_func_strlcat=yes
14236 else
14237   echo "$as_me: failed program was:" >&5
14238 cat conftest.$ac_ext >&5
14239 ac_cv_func_strlcat=no
14240 fi
14241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14242 fi
14243 echo "$as_me:14243: result: $ac_cv_func_strlcat" >&5
14244 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14245 if test $ac_cv_func_strlcat = yes; then
14246
14247 cat >>confdefs.h <<\EOF
14248 #define HAVE_STRLCAT 1
14249 EOF
14250
14251 else
14252
14253                 echo "$as_me:14253: checking for strlcat in -lbsd" >&5
14254 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14255 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14256   echo $ECHO_N "(cached) $ECHO_C" >&6
14257 else
14258   ac_check_lib_save_LIBS=$LIBS
14259 LIBS="-lbsd  $LIBS"
14260 cat >conftest.$ac_ext <<_ACEOF
14261 #line 14261 "configure"
14262 #include "confdefs.h"
14263
14264 /* Override any gcc2 internal prototype to avoid an error.  */
14265 #ifdef __cplusplus
14266 extern "C"
14267 #endif
14268 /* We use char because int might match the return type of a gcc2
14269    builtin and then its argument prototype would still apply.  */
14270 char strlcat ();
14271 int
14272 main (void)
14273 {
14274 strlcat ();
14275   ;
14276   return 0;
14277 }
14278 _ACEOF
14279 rm -f conftest.$ac_objext conftest$ac_exeext
14280 if { (eval echo "$as_me:14280: \"$ac_link\"") >&5
14281   (eval $ac_link) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); } &&
14285          { ac_try='test -s conftest$ac_exeext'
14286   { (eval echo "$as_me:14286: \"$ac_try\"") >&5
14287   (eval $ac_try) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); }; }; then
14291   ac_cv_lib_bsd_strlcat=yes
14292 else
14293   echo "$as_me: failed program was:" >&5
14294 cat conftest.$ac_ext >&5
14295 ac_cv_lib_bsd_strlcat=no
14296 fi
14297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14298 LIBS=$ac_check_lib_save_LIBS
14299 fi
14300 echo "$as_me:14300: result: $ac_cv_lib_bsd_strlcat" >&5
14301 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14302 if test $ac_cv_lib_bsd_strlcat = yes; then
14303
14304 cf_add_libs="-lbsd"
14305 # Filter out duplicates - this happens with badly-designed ".pc" files...
14306 for cf_add_1lib in $LIBS
14307 do
14308         for cf_add_2lib in $cf_add_libs
14309         do
14310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14311                 then
14312                         cf_add_1lib=
14313                         break
14314                 fi
14315         done
14316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14317 done
14318 LIBS="$cf_add_libs"
14319
14320 for ac_header in bsd/string.h
14321 do
14322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14323 echo "$as_me:14323: checking for $ac_header" >&5
14324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14326   echo $ECHO_N "(cached) $ECHO_C" >&6
14327 else
14328   cat >conftest.$ac_ext <<_ACEOF
14329 #line 14329 "configure"
14330 #include "confdefs.h"
14331 #include <$ac_header>
14332 _ACEOF
14333 if { (eval echo "$as_me:14333: \"$ac_cpp conftest.$ac_ext\"") >&5
14334   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14335   ac_status=$?
14336   egrep -v '^ *\+' conftest.er1 >conftest.err
14337   rm -f conftest.er1
14338   cat conftest.err >&5
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit $ac_status); } >/dev/null; then
14341   if test -s conftest.err; then
14342     ac_cpp_err=$ac_c_preproc_warn_flag
14343   else
14344     ac_cpp_err=
14345   fi
14346 else
14347   ac_cpp_err=yes
14348 fi
14349 if test -z "$ac_cpp_err"; then
14350   eval "$as_ac_Header=yes"
14351 else
14352   echo "$as_me: failed program was:" >&5
14353   cat conftest.$ac_ext >&5
14354   eval "$as_ac_Header=no"
14355 fi
14356 rm -f conftest.err conftest.$ac_ext
14357 fi
14358 echo "$as_me:14358: result: `eval echo '${'$as_ac_Header'}'`" >&5
14359 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14360 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14361   cat >>confdefs.h <<EOF
14362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14363 EOF
14364
14365 fi
14366 done
14367
14368 cat >>confdefs.h <<\EOF
14369 #define HAVE_STRLCAT 1
14370 EOF
14371
14372 fi
14373
14374 fi
14375
14376 for ac_func in strlcpy snprintf
14377 do
14378 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14379 echo "$as_me:14379: checking for $ac_func" >&5
14380 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14381 if eval "test \"\${$as_ac_var+set}\" = set"; then
14382   echo $ECHO_N "(cached) $ECHO_C" >&6
14383 else
14384   cat >conftest.$ac_ext <<_ACEOF
14385 #line 14385 "configure"
14386 #include "confdefs.h"
14387 /* System header to define __stub macros and hopefully few prototypes,
14388     which can conflict with char $ac_func (); below.  */
14389 #include <assert.h>
14390 /* Override any gcc2 internal prototype to avoid an error.  */
14391 #ifdef __cplusplus
14392 extern "C"
14393 #endif
14394 /* We use char because int might match the return type of a gcc2
14395    builtin and then its argument prototype would still apply.  */
14396 char $ac_func ();
14397 char (*f) ();
14398
14399 int
14400 main (void)
14401 {
14402 /* The GNU C library defines this for functions which it implements
14403     to always fail with ENOSYS.  Some functions are actually named
14404     something starting with __ and the normal name is an alias.  */
14405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14406 choke me
14407 #else
14408 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14409 #endif
14410
14411   ;
14412   return 0;
14413 }
14414 _ACEOF
14415 rm -f conftest.$ac_objext conftest$ac_exeext
14416 if { (eval echo "$as_me:14416: \"$ac_link\"") >&5
14417   (eval $ac_link) 2>&5
14418   ac_status=$?
14419   echo "$as_me:14419: \$? = $ac_status" >&5
14420   (exit $ac_status); } &&
14421          { ac_try='test -s conftest$ac_exeext'
14422   { (eval echo "$as_me:14422: \"$ac_try\"") >&5
14423   (eval $ac_try) 2>&5
14424   ac_status=$?
14425   echo "$as_me:14425: \$? = $ac_status" >&5
14426   (exit $ac_status); }; }; then
14427   eval "$as_ac_var=yes"
14428 else
14429   echo "$as_me: failed program was:" >&5
14430 cat conftest.$ac_ext >&5
14431 eval "$as_ac_var=no"
14432 fi
14433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14434 fi
14435 echo "$as_me:14435: result: `eval echo '${'$as_ac_var'}'`" >&5
14436 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14437 if test `eval echo '${'$as_ac_var'}'` = yes; then
14438   cat >>confdefs.h <<EOF
14439 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14440 EOF
14441
14442 fi
14443 done
14444
14445 fi
14446
14447 ###     use option --enable-assertions to turn on generation of assertion code
14448 echo "$as_me:14448: checking if you want to enable runtime assertions" >&5
14449 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14450
14451 # Check whether --enable-assertions or --disable-assertions was given.
14452 if test "${enable_assertions+set}" = set; then
14453   enableval="$enable_assertions"
14454   with_assertions=$enableval
14455 else
14456   with_assertions=no
14457 fi;
14458 echo "$as_me:14458: result: $with_assertions" >&5
14459 echo "${ECHO_T}$with_assertions" >&6
14460 if test -n "$GCC"
14461 then
14462         if test "$with_assertions" = no
14463         then
14464                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14465         else
14466
14467         ADAFLAGS="$ADAFLAGS -gnata"
14468
14469         fi
14470 fi
14471
14472 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14473
14474 echo "$as_me:14474: checking if you want to use dmalloc for testing" >&5
14475 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14476
14477 # Check whether --with-dmalloc or --without-dmalloc was given.
14478 if test "${with_dmalloc+set}" = set; then
14479   withval="$with_dmalloc"
14480
14481 cat >>confdefs.h <<EOF
14482 #define USE_DMALLOC 1
14483 EOF
14484
14485         : ${with_cflags:=-g}
14486         : ${with_no_leaks:=yes}
14487          with_dmalloc=yes
14488 else
14489   with_dmalloc=
14490 fi;
14491 echo "$as_me:14491: result: ${with_dmalloc:-no}" >&5
14492 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14493
14494 case .$with_cflags in
14495 (.*-g*)
14496         case .$CFLAGS in
14497         (.*-g*)
14498                 ;;
14499         (*)
14500
14501 cf_fix_cppflags=no
14502 cf_new_cflags=
14503 cf_new_cppflags=
14504 cf_new_extra_cppflags=
14505
14506 for cf_add_cflags in -g
14507 do
14508 case $cf_fix_cppflags in
14509 (no)
14510         case $cf_add_cflags in
14511         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14512                 case $cf_add_cflags in
14513                 (-D*)
14514                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14515
14516                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14517                                 && test -z "${cf_tst_cflags}" \
14518                                 && cf_fix_cppflags=yes
14519
14520                         if test $cf_fix_cppflags = yes ; then
14521
14522         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14523         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14524
14525                                 continue
14526                         elif test "${cf_tst_cflags}" = "\"'" ; then
14527
14528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14530
14531                                 continue
14532                         fi
14533                         ;;
14534                 esac
14535                 case "$CPPFLAGS" in
14536                 (*$cf_add_cflags)
14537                         ;;
14538                 (*)
14539                         case $cf_add_cflags in
14540                         (-D*)
14541                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14542
14543 CPPFLAGS=`echo "$CPPFLAGS" | \
14544         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14545                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14546
14547                                 ;;
14548                         esac
14549
14550         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14551         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14552
14553                         ;;
14554                 esac
14555                 ;;
14556         (*)
14557
14558         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14559         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14560
14561                 ;;
14562         esac
14563         ;;
14564 (yes)
14565
14566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14568
14569         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14570
14571         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14572                 && test -z "${cf_tst_cflags}" \
14573                 && cf_fix_cppflags=no
14574         ;;
14575 esac
14576 done
14577
14578 if test -n "$cf_new_cflags" ; then
14579
14580         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14581         CFLAGS="${CFLAGS}$cf_new_cflags"
14582
14583 fi
14584
14585 if test -n "$cf_new_cppflags" ; then
14586
14587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14588         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14589
14590 fi
14591
14592 if test -n "$cf_new_extra_cppflags" ; then
14593
14594         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14595         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14596
14597 fi
14598
14599                 ;;
14600         esac
14601         ;;
14602 esac
14603
14604 if test "$with_dmalloc" = yes ; then
14605         echo "$as_me:14605: checking for dmalloc.h" >&5
14606 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14607 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14608   echo $ECHO_N "(cached) $ECHO_C" >&6
14609 else
14610   cat >conftest.$ac_ext <<_ACEOF
14611 #line 14611 "configure"
14612 #include "confdefs.h"
14613 #include <dmalloc.h>
14614 _ACEOF
14615 if { (eval echo "$as_me:14615: \"$ac_cpp conftest.$ac_ext\"") >&5
14616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14617   ac_status=$?
14618   egrep -v '^ *\+' conftest.er1 >conftest.err
14619   rm -f conftest.er1
14620   cat conftest.err >&5
14621   echo "$as_me:14621: \$? = $ac_status" >&5
14622   (exit $ac_status); } >/dev/null; then
14623   if test -s conftest.err; then
14624     ac_cpp_err=$ac_c_preproc_warn_flag
14625   else
14626     ac_cpp_err=
14627   fi
14628 else
14629   ac_cpp_err=yes
14630 fi
14631 if test -z "$ac_cpp_err"; then
14632   ac_cv_header_dmalloc_h=yes
14633 else
14634   echo "$as_me: failed program was:" >&5
14635   cat conftest.$ac_ext >&5
14636   ac_cv_header_dmalloc_h=no
14637 fi
14638 rm -f conftest.err conftest.$ac_ext
14639 fi
14640 echo "$as_me:14640: result: $ac_cv_header_dmalloc_h" >&5
14641 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14642 if test $ac_cv_header_dmalloc_h = yes; then
14643
14644 echo "$as_me:14644: checking for dmalloc_debug in -ldmalloc" >&5
14645 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14646 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14647   echo $ECHO_N "(cached) $ECHO_C" >&6
14648 else
14649   ac_check_lib_save_LIBS=$LIBS
14650 LIBS="-ldmalloc  $LIBS"
14651 cat >conftest.$ac_ext <<_ACEOF
14652 #line 14652 "configure"
14653 #include "confdefs.h"
14654
14655 /* Override any gcc2 internal prototype to avoid an error.  */
14656 #ifdef __cplusplus
14657 extern "C"
14658 #endif
14659 /* We use char because int might match the return type of a gcc2
14660    builtin and then its argument prototype would still apply.  */
14661 char dmalloc_debug ();
14662 int
14663 main (void)
14664 {
14665 dmalloc_debug ();
14666   ;
14667   return 0;
14668 }
14669 _ACEOF
14670 rm -f conftest.$ac_objext conftest$ac_exeext
14671 if { (eval echo "$as_me:14671: \"$ac_link\"") >&5
14672   (eval $ac_link) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); } &&
14676          { ac_try='test -s conftest$ac_exeext'
14677   { (eval echo "$as_me:14677: \"$ac_try\"") >&5
14678   (eval $ac_try) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); }; }; then
14682   ac_cv_lib_dmalloc_dmalloc_debug=yes
14683 else
14684   echo "$as_me: failed program was:" >&5
14685 cat conftest.$ac_ext >&5
14686 ac_cv_lib_dmalloc_dmalloc_debug=no
14687 fi
14688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14689 LIBS=$ac_check_lib_save_LIBS
14690 fi
14691 echo "$as_me:14691: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14692 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14693 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14694   cat >>confdefs.h <<EOF
14695 #define HAVE_LIBDMALLOC 1
14696 EOF
14697
14698   LIBS="-ldmalloc $LIBS"
14699
14700 fi
14701
14702 fi
14703
14704 fi
14705
14706 echo "$as_me:14706: checking if you want to use dbmalloc for testing" >&5
14707 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14708
14709 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14710 if test "${with_dbmalloc+set}" = set; then
14711   withval="$with_dbmalloc"
14712
14713 cat >>confdefs.h <<EOF
14714 #define USE_DBMALLOC 1
14715 EOF
14716
14717         : ${with_cflags:=-g}
14718         : ${with_no_leaks:=yes}
14719          with_dbmalloc=yes
14720 else
14721   with_dbmalloc=
14722 fi;
14723 echo "$as_me:14723: result: ${with_dbmalloc:-no}" >&5
14724 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14725
14726 case .$with_cflags in
14727 (.*-g*)
14728         case .$CFLAGS in
14729         (.*-g*)
14730                 ;;
14731         (*)
14732
14733 cf_fix_cppflags=no
14734 cf_new_cflags=
14735 cf_new_cppflags=
14736 cf_new_extra_cppflags=
14737
14738 for cf_add_cflags in -g
14739 do
14740 case $cf_fix_cppflags in
14741 (no)
14742         case $cf_add_cflags in
14743         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14744                 case $cf_add_cflags in
14745                 (-D*)
14746                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14747
14748                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14749                                 && test -z "${cf_tst_cflags}" \
14750                                 && cf_fix_cppflags=yes
14751
14752                         if test $cf_fix_cppflags = yes ; then
14753
14754         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14755         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14756
14757                                 continue
14758                         elif test "${cf_tst_cflags}" = "\"'" ; then
14759
14760         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14761         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14762
14763                                 continue
14764                         fi
14765                         ;;
14766                 esac
14767                 case "$CPPFLAGS" in
14768                 (*$cf_add_cflags)
14769                         ;;
14770                 (*)
14771                         case $cf_add_cflags in
14772                         (-D*)
14773                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14774
14775 CPPFLAGS=`echo "$CPPFLAGS" | \
14776         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14777                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14778
14779                                 ;;
14780                         esac
14781
14782         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14783         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14784
14785                         ;;
14786                 esac
14787                 ;;
14788         (*)
14789
14790         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14791         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14792
14793                 ;;
14794         esac
14795         ;;
14796 (yes)
14797
14798         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14799         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14800
14801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14802
14803         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14804                 && test -z "${cf_tst_cflags}" \
14805                 && cf_fix_cppflags=no
14806         ;;
14807 esac
14808 done
14809
14810 if test -n "$cf_new_cflags" ; then
14811
14812         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14813         CFLAGS="${CFLAGS}$cf_new_cflags"
14814
14815 fi
14816
14817 if test -n "$cf_new_cppflags" ; then
14818
14819         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14820         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14821
14822 fi
14823
14824 if test -n "$cf_new_extra_cppflags" ; then
14825
14826         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14827         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14828
14829 fi
14830
14831                 ;;
14832         esac
14833         ;;
14834 esac
14835
14836 if test "$with_dbmalloc" = yes ; then
14837         echo "$as_me:14837: checking for dbmalloc.h" >&5
14838 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14839 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14840   echo $ECHO_N "(cached) $ECHO_C" >&6
14841 else
14842   cat >conftest.$ac_ext <<_ACEOF
14843 #line 14843 "configure"
14844 #include "confdefs.h"
14845 #include <dbmalloc.h>
14846 _ACEOF
14847 if { (eval echo "$as_me:14847: \"$ac_cpp conftest.$ac_ext\"") >&5
14848   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14849   ac_status=$?
14850   egrep -v '^ *\+' conftest.er1 >conftest.err
14851   rm -f conftest.er1
14852   cat conftest.err >&5
14853   echo "$as_me:14853: \$? = $ac_status" >&5
14854   (exit $ac_status); } >/dev/null; then
14855   if test -s conftest.err; then
14856     ac_cpp_err=$ac_c_preproc_warn_flag
14857   else
14858     ac_cpp_err=
14859   fi
14860 else
14861   ac_cpp_err=yes
14862 fi
14863 if test -z "$ac_cpp_err"; then
14864   ac_cv_header_dbmalloc_h=yes
14865 else
14866   echo "$as_me: failed program was:" >&5
14867   cat conftest.$ac_ext >&5
14868   ac_cv_header_dbmalloc_h=no
14869 fi
14870 rm -f conftest.err conftest.$ac_ext
14871 fi
14872 echo "$as_me:14872: result: $ac_cv_header_dbmalloc_h" >&5
14873 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14874 if test $ac_cv_header_dbmalloc_h = yes; then
14875
14876 echo "$as_me:14876: checking for debug_malloc in -ldbmalloc" >&5
14877 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14878 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14879   echo $ECHO_N "(cached) $ECHO_C" >&6
14880 else
14881   ac_check_lib_save_LIBS=$LIBS
14882 LIBS="-ldbmalloc  $LIBS"
14883 cat >conftest.$ac_ext <<_ACEOF
14884 #line 14884 "configure"
14885 #include "confdefs.h"
14886
14887 /* Override any gcc2 internal prototype to avoid an error.  */
14888 #ifdef __cplusplus
14889 extern "C"
14890 #endif
14891 /* We use char because int might match the return type of a gcc2
14892    builtin and then its argument prototype would still apply.  */
14893 char debug_malloc ();
14894 int
14895 main (void)
14896 {
14897 debug_malloc ();
14898   ;
14899   return 0;
14900 }
14901 _ACEOF
14902 rm -f conftest.$ac_objext conftest$ac_exeext
14903 if { (eval echo "$as_me:14903: \"$ac_link\"") >&5
14904   (eval $ac_link) 2>&5
14905   ac_status=$?
14906   echo "$as_me:14906: \$? = $ac_status" >&5
14907   (exit $ac_status); } &&
14908          { ac_try='test -s conftest$ac_exeext'
14909   { (eval echo "$as_me:14909: \"$ac_try\"") >&5
14910   (eval $ac_try) 2>&5
14911   ac_status=$?
14912   echo "$as_me:14912: \$? = $ac_status" >&5
14913   (exit $ac_status); }; }; then
14914   ac_cv_lib_dbmalloc_debug_malloc=yes
14915 else
14916   echo "$as_me: failed program was:" >&5
14917 cat conftest.$ac_ext >&5
14918 ac_cv_lib_dbmalloc_debug_malloc=no
14919 fi
14920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14921 LIBS=$ac_check_lib_save_LIBS
14922 fi
14923 echo "$as_me:14923: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14924 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14925 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14926   cat >>confdefs.h <<EOF
14927 #define HAVE_LIBDBMALLOC 1
14928 EOF
14929
14930   LIBS="-ldbmalloc $LIBS"
14931
14932 fi
14933
14934 fi
14935
14936 fi
14937
14938 echo "$as_me:14938: checking if you want to use valgrind for testing" >&5
14939 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14940
14941 # Check whether --with-valgrind or --without-valgrind was given.
14942 if test "${with_valgrind+set}" = set; then
14943   withval="$with_valgrind"
14944
14945 cat >>confdefs.h <<EOF
14946 #define USE_VALGRIND 1
14947 EOF
14948
14949         : ${with_cflags:=-g}
14950         : ${with_no_leaks:=yes}
14951          with_valgrind=yes
14952 else
14953   with_valgrind=
14954 fi;
14955 echo "$as_me:14955: result: ${with_valgrind:-no}" >&5
14956 echo "${ECHO_T}${with_valgrind:-no}" >&6
14957
14958 case .$with_cflags in
14959 (.*-g*)
14960         case .$CFLAGS in
14961         (.*-g*)
14962                 ;;
14963         (*)
14964
14965 cf_fix_cppflags=no
14966 cf_new_cflags=
14967 cf_new_cppflags=
14968 cf_new_extra_cppflags=
14969
14970 for cf_add_cflags in -g
14971 do
14972 case $cf_fix_cppflags in
14973 (no)
14974         case $cf_add_cflags in
14975         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14976                 case $cf_add_cflags in
14977                 (-D*)
14978                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14979
14980                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14981                                 && test -z "${cf_tst_cflags}" \
14982                                 && cf_fix_cppflags=yes
14983
14984                         if test $cf_fix_cppflags = yes ; then
14985
14986         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14987         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14988
14989                                 continue
14990                         elif test "${cf_tst_cflags}" = "\"'" ; then
14991
14992         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14993         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14994
14995                                 continue
14996                         fi
14997                         ;;
14998                 esac
14999                 case "$CPPFLAGS" in
15000                 (*$cf_add_cflags)
15001                         ;;
15002                 (*)
15003                         case $cf_add_cflags in
15004                         (-D*)
15005                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15006
15007 CPPFLAGS=`echo "$CPPFLAGS" | \
15008         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15009                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15010
15011                                 ;;
15012                         esac
15013
15014         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15015         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15016
15017                         ;;
15018                 esac
15019                 ;;
15020         (*)
15021
15022         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15023         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15024
15025                 ;;
15026         esac
15027         ;;
15028 (yes)
15029
15030         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15031         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15032
15033         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15034
15035         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15036                 && test -z "${cf_tst_cflags}" \
15037                 && cf_fix_cppflags=no
15038         ;;
15039 esac
15040 done
15041
15042 if test -n "$cf_new_cflags" ; then
15043
15044         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15045         CFLAGS="${CFLAGS}$cf_new_cflags"
15046
15047 fi
15048
15049 if test -n "$cf_new_cppflags" ; then
15050
15051         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15052         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15053
15054 fi
15055
15056 if test -n "$cf_new_extra_cppflags" ; then
15057
15058         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15059         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15060
15061 fi
15062
15063                 ;;
15064         esac
15065         ;;
15066 esac
15067
15068 echo "$as_me:15068: checking if you want to perform memory-leak testing" >&5
15069 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15070
15071 # Check whether --enable-leaks or --disable-leaks was given.
15072 if test "${enable_leaks+set}" = set; then
15073   enableval="$enable_leaks"
15074   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15075 else
15076   : ${with_no_leaks:=no}
15077 fi;
15078 echo "$as_me:15078: result: $with_no_leaks" >&5
15079 echo "${ECHO_T}$with_no_leaks" >&6
15080
15081 if test "$with_no_leaks" = yes ; then
15082
15083 cat >>confdefs.h <<\EOF
15084 #define NO_LEAKS 1
15085 EOF
15086
15087 cat >>confdefs.h <<\EOF
15088 #define YY_NO_LEAKS 1
15089 EOF
15090
15091 fi
15092
15093 cat >>confdefs.h <<\EOF
15094 #define HAVE_NC_ALLOC_H 1
15095 EOF
15096
15097 ###     use option --enable-expanded to generate certain macros as functions
15098
15099 # Check whether --enable-expanded or --disable-expanded was given.
15100 if test "${enable_expanded+set}" = set; then
15101   enableval="$enable_expanded"
15102   test "x$enableval" = xyes &&
15103 cat >>confdefs.h <<\EOF
15104 #define NCURSES_EXPANDED 1
15105 EOF
15106
15107 fi;
15108
15109 ###     use option --disable-macros to suppress macros in favor of functions
15110
15111 # Check whether --enable-macros or --disable-macros was given.
15112 if test "${enable_macros+set}" = set; then
15113   enableval="$enable_macros"
15114   test "$enableval" = no &&
15115 cat >>confdefs.h <<\EOF
15116 #define NCURSES_NOMACROS 1
15117 EOF
15118
15119 fi;
15120
15121 # Normally we only add trace() to the debug-library.  Allow this to be
15122 # extended to all models of the ncurses library:
15123 cf_all_traces=no
15124 case "$CFLAGS $CPPFLAGS" in
15125 (*-DTRACE*)
15126         cf_all_traces=yes
15127         ;;
15128 esac
15129
15130 echo "$as_me:15130: checking whether to add trace feature to all models" >&5
15131 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15132
15133 # Check whether --with-trace or --without-trace was given.
15134 if test "${with_trace+set}" = set; then
15135   withval="$with_trace"
15136   cf_with_trace=$withval
15137 else
15138   cf_with_trace=$cf_all_traces
15139 fi;
15140 echo "$as_me:15140: result: $cf_with_trace" >&5
15141 echo "${ECHO_T}$cf_with_trace" >&6
15142
15143 if test "x$cf_with_trace" = xyes ; then
15144         LIB_TRACING=all
15145         ADA_TRACE=TRUE
15146
15147 cf_fix_cppflags=no
15148 cf_new_cflags=
15149 cf_new_cppflags=
15150 cf_new_extra_cppflags=
15151
15152 for cf_add_cflags in -DTRACE
15153 do
15154 case $cf_fix_cppflags in
15155 (no)
15156         case $cf_add_cflags in
15157         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15158                 case $cf_add_cflags in
15159                 (-D*)
15160                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15161
15162                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15163                                 && test -z "${cf_tst_cflags}" \
15164                                 && cf_fix_cppflags=yes
15165
15166                         if test $cf_fix_cppflags = yes ; then
15167
15168         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15169         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15170
15171                                 continue
15172                         elif test "${cf_tst_cflags}" = "\"'" ; then
15173
15174         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15175         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15176
15177                                 continue
15178                         fi
15179                         ;;
15180                 esac
15181                 case "$CPPFLAGS" in
15182                 (*$cf_add_cflags)
15183                         ;;
15184                 (*)
15185                         case $cf_add_cflags in
15186                         (-D*)
15187                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15188
15189 CPPFLAGS=`echo "$CPPFLAGS" | \
15190         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15191                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15192
15193                                 ;;
15194                         esac
15195
15196         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15197         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15198
15199                         ;;
15200                 esac
15201                 ;;
15202         (*)
15203
15204         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15205         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15206
15207                 ;;
15208         esac
15209         ;;
15210 (yes)
15211
15212         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15213         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15214
15215         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15216
15217         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15218                 && test -z "${cf_tst_cflags}" \
15219                 && cf_fix_cppflags=no
15220         ;;
15221 esac
15222 done
15223
15224 if test -n "$cf_new_cflags" ; then
15225
15226         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15227         CFLAGS="${CFLAGS}$cf_new_cflags"
15228
15229 fi
15230
15231 if test -n "$cf_new_cppflags" ; then
15232
15233         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15234         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15235
15236 fi
15237
15238 if test -n "$cf_new_extra_cppflags" ; then
15239
15240         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15241         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15242
15243 fi
15244
15245 cat >>confdefs.h <<\EOF
15246 #define HAVE__TRACEF 1
15247 EOF
15248
15249 else
15250         LIB_TRACING=DEBUG
15251         ADA_TRACE=FALSE
15252 fi
15253
15254 echo "$as_me:15254: checking if we want to use GNAT projects" >&5
15255 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15256
15257 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15258 if test "${enable_gnat_projects+set}" = set; then
15259   enableval="$enable_gnat_projects"
15260   test "$enableval" != no && enableval=yes
15261         if test "$enableval" != "yes" ; then
15262     enable_gnat_projects=no
15263         else
15264                 enable_gnat_projects=yes
15265         fi
15266 else
15267   enableval=yes
15268         enable_gnat_projects=yes
15269
15270 fi;
15271 echo "$as_me:15271: result: $enable_gnat_projects" >&5
15272 echo "${ECHO_T}$enable_gnat_projects" >&6
15273
15274 ###     Checks for libraries.
15275 case $cf_cv_system_name in
15276 (*mingw32*|*mingw64*)
15277         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15278         LIBS=" -lpsapi $LIBS"
15279         ;;
15280 (*)
15281 echo "$as_me:15281: checking for gettimeofday" >&5
15282 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15283 if test "${ac_cv_func_gettimeofday+set}" = set; then
15284   echo $ECHO_N "(cached) $ECHO_C" >&6
15285 else
15286   cat >conftest.$ac_ext <<_ACEOF
15287 #line 15287 "configure"
15288 #include "confdefs.h"
15289 /* System header to define __stub macros and hopefully few prototypes,
15290     which can conflict with char gettimeofday (); below.  */
15291 #include <assert.h>
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 gettimeofday ();
15299 char (*f) ();
15300
15301 int
15302 main (void)
15303 {
15304 /* The GNU C library defines this for functions which it implements
15305     to always fail with ENOSYS.  Some functions are actually named
15306     something starting with __ and the normal name is an alias.  */
15307 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15308 choke me
15309 #else
15310 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15311 #endif
15312
15313   ;
15314   return 0;
15315 }
15316 _ACEOF
15317 rm -f conftest.$ac_objext conftest$ac_exeext
15318 if { (eval echo "$as_me:15318: \"$ac_link\"") >&5
15319   (eval $ac_link) 2>&5
15320   ac_status=$?
15321   echo "$as_me:15321: \$? = $ac_status" >&5
15322   (exit $ac_status); } &&
15323          { ac_try='test -s conftest$ac_exeext'
15324   { (eval echo "$as_me:15324: \"$ac_try\"") >&5
15325   (eval $ac_try) 2>&5
15326   ac_status=$?
15327   echo "$as_me:15327: \$? = $ac_status" >&5
15328   (exit $ac_status); }; }; then
15329   ac_cv_func_gettimeofday=yes
15330 else
15331   echo "$as_me: failed program was:" >&5
15332 cat conftest.$ac_ext >&5
15333 ac_cv_func_gettimeofday=no
15334 fi
15335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15336 fi
15337 echo "$as_me:15337: result: $ac_cv_func_gettimeofday" >&5
15338 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15339 if test $ac_cv_func_gettimeofday = yes; then
15340
15341 cat >>confdefs.h <<\EOF
15342 #define HAVE_GETTIMEOFDAY 1
15343 EOF
15344
15345 else
15346
15347 echo "$as_me:15347: checking for gettimeofday in -lbsd" >&5
15348 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15349 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15350   echo $ECHO_N "(cached) $ECHO_C" >&6
15351 else
15352   ac_check_lib_save_LIBS=$LIBS
15353 LIBS="-lbsd  $LIBS"
15354 cat >conftest.$ac_ext <<_ACEOF
15355 #line 15355 "configure"
15356 #include "confdefs.h"
15357
15358 /* Override any gcc2 internal prototype to avoid an error.  */
15359 #ifdef __cplusplus
15360 extern "C"
15361 #endif
15362 /* We use char because int might match the return type of a gcc2
15363    builtin and then its argument prototype would still apply.  */
15364 char gettimeofday ();
15365 int
15366 main (void)
15367 {
15368 gettimeofday ();
15369   ;
15370   return 0;
15371 }
15372 _ACEOF
15373 rm -f conftest.$ac_objext conftest$ac_exeext
15374 if { (eval echo "$as_me:15374: \"$ac_link\"") >&5
15375   (eval $ac_link) 2>&5
15376   ac_status=$?
15377   echo "$as_me:15377: \$? = $ac_status" >&5
15378   (exit $ac_status); } &&
15379          { ac_try='test -s conftest$ac_exeext'
15380   { (eval echo "$as_me:15380: \"$ac_try\"") >&5
15381   (eval $ac_try) 2>&5
15382   ac_status=$?
15383   echo "$as_me:15383: \$? = $ac_status" >&5
15384   (exit $ac_status); }; }; then
15385   ac_cv_lib_bsd_gettimeofday=yes
15386 else
15387   echo "$as_me: failed program was:" >&5
15388 cat conftest.$ac_ext >&5
15389 ac_cv_lib_bsd_gettimeofday=no
15390 fi
15391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15392 LIBS=$ac_check_lib_save_LIBS
15393 fi
15394 echo "$as_me:15394: result: $ac_cv_lib_bsd_gettimeofday" >&5
15395 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15396 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15397
15398 cat >>confdefs.h <<\EOF
15399 #define HAVE_GETTIMEOFDAY 1
15400 EOF
15401
15402 cf_add_libs="-lbsd"
15403 # Filter out duplicates - this happens with badly-designed ".pc" files...
15404 for cf_add_1lib in $LIBS
15405 do
15406         for cf_add_2lib in $cf_add_libs
15407         do
15408                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15409                 then
15410                         cf_add_1lib=
15411                         break
15412                 fi
15413         done
15414         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15415 done
15416 LIBS="$cf_add_libs"
15417
15418 fi
15419
15420 fi
15421         ;;
15422 esac
15423
15424 echo "$as_me:15424: checking if -lm needed for math functions" >&5
15425 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15426 if test "${cf_cv_need_libm+set}" = set; then
15427   echo $ECHO_N "(cached) $ECHO_C" >&6
15428 else
15429
15430         cat >conftest.$ac_ext <<_ACEOF
15431 #line 15431 "configure"
15432 #include "confdefs.h"
15433
15434         #include <stdio.h>
15435         #include <stdlib.h>
15436         #include <math.h>
15437
15438 int
15439 main (void)
15440 {
15441 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15442   ;
15443   return 0;
15444 }
15445 _ACEOF
15446 rm -f conftest.$ac_objext conftest$ac_exeext
15447 if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
15448   (eval $ac_link) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); } &&
15452          { ac_try='test -s conftest$ac_exeext'
15453   { (eval echo "$as_me:15453: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:15456: \$? = $ac_status" >&5
15457   (exit $ac_status); }; }; then
15458   cf_cv_need_libm=no
15459 else
15460   echo "$as_me: failed program was:" >&5
15461 cat conftest.$ac_ext >&5
15462 cf_cv_need_libm=yes
15463 fi
15464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15465 fi
15466 echo "$as_me:15466: result: $cf_cv_need_libm" >&5
15467 echo "${ECHO_T}$cf_cv_need_libm" >&6
15468 if test "$cf_cv_need_libm" = yes
15469 then
15470 MATH_LIB=-lm
15471 fi
15472
15473 ###     Checks for header files.
15474 echo "$as_me:15474: checking for ANSI C header files" >&5
15475 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15476 if test "${ac_cv_header_stdc+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 <stdlib.h>
15483 #include <stdarg.h>
15484 #include <string.h>
15485 #include <float.h>
15486
15487 _ACEOF
15488 if { (eval echo "$as_me:15488: \"$ac_cpp conftest.$ac_ext\"") >&5
15489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15490   ac_status=$?
15491   egrep -v '^ *\+' conftest.er1 >conftest.err
15492   rm -f conftest.er1
15493   cat conftest.err >&5
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); } >/dev/null; then
15496   if test -s conftest.err; then
15497     ac_cpp_err=$ac_c_preproc_warn_flag
15498   else
15499     ac_cpp_err=
15500   fi
15501 else
15502   ac_cpp_err=yes
15503 fi
15504 if test -z "$ac_cpp_err"; then
15505   ac_cv_header_stdc=yes
15506 else
15507   echo "$as_me: failed program was:" >&5
15508   cat conftest.$ac_ext >&5
15509   ac_cv_header_stdc=no
15510 fi
15511 rm -f conftest.err conftest.$ac_ext
15512
15513 if test $ac_cv_header_stdc = yes; then
15514   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15515   cat >conftest.$ac_ext <<_ACEOF
15516 #line 15516 "configure"
15517 #include "confdefs.h"
15518 #include <string.h>
15519
15520 _ACEOF
15521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15522   egrep "memchr" >/dev/null 2>&1; then
15523   :
15524 else
15525   ac_cv_header_stdc=no
15526 fi
15527 rm -rf conftest*
15528
15529 fi
15530
15531 if test $ac_cv_header_stdc = yes; then
15532   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15533   cat >conftest.$ac_ext <<_ACEOF
15534 #line 15534 "configure"
15535 #include "confdefs.h"
15536 #include <stdlib.h>
15537
15538 _ACEOF
15539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15540   egrep "free" >/dev/null 2>&1; then
15541   :
15542 else
15543   ac_cv_header_stdc=no
15544 fi
15545 rm -rf conftest*
15546
15547 fi
15548
15549 if test $ac_cv_header_stdc = yes; then
15550   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15551   if test "$cross_compiling" = yes; then
15552   :
15553 else
15554   cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557 #include <ctype.h>
15558 #if ((' ' & 0x0FF) == 0x020)
15559 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15560 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15561 #else
15562 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15563                      || ('j' <= (c) && (c) <= 'r') \
15564                      || ('s' <= (c) && (c) <= 'z'))
15565 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15566 #endif
15567
15568 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15569 int
15570 main (void)
15571 {
15572   int i;
15573   for (i = 0; i < 256; i++)
15574     if (XOR (islower (i), ISLOWER (i))
15575         || toupper (i) != TOUPPER (i))
15576       $ac_main_return(2);
15577   $ac_main_return (0);
15578 }
15579 _ACEOF
15580 rm -f conftest$ac_exeext
15581 if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
15582   (eval $ac_link) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15586   { (eval echo "$as_me:15586: \"$ac_try\"") >&5
15587   (eval $ac_try) 2>&5
15588   ac_status=$?
15589   echo "$as_me:15589: \$? = $ac_status" >&5
15590   (exit $ac_status); }; }; then
15591   :
15592 else
15593   echo "$as_me: program exited with status $ac_status" >&5
15594 echo "$as_me: failed program was:" >&5
15595 cat conftest.$ac_ext >&5
15596 ac_cv_header_stdc=no
15597 fi
15598 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15599 fi
15600 fi
15601 fi
15602 echo "$as_me:15602: result: $ac_cv_header_stdc" >&5
15603 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15604 if test $ac_cv_header_stdc = yes; then
15605
15606 cat >>confdefs.h <<\EOF
15607 #define STDC_HEADERS 1
15608 EOF
15609
15610 fi
15611
15612 ac_header_dirent=no
15613 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15614   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15615 echo "$as_me:15615: checking for $ac_hdr that defines DIR" >&5
15616 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15617 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15618   echo $ECHO_N "(cached) $ECHO_C" >&6
15619 else
15620   cat >conftest.$ac_ext <<_ACEOF
15621 #line 15621 "configure"
15622 #include "confdefs.h"
15623 #include <sys/types.h>
15624 #include <$ac_hdr>
15625
15626 int
15627 main (void)
15628 {
15629 if ((DIR *) 0)
15630 return 0;
15631   ;
15632   return 0;
15633 }
15634 _ACEOF
15635 rm -f conftest.$ac_objext
15636 if { (eval echo "$as_me:15636: \"$ac_compile\"") >&5
15637   (eval $ac_compile) 2>&5
15638   ac_status=$?
15639   echo "$as_me:15639: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -s conftest.$ac_objext'
15642   { (eval echo "$as_me:15642: \"$ac_try\"") >&5
15643   (eval $ac_try) 2>&5
15644   ac_status=$?
15645   echo "$as_me:15645: \$? = $ac_status" >&5
15646   (exit $ac_status); }; }; then
15647   eval "$as_ac_Header=yes"
15648 else
15649   echo "$as_me: failed program was:" >&5
15650 cat conftest.$ac_ext >&5
15651 eval "$as_ac_Header=no"
15652 fi
15653 rm -f conftest.$ac_objext conftest.$ac_ext
15654 fi
15655 echo "$as_me:15655: result: `eval echo '${'$as_ac_Header'}'`" >&5
15656 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15657 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15658   cat >>confdefs.h <<EOF
15659 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15660 EOF
15661
15662 ac_header_dirent=$ac_hdr; break
15663 fi
15664
15665 done
15666 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15667 if test $ac_header_dirent = dirent.h; then
15668   echo "$as_me:15668: checking for opendir in -ldir" >&5
15669 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15670 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15671   echo $ECHO_N "(cached) $ECHO_C" >&6
15672 else
15673   ac_check_lib_save_LIBS=$LIBS
15674 LIBS="-ldir  $LIBS"
15675 cat >conftest.$ac_ext <<_ACEOF
15676 #line 15676 "configure"
15677 #include "confdefs.h"
15678
15679 /* Override any gcc2 internal prototype to avoid an error.  */
15680 #ifdef __cplusplus
15681 extern "C"
15682 #endif
15683 /* We use char because int might match the return type of a gcc2
15684    builtin and then its argument prototype would still apply.  */
15685 char opendir ();
15686 int
15687 main (void)
15688 {
15689 opendir ();
15690   ;
15691   return 0;
15692 }
15693 _ACEOF
15694 rm -f conftest.$ac_objext conftest$ac_exeext
15695 if { (eval echo "$as_me:15695: \"$ac_link\"") >&5
15696   (eval $ac_link) 2>&5
15697   ac_status=$?
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); } &&
15700          { ac_try='test -s conftest$ac_exeext'
15701   { (eval echo "$as_me:15701: \"$ac_try\"") >&5
15702   (eval $ac_try) 2>&5
15703   ac_status=$?
15704   echo "$as_me:15704: \$? = $ac_status" >&5
15705   (exit $ac_status); }; }; then
15706   ac_cv_lib_dir_opendir=yes
15707 else
15708   echo "$as_me: failed program was:" >&5
15709 cat conftest.$ac_ext >&5
15710 ac_cv_lib_dir_opendir=no
15711 fi
15712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15713 LIBS=$ac_check_lib_save_LIBS
15714 fi
15715 echo "$as_me:15715: result: $ac_cv_lib_dir_opendir" >&5
15716 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15717 if test $ac_cv_lib_dir_opendir = yes; then
15718   LIBS="$LIBS -ldir"
15719 fi
15720
15721 else
15722   echo "$as_me:15722: checking for opendir in -lx" >&5
15723 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15724 if test "${ac_cv_lib_x_opendir+set}" = set; then
15725   echo $ECHO_N "(cached) $ECHO_C" >&6
15726 else
15727   ac_check_lib_save_LIBS=$LIBS
15728 LIBS="-lx  $LIBS"
15729 cat >conftest.$ac_ext <<_ACEOF
15730 #line 15730 "configure"
15731 #include "confdefs.h"
15732
15733 /* Override any gcc2 internal prototype to avoid an error.  */
15734 #ifdef __cplusplus
15735 extern "C"
15736 #endif
15737 /* We use char because int might match the return type of a gcc2
15738    builtin and then its argument prototype would still apply.  */
15739 char opendir ();
15740 int
15741 main (void)
15742 {
15743 opendir ();
15744   ;
15745   return 0;
15746 }
15747 _ACEOF
15748 rm -f conftest.$ac_objext conftest$ac_exeext
15749 if { (eval echo "$as_me:15749: \"$ac_link\"") >&5
15750   (eval $ac_link) 2>&5
15751   ac_status=$?
15752   echo "$as_me:15752: \$? = $ac_status" >&5
15753   (exit $ac_status); } &&
15754          { ac_try='test -s conftest$ac_exeext'
15755   { (eval echo "$as_me:15755: \"$ac_try\"") >&5
15756   (eval $ac_try) 2>&5
15757   ac_status=$?
15758   echo "$as_me:15758: \$? = $ac_status" >&5
15759   (exit $ac_status); }; }; then
15760   ac_cv_lib_x_opendir=yes
15761 else
15762   echo "$as_me: failed program was:" >&5
15763 cat conftest.$ac_ext >&5
15764 ac_cv_lib_x_opendir=no
15765 fi
15766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15767 LIBS=$ac_check_lib_save_LIBS
15768 fi
15769 echo "$as_me:15769: result: $ac_cv_lib_x_opendir" >&5
15770 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15771 if test $ac_cv_lib_x_opendir = yes; then
15772   LIBS="$LIBS -lx"
15773 fi
15774
15775 fi
15776
15777 echo "$as_me:15777: checking whether time.h and sys/time.h may both be included" >&5
15778 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15779 if test "${ac_cv_header_time+set}" = set; then
15780   echo $ECHO_N "(cached) $ECHO_C" >&6
15781 else
15782   cat >conftest.$ac_ext <<_ACEOF
15783 #line 15783 "configure"
15784 #include "confdefs.h"
15785 #include <sys/types.h>
15786 #include <sys/time.h>
15787 #include <time.h>
15788
15789 int
15790 main (void)
15791 {
15792 if ((struct tm *) 0)
15793 return 0;
15794   ;
15795   return 0;
15796 }
15797 _ACEOF
15798 rm -f conftest.$ac_objext
15799 if { (eval echo "$as_me:15799: \"$ac_compile\"") >&5
15800   (eval $ac_compile) 2>&5
15801   ac_status=$?
15802   echo "$as_me:15802: \$? = $ac_status" >&5
15803   (exit $ac_status); } &&
15804          { ac_try='test -s conftest.$ac_objext'
15805   { (eval echo "$as_me:15805: \"$ac_try\"") >&5
15806   (eval $ac_try) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); }; }; then
15810   ac_cv_header_time=yes
15811 else
15812   echo "$as_me: failed program was:" >&5
15813 cat conftest.$ac_ext >&5
15814 ac_cv_header_time=no
15815 fi
15816 rm -f conftest.$ac_objext conftest.$ac_ext
15817 fi
15818 echo "$as_me:15818: result: $ac_cv_header_time" >&5
15819 echo "${ECHO_T}$ac_cv_header_time" >&6
15820 if test $ac_cv_header_time = yes; then
15821
15822 cat >>confdefs.h <<\EOF
15823 #define TIME_WITH_SYS_TIME 1
15824 EOF
15825
15826 fi
15827
15828 cf_regex_func=no
15829
15830 cf_regex_libs="regex re"
15831 case $host_os in
15832 (mingw*)
15833         cf_regex_libs="gnurx $cf_regex_libs"
15834         ;;
15835 esac
15836
15837 echo "$as_me:15837: checking for regcomp" >&5
15838 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15839 if test "${ac_cv_func_regcomp+set}" = set; then
15840   echo $ECHO_N "(cached) $ECHO_C" >&6
15841 else
15842   cat >conftest.$ac_ext <<_ACEOF
15843 #line 15843 "configure"
15844 #include "confdefs.h"
15845 /* System header to define __stub macros and hopefully few prototypes,
15846     which can conflict with char regcomp (); below.  */
15847 #include <assert.h>
15848 /* Override any gcc2 internal prototype to avoid an error.  */
15849 #ifdef __cplusplus
15850 extern "C"
15851 #endif
15852 /* We use char because int might match the return type of a gcc2
15853    builtin and then its argument prototype would still apply.  */
15854 char regcomp ();
15855 char (*f) ();
15856
15857 int
15858 main (void)
15859 {
15860 /* The GNU C library defines this for functions which it implements
15861     to always fail with ENOSYS.  Some functions are actually named
15862     something starting with __ and the normal name is an alias.  */
15863 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15864 choke me
15865 #else
15866 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15867 #endif
15868
15869   ;
15870   return 0;
15871 }
15872 _ACEOF
15873 rm -f conftest.$ac_objext conftest$ac_exeext
15874 if { (eval echo "$as_me:15874: \"$ac_link\"") >&5
15875   (eval $ac_link) 2>&5
15876   ac_status=$?
15877   echo "$as_me:15877: \$? = $ac_status" >&5
15878   (exit $ac_status); } &&
15879          { ac_try='test -s conftest$ac_exeext'
15880   { (eval echo "$as_me:15880: \"$ac_try\"") >&5
15881   (eval $ac_try) 2>&5
15882   ac_status=$?
15883   echo "$as_me:15883: \$? = $ac_status" >&5
15884   (exit $ac_status); }; }; then
15885   ac_cv_func_regcomp=yes
15886 else
15887   echo "$as_me: failed program was:" >&5
15888 cat conftest.$ac_ext >&5
15889 ac_cv_func_regcomp=no
15890 fi
15891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15892 fi
15893 echo "$as_me:15893: result: $ac_cv_func_regcomp" >&5
15894 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15895 if test $ac_cv_func_regcomp = yes; then
15896   cf_regex_func=regcomp
15897 else
15898
15899         for cf_regex_lib in $cf_regex_libs
15900         do
15901                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15902 echo "$as_me:15902: checking for regcomp in -l$cf_regex_lib" >&5
15903 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15904 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15905   echo $ECHO_N "(cached) $ECHO_C" >&6
15906 else
15907   ac_check_lib_save_LIBS=$LIBS
15908 LIBS="-l$cf_regex_lib  $LIBS"
15909 cat >conftest.$ac_ext <<_ACEOF
15910 #line 15910 "configure"
15911 #include "confdefs.h"
15912
15913 /* Override any gcc2 internal prototype to avoid an error.  */
15914 #ifdef __cplusplus
15915 extern "C"
15916 #endif
15917 /* We use char because int might match the return type of a gcc2
15918    builtin and then its argument prototype would still apply.  */
15919 char regcomp ();
15920 int
15921 main (void)
15922 {
15923 regcomp ();
15924   ;
15925   return 0;
15926 }
15927 _ACEOF
15928 rm -f conftest.$ac_objext conftest$ac_exeext
15929 if { (eval echo "$as_me:15929: \"$ac_link\"") >&5
15930   (eval $ac_link) 2>&5
15931   ac_status=$?
15932   echo "$as_me:15932: \$? = $ac_status" >&5
15933   (exit $ac_status); } &&
15934          { ac_try='test -s conftest$ac_exeext'
15935   { (eval echo "$as_me:15935: \"$ac_try\"") >&5
15936   (eval $ac_try) 2>&5
15937   ac_status=$?
15938   echo "$as_me:15938: \$? = $ac_status" >&5
15939   (exit $ac_status); }; }; then
15940   eval "$as_ac_Lib=yes"
15941 else
15942   echo "$as_me: failed program was:" >&5
15943 cat conftest.$ac_ext >&5
15944 eval "$as_ac_Lib=no"
15945 fi
15946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15947 LIBS=$ac_check_lib_save_LIBS
15948 fi
15949 echo "$as_me:15949: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15950 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15951 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15952
15953 cf_add_libs="-l$cf_regex_lib"
15954 # Filter out duplicates - this happens with badly-designed ".pc" files...
15955 for cf_add_1lib in $LIBS
15956 do
15957         for cf_add_2lib in $cf_add_libs
15958         do
15959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15960                 then
15961                         cf_add_1lib=
15962                         break
15963                 fi
15964         done
15965         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15966 done
15967 LIBS="$cf_add_libs"
15968
15969                                 cf_regex_func=regcomp
15970                                 break
15971 fi
15972
15973         done
15974
15975 fi
15976
15977 if test "$cf_regex_func" = no ; then
15978         echo "$as_me:15978: checking for compile" >&5
15979 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15980 if test "${ac_cv_func_compile+set}" = set; then
15981   echo $ECHO_N "(cached) $ECHO_C" >&6
15982 else
15983   cat >conftest.$ac_ext <<_ACEOF
15984 #line 15984 "configure"
15985 #include "confdefs.h"
15986 /* System header to define __stub macros and hopefully few prototypes,
15987     which can conflict with char compile (); below.  */
15988 #include <assert.h>
15989 /* Override any gcc2 internal prototype to avoid an error.  */
15990 #ifdef __cplusplus
15991 extern "C"
15992 #endif
15993 /* We use char because int might match the return type of a gcc2
15994    builtin and then its argument prototype would still apply.  */
15995 char compile ();
15996 char (*f) ();
15997
15998 int
15999 main (void)
16000 {
16001 /* The GNU C library defines this for functions which it implements
16002     to always fail with ENOSYS.  Some functions are actually named
16003     something starting with __ and the normal name is an alias.  */
16004 #if defined (__stub_compile) || defined (__stub___compile)
16005 choke me
16006 #else
16007 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16008 #endif
16009
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f conftest.$ac_objext conftest$ac_exeext
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit $ac_status); } &&
16020          { ac_try='test -s conftest$ac_exeext'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit $ac_status); }; }; then
16026   ac_cv_func_compile=yes
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat conftest.$ac_ext >&5
16030 ac_cv_func_compile=no
16031 fi
16032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16033 fi
16034 echo "$as_me:16034: result: $ac_cv_func_compile" >&5
16035 echo "${ECHO_T}$ac_cv_func_compile" >&6
16036 if test $ac_cv_func_compile = yes; then
16037   cf_regex_func=compile
16038 else
16039
16040                 echo "$as_me:16040: checking for compile in -lgen" >&5
16041 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16042 if test "${ac_cv_lib_gen_compile+set}" = set; then
16043   echo $ECHO_N "(cached) $ECHO_C" >&6
16044 else
16045   ac_check_lib_save_LIBS=$LIBS
16046 LIBS="-lgen  $LIBS"
16047 cat >conftest.$ac_ext <<_ACEOF
16048 #line 16048 "configure"
16049 #include "confdefs.h"
16050
16051 /* Override any gcc2 internal prototype to avoid an error.  */
16052 #ifdef __cplusplus
16053 extern "C"
16054 #endif
16055 /* We use char because int might match the return type of a gcc2
16056    builtin and then its argument prototype would still apply.  */
16057 char compile ();
16058 int
16059 main (void)
16060 {
16061 compile ();
16062   ;
16063   return 0;
16064 }
16065 _ACEOF
16066 rm -f conftest.$ac_objext conftest$ac_exeext
16067 if { (eval echo "$as_me:16067: \"$ac_link\"") >&5
16068   (eval $ac_link) 2>&5
16069   ac_status=$?
16070   echo "$as_me:16070: \$? = $ac_status" >&5
16071   (exit $ac_status); } &&
16072          { ac_try='test -s conftest$ac_exeext'
16073   { (eval echo "$as_me:16073: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:16076: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   ac_cv_lib_gen_compile=yes
16079 else
16080   echo "$as_me: failed program was:" >&5
16081 cat conftest.$ac_ext >&5
16082 ac_cv_lib_gen_compile=no
16083 fi
16084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16085 LIBS=$ac_check_lib_save_LIBS
16086 fi
16087 echo "$as_me:16087: result: $ac_cv_lib_gen_compile" >&5
16088 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16089 if test $ac_cv_lib_gen_compile = yes; then
16090
16091 cf_add_libs="-lgen"
16092 # Filter out duplicates - this happens with badly-designed ".pc" files...
16093 for cf_add_1lib in $LIBS
16094 do
16095         for cf_add_2lib in $cf_add_libs
16096         do
16097                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16098                 then
16099                         cf_add_1lib=
16100                         break
16101                 fi
16102         done
16103         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16104 done
16105 LIBS="$cf_add_libs"
16106
16107                                 cf_regex_func=compile
16108 fi
16109
16110 fi
16111
16112 fi
16113
16114 if test "$cf_regex_func" = no ; then
16115         { echo "$as_me:16115: WARNING: cannot find regular expression library" >&5
16116 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16117 fi
16118
16119 echo "$as_me:16119: checking for regular-expression headers" >&5
16120 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16121 if test "${cf_cv_regex_hdrs+set}" = set; then
16122   echo $ECHO_N "(cached) $ECHO_C" >&6
16123 else
16124
16125 cf_cv_regex_hdrs=no
16126 case $cf_regex_func in
16127 (compile)
16128         for cf_regex_hdr in regexp.h regexpr.h
16129         do
16130                 cat >conftest.$ac_ext <<_ACEOF
16131 #line 16131 "configure"
16132 #include "confdefs.h"
16133 #include <$cf_regex_hdr>
16134 int
16135 main (void)
16136 {
16137
16138                         char *p = compile("", "", "", 0);
16139                         int x = step("", "");
16140
16141   ;
16142   return 0;
16143 }
16144 _ACEOF
16145 rm -f conftest.$ac_objext conftest$ac_exeext
16146 if { (eval echo "$as_me:16146: \"$ac_link\"") >&5
16147   (eval $ac_link) 2>&5
16148   ac_status=$?
16149   echo "$as_me:16149: \$? = $ac_status" >&5
16150   (exit $ac_status); } &&
16151          { ac_try='test -s conftest$ac_exeext'
16152   { (eval echo "$as_me:16152: \"$ac_try\"") >&5
16153   (eval $ac_try) 2>&5
16154   ac_status=$?
16155   echo "$as_me:16155: \$? = $ac_status" >&5
16156   (exit $ac_status); }; }; then
16157
16158                         cf_cv_regex_hdrs=$cf_regex_hdr
16159                         break
16160
16161 else
16162   echo "$as_me: failed program was:" >&5
16163 cat conftest.$ac_ext >&5
16164 fi
16165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16166         done
16167         ;;
16168 (*)
16169         for cf_regex_hdr in regex.h
16170         do
16171                 cat >conftest.$ac_ext <<_ACEOF
16172 #line 16172 "configure"
16173 #include "confdefs.h"
16174 #include <sys/types.h>
16175 #include <$cf_regex_hdr>
16176 int
16177 main (void)
16178 {
16179
16180                         regex_t *p;
16181                         int x = regcomp(p, "", 0);
16182                         int y = regexec(p, "", 0, 0, 0);
16183                         regfree(p);
16184
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 rm -f conftest.$ac_objext conftest$ac_exeext
16190 if { (eval echo "$as_me:16190: \"$ac_link\"") >&5
16191   (eval $ac_link) 2>&5
16192   ac_status=$?
16193   echo "$as_me:16193: \$? = $ac_status" >&5
16194   (exit $ac_status); } &&
16195          { ac_try='test -s conftest$ac_exeext'
16196   { (eval echo "$as_me:16196: \"$ac_try\"") >&5
16197   (eval $ac_try) 2>&5
16198   ac_status=$?
16199   echo "$as_me:16199: \$? = $ac_status" >&5
16200   (exit $ac_status); }; }; then
16201
16202                         cf_cv_regex_hdrs=$cf_regex_hdr
16203                         break
16204
16205 else
16206   echo "$as_me: failed program was:" >&5
16207 cat conftest.$ac_ext >&5
16208 fi
16209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16210         done
16211         ;;
16212 esac
16213
16214 fi
16215 echo "$as_me:16215: result: $cf_cv_regex_hdrs" >&5
16216 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16217
16218 case $cf_cv_regex_hdrs in
16219         (no)            { echo "$as_me:16219: WARNING: no regular expression header found" >&5
16220 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16221         (regex.h)
16222 cat >>confdefs.h <<\EOF
16223 #define HAVE_REGEX_H_FUNCS 1
16224 EOF
16225  ;;
16226         (regexp.h)
16227 cat >>confdefs.h <<\EOF
16228 #define HAVE_REGEXP_H_FUNCS 1
16229 EOF
16230  ;;
16231         (regexpr.h)
16232 cat >>confdefs.h <<\EOF
16233 #define HAVE_REGEXPR_H_FUNCS 1
16234 EOF
16235  ;;
16236 esac
16237
16238 for ac_header in \
16239 fcntl.h \
16240 getopt.h \
16241 limits.h \
16242 locale.h \
16243 math.h \
16244 poll.h \
16245 sys/bsdtypes.h \
16246 sys/ioctl.h \
16247 sys/param.h \
16248 sys/poll.h \
16249 sys/select.h \
16250 sys/time.h \
16251 sys/times.h \
16252 ttyent.h \
16253 unistd.h \
16254 wctype.h \
16255
16256 do
16257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16258 echo "$as_me:16258: checking for $ac_header" >&5
16259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16261   echo $ECHO_N "(cached) $ECHO_C" >&6
16262 else
16263   cat >conftest.$ac_ext <<_ACEOF
16264 #line 16264 "configure"
16265 #include "confdefs.h"
16266 #include <$ac_header>
16267 _ACEOF
16268 if { (eval echo "$as_me:16268: \"$ac_cpp conftest.$ac_ext\"") >&5
16269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16270   ac_status=$?
16271   egrep -v '^ *\+' conftest.er1 >conftest.err
16272   rm -f conftest.er1
16273   cat conftest.err >&5
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit $ac_status); } >/dev/null; then
16276   if test -s conftest.err; then
16277     ac_cpp_err=$ac_c_preproc_warn_flag
16278   else
16279     ac_cpp_err=
16280   fi
16281 else
16282   ac_cpp_err=yes
16283 fi
16284 if test -z "$ac_cpp_err"; then
16285   eval "$as_ac_Header=yes"
16286 else
16287   echo "$as_me: failed program was:" >&5
16288   cat conftest.$ac_ext >&5
16289   eval "$as_ac_Header=no"
16290 fi
16291 rm -f conftest.err conftest.$ac_ext
16292 fi
16293 echo "$as_me:16293: result: `eval echo '${'$as_ac_Header'}'`" >&5
16294 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16295 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16296   cat >>confdefs.h <<EOF
16297 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16298 EOF
16299
16300 fi
16301 done
16302
16303 for ac_header in unistd.h getopt.h
16304 do
16305 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16306 echo "$as_me:16306: checking for $ac_header" >&5
16307 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16309   echo $ECHO_N "(cached) $ECHO_C" >&6
16310 else
16311   cat >conftest.$ac_ext <<_ACEOF
16312 #line 16312 "configure"
16313 #include "confdefs.h"
16314 #include <$ac_header>
16315 _ACEOF
16316 if { (eval echo "$as_me:16316: \"$ac_cpp conftest.$ac_ext\"") >&5
16317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16318   ac_status=$?
16319   egrep -v '^ *\+' conftest.er1 >conftest.err
16320   rm -f conftest.er1
16321   cat conftest.err >&5
16322   echo "$as_me:16322: \$? = $ac_status" >&5
16323   (exit $ac_status); } >/dev/null; then
16324   if test -s conftest.err; then
16325     ac_cpp_err=$ac_c_preproc_warn_flag
16326   else
16327     ac_cpp_err=
16328   fi
16329 else
16330   ac_cpp_err=yes
16331 fi
16332 if test -z "$ac_cpp_err"; then
16333   eval "$as_ac_Header=yes"
16334 else
16335   echo "$as_me: failed program was:" >&5
16336   cat conftest.$ac_ext >&5
16337   eval "$as_ac_Header=no"
16338 fi
16339 rm -f conftest.err conftest.$ac_ext
16340 fi
16341 echo "$as_me:16341: result: `eval echo '${'$as_ac_Header'}'`" >&5
16342 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16343 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16344   cat >>confdefs.h <<EOF
16345 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16346 EOF
16347
16348 fi
16349 done
16350
16351 echo "$as_me:16351: checking for header declaring getopt variables" >&5
16352 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16353 if test "${cf_cv_getopt_header+set}" = set; then
16354   echo $ECHO_N "(cached) $ECHO_C" >&6
16355 else
16356
16357 cf_cv_getopt_header=none
16358 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16359 do
16360 cat >conftest.$ac_ext <<_ACEOF
16361 #line 16361 "configure"
16362 #include "confdefs.h"
16363
16364 #include <$cf_header>
16365 int
16366 main (void)
16367 {
16368 int x = optind; char *y = optarg
16369   ;
16370   return 0;
16371 }
16372 _ACEOF
16373 rm -f conftest.$ac_objext
16374 if { (eval echo "$as_me:16374: \"$ac_compile\"") >&5
16375   (eval $ac_compile) 2>&5
16376   ac_status=$?
16377   echo "$as_me:16377: \$? = $ac_status" >&5
16378   (exit $ac_status); } &&
16379          { ac_try='test -s conftest.$ac_objext'
16380   { (eval echo "$as_me:16380: \"$ac_try\"") >&5
16381   (eval $ac_try) 2>&5
16382   ac_status=$?
16383   echo "$as_me:16383: \$? = $ac_status" >&5
16384   (exit $ac_status); }; }; then
16385   cf_cv_getopt_header=$cf_header
16386  break
16387 else
16388   echo "$as_me: failed program was:" >&5
16389 cat conftest.$ac_ext >&5
16390 fi
16391 rm -f conftest.$ac_objext conftest.$ac_ext
16392 done
16393
16394 fi
16395 echo "$as_me:16395: result: $cf_cv_getopt_header" >&5
16396 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16397 if test $cf_cv_getopt_header != none ; then
16398
16399 cat >>confdefs.h <<\EOF
16400 #define HAVE_GETOPT_HEADER 1
16401 EOF
16402
16403 fi
16404 if test $cf_cv_getopt_header = getopt.h ; then
16405
16406 cat >>confdefs.h <<\EOF
16407 #define NEED_GETOPT_H 1
16408 EOF
16409
16410 fi
16411
16412 # check for ISC (this may also define _POSIX_SOURCE)
16413 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16414 if test "x$ISC" = xyes ; then
16415
16416 echo "$as_me:16416: checking for main in -lcposix" >&5
16417 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16418 if test "${ac_cv_lib_cposix_main+set}" = set; then
16419   echo $ECHO_N "(cached) $ECHO_C" >&6
16420 else
16421   ac_check_lib_save_LIBS=$LIBS
16422 LIBS="-lcposix  $LIBS"
16423 cat >conftest.$ac_ext <<_ACEOF
16424 #line 16424 "configure"
16425 #include "confdefs.h"
16426
16427 int
16428 main (void)
16429 {
16430 main ();
16431   ;
16432   return 0;
16433 }
16434 _ACEOF
16435 rm -f conftest.$ac_objext conftest$ac_exeext
16436 if { (eval echo "$as_me:16436: \"$ac_link\"") >&5
16437   (eval $ac_link) 2>&5
16438   ac_status=$?
16439   echo "$as_me:16439: \$? = $ac_status" >&5
16440   (exit $ac_status); } &&
16441          { ac_try='test -s conftest$ac_exeext'
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_lib_cposix_main=yes
16448 else
16449   echo "$as_me: failed program was:" >&5
16450 cat conftest.$ac_ext >&5
16451 ac_cv_lib_cposix_main=no
16452 fi
16453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16454 LIBS=$ac_check_lib_save_LIBS
16455 fi
16456 echo "$as_me:16456: result: $ac_cv_lib_cposix_main" >&5
16457 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16458 if test $ac_cv_lib_cposix_main = yes; then
16459   cat >>confdefs.h <<EOF
16460 #define HAVE_LIBCPOSIX 1
16461 EOF
16462
16463   LIBS="-lcposix $LIBS"
16464
16465 fi
16466
16467         echo "$as_me:16467: checking for bzero in -linet" >&5
16468 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16469 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16470   echo $ECHO_N "(cached) $ECHO_C" >&6
16471 else
16472   ac_check_lib_save_LIBS=$LIBS
16473 LIBS="-linet  $LIBS"
16474 cat >conftest.$ac_ext <<_ACEOF
16475 #line 16475 "configure"
16476 #include "confdefs.h"
16477
16478 /* Override any gcc2 internal prototype to avoid an error.  */
16479 #ifdef __cplusplus
16480 extern "C"
16481 #endif
16482 /* We use char because int might match the return type of a gcc2
16483    builtin and then its argument prototype would still apply.  */
16484 char bzero ();
16485 int
16486 main (void)
16487 {
16488 bzero ();
16489   ;
16490   return 0;
16491 }
16492 _ACEOF
16493 rm -f conftest.$ac_objext conftest$ac_exeext
16494 if { (eval echo "$as_me:16494: \"$ac_link\"") >&5
16495   (eval $ac_link) 2>&5
16496   ac_status=$?
16497   echo "$as_me:16497: \$? = $ac_status" >&5
16498   (exit $ac_status); } &&
16499          { ac_try='test -s conftest$ac_exeext'
16500   { (eval echo "$as_me:16500: \"$ac_try\"") >&5
16501   (eval $ac_try) 2>&5
16502   ac_status=$?
16503   echo "$as_me:16503: \$? = $ac_status" >&5
16504   (exit $ac_status); }; }; then
16505   ac_cv_lib_inet_bzero=yes
16506 else
16507   echo "$as_me: failed program was:" >&5
16508 cat conftest.$ac_ext >&5
16509 ac_cv_lib_inet_bzero=no
16510 fi
16511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16512 LIBS=$ac_check_lib_save_LIBS
16513 fi
16514 echo "$as_me:16514: result: $ac_cv_lib_inet_bzero" >&5
16515 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16516 if test $ac_cv_lib_inet_bzero = yes; then
16517
16518 cf_add_libs="-linet"
16519 # Filter out duplicates - this happens with badly-designed ".pc" files...
16520 for cf_add_1lib in $LIBS
16521 do
16522         for cf_add_2lib in $cf_add_libs
16523         do
16524                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16525                 then
16526                         cf_add_1lib=
16527                         break
16528                 fi
16529         done
16530         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16531 done
16532 LIBS="$cf_add_libs"
16533
16534 fi
16535 fi
16536
16537 echo "$as_me:16537: checking if sys/time.h works with sys/select.h" >&5
16538 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16539 if test "${cf_cv_sys_time_select+set}" = set; then
16540   echo $ECHO_N "(cached) $ECHO_C" >&6
16541 else
16542
16543 cat >conftest.$ac_ext <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16546
16547 #include <sys/types.h>
16548 #ifdef HAVE_SYS_TIME_H
16549 #include <sys/time.h>
16550 #endif
16551 #ifdef HAVE_SYS_SELECT_H
16552 #include <sys/select.h>
16553 #endif
16554
16555 int
16556 main (void)
16557 {
16558
16559   ;
16560   return 0;
16561 }
16562 _ACEOF
16563 rm -f conftest.$ac_objext
16564 if { (eval echo "$as_me:16564: \"$ac_compile\"") >&5
16565   (eval $ac_compile) 2>&5
16566   ac_status=$?
16567   echo "$as_me:16567: \$? = $ac_status" >&5
16568   (exit $ac_status); } &&
16569          { ac_try='test -s conftest.$ac_objext'
16570   { (eval echo "$as_me:16570: \"$ac_try\"") >&5
16571   (eval $ac_try) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit $ac_status); }; }; then
16575   cf_cv_sys_time_select=yes
16576 else
16577   echo "$as_me: failed program was:" >&5
16578 cat conftest.$ac_ext >&5
16579 cf_cv_sys_time_select=no
16580 fi
16581 rm -f conftest.$ac_objext conftest.$ac_ext
16582
16583 fi
16584
16585 echo "$as_me:16585: result: $cf_cv_sys_time_select" >&5
16586 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16587 test "$cf_cv_sys_time_select" = yes &&
16588 cat >>confdefs.h <<\EOF
16589 #define HAVE_SYS_TIME_SELECT 1
16590 EOF
16591
16592 ###     checks for compiler characteristics
16593 ac_ext=c
16594 ac_cpp='$CPP $CPPFLAGS'
16595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16598 ac_main_return=return
16599
16600 echo "$as_me:16600: checking for an ANSI C-conforming const" >&5
16601 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16602 if test "${ac_cv_c_const+set}" = set; then
16603   echo $ECHO_N "(cached) $ECHO_C" >&6
16604 else
16605   cat >conftest.$ac_ext <<_ACEOF
16606 #line 16606 "configure"
16607 #include "confdefs.h"
16608
16609 int
16610 main (void)
16611 {
16612 /* FIXME: Include the comments suggested by Paul. */
16613 #ifndef __cplusplus
16614   /* Ultrix mips cc rejects this.  */
16615   typedef int charset[2];
16616   const charset x;
16617   /* SunOS 4.1.1 cc rejects this.  */
16618   char const *const *ccp;
16619   char **p;
16620   /* NEC SVR4.0.2 mips cc rejects this.  */
16621   struct point {int x, y;};
16622   static struct point const zero = {0,0};
16623   /* AIX XL C 1.02.0.0 rejects this.
16624      It does not let you subtract one const X* pointer from another in
16625      an arm of an if-expression whose if-part is not a constant
16626      expression */
16627   const char *g = "string";
16628   ccp = &g + (g ? g-g : 0);
16629   /* HPUX 7.0 cc rejects these. */
16630   ++ccp;
16631   p = (char**) ccp;
16632   ccp = (char const *const *) p;
16633   { /* SCO 3.2v4 cc rejects this.  */
16634     char *t;
16635     char const *s = 0 ? (char *) 0 : (char const *) 0;
16636
16637     *t++ = 0;
16638   }
16639   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16640     int x[] = {25, 17};
16641     const int *foo = &x[0];
16642     ++foo;
16643   }
16644   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16645     typedef const int *iptr;
16646     iptr p = 0;
16647     ++p;
16648   }
16649   { /* AIX XL C 1.02.0.0 rejects this saying
16650        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16651     struct s { int j; const int *ap[3]; };
16652     struct s *b; b->j = 5;
16653   }
16654   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16655     const int foo = 10;
16656   }
16657 #endif
16658
16659   ;
16660   return 0;
16661 }
16662 _ACEOF
16663 rm -f conftest.$ac_objext
16664 if { (eval echo "$as_me:16664: \"$ac_compile\"") >&5
16665   (eval $ac_compile) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); } &&
16669          { ac_try='test -s conftest.$ac_objext'
16670   { (eval echo "$as_me:16670: \"$ac_try\"") >&5
16671   (eval $ac_try) 2>&5
16672   ac_status=$?
16673   echo "$as_me:16673: \$? = $ac_status" >&5
16674   (exit $ac_status); }; }; then
16675   ac_cv_c_const=yes
16676 else
16677   echo "$as_me: failed program was:" >&5
16678 cat conftest.$ac_ext >&5
16679 ac_cv_c_const=no
16680 fi
16681 rm -f conftest.$ac_objext conftest.$ac_ext
16682 fi
16683 echo "$as_me:16683: result: $ac_cv_c_const" >&5
16684 echo "${ECHO_T}$ac_cv_c_const" >&6
16685 if test $ac_cv_c_const = no; then
16686
16687 cat >>confdefs.h <<\EOF
16688 #define const
16689 EOF
16690
16691 fi
16692
16693 echo "$as_me:16693: checking for inline" >&5
16694 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16695 if test "${ac_cv_c_inline+set}" = set; then
16696   echo $ECHO_N "(cached) $ECHO_C" >&6
16697 else
16698   ac_cv_c_inline=no
16699 for ac_kw in inline __inline__ __inline; do
16700   cat >conftest.$ac_ext <<_ACEOF
16701 #line 16701 "configure"
16702 #include "confdefs.h"
16703 #ifndef __cplusplus
16704 static $ac_kw int static_foo () {return 0; }
16705 $ac_kw int foo () {return 0; }
16706 #endif
16707
16708 _ACEOF
16709 rm -f conftest.$ac_objext
16710 if { (eval echo "$as_me:16710: \"$ac_compile\"") >&5
16711   (eval $ac_compile) 2>&5
16712   ac_status=$?
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); } &&
16715          { ac_try='test -s conftest.$ac_objext'
16716   { (eval echo "$as_me:16716: \"$ac_try\"") >&5
16717   (eval $ac_try) 2>&5
16718   ac_status=$?
16719   echo "$as_me:16719: \$? = $ac_status" >&5
16720   (exit $ac_status); }; }; then
16721   ac_cv_c_inline=$ac_kw; break
16722 else
16723   echo "$as_me: failed program was:" >&5
16724 cat conftest.$ac_ext >&5
16725 fi
16726 rm -f conftest.$ac_objext conftest.$ac_ext
16727 done
16728
16729 fi
16730 echo "$as_me:16730: result: $ac_cv_c_inline" >&5
16731 echo "${ECHO_T}$ac_cv_c_inline" >&6
16732 case $ac_cv_c_inline in
16733   inline | yes) ;;
16734   no)
16735 cat >>confdefs.h <<\EOF
16736 #define inline
16737 EOF
16738  ;;
16739   *)  cat >>confdefs.h <<EOF
16740 #define inline $ac_cv_c_inline
16741 EOF
16742  ;;
16743 esac
16744
16745 NCURSES_INLINE=
16746 if test "$ac_cv_c_inline" != no ; then
16747         NCURSES_INLINE=inline
16748         if test "$INTEL_COMPILER" = yes
16749         then
16750                 :
16751         elif test "$CLANG_COMPILER" = yes
16752         then
16753                 :
16754         elif test "$GCC" = yes
16755         then
16756                 echo "$as_me:16756: checking if $CC supports options to tune inlining" >&5
16757 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16758 if test "${cf_cv_gcc_inline+set}" = set; then
16759   echo $ECHO_N "(cached) $ECHO_C" >&6
16760 else
16761
16762                 cf_save_CFLAGS=$CFLAGS
16763                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16764                 cat >conftest.$ac_ext <<_ACEOF
16765 #line 16765 "configure"
16766 #include "confdefs.h"
16767 inline int foo(void) { return 1; }
16768 int
16769 main (void)
16770 {
16771 ${cf_cv_main_return:-return} foo()
16772   ;
16773   return 0;
16774 }
16775 _ACEOF
16776 rm -f conftest.$ac_objext
16777 if { (eval echo "$as_me:16777: \"$ac_compile\"") >&5
16778   (eval $ac_compile) 2>&5
16779   ac_status=$?
16780   echo "$as_me:16780: \$? = $ac_status" >&5
16781   (exit $ac_status); } &&
16782          { ac_try='test -s conftest.$ac_objext'
16783   { (eval echo "$as_me:16783: \"$ac_try\"") >&5
16784   (eval $ac_try) 2>&5
16785   ac_status=$?
16786   echo "$as_me:16786: \$? = $ac_status" >&5
16787   (exit $ac_status); }; }; then
16788   cf_cv_gcc_inline=yes
16789 else
16790   echo "$as_me: failed program was:" >&5
16791 cat conftest.$ac_ext >&5
16792 cf_cv_gcc_inline=no
16793 fi
16794 rm -f conftest.$ac_objext conftest.$ac_ext
16795                 CFLAGS=$cf_save_CFLAGS
16796
16797 fi
16798 echo "$as_me:16798: result: $cf_cv_gcc_inline" >&5
16799 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16800                 if test "$cf_cv_gcc_inline" = yes ; then
16801
16802 cf_fix_cppflags=no
16803 cf_new_cflags=
16804 cf_new_cppflags=
16805 cf_new_extra_cppflags=
16806
16807 for cf_add_cflags in --param max-inline-insns-single=1200
16808 do
16809 case $cf_fix_cppflags in
16810 (no)
16811         case $cf_add_cflags in
16812         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16813                 case $cf_add_cflags in
16814                 (-D*)
16815                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16816
16817                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16818                                 && test -z "${cf_tst_cflags}" \
16819                                 && cf_fix_cppflags=yes
16820
16821                         if test $cf_fix_cppflags = yes ; then
16822
16823         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16824         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16825
16826                                 continue
16827                         elif test "${cf_tst_cflags}" = "\"'" ; then
16828
16829         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16830         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16831
16832                                 continue
16833                         fi
16834                         ;;
16835                 esac
16836                 case "$CPPFLAGS" in
16837                 (*$cf_add_cflags)
16838                         ;;
16839                 (*)
16840                         case $cf_add_cflags in
16841                         (-D*)
16842                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16843
16844 CPPFLAGS=`echo "$CPPFLAGS" | \
16845         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16846                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16847
16848                                 ;;
16849                         esac
16850
16851         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16852         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16853
16854                         ;;
16855                 esac
16856                 ;;
16857         (*)
16858
16859         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16860         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16861
16862                 ;;
16863         esac
16864         ;;
16865 (yes)
16866
16867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16869
16870         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16871
16872         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16873                 && test -z "${cf_tst_cflags}" \
16874                 && cf_fix_cppflags=no
16875         ;;
16876 esac
16877 done
16878
16879 if test -n "$cf_new_cflags" ; then
16880
16881         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16882         CFLAGS="${CFLAGS}$cf_new_cflags"
16883
16884 fi
16885
16886 if test -n "$cf_new_cppflags" ; then
16887
16888         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16889         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16890
16891 fi
16892
16893 if test -n "$cf_new_extra_cppflags" ; then
16894
16895         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16896         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16897
16898 fi
16899
16900                 fi
16901         fi
16902 fi
16903
16904 echo "$as_me:16904: checking for signal global datatype" >&5
16905 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16906 if test "${cf_cv_sig_atomic_t+set}" = set; then
16907   echo $ECHO_N "(cached) $ECHO_C" >&6
16908 else
16909
16910         for cf_type in \
16911                 "volatile sig_atomic_t" \
16912                 "sig_atomic_t" \
16913                 "int"
16914         do
16915         cat >conftest.$ac_ext <<_ACEOF
16916 #line 16916 "configure"
16917 #include "confdefs.h"
16918
16919 #include <sys/types.h>
16920 #include <signal.h>
16921 #include <stdio.h>
16922
16923 extern $cf_type x;
16924 $cf_type x;
16925 static void handler(int sig)
16926 {
16927         x = 5;
16928 }
16929 int
16930 main (void)
16931 {
16932 signal(SIGINT, handler);
16933                  x = 1
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 rm -f conftest.$ac_objext
16939 if { (eval echo "$as_me:16939: \"$ac_compile\"") >&5
16940   (eval $ac_compile) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); } &&
16944          { ac_try='test -s conftest.$ac_objext'
16945   { (eval echo "$as_me:16945: \"$ac_try\"") >&5
16946   (eval $ac_try) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); }; }; then
16950   cf_cv_sig_atomic_t=$cf_type
16951 else
16952   echo "$as_me: failed program was:" >&5
16953 cat conftest.$ac_ext >&5
16954 cf_cv_sig_atomic_t=no
16955 fi
16956 rm -f conftest.$ac_objext conftest.$ac_ext
16957                 test "$cf_cv_sig_atomic_t" != no && break
16958         done
16959
16960 fi
16961
16962 echo "$as_me:16962: result: $cf_cv_sig_atomic_t" >&5
16963 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16964 test "$cf_cv_sig_atomic_t" != no &&
16965 cat >>confdefs.h <<EOF
16966 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16967 EOF
16968
16969 if test $NCURSES_CHTYPE = auto ; then
16970
16971 echo "$as_me:16971: checking for type of chtype" >&5
16972 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16973 if test "${cf_cv_typeof_chtype+set}" = set; then
16974   echo $ECHO_N "(cached) $ECHO_C" >&6
16975 else
16976
16977                 if test "$cross_compiling" = yes; then
16978   cf_cv_typeof_chtype=long
16979 else
16980   cat >conftest.$ac_ext <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16983
16984 #define WANT_BITS 31
16985 #include <stdio.h>
16986 int main(void)
16987 {
16988         FILE *fp = fopen("cf_test.out", "w");
16989         if (fp != 0) {
16990                 char *result = "long";
16991                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16992                         int n;
16993                         unsigned int x, y;
16994                         for (n = 0; n < WANT_BITS; n++) {
16995                                 x = (1 << n);
16996                                 y = (x >> n);
16997                                 if (y != 1 || x == 0) {
16998                                         x = 0;
16999                                         break;
17000                                 }
17001                         }
17002                         /*
17003                          * If x is nonzero, an int is big enough for the bits
17004                          * that we want.
17005                          */
17006                         result = (x != 0) ? "int" : "long";
17007                 }
17008                 fputs(result, fp);
17009                 fclose(fp);
17010         }
17011         ${cf_cv_main_return:-return}(0);
17012 }
17013
17014 _ACEOF
17015 rm -f conftest$ac_exeext
17016 if { (eval echo "$as_me:17016: \"$ac_link\"") >&5
17017   (eval $ac_link) 2>&5
17018   ac_status=$?
17019   echo "$as_me:17019: \$? = $ac_status" >&5
17020   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17021   { (eval echo "$as_me:17021: \"$ac_try\"") >&5
17022   (eval $ac_try) 2>&5
17023   ac_status=$?
17024   echo "$as_me:17024: \$? = $ac_status" >&5
17025   (exit $ac_status); }; }; then
17026   cf_cv_typeof_chtype=`cat cf_test.out`
17027 else
17028   echo "$as_me: program exited with status $ac_status" >&5
17029 echo "$as_me: failed program was:" >&5
17030 cat conftest.$ac_ext >&5
17031 cf_cv_typeof_chtype=long
17032 fi
17033 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17034 fi
17035                 rm -f cf_test.out
17036
17037 fi
17038
17039 echo "$as_me:17039: result: $cf_cv_typeof_chtype" >&5
17040 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17041
17042 cat >>confdefs.h <<EOF
17043 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17044 EOF
17045
17046 else
17047         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17048 fi
17049 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17050
17051 echo "$as_me:17051: checking if unsigned literals are legal" >&5
17052 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17053 if test "${cf_cv_unsigned_literals+set}" = set; then
17054   echo $ECHO_N "(cached) $ECHO_C" >&6
17055 else
17056
17057         cat >conftest.$ac_ext <<_ACEOF
17058 #line 17058 "configure"
17059 #include "confdefs.h"
17060
17061 int
17062 main (void)
17063 {
17064 long x = 1L + 1UL + 1U + 1
17065   ;
17066   return 0;
17067 }
17068 _ACEOF
17069 rm -f conftest.$ac_objext
17070 if { (eval echo "$as_me:17070: \"$ac_compile\"") >&5
17071   (eval $ac_compile) 2>&5
17072   ac_status=$?
17073   echo "$as_me:17073: \$? = $ac_status" >&5
17074   (exit $ac_status); } &&
17075          { ac_try='test -s conftest.$ac_objext'
17076   { (eval echo "$as_me:17076: \"$ac_try\"") >&5
17077   (eval $ac_try) 2>&5
17078   ac_status=$?
17079   echo "$as_me:17079: \$? = $ac_status" >&5
17080   (exit $ac_status); }; }; then
17081   cf_cv_unsigned_literals=yes
17082 else
17083   echo "$as_me: failed program was:" >&5
17084 cat conftest.$ac_ext >&5
17085 cf_cv_unsigned_literals=no
17086 fi
17087 rm -f conftest.$ac_objext conftest.$ac_ext
17088
17089 fi
17090
17091 echo "$as_me:17091: result: $cf_cv_unsigned_literals" >&5
17092 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17093
17094 cf_cv_1UL="1"
17095 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17096 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17097
17098 if test $NCURSES_MMASK_T = auto ; then
17099         cf_cv_typeof_mmask_t=long
17100 else
17101         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17102 fi
17103 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17104
17105 ###     Checks for external-data
17106
17107 echo "$as_me:17107: checking if external errno is declared" >&5
17108 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17109 if test "${cf_cv_dcl_errno+set}" = set; then
17110   echo $ECHO_N "(cached) $ECHO_C" >&6
17111 else
17112
17113         cat >conftest.$ac_ext <<_ACEOF
17114 #line 17114 "configure"
17115 #include "confdefs.h"
17116
17117 #ifdef HAVE_STDLIB_H
17118 #include <stdlib.h>
17119 #endif
17120 #include <stdio.h>
17121 #include <sys/types.h>
17122 #include <errno.h>
17123 int
17124 main (void)
17125 {
17126 int x = (int) errno
17127   ;
17128   return 0;
17129 }
17130 _ACEOF
17131 rm -f conftest.$ac_objext
17132 if { (eval echo "$as_me:17132: \"$ac_compile\"") >&5
17133   (eval $ac_compile) 2>&5
17134   ac_status=$?
17135   echo "$as_me:17135: \$? = $ac_status" >&5
17136   (exit $ac_status); } &&
17137          { ac_try='test -s conftest.$ac_objext'
17138   { (eval echo "$as_me:17138: \"$ac_try\"") >&5
17139   (eval $ac_try) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit $ac_status); }; }; then
17143   cf_cv_dcl_errno=yes
17144 else
17145   echo "$as_me: failed program was:" >&5
17146 cat conftest.$ac_ext >&5
17147 cf_cv_dcl_errno=no
17148 fi
17149 rm -f conftest.$ac_objext conftest.$ac_ext
17150
17151 fi
17152 echo "$as_me:17152: result: $cf_cv_dcl_errno" >&5
17153 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17154
17155 if test "$cf_cv_dcl_errno" = no ; then
17156
17157 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17158
17159         cat >>confdefs.h <<EOF
17160 #define $cf_result 1
17161 EOF
17162
17163 fi
17164
17165 # It's possible (for near-UNIX clones) that the data doesn't exist
17166
17167 echo "$as_me:17167: checking if external errno exists" >&5
17168 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17169 if test "${cf_cv_have_errno+set}" = set; then
17170   echo $ECHO_N "(cached) $ECHO_C" >&6
17171 else
17172
17173         cat >conftest.$ac_ext <<_ACEOF
17174 #line 17174 "configure"
17175 #include "confdefs.h"
17176
17177 #undef errno
17178 extern int errno;
17179
17180 int
17181 main (void)
17182 {
17183 errno = 2
17184   ;
17185   return 0;
17186 }
17187 _ACEOF
17188 rm -f conftest.$ac_objext conftest$ac_exeext
17189 if { (eval echo "$as_me:17189: \"$ac_link\"") >&5
17190   (eval $ac_link) 2>&5
17191   ac_status=$?
17192   echo "$as_me:17192: \$? = $ac_status" >&5
17193   (exit $ac_status); } &&
17194          { ac_try='test -s conftest$ac_exeext'
17195   { (eval echo "$as_me:17195: \"$ac_try\"") >&5
17196   (eval $ac_try) 2>&5
17197   ac_status=$?
17198   echo "$as_me:17198: \$? = $ac_status" >&5
17199   (exit $ac_status); }; }; then
17200   cf_cv_have_errno=yes
17201 else
17202   echo "$as_me: failed program was:" >&5
17203 cat conftest.$ac_ext >&5
17204 cf_cv_have_errno=no
17205 fi
17206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17207
17208 fi
17209 echo "$as_me:17209: result: $cf_cv_have_errno" >&5
17210 echo "${ECHO_T}$cf_cv_have_errno" >&6
17211
17212 if test "$cf_cv_have_errno" = yes ; then
17213
17214 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17215
17216         cat >>confdefs.h <<EOF
17217 #define $cf_result 1
17218 EOF
17219
17220 fi
17221
17222 echo "$as_me:17222: checking if data-only library module links" >&5
17223 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17224 if test "${cf_cv_link_dataonly+set}" = set; then
17225   echo $ECHO_N "(cached) $ECHO_C" >&6
17226 else
17227
17228         rm -f conftest.a
17229         cat >conftest.$ac_ext <<EOF
17230 #line 17230 "configure"
17231 int     testdata[3] = { 123, 456, 789 };
17232 EOF
17233         if { (eval echo "$as_me:17233: \"$ac_compile\"") >&5
17234   (eval $ac_compile) 2>&5
17235   ac_status=$?
17236   echo "$as_me:17236: \$? = $ac_status" >&5
17237   (exit $ac_status); } ; then
17238                 mv conftest.o data.o && \
17239                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17240         fi
17241         rm -f conftest.$ac_ext data.o
17242         cat >conftest.$ac_ext <<EOF
17243 #line 17243 "configure"
17244 int     testfunc(void)
17245 {
17246 #if defined(NeXT)
17247         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17248 #else
17249         extern int testdata[3];
17250         return testdata[0] == 123
17251            &&  testdata[1] == 456
17252            &&  testdata[2] == 789;
17253 #endif
17254 }
17255 EOF
17256         if { (eval echo "$as_me:17256: \"$ac_compile\"") >&5
17257   (eval $ac_compile) 2>&5
17258   ac_status=$?
17259   echo "$as_me:17259: \$? = $ac_status" >&5
17260   (exit $ac_status); }; then
17261                 mv conftest.o func.o && \
17262                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17263         fi
17264         rm -f conftest.$ac_ext func.o
17265         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17266         cf_saveLIBS="$LIBS"
17267         LIBS="conftest.a $LIBS"
17268         if test "$cross_compiling" = yes; then
17269   cf_cv_link_dataonly=unknown
17270 else
17271   cat >conftest.$ac_ext <<_ACEOF
17272 #line 17272 "configure"
17273 #include "confdefs.h"
17274
17275         int main(void)
17276         {
17277                 extern int testfunc();
17278                 ${cf_cv_main_return:-return} (!testfunc());
17279         }
17280
17281 _ACEOF
17282 rm -f conftest$ac_exeext
17283 if { (eval echo "$as_me:17283: \"$ac_link\"") >&5
17284   (eval $ac_link) 2>&5
17285   ac_status=$?
17286   echo "$as_me:17286: \$? = $ac_status" >&5
17287   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17288   { (eval echo "$as_me:17288: \"$ac_try\"") >&5
17289   (eval $ac_try) 2>&5
17290   ac_status=$?
17291   echo "$as_me:17291: \$? = $ac_status" >&5
17292   (exit $ac_status); }; }; then
17293   cf_cv_link_dataonly=yes
17294 else
17295   echo "$as_me: program exited with status $ac_status" >&5
17296 echo "$as_me: failed program was:" >&5
17297 cat conftest.$ac_ext >&5
17298 cf_cv_link_dataonly=no
17299 fi
17300 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17301 fi
17302         LIBS="$cf_saveLIBS"
17303
17304 fi
17305
17306 echo "$as_me:17306: result: $cf_cv_link_dataonly" >&5
17307 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17308
17309 if test "$cf_cv_link_dataonly" = no ; then
17310
17311 cat >>confdefs.h <<\EOF
17312 #define BROKEN_LINKER 1
17313 EOF
17314
17315         BROKEN_LINKER=1
17316 fi
17317
17318 ###     Checks for library functions.
17319
17320 for ac_func in \
17321 getcwd \
17322 getegid \
17323 geteuid \
17324 getopt \
17325 getttynam \
17326 issetugid \
17327 poll \
17328 putenv \
17329 remove \
17330 select \
17331 setbuf \
17332 setbuffer \
17333 setenv \
17334 setvbuf \
17335 sigaction \
17336 sigvec \
17337 strdup \
17338 strstr \
17339 tcgetpgrp \
17340 tdestroy \
17341 times \
17342 tsearch \
17343 vsnprintf \
17344
17345 do
17346 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17347 echo "$as_me:17347: checking for $ac_func" >&5
17348 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17349 if eval "test \"\${$as_ac_var+set}\" = set"; then
17350   echo $ECHO_N "(cached) $ECHO_C" >&6
17351 else
17352   cat >conftest.$ac_ext <<_ACEOF
17353 #line 17353 "configure"
17354 #include "confdefs.h"
17355 /* System header to define __stub macros and hopefully few prototypes,
17356     which can conflict with char $ac_func (); below.  */
17357 #include <assert.h>
17358 /* Override any gcc2 internal prototype to avoid an error.  */
17359 #ifdef __cplusplus
17360 extern "C"
17361 #endif
17362 /* We use char because int might match the return type of a gcc2
17363    builtin and then its argument prototype would still apply.  */
17364 char $ac_func ();
17365 char (*f) ();
17366
17367 int
17368 main (void)
17369 {
17370 /* The GNU C library defines this for functions which it implements
17371     to always fail with ENOSYS.  Some functions are actually named
17372     something starting with __ and the normal name is an alias.  */
17373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17374 choke me
17375 #else
17376 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17377 #endif
17378
17379   ;
17380   return 0;
17381 }
17382 _ACEOF
17383 rm -f conftest.$ac_objext conftest$ac_exeext
17384 if { (eval echo "$as_me:17384: \"$ac_link\"") >&5
17385   (eval $ac_link) 2>&5
17386   ac_status=$?
17387   echo "$as_me:17387: \$? = $ac_status" >&5
17388   (exit $ac_status); } &&
17389          { ac_try='test -s conftest$ac_exeext'
17390   { (eval echo "$as_me:17390: \"$ac_try\"") >&5
17391   (eval $ac_try) 2>&5
17392   ac_status=$?
17393   echo "$as_me:17393: \$? = $ac_status" >&5
17394   (exit $ac_status); }; }; then
17395   eval "$as_ac_var=yes"
17396 else
17397   echo "$as_me: failed program was:" >&5
17398 cat conftest.$ac_ext >&5
17399 eval "$as_ac_var=no"
17400 fi
17401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17402 fi
17403 echo "$as_me:17403: result: `eval echo '${'$as_ac_var'}'`" >&5
17404 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17405 if test `eval echo '${'$as_ac_var'}'` = yes; then
17406   cat >>confdefs.h <<EOF
17407 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17408 EOF
17409
17410 fi
17411 done
17412
17413 if test "x$ac_cv_func_getopt" = xno && \
17414    test "x$cf_with_progs$cf_with_tests" != xnono; then
17415         { { echo "$as_me:17415: error: getopt is required for building programs" >&5
17416 echo "$as_me: error: getopt is required for building programs" >&2;}
17417    { (exit 1); exit 1; }; }
17418 fi
17419
17420 if test "x$with_getcap" = "xyes" ; then
17421
17422 echo "$as_me:17422: checking for terminal-capability database functions" >&5
17423 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17424 if test "${cf_cv_cgetent+set}" = set; then
17425   echo $ECHO_N "(cached) $ECHO_C" >&6
17426 else
17427
17428 cat >conftest.$ac_ext <<_ACEOF
17429 #line 17429 "configure"
17430 #include "confdefs.h"
17431
17432 #include <stdlib.h>
17433 int
17434 main (void)
17435 {
17436
17437         char temp[128];
17438         char *buf = temp;
17439         char *db_array = temp;
17440         cgetent(&buf, &db_array, "vt100");
17441         cgetcap(buf, "tc", '=');
17442         cgetmatch(buf, "tc");
17443
17444   ;
17445   return 0;
17446 }
17447 _ACEOF
17448 rm -f conftest.$ac_objext conftest$ac_exeext
17449 if { (eval echo "$as_me:17449: \"$ac_link\"") >&5
17450   (eval $ac_link) 2>&5
17451   ac_status=$?
17452   echo "$as_me:17452: \$? = $ac_status" >&5
17453   (exit $ac_status); } &&
17454          { ac_try='test -s conftest$ac_exeext'
17455   { (eval echo "$as_me:17455: \"$ac_try\"") >&5
17456   (eval $ac_try) 2>&5
17457   ac_status=$?
17458   echo "$as_me:17458: \$? = $ac_status" >&5
17459   (exit $ac_status); }; }; then
17460   cf_cv_cgetent=yes
17461 else
17462   echo "$as_me: failed program was:" >&5
17463 cat conftest.$ac_ext >&5
17464 cf_cv_cgetent=no
17465 fi
17466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17467
17468 fi
17469 echo "$as_me:17469: result: $cf_cv_cgetent" >&5
17470 echo "${ECHO_T}$cf_cv_cgetent" >&6
17471
17472 if test "$cf_cv_cgetent" = yes
17473 then
17474
17475 cat >>confdefs.h <<\EOF
17476 #define HAVE_BSD_CGETENT 1
17477 EOF
17478
17479 echo "$as_me:17479: checking if cgetent uses const parameter" >&5
17480 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17481 if test "${cf_cv_cgetent_const+set}" = set; then
17482   echo $ECHO_N "(cached) $ECHO_C" >&6
17483 else
17484
17485 cat >conftest.$ac_ext <<_ACEOF
17486 #line 17486 "configure"
17487 #include "confdefs.h"
17488
17489 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17490 #include <stdlib.h>
17491 int
17492 main (void)
17493 {
17494
17495         char temp[128];
17496         char *buf = temp;
17497 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17498         const char *db_array = temp;
17499         cgetent(&buf, &db_array, "vt100");
17500 #endif
17501         cgetcap(buf, "tc", '=');
17502         cgetmatch(buf, "tc");
17503
17504   ;
17505   return 0;
17506 }
17507 _ACEOF
17508 rm -f conftest.$ac_objext conftest$ac_exeext
17509 if { (eval echo "$as_me:17509: \"$ac_link\"") >&5
17510   (eval $ac_link) 2>&5
17511   ac_status=$?
17512   echo "$as_me:17512: \$? = $ac_status" >&5
17513   (exit $ac_status); } &&
17514          { ac_try='test -s conftest$ac_exeext'
17515   { (eval echo "$as_me:17515: \"$ac_try\"") >&5
17516   (eval $ac_try) 2>&5
17517   ac_status=$?
17518   echo "$as_me:17518: \$? = $ac_status" >&5
17519   (exit $ac_status); }; }; then
17520   cf_cv_cgetent_const=yes
17521 else
17522   echo "$as_me: failed program was:" >&5
17523 cat conftest.$ac_ext >&5
17524 cf_cv_cgetent_const=no
17525 fi
17526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17527
17528 fi
17529 echo "$as_me:17529: result: $cf_cv_cgetent_const" >&5
17530 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17531         if test "$cf_cv_cgetent_const" = yes
17532         then
17533
17534 cat >>confdefs.h <<EOF
17535 #define CGETENT_CONST const
17536 EOF
17537
17538         fi
17539 fi
17540
17541 fi
17542
17543 echo "$as_me:17543: checking for isascii" >&5
17544 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17545 if test "${cf_cv_have_isascii+set}" = set; then
17546   echo $ECHO_N "(cached) $ECHO_C" >&6
17547 else
17548
17549         cat >conftest.$ac_ext <<_ACEOF
17550 #line 17550 "configure"
17551 #include "confdefs.h"
17552 #include <ctype.h>
17553 int
17554 main (void)
17555 {
17556 int x = isascii(' ')
17557   ;
17558   return 0;
17559 }
17560 _ACEOF
17561 rm -f conftest.$ac_objext conftest$ac_exeext
17562 if { (eval echo "$as_me:17562: \"$ac_link\"") >&5
17563   (eval $ac_link) 2>&5
17564   ac_status=$?
17565   echo "$as_me:17565: \$? = $ac_status" >&5
17566   (exit $ac_status); } &&
17567          { ac_try='test -s conftest$ac_exeext'
17568   { (eval echo "$as_me:17568: \"$ac_try\"") >&5
17569   (eval $ac_try) 2>&5
17570   ac_status=$?
17571   echo "$as_me:17571: \$? = $ac_status" >&5
17572   (exit $ac_status); }; }; then
17573   cf_cv_have_isascii=yes
17574 else
17575   echo "$as_me: failed program was:" >&5
17576 cat conftest.$ac_ext >&5
17577 cf_cv_have_isascii=no
17578 fi
17579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17580
17581 fi
17582 echo "$as_me:17582: result: $cf_cv_have_isascii" >&5
17583 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17584 test "$cf_cv_have_isascii" = yes &&
17585 cat >>confdefs.h <<\EOF
17586 #define HAVE_ISASCII 1
17587 EOF
17588
17589 if test "$ac_cv_func_sigaction" = yes; then
17590 echo "$as_me:17590: checking whether sigaction needs _POSIX_SOURCE" >&5
17591 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17592 cat >conftest.$ac_ext <<_ACEOF
17593 #line 17593 "configure"
17594 #include "confdefs.h"
17595
17596 #include <sys/types.h>
17597 #include <signal.h>
17598 int
17599 main (void)
17600 {
17601 struct sigaction act
17602   ;
17603   return 0;
17604 }
17605 _ACEOF
17606 rm -f conftest.$ac_objext
17607 if { (eval echo "$as_me:17607: \"$ac_compile\"") >&5
17608   (eval $ac_compile) 2>&5
17609   ac_status=$?
17610   echo "$as_me:17610: \$? = $ac_status" >&5
17611   (exit $ac_status); } &&
17612          { ac_try='test -s conftest.$ac_objext'
17613   { (eval echo "$as_me:17613: \"$ac_try\"") >&5
17614   (eval $ac_try) 2>&5
17615   ac_status=$?
17616   echo "$as_me:17616: \$? = $ac_status" >&5
17617   (exit $ac_status); }; }; then
17618   sigact_bad=no
17619 else
17620   echo "$as_me: failed program was:" >&5
17621 cat conftest.$ac_ext >&5
17622
17623 cat >conftest.$ac_ext <<_ACEOF
17624 #line 17624 "configure"
17625 #include "confdefs.h"
17626
17627 #define _POSIX_SOURCE
17628 #include <sys/types.h>
17629 #include <signal.h>
17630 int
17631 main (void)
17632 {
17633 struct sigaction act
17634   ;
17635   return 0;
17636 }
17637 _ACEOF
17638 rm -f conftest.$ac_objext
17639 if { (eval echo "$as_me:17639: \"$ac_compile\"") >&5
17640   (eval $ac_compile) 2>&5
17641   ac_status=$?
17642   echo "$as_me:17642: \$? = $ac_status" >&5
17643   (exit $ac_status); } &&
17644          { ac_try='test -s conftest.$ac_objext'
17645   { (eval echo "$as_me:17645: \"$ac_try\"") >&5
17646   (eval $ac_try) 2>&5
17647   ac_status=$?
17648   echo "$as_me:17648: \$? = $ac_status" >&5
17649   (exit $ac_status); }; }; then
17650   sigact_bad=yes
17651
17652 cat >>confdefs.h <<\EOF
17653 #define _POSIX_SOURCE 1
17654 EOF
17655
17656 else
17657   echo "$as_me: failed program was:" >&5
17658 cat conftest.$ac_ext >&5
17659 sigact_bad=unknown
17660 fi
17661 rm -f conftest.$ac_objext conftest.$ac_ext
17662 fi
17663 rm -f conftest.$ac_objext conftest.$ac_ext
17664 echo "$as_me:17664: result: $sigact_bad" >&5
17665 echo "${ECHO_T}$sigact_bad" >&6
17666 fi
17667
17668 echo "$as_me:17668: checking if nanosleep really works" >&5
17669 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17670 if test "${cf_cv_func_nanosleep+set}" = set; then
17671   echo $ECHO_N "(cached) $ECHO_C" >&6
17672 else
17673
17674 if test "$cross_compiling" = yes; then
17675   cf_cv_func_nanosleep=unknown
17676 else
17677   cat >conftest.$ac_ext <<_ACEOF
17678 #line 17678 "configure"
17679 #include "confdefs.h"
17680
17681 #include <stdio.h>
17682 #include <errno.h>
17683 #include <time.h>
17684
17685 #ifdef HAVE_SYS_TIME_H
17686 #include <sys/time.h>
17687 #endif
17688
17689 int main(void) {
17690         struct timespec ts1, ts2;
17691         int code;
17692         ts1.tv_sec  = 0;
17693         ts1.tv_nsec = 750000000;
17694         ts2.tv_sec  = 0;
17695         ts2.tv_nsec = 0;
17696         errno = 0;
17697         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17698         ${cf_cv_main_return:-return}(code != 0);
17699 }
17700
17701 _ACEOF
17702 rm -f conftest$ac_exeext
17703 if { (eval echo "$as_me:17703: \"$ac_link\"") >&5
17704   (eval $ac_link) 2>&5
17705   ac_status=$?
17706   echo "$as_me:17706: \$? = $ac_status" >&5
17707   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17708   { (eval echo "$as_me:17708: \"$ac_try\"") >&5
17709   (eval $ac_try) 2>&5
17710   ac_status=$?
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit $ac_status); }; }; then
17713   cf_cv_func_nanosleep=yes
17714 else
17715   echo "$as_me: program exited with status $ac_status" >&5
17716 echo "$as_me: failed program was:" >&5
17717 cat conftest.$ac_ext >&5
17718 cf_cv_func_nanosleep=no
17719 fi
17720 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17721 fi
17722 fi
17723 echo "$as_me:17723: result: $cf_cv_func_nanosleep" >&5
17724 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17725
17726 test "$cf_cv_func_nanosleep" = "yes" &&
17727 cat >>confdefs.h <<\EOF
17728 #define HAVE_NANOSLEEP 1
17729 EOF
17730
17731 for ac_header in \
17732 termio.h \
17733 termios.h \
17734 unistd.h \
17735
17736 do
17737 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17738 echo "$as_me:17738: checking for $ac_header" >&5
17739 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17740 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17741   echo $ECHO_N "(cached) $ECHO_C" >&6
17742 else
17743   cat >conftest.$ac_ext <<_ACEOF
17744 #line 17744 "configure"
17745 #include "confdefs.h"
17746 #include <$ac_header>
17747 _ACEOF
17748 if { (eval echo "$as_me:17748: \"$ac_cpp conftest.$ac_ext\"") >&5
17749   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17750   ac_status=$?
17751   egrep -v '^ *\+' conftest.er1 >conftest.err
17752   rm -f conftest.er1
17753   cat conftest.err >&5
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); } >/dev/null; then
17756   if test -s conftest.err; then
17757     ac_cpp_err=$ac_c_preproc_warn_flag
17758   else
17759     ac_cpp_err=
17760   fi
17761 else
17762   ac_cpp_err=yes
17763 fi
17764 if test -z "$ac_cpp_err"; then
17765   eval "$as_ac_Header=yes"
17766 else
17767   echo "$as_me: failed program was:" >&5
17768   cat conftest.$ac_ext >&5
17769   eval "$as_ac_Header=no"
17770 fi
17771 rm -f conftest.err conftest.$ac_ext
17772 fi
17773 echo "$as_me:17773: result: `eval echo '${'$as_ac_Header'}'`" >&5
17774 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17775 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17776   cat >>confdefs.h <<EOF
17777 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17778 EOF
17779
17780 fi
17781 done
17782
17783 if test "$ISC" = yes ; then
17784
17785 for ac_header in sys/termio.h
17786 do
17787 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17788 echo "$as_me:17788: checking for $ac_header" >&5
17789 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17791   echo $ECHO_N "(cached) $ECHO_C" >&6
17792 else
17793   cat >conftest.$ac_ext <<_ACEOF
17794 #line 17794 "configure"
17795 #include "confdefs.h"
17796 #include <$ac_header>
17797 _ACEOF
17798 if { (eval echo "$as_me:17798: \"$ac_cpp conftest.$ac_ext\"") >&5
17799   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17800   ac_status=$?
17801   egrep -v '^ *\+' conftest.er1 >conftest.err
17802   rm -f conftest.er1
17803   cat conftest.err >&5
17804   echo "$as_me:17804: \$? = $ac_status" >&5
17805   (exit $ac_status); } >/dev/null; then
17806   if test -s conftest.err; then
17807     ac_cpp_err=$ac_c_preproc_warn_flag
17808   else
17809     ac_cpp_err=
17810   fi
17811 else
17812   ac_cpp_err=yes
17813 fi
17814 if test -z "$ac_cpp_err"; then
17815   eval "$as_ac_Header=yes"
17816 else
17817   echo "$as_me: failed program was:" >&5
17818   cat conftest.$ac_ext >&5
17819   eval "$as_ac_Header=no"
17820 fi
17821 rm -f conftest.err conftest.$ac_ext
17822 fi
17823 echo "$as_me:17823: result: `eval echo '${'$as_ac_Header'}'`" >&5
17824 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17825 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17826   cat >>confdefs.h <<EOF
17827 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17828 EOF
17829
17830 fi
17831 done
17832
17833 fi
17834 if test "$ac_cv_header_termios_h" = yes ; then
17835         case "$CFLAGS $CPPFLAGS" in
17836         (*-D_POSIX_SOURCE*)
17837                 termios_bad=dunno ;;
17838         (*)     termios_bad=maybe ;;
17839         esac
17840         if test "$termios_bad" = maybe ; then
17841         echo "$as_me:17841: checking whether termios.h needs _POSIX_SOURCE" >&5
17842 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17843         cat >conftest.$ac_ext <<_ACEOF
17844 #line 17844 "configure"
17845 #include "confdefs.h"
17846 #include <termios.h>
17847 int
17848 main (void)
17849 {
17850 struct termios foo; int x = foo.c_iflag
17851   ;
17852   return 0;
17853 }
17854 _ACEOF
17855 rm -f conftest.$ac_objext
17856 if { (eval echo "$as_me:17856: \"$ac_compile\"") >&5
17857   (eval $ac_compile) 2>&5
17858   ac_status=$?
17859   echo "$as_me:17859: \$? = $ac_status" >&5
17860   (exit $ac_status); } &&
17861          { ac_try='test -s conftest.$ac_objext'
17862   { (eval echo "$as_me:17862: \"$ac_try\"") >&5
17863   (eval $ac_try) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit $ac_status); }; }; then
17867   termios_bad=no
17868 else
17869   echo "$as_me: failed program was:" >&5
17870 cat conftest.$ac_ext >&5
17871
17872                 cat >conftest.$ac_ext <<_ACEOF
17873 #line 17873 "configure"
17874 #include "confdefs.h"
17875
17876 #define _POSIX_SOURCE
17877 #include <termios.h>
17878 int
17879 main (void)
17880 {
17881 struct termios foo; int x = foo.c_iflag
17882   ;
17883   return 0;
17884 }
17885 _ACEOF
17886 rm -f conftest.$ac_objext
17887 if { (eval echo "$as_me:17887: \"$ac_compile\"") >&5
17888   (eval $ac_compile) 2>&5
17889   ac_status=$?
17890   echo "$as_me:17890: \$? = $ac_status" >&5
17891   (exit $ac_status); } &&
17892          { ac_try='test -s conftest.$ac_objext'
17893   { (eval echo "$as_me:17893: \"$ac_try\"") >&5
17894   (eval $ac_try) 2>&5
17895   ac_status=$?
17896   echo "$as_me:17896: \$? = $ac_status" >&5
17897   (exit $ac_status); }; }; then
17898   termios_bad=unknown
17899 else
17900   echo "$as_me: failed program was:" >&5
17901 cat conftest.$ac_ext >&5
17902 termios_bad=yes
17903 cat >>confdefs.h <<\EOF
17904 #define _POSIX_SOURCE 1
17905 EOF
17906
17907 fi
17908 rm -f conftest.$ac_objext conftest.$ac_ext
17909
17910 fi
17911 rm -f conftest.$ac_objext conftest.$ac_ext
17912         echo "$as_me:17912: result: $termios_bad" >&5
17913 echo "${ECHO_T}$termios_bad" >&6
17914         fi
17915 fi
17916
17917 echo "$as_me:17917: checking for tcgetattr" >&5
17918 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17919 if test "${cf_cv_have_tcgetattr+set}" = set; then
17920   echo $ECHO_N "(cached) $ECHO_C" >&6
17921 else
17922
17923 cat >conftest.$ac_ext <<_ACEOF
17924 #line 17924 "configure"
17925 #include "confdefs.h"
17926
17927 #include <sys/types.h>
17928 #ifdef HAVE_UNISTD_H
17929 #include <unistd.h>
17930 #endif
17931 #ifdef HAVE_TERMIOS_H
17932 #include <termios.h>
17933 #define TTY struct termios
17934 #else
17935 #ifdef HAVE_TERMIO_H
17936 #include <termio.h>
17937 #define TTY struct termio
17938 #endif
17939 #endif
17940
17941 int
17942 main (void)
17943 {
17944
17945 TTY foo;
17946 tcgetattr(1, &foo);
17947   ;
17948   return 0;
17949 }
17950 _ACEOF
17951 rm -f conftest.$ac_objext conftest$ac_exeext
17952 if { (eval echo "$as_me:17952: \"$ac_link\"") >&5
17953   (eval $ac_link) 2>&5
17954   ac_status=$?
17955   echo "$as_me:17955: \$? = $ac_status" >&5
17956   (exit $ac_status); } &&
17957          { ac_try='test -s conftest$ac_exeext'
17958   { (eval echo "$as_me:17958: \"$ac_try\"") >&5
17959   (eval $ac_try) 2>&5
17960   ac_status=$?
17961   echo "$as_me:17961: \$? = $ac_status" >&5
17962   (exit $ac_status); }; }; then
17963   cf_cv_have_tcgetattr=yes
17964 else
17965   echo "$as_me: failed program was:" >&5
17966 cat conftest.$ac_ext >&5
17967 cf_cv_have_tcgetattr=no
17968 fi
17969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17970 fi
17971 echo "$as_me:17971: result: $cf_cv_have_tcgetattr" >&5
17972 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17973 test "$cf_cv_have_tcgetattr" = yes &&
17974 cat >>confdefs.h <<\EOF
17975 #define HAVE_TCGETATTR 1
17976 EOF
17977
17978 echo "$as_me:17978: checking for vsscanf function or workaround" >&5
17979 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17980 if test "${cf_cv_func_vsscanf+set}" = set; then
17981   echo $ECHO_N "(cached) $ECHO_C" >&6
17982 else
17983
17984 cat >conftest.$ac_ext <<_ACEOF
17985 #line 17985 "configure"
17986 #include "confdefs.h"
17987
17988 #include <stdarg.h>
17989 #include <stdio.h>
17990 int
17991 main (void)
17992 {
17993
17994         va_list ap;
17995         vsscanf("from", "%d", ap)
17996   ;
17997   return 0;
17998 }
17999 _ACEOF
18000 rm -f conftest.$ac_objext conftest$ac_exeext
18001 if { (eval echo "$as_me:18001: \"$ac_link\"") >&5
18002   (eval $ac_link) 2>&5
18003   ac_status=$?
18004   echo "$as_me:18004: \$? = $ac_status" >&5
18005   (exit $ac_status); } &&
18006          { ac_try='test -s conftest$ac_exeext'
18007   { (eval echo "$as_me:18007: \"$ac_try\"") >&5
18008   (eval $ac_try) 2>&5
18009   ac_status=$?
18010   echo "$as_me:18010: \$? = $ac_status" >&5
18011   (exit $ac_status); }; }; then
18012   cf_cv_func_vsscanf=vsscanf
18013 else
18014   echo "$as_me: failed program was:" >&5
18015 cat conftest.$ac_ext >&5
18016
18017 cat >conftest.$ac_ext <<_ACEOF
18018 #line 18018 "configure"
18019 #include "confdefs.h"
18020
18021 #include <stdarg.h>
18022 #include <stdio.h>
18023 int
18024 main (void)
18025 {
18026
18027         FILE strbuf;
18028         char *str = "from";
18029
18030         strbuf._flag = _IOREAD;
18031         strbuf._ptr = strbuf._base = (unsigned char *) str;
18032         strbuf._cnt = strlen(str);
18033         strbuf._file = _NFILE;
18034         return (vfscanf(&strbuf, "%d", ap))
18035   ;
18036   return 0;
18037 }
18038 _ACEOF
18039 rm -f conftest.$ac_objext conftest$ac_exeext
18040 if { (eval echo "$as_me:18040: \"$ac_link\"") >&5
18041   (eval $ac_link) 2>&5
18042   ac_status=$?
18043   echo "$as_me:18043: \$? = $ac_status" >&5
18044   (exit $ac_status); } &&
18045          { ac_try='test -s conftest$ac_exeext'
18046   { (eval echo "$as_me:18046: \"$ac_try\"") >&5
18047   (eval $ac_try) 2>&5
18048   ac_status=$?
18049   echo "$as_me:18049: \$? = $ac_status" >&5
18050   (exit $ac_status); }; }; then
18051   cf_cv_func_vsscanf=vfscanf
18052 else
18053   echo "$as_me: failed program was:" >&5
18054 cat conftest.$ac_ext >&5
18055
18056 cat >conftest.$ac_ext <<_ACEOF
18057 #line 18057 "configure"
18058 #include "confdefs.h"
18059
18060 #include <stdarg.h>
18061 #include <stdio.h>
18062 int
18063 main (void)
18064 {
18065
18066         FILE strbuf;
18067         char *str = "from";
18068
18069         strbuf._flag = _IOREAD;
18070         strbuf._ptr = strbuf._base = (unsigned char *) str;
18071         strbuf._cnt = strlen(str);
18072         strbuf._file = _NFILE;
18073         return (_doscan(&strbuf, "%d", ap))
18074   ;
18075   return 0;
18076 }
18077 _ACEOF
18078 rm -f conftest.$ac_objext conftest$ac_exeext
18079 if { (eval echo "$as_me:18079: \"$ac_link\"") >&5
18080   (eval $ac_link) 2>&5
18081   ac_status=$?
18082   echo "$as_me:18082: \$? = $ac_status" >&5
18083   (exit $ac_status); } &&
18084          { ac_try='test -s conftest$ac_exeext'
18085   { (eval echo "$as_me:18085: \"$ac_try\"") >&5
18086   (eval $ac_try) 2>&5
18087   ac_status=$?
18088   echo "$as_me:18088: \$? = $ac_status" >&5
18089   (exit $ac_status); }; }; then
18090   cf_cv_func_vsscanf=_doscan
18091 else
18092   echo "$as_me: failed program was:" >&5
18093 cat conftest.$ac_ext >&5
18094
18095 cf_cv_func_vsscanf=no
18096 fi
18097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18098 fi
18099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18100 fi
18101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18102 fi
18103 echo "$as_me:18103: result: $cf_cv_func_vsscanf" >&5
18104 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18105
18106 case $cf_cv_func_vsscanf in
18107 (vsscanf)
18108 cat >>confdefs.h <<\EOF
18109 #define HAVE_VSSCANF 1
18110 EOF
18111 ;;
18112 (vfscanf)
18113 cat >>confdefs.h <<\EOF
18114 #define HAVE_VFSCANF 1
18115 EOF
18116 ;;
18117 (_doscan)
18118 cat >>confdefs.h <<\EOF
18119 #define HAVE__DOSCAN 1
18120 EOF
18121 ;;
18122 esac
18123
18124 for ac_header in \
18125 unistd.h \
18126
18127 do
18128 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18129 echo "$as_me:18129: checking for $ac_header" >&5
18130 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18131 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18132   echo $ECHO_N "(cached) $ECHO_C" >&6
18133 else
18134   cat >conftest.$ac_ext <<_ACEOF
18135 #line 18135 "configure"
18136 #include "confdefs.h"
18137 #include <$ac_header>
18138 _ACEOF
18139 if { (eval echo "$as_me:18139: \"$ac_cpp conftest.$ac_ext\"") >&5
18140   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18141   ac_status=$?
18142   egrep -v '^ *\+' conftest.er1 >conftest.err
18143   rm -f conftest.er1
18144   cat conftest.err >&5
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); } >/dev/null; then
18147   if test -s conftest.err; then
18148     ac_cpp_err=$ac_c_preproc_warn_flag
18149   else
18150     ac_cpp_err=
18151   fi
18152 else
18153   ac_cpp_err=yes
18154 fi
18155 if test -z "$ac_cpp_err"; then
18156   eval "$as_ac_Header=yes"
18157 else
18158   echo "$as_me: failed program was:" >&5
18159   cat conftest.$ac_ext >&5
18160   eval "$as_ac_Header=no"
18161 fi
18162 rm -f conftest.err conftest.$ac_ext
18163 fi
18164 echo "$as_me:18164: result: `eval echo '${'$as_ac_Header'}'`" >&5
18165 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18166 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18167   cat >>confdefs.h <<EOF
18168 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18169 EOF
18170
18171 fi
18172 done
18173
18174 echo "$as_me:18174: checking for working mkstemp" >&5
18175 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18176 if test "${cf_cv_func_mkstemp+set}" = set; then
18177   echo $ECHO_N "(cached) $ECHO_C" >&6
18178 else
18179
18180 rm -rf conftest*
18181 if test "$cross_compiling" = yes; then
18182   cf_cv_func_mkstemp=maybe
18183 else
18184   cat >conftest.$ac_ext <<_ACEOF
18185 #line 18185 "configure"
18186 #include "confdefs.h"
18187
18188 #include <sys/types.h>
18189 #ifdef HAVE_UNISTD_H
18190 #include <unistd.h>
18191 #endif
18192 #include <stdlib.h>
18193 #include <stdio.h>
18194 #include <string.h>
18195 #include <sys/stat.h>
18196 int main(void)
18197 {
18198         char *tmpl = "conftestXXXXXX";
18199         char name[2][80];
18200         int n;
18201         int result = 0;
18202         int fd;
18203         struct stat sb;
18204
18205         umask(077);
18206         for (n = 0; n < 2; ++n) {
18207                 strcpy(name[n], tmpl);
18208                 if ((fd = mkstemp(name[n])) >= 0) {
18209                         if (!strcmp(name[n], tmpl)
18210                          || stat(name[n], &sb) != 0
18211                          || (sb.st_mode & S_IFMT) != S_IFREG
18212                          || (sb.st_mode & 077) != 0) {
18213                                 result = 1;
18214                         }
18215                         close(fd);
18216                 }
18217         }
18218         if (result == 0
18219          && !strcmp(name[0], name[1]))
18220                 result = 1;
18221         ${cf_cv_main_return:-return}(result);
18222 }
18223
18224 _ACEOF
18225 rm -f conftest$ac_exeext
18226 if { (eval echo "$as_me:18226: \"$ac_link\"") >&5
18227   (eval $ac_link) 2>&5
18228   ac_status=$?
18229   echo "$as_me:18229: \$? = $ac_status" >&5
18230   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18231   { (eval echo "$as_me:18231: \"$ac_try\"") >&5
18232   (eval $ac_try) 2>&5
18233   ac_status=$?
18234   echo "$as_me:18234: \$? = $ac_status" >&5
18235   (exit $ac_status); }; }; then
18236   cf_cv_func_mkstemp=yes
18237
18238 else
18239   echo "$as_me: program exited with status $ac_status" >&5
18240 echo "$as_me: failed program was:" >&5
18241 cat conftest.$ac_ext >&5
18242 cf_cv_func_mkstemp=no
18243
18244 fi
18245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18246 fi
18247
18248 fi
18249 echo "$as_me:18249: result: $cf_cv_func_mkstemp" >&5
18250 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18251 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18252         echo "$as_me:18252: checking for mkstemp" >&5
18253 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18254 if test "${ac_cv_func_mkstemp+set}" = set; then
18255   echo $ECHO_N "(cached) $ECHO_C" >&6
18256 else
18257   cat >conftest.$ac_ext <<_ACEOF
18258 #line 18258 "configure"
18259 #include "confdefs.h"
18260 /* System header to define __stub macros and hopefully few prototypes,
18261     which can conflict with char mkstemp (); below.  */
18262 #include <assert.h>
18263 /* Override any gcc2 internal prototype to avoid an error.  */
18264 #ifdef __cplusplus
18265 extern "C"
18266 #endif
18267 /* We use char because int might match the return type of a gcc2
18268    builtin and then its argument prototype would still apply.  */
18269 char mkstemp ();
18270 char (*f) ();
18271
18272 int
18273 main (void)
18274 {
18275 /* The GNU C library defines this for functions which it implements
18276     to always fail with ENOSYS.  Some functions are actually named
18277     something starting with __ and the normal name is an alias.  */
18278 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18279 choke me
18280 #else
18281 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18282 #endif
18283
18284   ;
18285   return 0;
18286 }
18287 _ACEOF
18288 rm -f conftest.$ac_objext conftest$ac_exeext
18289 if { (eval echo "$as_me:18289: \"$ac_link\"") >&5
18290   (eval $ac_link) 2>&5
18291   ac_status=$?
18292   echo "$as_me:18292: \$? = $ac_status" >&5
18293   (exit $ac_status); } &&
18294          { ac_try='test -s conftest$ac_exeext'
18295   { (eval echo "$as_me:18295: \"$ac_try\"") >&5
18296   (eval $ac_try) 2>&5
18297   ac_status=$?
18298   echo "$as_me:18298: \$? = $ac_status" >&5
18299   (exit $ac_status); }; }; then
18300   ac_cv_func_mkstemp=yes
18301 else
18302   echo "$as_me: failed program was:" >&5
18303 cat conftest.$ac_ext >&5
18304 ac_cv_func_mkstemp=no
18305 fi
18306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18307 fi
18308 echo "$as_me:18308: result: $ac_cv_func_mkstemp" >&5
18309 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18310
18311 fi
18312 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18313
18314 cat >>confdefs.h <<\EOF
18315 #define HAVE_MKSTEMP 1
18316 EOF
18317
18318 fi
18319
18320 # setup for prototype of fallback for vsscanf()
18321
18322 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18323         HAVE_VSSCANF=1
18324 else
18325         HAVE_VSSCANF=0
18326 fi
18327
18328 if test "x$cross_compiling" = xyes ; then
18329         { echo "$as_me:18329: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18330 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18331 else
18332         echo "$as_me:18332: checking whether setvbuf arguments are reversed" >&5
18333 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18334 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18335   echo $ECHO_N "(cached) $ECHO_C" >&6
18336 else
18337   if test "$cross_compiling" = yes; then
18338   { { echo "$as_me:18338: error: cannot run test program while cross compiling" >&5
18339 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18340    { (exit 1); exit 1; }; }
18341 else
18342   cat >conftest.$ac_ext <<_ACEOF
18343 #line 18343 "configure"
18344 #include "confdefs.h"
18345 #include <stdio.h>
18346 /* If setvbuf has the reversed format, exit 0. */
18347 int
18348 main (void)
18349 {
18350   /* This call has the arguments reversed.
18351      A reversed system may check and see that the address of main
18352      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18353   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18354     $ac_main_return(1);
18355   putc('\r', stdout);
18356   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18357 }
18358 _ACEOF
18359 rm -f conftest$ac_exeext
18360 if { (eval echo "$as_me:18360: \"$ac_link\"") >&5
18361   (eval $ac_link) 2>&5
18362   ac_status=$?
18363   echo "$as_me:18363: \$? = $ac_status" >&5
18364   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18365   { (eval echo "$as_me:18365: \"$ac_try\"") >&5
18366   (eval $ac_try) 2>&5
18367   ac_status=$?
18368   echo "$as_me:18368: \$? = $ac_status" >&5
18369   (exit $ac_status); }; }; then
18370   ac_cv_func_setvbuf_reversed=yes
18371 else
18372   echo "$as_me: program exited with status $ac_status" >&5
18373 echo "$as_me: failed program was:" >&5
18374 cat conftest.$ac_ext >&5
18375 ac_cv_func_setvbuf_reversed=no
18376 fi
18377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18378 fi
18379 rm -f core core.* *.core
18380 fi
18381 echo "$as_me:18381: result: $ac_cv_func_setvbuf_reversed" >&5
18382 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18383 if test $ac_cv_func_setvbuf_reversed = yes; then
18384
18385 cat >>confdefs.h <<\EOF
18386 #define SETVBUF_REVERSED 1
18387 EOF
18388
18389 fi
18390
18391 fi
18392 echo "$as_me:18392: checking for intptr_t" >&5
18393 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18394 if test "${ac_cv_type_intptr_t+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 $ac_includes_default
18401 int
18402 main (void)
18403 {
18404 if ((intptr_t *) 0)
18405   return 0;
18406 if (sizeof (intptr_t))
18407   return 0;
18408   ;
18409   return 0;
18410 }
18411 _ACEOF
18412 rm -f conftest.$ac_objext
18413 if { (eval echo "$as_me:18413: \"$ac_compile\"") >&5
18414   (eval $ac_compile) 2>&5
18415   ac_status=$?
18416   echo "$as_me:18416: \$? = $ac_status" >&5
18417   (exit $ac_status); } &&
18418          { ac_try='test -s conftest.$ac_objext'
18419   { (eval echo "$as_me:18419: \"$ac_try\"") >&5
18420   (eval $ac_try) 2>&5
18421   ac_status=$?
18422   echo "$as_me:18422: \$? = $ac_status" >&5
18423   (exit $ac_status); }; }; then
18424   ac_cv_type_intptr_t=yes
18425 else
18426   echo "$as_me: failed program was:" >&5
18427 cat conftest.$ac_ext >&5
18428 ac_cv_type_intptr_t=no
18429 fi
18430 rm -f conftest.$ac_objext conftest.$ac_ext
18431 fi
18432 echo "$as_me:18432: result: $ac_cv_type_intptr_t" >&5
18433 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18434 if test $ac_cv_type_intptr_t = yes; then
18435   :
18436 else
18437
18438 cat >>confdefs.h <<EOF
18439 #define intptr_t long
18440 EOF
18441
18442 fi
18443
18444 echo "$as_me:18444: checking for ssize_t" >&5
18445 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18446 if test "${ac_cv_type_ssize_t+set}" = set; then
18447   echo $ECHO_N "(cached) $ECHO_C" >&6
18448 else
18449   cat >conftest.$ac_ext <<_ACEOF
18450 #line 18450 "configure"
18451 #include "confdefs.h"
18452 $ac_includes_default
18453 int
18454 main (void)
18455 {
18456 if ((ssize_t *) 0)
18457   return 0;
18458 if (sizeof (ssize_t))
18459   return 0;
18460   ;
18461   return 0;
18462 }
18463 _ACEOF
18464 rm -f conftest.$ac_objext
18465 if { (eval echo "$as_me:18465: \"$ac_compile\"") >&5
18466   (eval $ac_compile) 2>&5
18467   ac_status=$?
18468   echo "$as_me:18468: \$? = $ac_status" >&5
18469   (exit $ac_status); } &&
18470          { ac_try='test -s conftest.$ac_objext'
18471   { (eval echo "$as_me:18471: \"$ac_try\"") >&5
18472   (eval $ac_try) 2>&5
18473   ac_status=$?
18474   echo "$as_me:18474: \$? = $ac_status" >&5
18475   (exit $ac_status); }; }; then
18476   ac_cv_type_ssize_t=yes
18477 else
18478   echo "$as_me: failed program was:" >&5
18479 cat conftest.$ac_ext >&5
18480 ac_cv_type_ssize_t=no
18481 fi
18482 rm -f conftest.$ac_objext conftest.$ac_ext
18483 fi
18484 echo "$as_me:18484: result: $ac_cv_type_ssize_t" >&5
18485 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18486 if test $ac_cv_type_ssize_t = yes; then
18487   :
18488 else
18489
18490 cat >>confdefs.h <<EOF
18491 #define ssize_t int
18492 EOF
18493
18494 fi
18495
18496 echo "$as_me:18496: checking for type sigaction_t" >&5
18497 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18498 if test "${cf_cv_type_sigaction+set}" = set; then
18499   echo $ECHO_N "(cached) $ECHO_C" >&6
18500 else
18501
18502         cat >conftest.$ac_ext <<_ACEOF
18503 #line 18503 "configure"
18504 #include "confdefs.h"
18505
18506 #include <signal.h>
18507 int
18508 main (void)
18509 {
18510 sigaction_t x
18511   ;
18512   return 0;
18513 }
18514 _ACEOF
18515 rm -f conftest.$ac_objext
18516 if { (eval echo "$as_me:18516: \"$ac_compile\"") >&5
18517   (eval $ac_compile) 2>&5
18518   ac_status=$?
18519   echo "$as_me:18519: \$? = $ac_status" >&5
18520   (exit $ac_status); } &&
18521          { ac_try='test -s conftest.$ac_objext'
18522   { (eval echo "$as_me:18522: \"$ac_try\"") >&5
18523   (eval $ac_try) 2>&5
18524   ac_status=$?
18525   echo "$as_me:18525: \$? = $ac_status" >&5
18526   (exit $ac_status); }; }; then
18527   cf_cv_type_sigaction=yes
18528 else
18529   echo "$as_me: failed program was:" >&5
18530 cat conftest.$ac_ext >&5
18531 cf_cv_type_sigaction=no
18532 fi
18533 rm -f conftest.$ac_objext conftest.$ac_ext
18534 fi
18535
18536 echo "$as_me:18536: result: $cf_cv_type_sigaction" >&5
18537 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18538 test "$cf_cv_type_sigaction" = yes &&
18539 cat >>confdefs.h <<\EOF
18540 #define HAVE_TYPE_SIGACTION 1
18541 EOF
18542
18543 echo "$as_me:18543: checking declaration of size-change" >&5
18544 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18545 if test "${cf_cv_sizechange+set}" = set; then
18546   echo $ECHO_N "(cached) $ECHO_C" >&6
18547 else
18548
18549         cf_cv_sizechange=unknown
18550         cf_save_CPPFLAGS="$CPPFLAGS"
18551
18552 for cf_opts in "" "NEED_PTEM_H"
18553 do
18554
18555         CPPFLAGS="$cf_save_CPPFLAGS"
18556         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18557         cat >conftest.$ac_ext <<_ACEOF
18558 #line 18558 "configure"
18559 #include "confdefs.h"
18560 #include <sys/types.h>
18561 #ifdef HAVE_TERMIOS_H
18562 #include <termios.h>
18563 #else
18564 #ifdef HAVE_TERMIO_H
18565 #include <termio.h>
18566 #endif
18567 #endif
18568 #ifdef NEED_PTEM_H
18569 /* This is a workaround for SCO:  they neglected to define struct winsize in
18570  * termios.h -- it's only in termio.h and ptem.h
18571  */
18572 #include        <sys/stream.h>
18573 #include        <sys/ptem.h>
18574 #endif
18575 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18576 #include <sys/ioctl.h>
18577 #endif
18578
18579 int
18580 main (void)
18581 {
18582
18583 #ifdef TIOCGSIZE
18584         struct ttysize win;     /* FIXME: what system is this? */
18585         int y = win.ts_lines;
18586         int x = win.ts_cols;
18587 #else
18588 #ifdef TIOCGWINSZ
18589         struct winsize win;
18590         int y = win.ws_row;
18591         int x = win.ws_col;
18592 #else
18593         no TIOCGSIZE or TIOCGWINSZ
18594 #endif /* TIOCGWINSZ */
18595 #endif /* TIOCGSIZE */
18596
18597   ;
18598   return 0;
18599 }
18600 _ACEOF
18601 rm -f conftest.$ac_objext
18602 if { (eval echo "$as_me:18602: \"$ac_compile\"") >&5
18603   (eval $ac_compile) 2>&5
18604   ac_status=$?
18605   echo "$as_me:18605: \$? = $ac_status" >&5
18606   (exit $ac_status); } &&
18607          { ac_try='test -s conftest.$ac_objext'
18608   { (eval echo "$as_me:18608: \"$ac_try\"") >&5
18609   (eval $ac_try) 2>&5
18610   ac_status=$?
18611   echo "$as_me:18611: \$? = $ac_status" >&5
18612   (exit $ac_status); }; }; then
18613   cf_cv_sizechange=yes
18614 else
18615   echo "$as_me: failed program was:" >&5
18616 cat conftest.$ac_ext >&5
18617 cf_cv_sizechange=no
18618 fi
18619 rm -f conftest.$ac_objext conftest.$ac_ext
18620
18621         CPPFLAGS="$cf_save_CPPFLAGS"
18622         if test "$cf_cv_sizechange" = yes ; then
18623                 echo "size-change succeeded ($cf_opts)" >&5
18624                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18625                 break
18626         fi
18627 done
18628
18629 fi
18630 echo "$as_me:18630: result: $cf_cv_sizechange" >&5
18631 echo "${ECHO_T}$cf_cv_sizechange" >&6
18632 if test "$cf_cv_sizechange" != no ; then
18633
18634 cat >>confdefs.h <<\EOF
18635 #define HAVE_SIZECHANGE 1
18636 EOF
18637
18638         case $cf_cv_sizechange in
18639         (NEED*)
18640                 cat >>confdefs.h <<EOF
18641 #define $cf_cv_sizechange  1
18642 EOF
18643
18644                 ;;
18645         esac
18646 fi
18647
18648 echo "$as_me:18648: checking for memmove" >&5
18649 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18650 if test "${ac_cv_func_memmove+set}" = set; then
18651   echo $ECHO_N "(cached) $ECHO_C" >&6
18652 else
18653   cat >conftest.$ac_ext <<_ACEOF
18654 #line 18654 "configure"
18655 #include "confdefs.h"
18656 /* System header to define __stub macros and hopefully few prototypes,
18657     which can conflict with char memmove (); below.  */
18658 #include <assert.h>
18659 /* Override any gcc2 internal prototype to avoid an error.  */
18660 #ifdef __cplusplus
18661 extern "C"
18662 #endif
18663 /* We use char because int might match the return type of a gcc2
18664    builtin and then its argument prototype would still apply.  */
18665 char memmove ();
18666 char (*f) ();
18667
18668 int
18669 main (void)
18670 {
18671 /* The GNU C library defines this for functions which it implements
18672     to always fail with ENOSYS.  Some functions are actually named
18673     something starting with __ and the normal name is an alias.  */
18674 #if defined (__stub_memmove) || defined (__stub___memmove)
18675 choke me
18676 #else
18677 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18678 #endif
18679
18680   ;
18681   return 0;
18682 }
18683 _ACEOF
18684 rm -f conftest.$ac_objext conftest$ac_exeext
18685 if { (eval echo "$as_me:18685: \"$ac_link\"") >&5
18686   (eval $ac_link) 2>&5
18687   ac_status=$?
18688   echo "$as_me:18688: \$? = $ac_status" >&5
18689   (exit $ac_status); } &&
18690          { ac_try='test -s conftest$ac_exeext'
18691   { (eval echo "$as_me:18691: \"$ac_try\"") >&5
18692   (eval $ac_try) 2>&5
18693   ac_status=$?
18694   echo "$as_me:18694: \$? = $ac_status" >&5
18695   (exit $ac_status); }; }; then
18696   ac_cv_func_memmove=yes
18697 else
18698   echo "$as_me: failed program was:" >&5
18699 cat conftest.$ac_ext >&5
18700 ac_cv_func_memmove=no
18701 fi
18702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18703 fi
18704 echo "$as_me:18704: result: $ac_cv_func_memmove" >&5
18705 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18706 if test $ac_cv_func_memmove = yes; then
18707   :
18708 else
18709
18710 echo "$as_me:18710: checking for bcopy" >&5
18711 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18712 if test "${ac_cv_func_bcopy+set}" = set; then
18713   echo $ECHO_N "(cached) $ECHO_C" >&6
18714 else
18715   cat >conftest.$ac_ext <<_ACEOF
18716 #line 18716 "configure"
18717 #include "confdefs.h"
18718 /* System header to define __stub macros and hopefully few prototypes,
18719     which can conflict with char bcopy (); below.  */
18720 #include <assert.h>
18721 /* Override any gcc2 internal prototype to avoid an error.  */
18722 #ifdef __cplusplus
18723 extern "C"
18724 #endif
18725 /* We use char because int might match the return type of a gcc2
18726    builtin and then its argument prototype would still apply.  */
18727 char bcopy ();
18728 char (*f) ();
18729
18730 int
18731 main (void)
18732 {
18733 /* The GNU C library defines this for functions which it implements
18734     to always fail with ENOSYS.  Some functions are actually named
18735     something starting with __ and the normal name is an alias.  */
18736 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18737 choke me
18738 #else
18739 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18740 #endif
18741
18742   ;
18743   return 0;
18744 }
18745 _ACEOF
18746 rm -f conftest.$ac_objext conftest$ac_exeext
18747 if { (eval echo "$as_me:18747: \"$ac_link\"") >&5
18748   (eval $ac_link) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit $ac_status); } &&
18752          { ac_try='test -s conftest$ac_exeext'
18753   { (eval echo "$as_me:18753: \"$ac_try\"") >&5
18754   (eval $ac_try) 2>&5
18755   ac_status=$?
18756   echo "$as_me:18756: \$? = $ac_status" >&5
18757   (exit $ac_status); }; }; then
18758   ac_cv_func_bcopy=yes
18759 else
18760   echo "$as_me: failed program was:" >&5
18761 cat conftest.$ac_ext >&5
18762 ac_cv_func_bcopy=no
18763 fi
18764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18765 fi
18766 echo "$as_me:18766: result: $ac_cv_func_bcopy" >&5
18767 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18768 if test $ac_cv_func_bcopy = yes; then
18769
18770         echo "$as_me:18770: checking if bcopy does overlapping moves" >&5
18771 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18772 if test "${cf_cv_good_bcopy+set}" = set; then
18773   echo $ECHO_N "(cached) $ECHO_C" >&6
18774 else
18775
18776                 if test "$cross_compiling" = yes; then
18777   cf_cv_good_bcopy=unknown
18778 else
18779   cat >conftest.$ac_ext <<_ACEOF
18780 #line 18780 "configure"
18781 #include "confdefs.h"
18782
18783 int main(void) {
18784         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18785         char temp[40];
18786         bcopy(data, temp, sizeof(data));
18787         bcopy(temp+10, temp, 15);
18788         bcopy(temp+5, temp+15, 10);
18789         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18790 }
18791
18792 _ACEOF
18793 rm -f conftest$ac_exeext
18794 if { (eval echo "$as_me:18794: \"$ac_link\"") >&5
18795   (eval $ac_link) 2>&5
18796   ac_status=$?
18797   echo "$as_me:18797: \$? = $ac_status" >&5
18798   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18799   { (eval echo "$as_me:18799: \"$ac_try\"") >&5
18800   (eval $ac_try) 2>&5
18801   ac_status=$?
18802   echo "$as_me:18802: \$? = $ac_status" >&5
18803   (exit $ac_status); }; }; then
18804   cf_cv_good_bcopy=yes
18805 else
18806   echo "$as_me: program exited with status $ac_status" >&5
18807 echo "$as_me: failed program was:" >&5
18808 cat conftest.$ac_ext >&5
18809 cf_cv_good_bcopy=no
18810 fi
18811 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18812 fi
18813
18814 fi
18815 echo "$as_me:18815: result: $cf_cv_good_bcopy" >&5
18816 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18817
18818 else
18819   cf_cv_good_bcopy=no
18820 fi
18821
18822         if test "$cf_cv_good_bcopy" = yes ; then
18823
18824 cat >>confdefs.h <<\EOF
18825 #define USE_OK_BCOPY 1
18826 EOF
18827
18828         else
18829
18830 cat >>confdefs.h <<\EOF
18831 #define USE_MY_MEMMOVE 1
18832 EOF
18833
18834         fi
18835
18836 fi
18837
18838 tty 2>&1 >/dev/null || {
18839 for ac_func in posix_openpt
18840 do
18841 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18842 echo "$as_me:18842: checking for $ac_func" >&5
18843 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18844 if eval "test \"\${$as_ac_var+set}\" = set"; then
18845   echo $ECHO_N "(cached) $ECHO_C" >&6
18846 else
18847   cat >conftest.$ac_ext <<_ACEOF
18848 #line 18848 "configure"
18849 #include "confdefs.h"
18850 /* System header to define __stub macros and hopefully few prototypes,
18851     which can conflict with char $ac_func (); below.  */
18852 #include <assert.h>
18853 /* Override any gcc2 internal prototype to avoid an error.  */
18854 #ifdef __cplusplus
18855 extern "C"
18856 #endif
18857 /* We use char because int might match the return type of a gcc2
18858    builtin and then its argument prototype would still apply.  */
18859 char $ac_func ();
18860 char (*f) ();
18861
18862 int
18863 main (void)
18864 {
18865 /* The GNU C library defines this for functions which it implements
18866     to always fail with ENOSYS.  Some functions are actually named
18867     something starting with __ and the normal name is an alias.  */
18868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18869 choke me
18870 #else
18871 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18872 #endif
18873
18874   ;
18875   return 0;
18876 }
18877 _ACEOF
18878 rm -f conftest.$ac_objext conftest$ac_exeext
18879 if { (eval echo "$as_me:18879: \"$ac_link\"") >&5
18880   (eval $ac_link) 2>&5
18881   ac_status=$?
18882   echo "$as_me:18882: \$? = $ac_status" >&5
18883   (exit $ac_status); } &&
18884          { ac_try='test -s conftest$ac_exeext'
18885   { (eval echo "$as_me:18885: \"$ac_try\"") >&5
18886   (eval $ac_try) 2>&5
18887   ac_status=$?
18888   echo "$as_me:18888: \$? = $ac_status" >&5
18889   (exit $ac_status); }; }; then
18890   eval "$as_ac_var=yes"
18891 else
18892   echo "$as_me: failed program was:" >&5
18893 cat conftest.$ac_ext >&5
18894 eval "$as_ac_var=no"
18895 fi
18896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18897 fi
18898 echo "$as_me:18898: result: `eval echo '${'$as_ac_var'}'`" >&5
18899 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18900 if test `eval echo '${'$as_ac_var'}'` = yes; then
18901   cat >>confdefs.h <<EOF
18902 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18903 EOF
18904
18905 fi
18906 done
18907  }
18908 echo "$as_me:18908: checking if poll really works" >&5
18909 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18910 if test "${cf_cv_working_poll+set}" = set; then
18911   echo $ECHO_N "(cached) $ECHO_C" >&6
18912 else
18913
18914 if test "$cross_compiling" = yes; then
18915   cf_cv_working_poll=unknown
18916 else
18917   cat >conftest.$ac_ext <<_ACEOF
18918 #line 18918 "configure"
18919 #include "confdefs.h"
18920
18921 #include <stdlib.h>
18922 #include <stdio.h>
18923 #include <unistd.h>
18924 #include <fcntl.h>
18925 #ifdef HAVE_POLL_H
18926 #include <poll.h>
18927 #else
18928 #include <sys/poll.h>
18929 #endif
18930 int main(void) {
18931         struct pollfd myfds;
18932         int ret;
18933
18934         /* check for Darwin bug with respect to "devices" */
18935         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18936         if (myfds.fd < 0)
18937                 myfds.fd = 0;
18938         myfds.events = POLLIN;
18939         myfds.revents = 0;
18940
18941         ret = poll(&myfds, 1, 100);
18942
18943         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18944                 ret = -1;
18945         } else {
18946                 int fd = 0;
18947                 if (!isatty(fd)) {
18948                         fd = open("/dev/tty", 2);       /* O_RDWR */
18949                 }
18950 #ifdef HAVE_POSIX_OPENPT
18951                 if (fd < 0) {
18952                         fd = posix_openpt(O_RDWR);
18953                 }
18954 #endif
18955
18956                 if (fd >= 0) {
18957                         /* also check with standard input */
18958                         myfds.fd = fd;
18959                         myfds.events = POLLIN;
18960                         myfds.revents = 0;
18961                         ret = poll(&myfds, 1, 100);
18962                 } else {
18963                         ret = -1;
18964                 }
18965         }
18966         ${cf_cv_main_return:-return}(ret < 0);
18967 }
18968 _ACEOF
18969 rm -f conftest$ac_exeext
18970 if { (eval echo "$as_me:18970: \"$ac_link\"") >&5
18971   (eval $ac_link) 2>&5
18972   ac_status=$?
18973   echo "$as_me:18973: \$? = $ac_status" >&5
18974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18975   { (eval echo "$as_me:18975: \"$ac_try\"") >&5
18976   (eval $ac_try) 2>&5
18977   ac_status=$?
18978   echo "$as_me:18978: \$? = $ac_status" >&5
18979   (exit $ac_status); }; }; then
18980   cf_cv_working_poll=yes
18981 else
18982   echo "$as_me: program exited with status $ac_status" >&5
18983 echo "$as_me: failed program was:" >&5
18984 cat conftest.$ac_ext >&5
18985 cf_cv_working_poll=no
18986 fi
18987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18988 fi
18989 fi
18990 echo "$as_me:18990: result: $cf_cv_working_poll" >&5
18991 echo "${ECHO_T}$cf_cv_working_poll" >&6
18992 test "$cf_cv_working_poll" = "yes" &&
18993 cat >>confdefs.h <<\EOF
18994 #define HAVE_WORKING_POLL 1
18995 EOF
18996
18997 echo "$as_me:18997: checking for va_copy" >&5
18998 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18999 if test "${cf_cv_have_va_copy+set}" = set; then
19000   echo $ECHO_N "(cached) $ECHO_C" >&6
19001 else
19002
19003 cat >conftest.$ac_ext <<_ACEOF
19004 #line 19004 "configure"
19005 #include "confdefs.h"
19006
19007 #include <stdarg.h>
19008
19009 int
19010 main (void)
19011 {
19012
19013         static va_list dst;
19014         static va_list src;
19015         va_copy(dst, src)
19016   ;
19017   return 0;
19018 }
19019 _ACEOF
19020 rm -f conftest.$ac_objext conftest$ac_exeext
19021 if { (eval echo "$as_me:19021: \"$ac_link\"") >&5
19022   (eval $ac_link) 2>&5
19023   ac_status=$?
19024   echo "$as_me:19024: \$? = $ac_status" >&5
19025   (exit $ac_status); } &&
19026          { ac_try='test -s conftest$ac_exeext'
19027   { (eval echo "$as_me:19027: \"$ac_try\"") >&5
19028   (eval $ac_try) 2>&5
19029   ac_status=$?
19030   echo "$as_me:19030: \$? = $ac_status" >&5
19031   (exit $ac_status); }; }; then
19032   cf_cv_have_va_copy=yes
19033 else
19034   echo "$as_me: failed program was:" >&5
19035 cat conftest.$ac_ext >&5
19036 cf_cv_have_va_copy=no
19037 fi
19038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19039 fi
19040 echo "$as_me:19040: result: $cf_cv_have_va_copy" >&5
19041 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19042
19043 test "$cf_cv_have_va_copy" = yes &&
19044 cat >>confdefs.h <<\EOF
19045 #define HAVE_VA_COPY 1
19046 EOF
19047
19048 echo "$as_me:19048: checking for __va_copy" >&5
19049 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19050 if test "${cf_cv_have___va_copy+set}" = set; then
19051   echo $ECHO_N "(cached) $ECHO_C" >&6
19052 else
19053
19054 cat >conftest.$ac_ext <<_ACEOF
19055 #line 19055 "configure"
19056 #include "confdefs.h"
19057
19058 #include <stdarg.h>
19059
19060 int
19061 main (void)
19062 {
19063
19064         static va_list dst;
19065         static va_list src;
19066         __va_copy(dst, src)
19067   ;
19068   return 0;
19069 }
19070 _ACEOF
19071 rm -f conftest.$ac_objext conftest$ac_exeext
19072 if { (eval echo "$as_me:19072: \"$ac_link\"") >&5
19073   (eval $ac_link) 2>&5
19074   ac_status=$?
19075   echo "$as_me:19075: \$? = $ac_status" >&5
19076   (exit $ac_status); } &&
19077          { ac_try='test -s conftest$ac_exeext'
19078   { (eval echo "$as_me:19078: \"$ac_try\"") >&5
19079   (eval $ac_try) 2>&5
19080   ac_status=$?
19081   echo "$as_me:19081: \$? = $ac_status" >&5
19082   (exit $ac_status); }; }; then
19083   cf_cv_have___va_copy=yes
19084 else
19085   echo "$as_me: failed program was:" >&5
19086 cat conftest.$ac_ext >&5
19087 cf_cv_have___va_copy=no
19088 fi
19089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19090 fi
19091 echo "$as_me:19091: result: $cf_cv_have___va_copy" >&5
19092 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19093
19094 test "$cf_cv_have___va_copy" = yes &&
19095 cat >>confdefs.h <<\EOF
19096 #define HAVE___VA_COPY 1
19097 EOF
19098
19099 echo "$as_me:19099: checking for pid_t" >&5
19100 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19101 if test "${ac_cv_type_pid_t+set}" = set; then
19102   echo $ECHO_N "(cached) $ECHO_C" >&6
19103 else
19104   cat >conftest.$ac_ext <<_ACEOF
19105 #line 19105 "configure"
19106 #include "confdefs.h"
19107 $ac_includes_default
19108 int
19109 main (void)
19110 {
19111 if ((pid_t *) 0)
19112   return 0;
19113 if (sizeof (pid_t))
19114   return 0;
19115   ;
19116   return 0;
19117 }
19118 _ACEOF
19119 rm -f conftest.$ac_objext
19120 if { (eval echo "$as_me:19120: \"$ac_compile\"") >&5
19121   (eval $ac_compile) 2>&5
19122   ac_status=$?
19123   echo "$as_me:19123: \$? = $ac_status" >&5
19124   (exit $ac_status); } &&
19125          { ac_try='test -s conftest.$ac_objext'
19126   { (eval echo "$as_me:19126: \"$ac_try\"") >&5
19127   (eval $ac_try) 2>&5
19128   ac_status=$?
19129   echo "$as_me:19129: \$? = $ac_status" >&5
19130   (exit $ac_status); }; }; then
19131   ac_cv_type_pid_t=yes
19132 else
19133   echo "$as_me: failed program was:" >&5
19134 cat conftest.$ac_ext >&5
19135 ac_cv_type_pid_t=no
19136 fi
19137 rm -f conftest.$ac_objext conftest.$ac_ext
19138 fi
19139 echo "$as_me:19139: result: $ac_cv_type_pid_t" >&5
19140 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19141 if test $ac_cv_type_pid_t = yes; then
19142   :
19143 else
19144
19145 cat >>confdefs.h <<EOF
19146 #define pid_t int
19147 EOF
19148
19149 fi
19150
19151 for ac_header in unistd.h vfork.h
19152 do
19153 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19154 echo "$as_me:19154: checking for $ac_header" >&5
19155 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19157   echo $ECHO_N "(cached) $ECHO_C" >&6
19158 else
19159   cat >conftest.$ac_ext <<_ACEOF
19160 #line 19160 "configure"
19161 #include "confdefs.h"
19162 #include <$ac_header>
19163 _ACEOF
19164 if { (eval echo "$as_me:19164: \"$ac_cpp conftest.$ac_ext\"") >&5
19165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19166   ac_status=$?
19167   egrep -v '^ *\+' conftest.er1 >conftest.err
19168   rm -f conftest.er1
19169   cat conftest.err >&5
19170   echo "$as_me:19170: \$? = $ac_status" >&5
19171   (exit $ac_status); } >/dev/null; then
19172   if test -s conftest.err; then
19173     ac_cpp_err=$ac_c_preproc_warn_flag
19174   else
19175     ac_cpp_err=
19176   fi
19177 else
19178   ac_cpp_err=yes
19179 fi
19180 if test -z "$ac_cpp_err"; then
19181   eval "$as_ac_Header=yes"
19182 else
19183   echo "$as_me: failed program was:" >&5
19184   cat conftest.$ac_ext >&5
19185   eval "$as_ac_Header=no"
19186 fi
19187 rm -f conftest.err conftest.$ac_ext
19188 fi
19189 echo "$as_me:19189: result: `eval echo '${'$as_ac_Header'}'`" >&5
19190 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19191 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19192   cat >>confdefs.h <<EOF
19193 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19194 EOF
19195
19196 fi
19197 done
19198
19199 for ac_func in fork vfork
19200 do
19201 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19202 echo "$as_me:19202: checking for $ac_func" >&5
19203 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19204 if eval "test \"\${$as_ac_var+set}\" = set"; then
19205   echo $ECHO_N "(cached) $ECHO_C" >&6
19206 else
19207   cat >conftest.$ac_ext <<_ACEOF
19208 #line 19208 "configure"
19209 #include "confdefs.h"
19210 /* System header to define __stub macros and hopefully few prototypes,
19211     which can conflict with char $ac_func (); below.  */
19212 #include <assert.h>
19213 /* Override any gcc2 internal prototype to avoid an error.  */
19214 #ifdef __cplusplus
19215 extern "C"
19216 #endif
19217 /* We use char because int might match the return type of a gcc2
19218    builtin and then its argument prototype would still apply.  */
19219 char $ac_func ();
19220 char (*f) ();
19221
19222 int
19223 main (void)
19224 {
19225 /* The GNU C library defines this for functions which it implements
19226     to always fail with ENOSYS.  Some functions are actually named
19227     something starting with __ and the normal name is an alias.  */
19228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19229 choke me
19230 #else
19231 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19232 #endif
19233
19234   ;
19235   return 0;
19236 }
19237 _ACEOF
19238 rm -f conftest.$ac_objext conftest$ac_exeext
19239 if { (eval echo "$as_me:19239: \"$ac_link\"") >&5
19240   (eval $ac_link) 2>&5
19241   ac_status=$?
19242   echo "$as_me:19242: \$? = $ac_status" >&5
19243   (exit $ac_status); } &&
19244          { ac_try='test -s conftest$ac_exeext'
19245   { (eval echo "$as_me:19245: \"$ac_try\"") >&5
19246   (eval $ac_try) 2>&5
19247   ac_status=$?
19248   echo "$as_me:19248: \$? = $ac_status" >&5
19249   (exit $ac_status); }; }; then
19250   eval "$as_ac_var=yes"
19251 else
19252   echo "$as_me: failed program was:" >&5
19253 cat conftest.$ac_ext >&5
19254 eval "$as_ac_var=no"
19255 fi
19256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19257 fi
19258 echo "$as_me:19258: result: `eval echo '${'$as_ac_var'}'`" >&5
19259 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19260 if test `eval echo '${'$as_ac_var'}'` = yes; then
19261   cat >>confdefs.h <<EOF
19262 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19263 EOF
19264
19265 fi
19266 done
19267
19268 ac_cv_func_fork_works=$ac_cv_func_fork
19269 if test "x$ac_cv_func_fork" = xyes; then
19270   echo "$as_me:19270: checking for working fork" >&5
19271 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19272 if test "${ac_cv_func_fork_works+set}" = set; then
19273   echo $ECHO_N "(cached) $ECHO_C" >&6
19274 else
19275   if test "$cross_compiling" = yes; then
19276   ac_cv_func_fork_works=cross
19277 else
19278   cat >conftest.$ac_ext <<_ACEOF
19279 /* By Rüdiger Kuhlmann. */
19280       #include <sys/types.h>
19281       #if HAVE_UNISTD_H
19282       # include <unistd.h>
19283       #endif
19284       /* Some systems only have a dummy stub for fork() */
19285       int main (void)
19286       {
19287         if (fork() < 0)
19288           $ac_main_return (1);
19289         $ac_main_return (0);
19290       }
19291 _ACEOF
19292 rm -f conftest$ac_exeext
19293 if { (eval echo "$as_me:19293: \"$ac_link\"") >&5
19294   (eval $ac_link) 2>&5
19295   ac_status=$?
19296   echo "$as_me:19296: \$? = $ac_status" >&5
19297   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19298   { (eval echo "$as_me:19298: \"$ac_try\"") >&5
19299   (eval $ac_try) 2>&5
19300   ac_status=$?
19301   echo "$as_me:19301: \$? = $ac_status" >&5
19302   (exit $ac_status); }; }; then
19303   ac_cv_func_fork_works=yes
19304 else
19305   echo "$as_me: program exited with status $ac_status" >&5
19306 echo "$as_me: failed program was:" >&5
19307 cat conftest.$ac_ext >&5
19308 ac_cv_func_fork_works=no
19309 fi
19310 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19311 fi
19312 fi
19313 echo "$as_me:19313: result: $ac_cv_func_fork_works" >&5
19314 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19315
19316 fi
19317 if test "x$ac_cv_func_fork_works" = xcross; then
19318   case $host in
19319     *-*-amigaos* | *-*-msdosdjgpp*)
19320       # Override, as these systems have only a dummy fork() stub
19321       ac_cv_func_fork_works=no
19322       ;;
19323     *)
19324       ac_cv_func_fork_works=yes
19325       ;;
19326   esac
19327   { echo "$as_me:19327: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19328 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19329 fi
19330 ac_cv_func_vfork_works=$ac_cv_func_vfork
19331 if test "x$ac_cv_func_vfork" = xyes; then
19332   echo "$as_me:19332: checking for working vfork" >&5
19333 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19334 if test "${ac_cv_func_vfork_works+set}" = set; then
19335   echo $ECHO_N "(cached) $ECHO_C" >&6
19336 else
19337   if test "$cross_compiling" = yes; then
19338   ac_cv_func_vfork_works=cross
19339 else
19340   cat >conftest.$ac_ext <<_ACEOF
19341 #line 19341 "configure"
19342 #include "confdefs.h"
19343 /* Thanks to Paul Eggert for this test.  */
19344 #include <stdio.h>
19345 #include <sys/types.h>
19346 #include <sys/stat.h>
19347 #if HAVE_UNISTD_H
19348 # include <unistd.h>
19349 #endif
19350 #if HAVE_VFORK_H
19351 # include <vfork.h>
19352 #endif
19353 /* On some sparc systems, changes by the child to local and incoming
19354    argument registers are propagated back to the parent.  The compiler
19355    is told about this with #include <vfork.h>, but some compilers
19356    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19357    static variable whose address is put into a register that is
19358    clobbered by the vfork.  */
19359 static
19360 #ifdef __cplusplus
19361 sparc_address_test (int arg)
19362 # else
19363 sparc_address_test (arg) int arg;
19364 #endif
19365 {
19366   static pid_t child;
19367   if (!child) {
19368     child = vfork ();
19369     if (child < 0) {
19370       perror ("vfork");
19371       _exit(2);
19372     }
19373     if (!child) {
19374       arg = getpid();
19375       write(-1, "", 0);
19376       _exit (arg);
19377     }
19378   }
19379 }
19380
19381 int
19382 main (void)
19383 {
19384   pid_t parent = getpid ();
19385   pid_t child;
19386
19387   sparc_address_test ();
19388
19389   child = vfork ();
19390
19391   if (child == 0) {
19392     /* Here is another test for sparc vfork register problems.  This
19393        test uses lots of local variables, at least as many local
19394        variables as main has allocated so far including compiler
19395        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19396        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19397        reuse the register of parent for one of the local variables,
19398        since it will think that parent can't possibly be used any more
19399        in this routine.  Assigning to the local variable will thus
19400        munge parent in the parent process.  */
19401     pid_t
19402       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19403       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19404     /* Convince the compiler that p..p7 are live; otherwise, it might
19405        use the same hardware register for all 8 local variables.  */
19406     if (p != p1 || p != p2 || p != p3 || p != p4
19407         || p != p5 || p != p6 || p != p7)
19408       _exit(1);
19409
19410     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19411        from child file descriptors.  If the child closes a descriptor
19412        before it execs or exits, this munges the parent's descriptor
19413        as well.  Test for this by closing stdout in the child.  */
19414     _exit(close(fileno(stdout)) != 0);
19415   } else {
19416     int status;
19417     struct stat st;
19418
19419     while (wait(&status) != child)
19420       ;
19421     $ac_main_return(
19422          /* Was there some problem with vforking?  */
19423          child < 0
19424
19425          /* Did the child fail?  (This shouldn't happen.)  */
19426          || status
19427
19428          /* Did the vfork/compiler bug occur?  */
19429          || parent != getpid()
19430
19431          /* Did the file descriptor bug occur?  */
19432          || fstat(fileno(stdout), &st) != 0
19433          );
19434   }
19435 }
19436 _ACEOF
19437 rm -f conftest$ac_exeext
19438 if { (eval echo "$as_me:19438: \"$ac_link\"") >&5
19439   (eval $ac_link) 2>&5
19440   ac_status=$?
19441   echo "$as_me:19441: \$? = $ac_status" >&5
19442   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19443   { (eval echo "$as_me:19443: \"$ac_try\"") >&5
19444   (eval $ac_try) 2>&5
19445   ac_status=$?
19446   echo "$as_me:19446: \$? = $ac_status" >&5
19447   (exit $ac_status); }; }; then
19448   ac_cv_func_vfork_works=yes
19449 else
19450   echo "$as_me: program exited with status $ac_status" >&5
19451 echo "$as_me: failed program was:" >&5
19452 cat conftest.$ac_ext >&5
19453 ac_cv_func_vfork_works=no
19454 fi
19455 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19456 fi
19457 fi
19458 echo "$as_me:19458: result: $ac_cv_func_vfork_works" >&5
19459 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19460
19461 fi;
19462 if test "x$ac_cv_func_fork_works" = xcross; then
19463   ac_cv_func_vfork_works=ac_cv_func_vfork
19464   { echo "$as_me:19464: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19465 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19466 fi
19467
19468 if test "x$ac_cv_func_vfork_works" = xyes; then
19469
19470 cat >>confdefs.h <<\EOF
19471 #define HAVE_WORKING_VFORK 1
19472 EOF
19473
19474 else
19475
19476 cat >>confdefs.h <<\EOF
19477 #define vfork fork
19478 EOF
19479
19480 fi
19481 if test "x$ac_cv_func_fork_works" = xyes; then
19482
19483 cat >>confdefs.h <<\EOF
19484 #define HAVE_WORKING_FORK 1
19485 EOF
19486
19487 fi
19488
19489 # special check for test/ditto.c
19490
19491 echo "$as_me:19491: checking for openpty in -lutil" >&5
19492 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19493 if test "${ac_cv_lib_util_openpty+set}" = set; then
19494   echo $ECHO_N "(cached) $ECHO_C" >&6
19495 else
19496   ac_check_lib_save_LIBS=$LIBS
19497 LIBS="-lutil  $LIBS"
19498 cat >conftest.$ac_ext <<_ACEOF
19499 #line 19499 "configure"
19500 #include "confdefs.h"
19501
19502 /* Override any gcc2 internal prototype to avoid an error.  */
19503 #ifdef __cplusplus
19504 extern "C"
19505 #endif
19506 /* We use char because int might match the return type of a gcc2
19507    builtin and then its argument prototype would still apply.  */
19508 char openpty ();
19509 int
19510 main (void)
19511 {
19512 openpty ();
19513   ;
19514   return 0;
19515 }
19516 _ACEOF
19517 rm -f conftest.$ac_objext conftest$ac_exeext
19518 if { (eval echo "$as_me:19518: \"$ac_link\"") >&5
19519   (eval $ac_link) 2>&5
19520   ac_status=$?
19521   echo "$as_me:19521: \$? = $ac_status" >&5
19522   (exit $ac_status); } &&
19523          { ac_try='test -s conftest$ac_exeext'
19524   { (eval echo "$as_me:19524: \"$ac_try\"") >&5
19525   (eval $ac_try) 2>&5
19526   ac_status=$?
19527   echo "$as_me:19527: \$? = $ac_status" >&5
19528   (exit $ac_status); }; }; then
19529   ac_cv_lib_util_openpty=yes
19530 else
19531   echo "$as_me: failed program was:" >&5
19532 cat conftest.$ac_ext >&5
19533 ac_cv_lib_util_openpty=no
19534 fi
19535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19536 LIBS=$ac_check_lib_save_LIBS
19537 fi
19538 echo "$as_me:19538: result: $ac_cv_lib_util_openpty" >&5
19539 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19540 if test $ac_cv_lib_util_openpty = yes; then
19541   cf_cv_lib_util=yes
19542 else
19543   cf_cv_lib_util=no
19544 fi
19545
19546 echo "$as_me:19546: checking for openpty header" >&5
19547 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19548 if test "${cf_cv_func_openpty+set}" = set; then
19549   echo $ECHO_N "(cached) $ECHO_C" >&6
19550 else
19551
19552         cf_save_LIBS="$LIBS"
19553         test $cf_cv_lib_util = yes && {
19554 cf_add_libs="-lutil"
19555 # Filter out duplicates - this happens with badly-designed ".pc" files...
19556 for cf_add_1lib in $LIBS
19557 do
19558         for cf_add_2lib in $cf_add_libs
19559         do
19560                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19561                 then
19562                         cf_add_1lib=
19563                         break
19564                 fi
19565         done
19566         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19567 done
19568 LIBS="$cf_add_libs"
19569  }
19570         for cf_header in pty.h libutil.h util.h
19571         do
19572         cat >conftest.$ac_ext <<_ACEOF
19573 #line 19573 "configure"
19574 #include "confdefs.h"
19575
19576 #include <$cf_header>
19577
19578 int
19579 main (void)
19580 {
19581
19582         int x = openpty((int *)0, (int *)0, (char *)0,
19583                                    (struct termios *)0, (struct winsize *)0);
19584
19585   ;
19586   return 0;
19587 }
19588 _ACEOF
19589 rm -f conftest.$ac_objext conftest$ac_exeext
19590 if { (eval echo "$as_me:19590: \"$ac_link\"") >&5
19591   (eval $ac_link) 2>&5
19592   ac_status=$?
19593   echo "$as_me:19593: \$? = $ac_status" >&5
19594   (exit $ac_status); } &&
19595          { ac_try='test -s conftest$ac_exeext'
19596   { (eval echo "$as_me:19596: \"$ac_try\"") >&5
19597   (eval $ac_try) 2>&5
19598   ac_status=$?
19599   echo "$as_me:19599: \$? = $ac_status" >&5
19600   (exit $ac_status); }; }; then
19601
19602                 cf_cv_func_openpty=$cf_header
19603                 break
19604
19605 else
19606   echo "$as_me: failed program was:" >&5
19607 cat conftest.$ac_ext >&5
19608
19609                 cf_cv_func_openpty=no
19610
19611 fi
19612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19613         done
19614         LIBS="$cf_save_LIBS"
19615
19616 fi
19617 echo "$as_me:19617: result: $cf_cv_func_openpty" >&5
19618 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19619
19620 if test "$cf_cv_func_openpty" != no ; then
19621
19622 cat >>confdefs.h <<EOF
19623 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19624 EOF
19625
19626 cat >>confdefs.h <<\EOF
19627 #define USE_XTERM_PTY 1
19628 EOF
19629
19630         if test "x$cf_cv_lib_util" = xyes ; then
19631
19632 cf_add_libs="-lutil"
19633 # Filter out duplicates - this happens with badly-designed ".pc" files...
19634 for cf_add_1lib in $TEST_LIBS
19635 do
19636         for cf_add_2lib in $cf_add_libs
19637         do
19638                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19639                 then
19640                         cf_add_1lib=
19641                         break
19642                 fi
19643         done
19644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19645 done
19646 TEST_LIBS="$cf_add_libs"
19647
19648         fi
19649 fi
19650
19651 if test "$with_hashed_db" != no ; then
19652
19653 cat >>confdefs.h <<\EOF
19654 #define USE_HASHED_DB 1
19655 EOF
19656
19657 case $with_hashed_db in
19658 (yes|*able*)
19659         ;;
19660 (*)
19661         if test -d "$with_hashed_db" ; then
19662
19663 if test -n "$with_hashed_db/include" ; then
19664   for cf_add_incdir in $with_hashed_db/include
19665   do
19666         while test $cf_add_incdir != /usr/include
19667         do
19668           if test -d $cf_add_incdir
19669           then
19670                 cf_have_incdir=no
19671                 if test -n "$CFLAGS$CPPFLAGS" ; then
19672                   # a loop is needed to ensure we can add subdirs of existing dirs
19673                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19674                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19675                           cf_have_incdir=yes; break
19676                         fi
19677                   done
19678                 fi
19679
19680                 if test "$cf_have_incdir" = no ; then
19681                   if test "$cf_add_incdir" = /usr/local/include ; then
19682                         if test "$GCC" = yes
19683                         then
19684                           cf_save_CPPFLAGS=$CPPFLAGS
19685                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19686                           cat >conftest.$ac_ext <<_ACEOF
19687 #line 19687 "configure"
19688 #include "confdefs.h"
19689 #include <stdio.h>
19690 int
19691 main (void)
19692 {
19693 printf("Hello")
19694   ;
19695   return 0;
19696 }
19697 _ACEOF
19698 rm -f conftest.$ac_objext
19699 if { (eval echo "$as_me:19699: \"$ac_compile\"") >&5
19700   (eval $ac_compile) 2>&5
19701   ac_status=$?
19702   echo "$as_me:19702: \$? = $ac_status" >&5
19703   (exit $ac_status); } &&
19704          { ac_try='test -s conftest.$ac_objext'
19705   { (eval echo "$as_me:19705: \"$ac_try\"") >&5
19706   (eval $ac_try) 2>&5
19707   ac_status=$?
19708   echo "$as_me:19708: \$? = $ac_status" >&5
19709   (exit $ac_status); }; }; then
19710   :
19711 else
19712   echo "$as_me: failed program was:" >&5
19713 cat conftest.$ac_ext >&5
19714 cf_have_incdir=yes
19715 fi
19716 rm -f conftest.$ac_objext conftest.$ac_ext
19717                           CPPFLAGS=$cf_save_CPPFLAGS
19718                         fi
19719                   fi
19720                 fi
19721
19722                 if test "$cf_have_incdir" = no ; then
19723                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19724
19725 echo "${as_me:-configure}:19725: testing adding $cf_add_incdir to include-path ..." 1>&5
19726
19727                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19728
19729                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19730                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19731                   cf_add_incdir="$cf_top_incdir"
19732                 else
19733                   break
19734                 fi
19735           else
19736                 break
19737           fi
19738         done
19739   done
19740 fi
19741
19742 if test -n "$with_hashed_db/lib" ; then
19743         for cf_add_libdir in $with_hashed_db/lib
19744         do
19745                 if test $cf_add_libdir = /usr/lib ; then
19746                         :
19747                 elif test -d $cf_add_libdir
19748                 then
19749                         cf_have_libdir=no
19750                         if test -n "$LDFLAGS$LIBS" ; then
19751                                 # a loop is needed to ensure we can add subdirs of existing dirs
19752                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19753                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19754                                                 cf_have_libdir=yes; break
19755                                         fi
19756                                 done
19757                         fi
19758                         if test "$cf_have_libdir" = no ; then
19759                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19760
19761 echo "${as_me:-configure}:19761: testing adding $cf_add_libdir to library-path ..." 1>&5
19762
19763                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19764                         fi
19765                 fi
19766         done
19767 fi
19768
19769         else
19770                 case "$with_hashed_db" in
19771                 (./*|../*|/*)
19772                         { echo "$as_me:19772: WARNING: no such directory $with_hashed_db" >&5
19773 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19774                         ;;
19775                 (*)
19776
19777 cf_search=
19778
19779 test "x$prefix" != "xNONE" && \
19780 test -d "$prefix" && \
19781  {
19782         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19783         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19784         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19785         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19786         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19787         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19788 }
19789
19790 for cf_subdir_prefix in \
19791         /usr \
19792         /usr/local \
19793         /usr/pkg \
19794         /opt \
19795         /opt/local \
19796         $HOME
19797 do
19798
19799 test "x$cf_subdir_prefix" != "x$prefix" && \
19800 test -d "$cf_subdir_prefix" && \
19801 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19802         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19803         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19804         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19805         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19806         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19807         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"
19808 }
19809
19810 done
19811
19812         for cf_item in $cf_search
19813         do
19814                 case $cf_item in
19815                 (*/$with_hashed_db)
19816
19817 if test -n "$cf_item" ; then
19818   for cf_add_incdir in $cf_item
19819   do
19820         while test $cf_add_incdir != /usr/include
19821         do
19822           if test -d $cf_add_incdir
19823           then
19824                 cf_have_incdir=no
19825                 if test -n "$CFLAGS$CPPFLAGS" ; then
19826                   # a loop is needed to ensure we can add subdirs of existing dirs
19827                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19828                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19829                           cf_have_incdir=yes; break
19830                         fi
19831                   done
19832                 fi
19833
19834                 if test "$cf_have_incdir" = no ; then
19835                   if test "$cf_add_incdir" = /usr/local/include ; then
19836                         if test "$GCC" = yes
19837                         then
19838                           cf_save_CPPFLAGS=$CPPFLAGS
19839                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19840                           cat >conftest.$ac_ext <<_ACEOF
19841 #line 19841 "configure"
19842 #include "confdefs.h"
19843 #include <stdio.h>
19844 int
19845 main (void)
19846 {
19847 printf("Hello")
19848   ;
19849   return 0;
19850 }
19851 _ACEOF
19852 rm -f conftest.$ac_objext
19853 if { (eval echo "$as_me:19853: \"$ac_compile\"") >&5
19854   (eval $ac_compile) 2>&5
19855   ac_status=$?
19856   echo "$as_me:19856: \$? = $ac_status" >&5
19857   (exit $ac_status); } &&
19858          { ac_try='test -s conftest.$ac_objext'
19859   { (eval echo "$as_me:19859: \"$ac_try\"") >&5
19860   (eval $ac_try) 2>&5
19861   ac_status=$?
19862   echo "$as_me:19862: \$? = $ac_status" >&5
19863   (exit $ac_status); }; }; then
19864   :
19865 else
19866   echo "$as_me: failed program was:" >&5
19867 cat conftest.$ac_ext >&5
19868 cf_have_incdir=yes
19869 fi
19870 rm -f conftest.$ac_objext conftest.$ac_ext
19871                           CPPFLAGS=$cf_save_CPPFLAGS
19872                         fi
19873                   fi
19874                 fi
19875
19876                 if test "$cf_have_incdir" = no ; then
19877                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19878
19879 echo "${as_me:-configure}:19879: testing adding $cf_add_incdir to include-path ..." 1>&5
19880
19881                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19882
19883                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19884                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19885                   cf_add_incdir="$cf_top_incdir"
19886                 else
19887                   break
19888                 fi
19889           else
19890                 break
19891           fi
19892         done
19893   done
19894 fi
19895
19896                         ;;
19897                 esac
19898         done
19899
19900 cf_search=
19901
19902 test "x$prefix" != "xNONE" && \
19903 test -d "$prefix" && \
19904  {
19905         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19906         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19907         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19908         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19909         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19910         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19911 }
19912
19913 for cf_subdir_prefix in \
19914         /usr \
19915         /usr/local \
19916         /usr/pkg \
19917         /opt \
19918         /opt/local \
19919         $HOME
19920 do
19921
19922 test "x$cf_subdir_prefix" != "x$prefix" && \
19923 test -d "$cf_subdir_prefix" && \
19924 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19925         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19926         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19927         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19928         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19929         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19930         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"
19931 }
19932
19933 done
19934
19935         for cf_item in $cf_search
19936         do
19937                 case $cf_item in
19938                 (*/$with_hashed_db)
19939
19940 if test -n "$cf_item" ; then
19941         for cf_add_libdir in $cf_item
19942         do
19943                 if test $cf_add_libdir = /usr/lib ; then
19944                         :
19945                 elif test -d $cf_add_libdir
19946                 then
19947                         cf_have_libdir=no
19948                         if test -n "$LDFLAGS$LIBS" ; then
19949                                 # a loop is needed to ensure we can add subdirs of existing dirs
19950                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19951                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19952                                                 cf_have_libdir=yes; break
19953                                         fi
19954                                 done
19955                         fi
19956                         if test "$cf_have_libdir" = no ; then
19957                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19958
19959 echo "${as_me:-configure}:19959: testing adding $cf_add_libdir to library-path ..." 1>&5
19960
19961                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19962                         fi
19963                 fi
19964         done
19965 fi
19966
19967                         ;;
19968                 esac
19969         done
19970
19971                         ;;
19972                 esac
19973         fi
19974 esac
19975
19976 echo "$as_me:19976: checking for db.h" >&5
19977 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19978 if test "${ac_cv_header_db_h+set}" = set; then
19979   echo $ECHO_N "(cached) $ECHO_C" >&6
19980 else
19981   cat >conftest.$ac_ext <<_ACEOF
19982 #line 19982 "configure"
19983 #include "confdefs.h"
19984 #include <db.h>
19985 _ACEOF
19986 if { (eval echo "$as_me:19986: \"$ac_cpp conftest.$ac_ext\"") >&5
19987   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19988   ac_status=$?
19989   egrep -v '^ *\+' conftest.er1 >conftest.err
19990   rm -f conftest.er1
19991   cat conftest.err >&5
19992   echo "$as_me:19992: \$? = $ac_status" >&5
19993   (exit $ac_status); } >/dev/null; then
19994   if test -s conftest.err; then
19995     ac_cpp_err=$ac_c_preproc_warn_flag
19996   else
19997     ac_cpp_err=
19998   fi
19999 else
20000   ac_cpp_err=yes
20001 fi
20002 if test -z "$ac_cpp_err"; then
20003   ac_cv_header_db_h=yes
20004 else
20005   echo "$as_me: failed program was:" >&5
20006   cat conftest.$ac_ext >&5
20007   ac_cv_header_db_h=no
20008 fi
20009 rm -f conftest.err conftest.$ac_ext
20010 fi
20011 echo "$as_me:20011: result: $ac_cv_header_db_h" >&5
20012 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20013 if test $ac_cv_header_db_h = yes; then
20014
20015 echo "$as_me:20015: checking for version of db" >&5
20016 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20017 if test "${cf_cv_hashed_db_version+set}" = set; then
20018   echo $ECHO_N "(cached) $ECHO_C" >&6
20019 else
20020
20021 cf_cv_hashed_db_version=unknown
20022
20023 for cf_db_version in 1 2 3 4 5 6
20024 do
20025
20026 echo "${as_me:-configure}:20026: testing checking for db version $cf_db_version ..." 1>&5
20027
20028         cat >conftest.$ac_ext <<_ACEOF
20029 #line 20029 "configure"
20030 #include "confdefs.h"
20031
20032 $ac_includes_default
20033 #include <db.h>
20034
20035 #ifdef DB_VERSION_MAJOR
20036         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20037 #if $cf_db_version == DB_VERSION_MAJOR
20038         /* ok */
20039 #else
20040         make an error
20041 #endif
20042 #else
20043 #if $cf_db_version == 1
20044         /* ok: assuming this is DB 1.8.5 */
20045 #else
20046         make an error
20047 #endif
20048 #endif
20049
20050 int
20051 main (void)
20052 {
20053 DBT *foo = 0
20054   ;
20055   return 0;
20056 }
20057 _ACEOF
20058 rm -f conftest.$ac_objext
20059 if { (eval echo "$as_me:20059: \"$ac_compile\"") >&5
20060   (eval $ac_compile) 2>&5
20061   ac_status=$?
20062   echo "$as_me:20062: \$? = $ac_status" >&5
20063   (exit $ac_status); } &&
20064          { ac_try='test -s conftest.$ac_objext'
20065   { (eval echo "$as_me:20065: \"$ac_try\"") >&5
20066   (eval $ac_try) 2>&5
20067   ac_status=$?
20068   echo "$as_me:20068: \$? = $ac_status" >&5
20069   (exit $ac_status); }; }; then
20070
20071         cf_cv_hashed_db_version=$cf_db_version
20072         break
20073
20074 else
20075   echo "$as_me: failed program was:" >&5
20076 cat conftest.$ac_ext >&5
20077 fi
20078 rm -f conftest.$ac_objext conftest.$ac_ext
20079 done
20080
20081 fi
20082 echo "$as_me:20082: result: $cf_cv_hashed_db_version" >&5
20083 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20084
20085 if test "$cf_cv_hashed_db_version" = unknown ; then
20086         { { echo "$as_me:20086: error: Cannot determine version of db" >&5
20087 echo "$as_me: error: Cannot determine version of db" >&2;}
20088    { (exit 1); exit 1; }; }
20089 else
20090
20091 echo "$as_me:20091: checking for db libraries" >&5
20092 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20093 if test "${cf_cv_hashed_db_libs+set}" = set; then
20094   echo $ECHO_N "(cached) $ECHO_C" >&6
20095 else
20096
20097 cf_cv_hashed_db_libs=unknown
20098 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20099 do
20100         cf_save_libs="$LIBS"
20101         if test -n "$cf_db_libs"; then
20102
20103 cf_add_libs="-l$cf_db_libs"
20104 # Filter out duplicates - this happens with badly-designed ".pc" files...
20105 for cf_add_1lib in $LIBS
20106 do
20107         for cf_add_2lib in $cf_add_libs
20108         do
20109                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20110                 then
20111                         cf_add_1lib=
20112                         break
20113                 fi
20114         done
20115         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20116 done
20117 LIBS="$cf_add_libs"
20118
20119         fi
20120
20121 echo "${as_me:-configure}:20121: testing checking for library "$cf_db_libs" ..." 1>&5
20122
20123         cat >conftest.$ac_ext <<_ACEOF
20124 #line 20124 "configure"
20125 #include "confdefs.h"
20126
20127 $ac_includes_default
20128 #include <db.h>
20129
20130 int
20131 main (void)
20132 {
20133
20134         char *path = "/tmp/foo";
20135 #ifdef DB_VERSION_MAJOR
20136 #if DB_VERSION_MAJOR >= 4
20137         DB *result = 0;
20138         db_create(&result, NULL, 0);
20139         result->open(result,
20140                 NULL,
20141                 path,
20142                 path,
20143                 DB_HASH,
20144                 DB_CREATE,
20145                 0644);
20146 #elif DB_VERSION_MAJOR >= 3
20147         DB *result = 0;
20148         db_create(&result, NULL, 0);
20149         result->open(result,
20150                 path,
20151                 path,
20152                 DB_HASH,
20153                 DB_CREATE,
20154                 0644);
20155 #elif DB_VERSION_MAJOR >= 2
20156         DB *result = 0;
20157         db_open(path,
20158                 DB_HASH,
20159                 DB_CREATE,
20160                 0644,
20161                 (DB_ENV *) 0,
20162                 (DB_INFO *) 0,
20163                 &result);
20164 #endif /* DB_VERSION_MAJOR */
20165 #else
20166         DB *result = dbopen(path,
20167                      2,
20168                      0644,
20169                      DB_HASH,
20170                      0);
20171 #endif
20172         ${cf_cv_main_return:-return}(result != 0)
20173
20174   ;
20175   return 0;
20176 }
20177 _ACEOF
20178 rm -f conftest.$ac_objext conftest$ac_exeext
20179 if { (eval echo "$as_me:20179: \"$ac_link\"") >&5
20180   (eval $ac_link) 2>&5
20181   ac_status=$?
20182   echo "$as_me:20182: \$? = $ac_status" >&5
20183   (exit $ac_status); } &&
20184          { ac_try='test -s conftest$ac_exeext'
20185   { (eval echo "$as_me:20185: \"$ac_try\"") >&5
20186   (eval $ac_try) 2>&5
20187   ac_status=$?
20188   echo "$as_me:20188: \$? = $ac_status" >&5
20189   (exit $ac_status); }; }; then
20190
20191         if test -n "$cf_db_libs" ; then
20192                 cf_cv_hashed_db_libs=$cf_db_libs
20193         else
20194                 cf_cv_hashed_db_libs=default
20195         fi
20196         LIBS="$cf_save_libs"
20197         break
20198
20199 else
20200   echo "$as_me: failed program was:" >&5
20201 cat conftest.$ac_ext >&5
20202 fi
20203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20204         LIBS="$cf_save_libs"
20205 done
20206
20207 fi
20208 echo "$as_me:20208: result: $cf_cv_hashed_db_libs" >&5
20209 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20210
20211         if test "$cf_cv_hashed_db_libs" = unknown ; then
20212                 { { echo "$as_me:20212: error: Cannot determine library for db" >&5
20213 echo "$as_me: error: Cannot determine library for db" >&2;}
20214    { (exit 1); exit 1; }; }
20215         elif test "$cf_cv_hashed_db_libs" != default ; then
20216
20217 cf_add_libs="-l$cf_cv_hashed_db_libs"
20218 # Filter out duplicates - this happens with badly-designed ".pc" files...
20219 for cf_add_1lib in $LIBS
20220 do
20221         for cf_add_2lib in $cf_add_libs
20222         do
20223                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20224                 then
20225                         cf_add_1lib=
20226                         break
20227                 fi
20228         done
20229         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20230 done
20231 LIBS="$cf_add_libs"
20232
20233         fi
20234 fi
20235
20236 else
20237
20238         { { echo "$as_me:20238: error: Cannot find db.h" >&5
20239 echo "$as_me: error: Cannot find db.h" >&2;}
20240    { (exit 1); exit 1; }; }
20241
20242 fi
20243
20244 fi
20245
20246 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20247         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20248         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20249 fi
20250
20251 # Just in case, check if the C compiler has a bool type.
20252
20253 echo "$as_me:20253: checking if we should include stdbool.h" >&5
20254 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20255
20256 if test "${cf_cv_header_stdbool_h+set}" = set; then
20257   echo $ECHO_N "(cached) $ECHO_C" >&6
20258 else
20259
20260         cat >conftest.$ac_ext <<_ACEOF
20261 #line 20261 "configure"
20262 #include "confdefs.h"
20263
20264 int
20265 main (void)
20266 {
20267 bool foo = false
20268   ;
20269   return 0;
20270 }
20271 _ACEOF
20272 rm -f conftest.$ac_objext
20273 if { (eval echo "$as_me:20273: \"$ac_compile\"") >&5
20274   (eval $ac_compile) 2>&5
20275   ac_status=$?
20276   echo "$as_me:20276: \$? = $ac_status" >&5
20277   (exit $ac_status); } &&
20278          { ac_try='test -s conftest.$ac_objext'
20279   { (eval echo "$as_me:20279: \"$ac_try\"") >&5
20280   (eval $ac_try) 2>&5
20281   ac_status=$?
20282   echo "$as_me:20282: \$? = $ac_status" >&5
20283   (exit $ac_status); }; }; then
20284   cf_cv_header_stdbool_h=0
20285 else
20286   echo "$as_me: failed program was:" >&5
20287 cat conftest.$ac_ext >&5
20288 cat >conftest.$ac_ext <<_ACEOF
20289 #line 20289 "configure"
20290 #include "confdefs.h"
20291
20292 #ifndef __BEOS__
20293 #include <stdbool.h>
20294 #endif
20295
20296 int
20297 main (void)
20298 {
20299 bool foo = false
20300   ;
20301   return 0;
20302 }
20303 _ACEOF
20304 rm -f conftest.$ac_objext
20305 if { (eval echo "$as_me:20305: \"$ac_compile\"") >&5
20306   (eval $ac_compile) 2>&5
20307   ac_status=$?
20308   echo "$as_me:20308: \$? = $ac_status" >&5
20309   (exit $ac_status); } &&
20310          { ac_try='test -s conftest.$ac_objext'
20311   { (eval echo "$as_me:20311: \"$ac_try\"") >&5
20312   (eval $ac_try) 2>&5
20313   ac_status=$?
20314   echo "$as_me:20314: \$? = $ac_status" >&5
20315   (exit $ac_status); }; }; then
20316   cf_cv_header_stdbool_h=1
20317 else
20318   echo "$as_me: failed program was:" >&5
20319 cat conftest.$ac_ext >&5
20320 cf_cv_header_stdbool_h=0
20321 fi
20322 rm -f conftest.$ac_objext conftest.$ac_ext
20323 fi
20324 rm -f conftest.$ac_objext conftest.$ac_ext
20325 fi
20326
20327 if test "$cf_cv_header_stdbool_h" = 1
20328 then    echo "$as_me:20328: result: yes" >&5
20329 echo "${ECHO_T}yes" >&6
20330 else    echo "$as_me:20330: result: no" >&5
20331 echo "${ECHO_T}no" >&6
20332 fi
20333
20334 echo "$as_me:20334: checking for builtin bool type" >&5
20335 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20336
20337 if test "${cf_cv_cc_bool_type+set}" = set; then
20338   echo $ECHO_N "(cached) $ECHO_C" >&6
20339 else
20340
20341         cat >conftest.$ac_ext <<_ACEOF
20342 #line 20342 "configure"
20343 #include "confdefs.h"
20344
20345 #include <stdio.h>
20346 #include <sys/types.h>
20347
20348 int
20349 main (void)
20350 {
20351 bool x = false
20352   ;
20353   return 0;
20354 }
20355 _ACEOF
20356 rm -f conftest.$ac_objext
20357 if { (eval echo "$as_me:20357: \"$ac_compile\"") >&5
20358   (eval $ac_compile) 2>&5
20359   ac_status=$?
20360   echo "$as_me:20360: \$? = $ac_status" >&5
20361   (exit $ac_status); } &&
20362          { ac_try='test -s conftest.$ac_objext'
20363   { (eval echo "$as_me:20363: \"$ac_try\"") >&5
20364   (eval $ac_try) 2>&5
20365   ac_status=$?
20366   echo "$as_me:20366: \$? = $ac_status" >&5
20367   (exit $ac_status); }; }; then
20368   cf_cv_cc_bool_type=1
20369 else
20370   echo "$as_me: failed program was:" >&5
20371 cat conftest.$ac_ext >&5
20372 cf_cv_cc_bool_type=0
20373 fi
20374 rm -f conftest.$ac_objext conftest.$ac_ext
20375
20376 fi
20377
20378 if test "$cf_cv_cc_bool_type" = 1
20379 then    echo "$as_me:20379: result: yes" >&5
20380 echo "${ECHO_T}yes" >&6
20381 else    echo "$as_me:20381: result: no" >&5
20382 echo "${ECHO_T}no" >&6
20383 fi
20384
20385 # Check for C++ compiler characteristics (and ensure that it's there!)
20386 if test -n "$CXX" ; then
20387         ac_ext=cc
20388 ac_cpp='$CXXCPP $CPPFLAGS'
20389 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20390 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20391 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20392 ac_main_return=return
20393
20394 if test -n "$GXX" ; then
20395
20396         cf_save="$LIBS"
20397         LIBS="$LIBS $CXXLIBS"
20398         echo "$as_me:20398: checking if we already have C++ library" >&5
20399 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20400         cat >conftest.$ac_ext <<_ACEOF
20401 #line 20401 "configure"
20402 #include "confdefs.h"
20403
20404                         #include <iostream>
20405 int
20406 main (void)
20407 {
20408
20409                         std::cout << "Hello World!" << std::endl;
20410   ;
20411   return 0;
20412 }
20413 _ACEOF
20414 rm -f conftest.$ac_objext conftest$ac_exeext
20415 if { (eval echo "$as_me:20415: \"$ac_link\"") >&5
20416   (eval $ac_link) 2>&5
20417   ac_status=$?
20418   echo "$as_me:20418: \$? = $ac_status" >&5
20419   (exit $ac_status); } &&
20420          { ac_try='test -s conftest$ac_exeext'
20421   { (eval echo "$as_me:20421: \"$ac_try\"") >&5
20422   (eval $ac_try) 2>&5
20423   ac_status=$?
20424   echo "$as_me:20424: \$? = $ac_status" >&5
20425   (exit $ac_status); }; }; then
20426   cf_have_libstdcpp=yes
20427 else
20428   echo "$as_me: failed program was:" >&5
20429 cat conftest.$ac_ext >&5
20430 cf_have_libstdcpp=no
20431 fi
20432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20433         echo "$as_me:20433: result: $cf_have_libstdcpp" >&5
20434 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20435         LIBS="$cf_save"
20436
20437         if test $cf_have_libstdcpp != yes
20438         then
20439                 case $cf_cv_system_name in
20440                 (os2*)
20441                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20442                                 cf_stdcpp_libname=stdcpp
20443                         else
20444                                 cf_stdcpp_libname=stdc++
20445                         fi
20446                         ;;
20447                 (*)
20448                         cf_stdcpp_libname=stdc++
20449                         ;;
20450                 esac
20451
20452                 echo "$as_me:20452: checking for library $cf_stdcpp_libname" >&5
20453 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20454 if test "${cf_cv_libstdcpp+set}" = set; then
20455   echo $ECHO_N "(cached) $ECHO_C" >&6
20456 else
20457
20458                         cf_save="$LIBS"
20459                         LIBS="$LIBS $CXXLIBS"
20460
20461 cf_add_libs="-l$cf_stdcpp_libname"
20462 # Filter out duplicates - this happens with badly-designed ".pc" files...
20463 for cf_add_1lib in $LIBS
20464 do
20465         for cf_add_2lib in $cf_add_libs
20466         do
20467                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20468                 then
20469                         cf_add_1lib=
20470                         break
20471                 fi
20472         done
20473         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20474 done
20475 LIBS="$cf_add_libs"
20476
20477                 cat >conftest.$ac_ext <<_ACEOF
20478 #line 20478 "configure"
20479 #include "confdefs.h"
20480
20481                                 #include <iostream>
20482 int
20483 main (void)
20484 {
20485
20486                                 std::cout << "Hello World!" << std::endl;
20487   ;
20488   return 0;
20489 }
20490 _ACEOF
20491 rm -f conftest.$ac_objext conftest$ac_exeext
20492 if { (eval echo "$as_me:20492: \"$ac_link\"") >&5
20493   (eval $ac_link) 2>&5
20494   ac_status=$?
20495   echo "$as_me:20495: \$? = $ac_status" >&5
20496   (exit $ac_status); } &&
20497          { ac_try='test -s conftest$ac_exeext'
20498   { (eval echo "$as_me:20498: \"$ac_try\"") >&5
20499   (eval $ac_try) 2>&5
20500   ac_status=$?
20501   echo "$as_me:20501: \$? = $ac_status" >&5
20502   (exit $ac_status); }; }; then
20503   cf_cv_libstdcpp=yes
20504 else
20505   echo "$as_me: failed program was:" >&5
20506 cat conftest.$ac_ext >&5
20507 cf_cv_libstdcpp=no
20508 fi
20509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20510                         LIBS="$cf_save"
20511
20512 fi
20513 echo "$as_me:20513: result: $cf_cv_libstdcpp" >&5
20514 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20515                 test "$cf_cv_libstdcpp" = yes && {
20516 cf_add_libs="-l$cf_stdcpp_libname"
20517 # Filter out duplicates - this happens with badly-designed ".pc" files...
20518 for cf_add_1lib in $CXXLIBS
20519 do
20520         for cf_add_2lib in $cf_add_libs
20521         do
20522                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20523                 then
20524                         cf_add_1lib=
20525                         break
20526                 fi
20527         done
20528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20529 done
20530 CXXLIBS="$cf_add_libs"
20531  }
20532         fi
20533 fi
20534
20535         echo "$as_me:20535: checking whether $CXX understands -c and -o together" >&5
20536 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20537 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20538   echo $ECHO_N "(cached) $ECHO_C" >&6
20539 else
20540
20541 cat > conftest.$ac_ext <<CF_EOF
20542 int main(void)
20543 {
20544         ${cf_cv_main_return:-return}(0);
20545 }
20546 CF_EOF
20547 # We do the test twice because some compilers refuse to overwrite an
20548 # existing .o file with -o, though they will create one.
20549 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20550 if { (eval echo "$as_me:20550: \"$ac_try\"") >&5
20551   (eval $ac_try) 2>&5
20552   ac_status=$?
20553   echo "$as_me:20553: \$? = $ac_status" >&5
20554   (exit $ac_status); } &&
20555   test -f conftest2.$ac_objext && { (eval echo "$as_me:20555: \"$ac_try\"") >&5
20556   (eval $ac_try) 2>&5
20557   ac_status=$?
20558   echo "$as_me:20558: \$? = $ac_status" >&5
20559   (exit $ac_status); };
20560 then
20561   eval cf_cv_prog_CXX_c_o=yes
20562 else
20563   eval cf_cv_prog_CXX_c_o=no
20564 fi
20565 rm -rf conftest*
20566
20567 fi
20568 if test $cf_cv_prog_CXX_c_o = yes; then
20569   echo "$as_me:20569: result: yes" >&5
20570 echo "${ECHO_T}yes" >&6
20571 else
20572   echo "$as_me:20572: result: no" >&5
20573 echo "${ECHO_T}no" >&6
20574 fi
20575
20576         case $GXX_VERSION in
20577         (1*|2.0-6*)
20578                 cf_cxx_library=yes
20579                 ;;
20580         (*-2.7*|2.7*)
20581
20582 cf_cxx_library=unknown
20583 case $cf_cv_system_name in
20584 (os2*)
20585         cf_gpp_libname=gpp
20586         ;;
20587 (*)
20588         cf_gpp_libname=g++
20589         ;;
20590 esac
20591 if test "$GXX" = yes; then
20592         echo "$as_me:20592: checking for lib$cf_gpp_libname" >&5
20593 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20594         cf_save="$LIBS"
20595
20596 cf_add_libs="-l$cf_gpp_libname"
20597 # Filter out duplicates - this happens with badly-designed ".pc" files...
20598 for cf_add_1lib in $LIBS
20599 do
20600         for cf_add_2lib in $cf_add_libs
20601         do
20602                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20603                 then
20604                         cf_add_1lib=
20605                         break
20606                 fi
20607         done
20608         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20609 done
20610 LIBS="$cf_add_libs"
20611
20612         cat >conftest.$ac_ext <<_ACEOF
20613 #line 20613 "configure"
20614 #include "confdefs.h"
20615
20616 #include <$cf_gpp_libname/builtin.h>
20617
20618 int
20619 main (void)
20620 {
20621 two_arg_error_handler_t foo2 = lib_error_handler
20622   ;
20623   return 0;
20624 }
20625 _ACEOF
20626 rm -f conftest.$ac_objext conftest$ac_exeext
20627 if { (eval echo "$as_me:20627: \"$ac_link\"") >&5
20628   (eval $ac_link) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit $ac_status); } &&
20632          { ac_try='test -s conftest$ac_exeext'
20633   { (eval echo "$as_me:20633: \"$ac_try\"") >&5
20634   (eval $ac_try) 2>&5
20635   ac_status=$?
20636   echo "$as_me:20636: \$? = $ac_status" >&5
20637   (exit $ac_status); }; }; then
20638   cf_cxx_library=yes
20639
20640 cf_add_libs="-l$cf_gpp_libname"
20641 # Filter out duplicates - this happens with badly-designed ".pc" files...
20642 for cf_add_1lib in $CXXLIBS
20643 do
20644         for cf_add_2lib in $cf_add_libs
20645         do
20646                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20647                 then
20648                         cf_add_1lib=
20649                         break
20650                 fi
20651         done
20652         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20653 done
20654 CXXLIBS="$cf_add_libs"
20655
20656          if test "$cf_gpp_libname" = cpp ; then
20657
20658 cat >>confdefs.h <<\EOF
20659 #define HAVE_GPP_BUILTIN_H 1
20660 EOF
20661
20662          else
20663
20664 cat >>confdefs.h <<\EOF
20665 #define HAVE_GXX_BUILTIN_H 1
20666 EOF
20667
20668          fi
20669 else
20670   echo "$as_me: failed program was:" >&5
20671 cat conftest.$ac_ext >&5
20672 cat >conftest.$ac_ext <<_ACEOF
20673 #line 20673 "configure"
20674 #include "confdefs.h"
20675
20676 #include <builtin.h>
20677
20678 int
20679 main (void)
20680 {
20681 two_arg_error_handler_t foo2 = lib_error_handler
20682   ;
20683   return 0;
20684 }
20685 _ACEOF
20686 rm -f conftest.$ac_objext conftest$ac_exeext
20687 if { (eval echo "$as_me:20687: \"$ac_link\"") >&5
20688   (eval $ac_link) 2>&5
20689   ac_status=$?
20690   echo "$as_me:20690: \$? = $ac_status" >&5
20691   (exit $ac_status); } &&
20692          { ac_try='test -s conftest$ac_exeext'
20693   { (eval echo "$as_me:20693: \"$ac_try\"") >&5
20694   (eval $ac_try) 2>&5
20695   ac_status=$?
20696   echo "$as_me:20696: \$? = $ac_status" >&5
20697   (exit $ac_status); }; }; then
20698   cf_cxx_library=yes
20699
20700 cf_add_libs="-l$cf_gpp_libname"
20701 # Filter out duplicates - this happens with badly-designed ".pc" files...
20702 for cf_add_1lib in $CXXLIBS
20703 do
20704         for cf_add_2lib in $cf_add_libs
20705         do
20706                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20707                 then
20708                         cf_add_1lib=
20709                         break
20710                 fi
20711         done
20712         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20713 done
20714 CXXLIBS="$cf_add_libs"
20715
20716 cat >>confdefs.h <<\EOF
20717 #define HAVE_BUILTIN_H 1
20718 EOF
20719
20720 else
20721   echo "$as_me: failed program was:" >&5
20722 cat conftest.$ac_ext >&5
20723 cf_cxx_library=no
20724 fi
20725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20726 fi
20727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20728         LIBS="$cf_save"
20729         echo "$as_me:20729: result: $cf_cxx_library" >&5
20730 echo "${ECHO_T}$cf_cxx_library" >&6
20731 fi
20732
20733                 ;;
20734         (*)
20735                 cf_cxx_library=no
20736                 ;;
20737         esac
20738
20739         ac_ext=cc
20740 ac_cpp='$CXXCPP $CPPFLAGS'
20741 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20742 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20743 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20744 ac_main_return=return
20745 echo "$as_me:20745: checking how to run the C++ preprocessor" >&5
20746 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20747 if test -z "$CXXCPP"; then
20748   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20749   echo $ECHO_N "(cached) $ECHO_C" >&6
20750 else
20751       # Double quotes because CXXCPP needs to be expanded
20752     for CXXCPP in "$CXX -E" "/lib/cpp"
20753     do
20754       ac_preproc_ok=false
20755 for ac_cxx_preproc_warn_flag in '' yes
20756 do
20757   # Use a header file that comes with gcc, so configuring glibc
20758   # with a fresh cross-compiler works.
20759   # On the NeXT, cc -E runs the code through the compiler's parser,
20760   # not just through cpp. "Syntax error" is here to catch this case.
20761   cat >conftest.$ac_ext <<_ACEOF
20762 #line 20762 "configure"
20763 #include "confdefs.h"
20764 #include <assert.h>
20765                      Syntax error
20766 _ACEOF
20767 if { (eval echo "$as_me:20767: \"$ac_cpp conftest.$ac_ext\"") >&5
20768   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20769   ac_status=$?
20770   egrep -v '^ *\+' conftest.er1 >conftest.err
20771   rm -f conftest.er1
20772   cat conftest.err >&5
20773   echo "$as_me:20773: \$? = $ac_status" >&5
20774   (exit $ac_status); } >/dev/null; then
20775   if test -s conftest.err; then
20776     ac_cpp_err=$ac_cxx_preproc_warn_flag
20777   else
20778     ac_cpp_err=
20779   fi
20780 else
20781   ac_cpp_err=yes
20782 fi
20783 if test -z "$ac_cpp_err"; then
20784   :
20785 else
20786   echo "$as_me: failed program was:" >&5
20787   cat conftest.$ac_ext >&5
20788   # Broken: fails on valid input.
20789 continue
20790 fi
20791 rm -f conftest.err conftest.$ac_ext
20792
20793   # OK, works on sane cases.  Now check whether non-existent headers
20794   # can be detected and how.
20795   cat >conftest.$ac_ext <<_ACEOF
20796 #line 20796 "configure"
20797 #include "confdefs.h"
20798 #include <ac_nonexistent.h>
20799 _ACEOF
20800 if { (eval echo "$as_me:20800: \"$ac_cpp conftest.$ac_ext\"") >&5
20801   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20802   ac_status=$?
20803   egrep -v '^ *\+' conftest.er1 >conftest.err
20804   rm -f conftest.er1
20805   cat conftest.err >&5
20806   echo "$as_me:20806: \$? = $ac_status" >&5
20807   (exit $ac_status); } >/dev/null; then
20808   if test -s conftest.err; then
20809     ac_cpp_err=$ac_cxx_preproc_warn_flag
20810   else
20811     ac_cpp_err=
20812   fi
20813 else
20814   ac_cpp_err=yes
20815 fi
20816 if test -z "$ac_cpp_err"; then
20817   # Broken: success on invalid input.
20818 continue
20819 else
20820   echo "$as_me: failed program was:" >&5
20821   cat conftest.$ac_ext >&5
20822   # Passes both tests.
20823 ac_preproc_ok=:
20824 break
20825 fi
20826 rm -f conftest.err conftest.$ac_ext
20827
20828 done
20829 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20830 rm -f conftest.err conftest.$ac_ext
20831 if $ac_preproc_ok; then
20832   break
20833 fi
20834
20835     done
20836     ac_cv_prog_CXXCPP=$CXXCPP
20837
20838 fi
20839   CXXCPP=$ac_cv_prog_CXXCPP
20840 else
20841   ac_cv_prog_CXXCPP=$CXXCPP
20842 fi
20843 echo "$as_me:20843: result: $CXXCPP" >&5
20844 echo "${ECHO_T}$CXXCPP" >&6
20845 ac_preproc_ok=false
20846 for ac_cxx_preproc_warn_flag in '' yes
20847 do
20848   # Use a header file that comes with gcc, so configuring glibc
20849   # with a fresh cross-compiler works.
20850   # On the NeXT, cc -E runs the code through the compiler's parser,
20851   # not just through cpp. "Syntax error" is here to catch this case.
20852   cat >conftest.$ac_ext <<_ACEOF
20853 #line 20853 "configure"
20854 #include "confdefs.h"
20855 #include <assert.h>
20856                      Syntax error
20857 _ACEOF
20858 if { (eval echo "$as_me:20858: \"$ac_cpp conftest.$ac_ext\"") >&5
20859   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20860   ac_status=$?
20861   egrep -v '^ *\+' conftest.er1 >conftest.err
20862   rm -f conftest.er1
20863   cat conftest.err >&5
20864   echo "$as_me:20864: \$? = $ac_status" >&5
20865   (exit $ac_status); } >/dev/null; then
20866   if test -s conftest.err; then
20867     ac_cpp_err=$ac_cxx_preproc_warn_flag
20868   else
20869     ac_cpp_err=
20870   fi
20871 else
20872   ac_cpp_err=yes
20873 fi
20874 if test -z "$ac_cpp_err"; then
20875   :
20876 else
20877   echo "$as_me: failed program was:" >&5
20878   cat conftest.$ac_ext >&5
20879   # Broken: fails on valid input.
20880 continue
20881 fi
20882 rm -f conftest.err conftest.$ac_ext
20883
20884   # OK, works on sane cases.  Now check whether non-existent headers
20885   # can be detected and how.
20886   cat >conftest.$ac_ext <<_ACEOF
20887 #line 20887 "configure"
20888 #include "confdefs.h"
20889 #include <ac_nonexistent.h>
20890 _ACEOF
20891 if { (eval echo "$as_me:20891: \"$ac_cpp conftest.$ac_ext\"") >&5
20892   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20893   ac_status=$?
20894   egrep -v '^ *\+' conftest.er1 >conftest.err
20895   rm -f conftest.er1
20896   cat conftest.err >&5
20897   echo "$as_me:20897: \$? = $ac_status" >&5
20898   (exit $ac_status); } >/dev/null; then
20899   if test -s conftest.err; then
20900     ac_cpp_err=$ac_cxx_preproc_warn_flag
20901   else
20902     ac_cpp_err=
20903   fi
20904 else
20905   ac_cpp_err=yes
20906 fi
20907 if test -z "$ac_cpp_err"; then
20908   # Broken: success on invalid input.
20909 continue
20910 else
20911   echo "$as_me: failed program was:" >&5
20912   cat conftest.$ac_ext >&5
20913   # Passes both tests.
20914 ac_preproc_ok=:
20915 break
20916 fi
20917 rm -f conftest.err conftest.$ac_ext
20918
20919 done
20920 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20921 rm -f conftest.err conftest.$ac_ext
20922 if $ac_preproc_ok; then
20923   :
20924 else
20925   { { echo "$as_me:20925: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20926 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20927    { (exit 1); exit 1; }; }
20928 fi
20929
20930 ac_ext=cc
20931 ac_cpp='$CXXCPP $CPPFLAGS'
20932 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20933 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20934 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20935 ac_main_return=return
20936
20937 for ac_header in typeinfo
20938 do
20939 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20940 echo "$as_me:20940: checking for $ac_header" >&5
20941 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20942 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20943   echo $ECHO_N "(cached) $ECHO_C" >&6
20944 else
20945   cat >conftest.$ac_ext <<_ACEOF
20946 #line 20946 "configure"
20947 #include "confdefs.h"
20948 #include <$ac_header>
20949 _ACEOF
20950 if { (eval echo "$as_me:20950: \"$ac_cpp conftest.$ac_ext\"") >&5
20951   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20952   ac_status=$?
20953   egrep -v '^ *\+' conftest.er1 >conftest.err
20954   rm -f conftest.er1
20955   cat conftest.err >&5
20956   echo "$as_me:20956: \$? = $ac_status" >&5
20957   (exit $ac_status); } >/dev/null; then
20958   if test -s conftest.err; then
20959     ac_cpp_err=$ac_cxx_preproc_warn_flag
20960   else
20961     ac_cpp_err=
20962   fi
20963 else
20964   ac_cpp_err=yes
20965 fi
20966 if test -z "$ac_cpp_err"; then
20967   eval "$as_ac_Header=yes"
20968 else
20969   echo "$as_me: failed program was:" >&5
20970   cat conftest.$ac_ext >&5
20971   eval "$as_ac_Header=no"
20972 fi
20973 rm -f conftest.err conftest.$ac_ext
20974 fi
20975 echo "$as_me:20975: result: `eval echo '${'$as_ac_Header'}'`" >&5
20976 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20977 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20978   cat >>confdefs.h <<EOF
20979 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20980 EOF
20981
20982 fi
20983 done
20984
20985 for ac_header in iostream
20986 do
20987 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20988 echo "$as_me:20988: checking for $ac_header" >&5
20989 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20990 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20991   echo $ECHO_N "(cached) $ECHO_C" >&6
20992 else
20993   cat >conftest.$ac_ext <<_ACEOF
20994 #line 20994 "configure"
20995 #include "confdefs.h"
20996 #include <$ac_header>
20997 _ACEOF
20998 if { (eval echo "$as_me:20998: \"$ac_cpp conftest.$ac_ext\"") >&5
20999   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21000   ac_status=$?
21001   egrep -v '^ *\+' conftest.er1 >conftest.err
21002   rm -f conftest.er1
21003   cat conftest.err >&5
21004   echo "$as_me:21004: \$? = $ac_status" >&5
21005   (exit $ac_status); } >/dev/null; then
21006   if test -s conftest.err; then
21007     ac_cpp_err=$ac_cxx_preproc_warn_flag
21008   else
21009     ac_cpp_err=
21010   fi
21011 else
21012   ac_cpp_err=yes
21013 fi
21014 if test -z "$ac_cpp_err"; then
21015   eval "$as_ac_Header=yes"
21016 else
21017   echo "$as_me: failed program was:" >&5
21018   cat conftest.$ac_ext >&5
21019   eval "$as_ac_Header=no"
21020 fi
21021 rm -f conftest.err conftest.$ac_ext
21022 fi
21023 echo "$as_me:21023: result: `eval echo '${'$as_ac_Header'}'`" >&5
21024 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21025 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21026   cat >>confdefs.h <<EOF
21027 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21028 EOF
21029
21030 fi
21031 done
21032
21033 if test x"$ac_cv_header_iostream" = xyes ; then
21034         echo "$as_me:21034: checking if iostream uses std-namespace" >&5
21035 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21036         cat >conftest.$ac_ext <<_ACEOF
21037 #line 21037 "configure"
21038 #include "confdefs.h"
21039
21040 #include <iostream>
21041 using std::endl;
21042 using std::cerr;
21043 int
21044 main (void)
21045 {
21046
21047 cerr << "testing" << endl;
21048
21049   ;
21050   return 0;
21051 }
21052 _ACEOF
21053 rm -f conftest.$ac_objext
21054 if { (eval echo "$as_me:21054: \"$ac_compile\"") >&5
21055   (eval $ac_compile) 2>&5
21056   ac_status=$?
21057   echo "$as_me:21057: \$? = $ac_status" >&5
21058   (exit $ac_status); } &&
21059          { ac_try='test -s conftest.$ac_objext'
21060   { (eval echo "$as_me:21060: \"$ac_try\"") >&5
21061   (eval $ac_try) 2>&5
21062   ac_status=$?
21063   echo "$as_me:21063: \$? = $ac_status" >&5
21064   (exit $ac_status); }; }; then
21065   cf_iostream_namespace=yes
21066 else
21067   echo "$as_me: failed program was:" >&5
21068 cat conftest.$ac_ext >&5
21069 cf_iostream_namespace=no
21070 fi
21071 rm -f conftest.$ac_objext conftest.$ac_ext
21072         echo "$as_me:21072: result: $cf_iostream_namespace" >&5
21073 echo "${ECHO_T}$cf_iostream_namespace" >&6
21074         if test "$cf_iostream_namespace" = yes ; then
21075
21076 cat >>confdefs.h <<\EOF
21077 #define IOSTREAM_NAMESPACE 1
21078 EOF
21079
21080         fi
21081 fi
21082
21083 echo "$as_me:21083: checking if we should include stdbool.h" >&5
21084 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21085
21086 if test "${cf_cv_header_stdbool_h+set}" = set; then
21087   echo $ECHO_N "(cached) $ECHO_C" >&6
21088 else
21089
21090         cat >conftest.$ac_ext <<_ACEOF
21091 #line 21091 "configure"
21092 #include "confdefs.h"
21093
21094 int
21095 main (void)
21096 {
21097 bool foo = false
21098   ;
21099   return 0;
21100 }
21101 _ACEOF
21102 rm -f conftest.$ac_objext
21103 if { (eval echo "$as_me:21103: \"$ac_compile\"") >&5
21104   (eval $ac_compile) 2>&5
21105   ac_status=$?
21106   echo "$as_me:21106: \$? = $ac_status" >&5
21107   (exit $ac_status); } &&
21108          { ac_try='test -s conftest.$ac_objext'
21109   { (eval echo "$as_me:21109: \"$ac_try\"") >&5
21110   (eval $ac_try) 2>&5
21111   ac_status=$?
21112   echo "$as_me:21112: \$? = $ac_status" >&5
21113   (exit $ac_status); }; }; then
21114   cf_cv_header_stdbool_h=0
21115 else
21116   echo "$as_me: failed program was:" >&5
21117 cat conftest.$ac_ext >&5
21118 cat >conftest.$ac_ext <<_ACEOF
21119 #line 21119 "configure"
21120 #include "confdefs.h"
21121
21122 #ifndef __BEOS__
21123 #include <stdbool.h>
21124 #endif
21125
21126 int
21127 main (void)
21128 {
21129 bool foo = false
21130   ;
21131   return 0;
21132 }
21133 _ACEOF
21134 rm -f conftest.$ac_objext
21135 if { (eval echo "$as_me:21135: \"$ac_compile\"") >&5
21136   (eval $ac_compile) 2>&5
21137   ac_status=$?
21138   echo "$as_me:21138: \$? = $ac_status" >&5
21139   (exit $ac_status); } &&
21140          { ac_try='test -s conftest.$ac_objext'
21141   { (eval echo "$as_me:21141: \"$ac_try\"") >&5
21142   (eval $ac_try) 2>&5
21143   ac_status=$?
21144   echo "$as_me:21144: \$? = $ac_status" >&5
21145   (exit $ac_status); }; }; then
21146   cf_cv_header_stdbool_h=1
21147 else
21148   echo "$as_me: failed program was:" >&5
21149 cat conftest.$ac_ext >&5
21150 cf_cv_header_stdbool_h=0
21151 fi
21152 rm -f conftest.$ac_objext conftest.$ac_ext
21153 fi
21154 rm -f conftest.$ac_objext conftest.$ac_ext
21155 fi
21156
21157 if test "$cf_cv_header_stdbool_h" = 1
21158 then    echo "$as_me:21158: result: yes" >&5
21159 echo "${ECHO_T}yes" >&6
21160 else    echo "$as_me:21160: result: no" >&5
21161 echo "${ECHO_T}no" >&6
21162 fi
21163
21164 echo "$as_me:21164: checking for builtin bool type" >&5
21165 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21166
21167 if test "${cf_cv_builtin_bool+set}" = set; then
21168   echo $ECHO_N "(cached) $ECHO_C" >&6
21169 else
21170
21171         cat >conftest.$ac_ext <<_ACEOF
21172 #line 21172 "configure"
21173 #include "confdefs.h"
21174
21175 #include <stdio.h>
21176 #include <sys/types.h>
21177
21178 int
21179 main (void)
21180 {
21181 bool x = false
21182   ;
21183   return 0;
21184 }
21185 _ACEOF
21186 rm -f conftest.$ac_objext
21187 if { (eval echo "$as_me:21187: \"$ac_compile\"") >&5
21188   (eval $ac_compile) 2>&5
21189   ac_status=$?
21190   echo "$as_me:21190: \$? = $ac_status" >&5
21191   (exit $ac_status); } &&
21192          { ac_try='test -s conftest.$ac_objext'
21193   { (eval echo "$as_me:21193: \"$ac_try\"") >&5
21194   (eval $ac_try) 2>&5
21195   ac_status=$?
21196   echo "$as_me:21196: \$? = $ac_status" >&5
21197   (exit $ac_status); }; }; then
21198   cf_cv_builtin_bool=1
21199 else
21200   echo "$as_me: failed program was:" >&5
21201 cat conftest.$ac_ext >&5
21202 cf_cv_builtin_bool=0
21203 fi
21204 rm -f conftest.$ac_objext conftest.$ac_ext
21205
21206 fi
21207
21208 if test "$cf_cv_builtin_bool" = 1
21209 then    echo "$as_me:21209: result: yes" >&5
21210 echo "${ECHO_T}yes" >&6
21211 else    echo "$as_me:21211: result: no" >&5
21212 echo "${ECHO_T}no" >&6
21213 fi
21214
21215 echo "$as_me:21215: checking for size of bool" >&5
21216 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21217 if test "${cf_cv_type_of_bool+set}" = set; then
21218   echo $ECHO_N "(cached) $ECHO_C" >&6
21219 else
21220
21221         rm -f cf_test.out
21222         if test "$cross_compiling" = yes; then
21223   cf_cv_type_of_bool=unknown
21224 else
21225   cat >conftest.$ac_ext <<_ACEOF
21226 #line 21226 "configure"
21227 #include "confdefs.h"
21228
21229 #include <stdlib.h>
21230 #include <stdio.h>
21231
21232 #if defined(__cplusplus)
21233
21234 #ifdef HAVE_GXX_BUILTIN_H
21235 #include <g++/builtin.h>
21236 #elif HAVE_GPP_BUILTIN_H
21237 #include <gpp/builtin.h>
21238 #elif HAVE_BUILTIN_H
21239 #include <builtin.h>
21240 #endif
21241
21242 #else
21243
21244 #if $cf_cv_header_stdbool_h
21245 #include <stdbool.h>
21246 #endif
21247
21248 #endif
21249
21250 int main(void)
21251 {
21252         FILE *fp = fopen("cf_test.out", "w");
21253         if (fp != 0) {
21254                 bool x = true;
21255                 if ((bool)(-x) >= 0)
21256                         fputs("unsigned ", fp);
21257                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21258                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21259                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21260                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21261                 fclose(fp);
21262         }
21263         ${cf_cv_main_return:-return}(0);
21264 }
21265
21266 _ACEOF
21267 rm -f conftest$ac_exeext
21268 if { (eval echo "$as_me:21268: \"$ac_link\"") >&5
21269   (eval $ac_link) 2>&5
21270   ac_status=$?
21271   echo "$as_me:21271: \$? = $ac_status" >&5
21272   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21273   { (eval echo "$as_me:21273: \"$ac_try\"") >&5
21274   (eval $ac_try) 2>&5
21275   ac_status=$?
21276   echo "$as_me:21276: \$? = $ac_status" >&5
21277   (exit $ac_status); }; }; then
21278   cf_cv_type_of_bool=`cat cf_test.out`
21279                  if test -z "$cf_cv_type_of_bool"; then
21280                    cf_cv_type_of_bool=unknown
21281                  fi
21282 else
21283   echo "$as_me: program exited with status $ac_status" >&5
21284 echo "$as_me: failed program was:" >&5
21285 cat conftest.$ac_ext >&5
21286 cf_cv_type_of_bool=unknown
21287 fi
21288 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21289 fi
21290
21291 fi
21292
21293         rm -f cf_test.out
21294 echo "$as_me:21294: result: $cf_cv_type_of_bool" >&5
21295 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21296 if test "$cf_cv_type_of_bool" = unknown ; then
21297         case .$NCURSES_BOOL in
21298         (.auto|.) NCURSES_BOOL=unsigned;;
21299         esac
21300         { echo "$as_me:21300: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21301 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21302         cf_cv_type_of_bool=$NCURSES_BOOL
21303 fi
21304
21305 echo "$as_me:21305: checking for special defines needed for etip.h" >&5
21306 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21307 cf_save_CXXFLAGS="$CXXFLAGS"
21308 cf_result="none"
21309
21310 # etip.h includes ncurses.h which includes ncurses_dll.h
21311 # But ncurses_dll.h is generated - fix here.
21312 test -d include || mkdir include
21313 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
21314
21315 for cf_math in "" MATH_H
21316 do
21317 for cf_excp in "" MATH_EXCEPTION
21318 do
21319         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21320         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21321         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21322 cat >conftest.$ac_ext <<_ACEOF
21323 #line 21323 "configure"
21324 #include "confdefs.h"
21325
21326 #include <etip.h.in>
21327
21328 int
21329 main (void)
21330 {
21331
21332   ;
21333   return 0;
21334 }
21335 _ACEOF
21336 rm -f conftest.$ac_objext
21337 if { (eval echo "$as_me:21337: \"$ac_compile\"") >&5
21338   (eval $ac_compile) 2>&5
21339   ac_status=$?
21340   echo "$as_me:21340: \$? = $ac_status" >&5
21341   (exit $ac_status); } &&
21342          { ac_try='test -s conftest.$ac_objext'
21343   { (eval echo "$as_me:21343: \"$ac_try\"") >&5
21344   (eval $ac_try) 2>&5
21345   ac_status=$?
21346   echo "$as_me:21346: \$? = $ac_status" >&5
21347   (exit $ac_status); }; }; then
21348
21349         test -n "$cf_math" && cat >>confdefs.h <<EOF
21350 #define ETIP_NEEDS_${cf_math} 1
21351 EOF
21352
21353         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21354 #define ETIP_NEEDS_${cf_excp} 1
21355 EOF
21356
21357         cf_result="$cf_math $cf_excp"
21358         break 2
21359
21360 else
21361   echo "$as_me: failed program was:" >&5
21362 cat conftest.$ac_ext >&5
21363 fi
21364 rm -f conftest.$ac_objext conftest.$ac_ext
21365 done
21366 done
21367 echo "$as_me:21367: result: $cf_result" >&5
21368 echo "${ECHO_T}$cf_result" >&6
21369 CXXFLAGS="$cf_save_CXXFLAGS"
21370
21371 if test -n "$CXX"; then
21372 echo "$as_me:21372: checking if $CXX accepts parameter initialization" >&5
21373 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21374 if test "${cf_cv_cpp_param_init+set}" = set; then
21375   echo $ECHO_N "(cached) $ECHO_C" >&6
21376 else
21377
21378         ac_ext=cc
21379 ac_cpp='$CXXCPP $CPPFLAGS'
21380 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21381 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21382 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21383 ac_main_return=return
21384
21385         if test "$cross_compiling" = yes; then
21386   cf_cv_cpp_param_init=unknown
21387 else
21388   cat >conftest.$ac_ext <<_ACEOF
21389 #line 21389 "configure"
21390 #include "confdefs.h"
21391
21392 class TEST {
21393 private:
21394         int value;
21395 public:
21396         TEST(int x = 1);
21397         ~TEST();
21398 };
21399
21400 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21401 {
21402         value = x;
21403 }
21404 int main(void) { }
21405
21406 _ACEOF
21407 rm -f conftest$ac_exeext
21408 if { (eval echo "$as_me:21408: \"$ac_link\"") >&5
21409   (eval $ac_link) 2>&5
21410   ac_status=$?
21411   echo "$as_me:21411: \$? = $ac_status" >&5
21412   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21413   { (eval echo "$as_me:21413: \"$ac_try\"") >&5
21414   (eval $ac_try) 2>&5
21415   ac_status=$?
21416   echo "$as_me:21416: \$? = $ac_status" >&5
21417   (exit $ac_status); }; }; then
21418   cf_cv_cpp_param_init=yes
21419 else
21420   echo "$as_me: program exited with status $ac_status" >&5
21421 echo "$as_me: failed program was:" >&5
21422 cat conftest.$ac_ext >&5
21423 cf_cv_cpp_param_init=no
21424 fi
21425 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21426 fi
21427         ac_ext=cc
21428 ac_cpp='$CXXCPP $CPPFLAGS'
21429 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21430 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21431 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21432 ac_main_return=return
21433
21434 fi
21435 echo "$as_me:21435: result: $cf_cv_cpp_param_init" >&5
21436 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21437 fi
21438 test "$cf_cv_cpp_param_init" = yes &&
21439 cat >>confdefs.h <<\EOF
21440 #define CPP_HAS_PARAM_INIT 1
21441 EOF
21442
21443 if test -n "$CXX"; then
21444
21445 echo "$as_me:21445: checking if $CXX accepts static_cast" >&5
21446 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21447 if test "${cf_cv_cpp_static_cast+set}" = set; then
21448   echo $ECHO_N "(cached) $ECHO_C" >&6
21449 else
21450
21451         ac_ext=cc
21452 ac_cpp='$CXXCPP $CPPFLAGS'
21453 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21454 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21455 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21456 ac_main_return=return
21457
21458         cat >conftest.$ac_ext <<_ACEOF
21459 #line 21459 "configure"
21460 #include "confdefs.h"
21461
21462 class NCursesPanel
21463 {
21464 public:
21465   NCursesPanel(int nlines,
21466                int ncols,
21467                int begin_y = 0,
21468                int begin_x = 0)
21469   {
21470   }
21471   NCursesPanel();
21472   ~NCursesPanel();
21473 };
21474
21475 template<class T> class NCursesUserPanel : public NCursesPanel
21476 {
21477 public:
21478   NCursesUserPanel (int nlines,
21479                     int ncols,
21480                     int begin_y = 0,
21481                     int begin_x = 0,
21482                     const T* p_UserData = static_cast<T*>(0))
21483     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21484   {
21485   };
21486   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21487   {
21488   };
21489
21490   virtual ~NCursesUserPanel() {};
21491 };
21492
21493 int
21494 main (void)
21495 {
21496
21497         const char* p_UserData = static_cast<char*>(0)
21498   ;
21499   return 0;
21500 }
21501 _ACEOF
21502 rm -f conftest.$ac_objext
21503 if { (eval echo "$as_me:21503: \"$ac_compile\"") >&5
21504   (eval $ac_compile) 2>&5
21505   ac_status=$?
21506   echo "$as_me:21506: \$? = $ac_status" >&5
21507   (exit $ac_status); } &&
21508          { ac_try='test -s conftest.$ac_objext'
21509   { (eval echo "$as_me:21509: \"$ac_try\"") >&5
21510   (eval $ac_try) 2>&5
21511   ac_status=$?
21512   echo "$as_me:21512: \$? = $ac_status" >&5
21513   (exit $ac_status); }; }; then
21514   cf_cv_cpp_static_cast=yes
21515 else
21516   echo "$as_me: failed program was:" >&5
21517 cat conftest.$ac_ext >&5
21518 cf_cv_cpp_static_cast=no
21519 fi
21520 rm -f conftest.$ac_objext conftest.$ac_ext
21521
21522         ac_ext=cc
21523 ac_cpp='$CXXCPP $CPPFLAGS'
21524 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21525 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21526 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21527 ac_main_return=return
21528
21529 fi
21530 echo "$as_me:21530: result: $cf_cv_cpp_static_cast" >&5
21531 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21532
21533 fi
21534
21535 test "$cf_cv_cpp_static_cast" = yes &&
21536 cat >>confdefs.h <<\EOF
21537 #define CPP_HAS_STATIC_CAST 1
21538 EOF
21539
21540         CXX_AR='$(AR)'
21541         CXX_ARFLAGS='$(ARFLAGS)'
21542         case $cf_cv_system_name in
21543         (irix*)
21544             if test "$GXX" != yes ; then
21545                 CXX_AR='$(CXX)'
21546                 CXX_ARFLAGS='-ar -o'
21547             fi
21548             ;;
21549         (sco3.2v5*)
21550             CXXLDFLAGS="-u main"
21551             ;;
21552         (solaris2*)
21553             if test "$GXX" != yes ; then
21554                 CXX_AR='$(CXX)'
21555                 CXX_ARFLAGS='-xar -o'
21556             fi
21557             ;;
21558         esac
21559
21560 else
21561         cf_cxx_library=no
21562         cf_cv_builtin_bool=1
21563
21564         # Just because we are not configuring against C++ right now does not
21565         # mean that a user will not want to use C++.  Some distributors disable
21566         # the C++ portion of this configuration as a shortcut (or just to avoid
21567         # compiling the demo in the c++ directory).  So we need a reasonable
21568         # default for the 'bool' type.
21569         #
21570         # Caveat: since the storage of the bool type is not standardized, it
21571         # may change.
21572
21573         if test "$NCURSES_BOOL" != auto ; then
21574                 cf_cv_type_of_bool=$NCURSES_BOOL
21575                 cf_cv_header_stdbool_h=0
21576         else
21577                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21578
21579 echo "$as_me:21579: checking for size of bool" >&5
21580 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21581 if test "${cf_cv_type_of_bool+set}" = set; then
21582   echo $ECHO_N "(cached) $ECHO_C" >&6
21583 else
21584
21585         rm -f cf_test.out
21586         if test "$cross_compiling" = yes; then
21587   cf_cv_type_of_bool=unknown
21588 else
21589   cat >conftest.$ac_ext <<_ACEOF
21590 #line 21590 "configure"
21591 #include "confdefs.h"
21592
21593 #include <stdlib.h>
21594 #include <stdio.h>
21595
21596 #if defined(__cplusplus)
21597
21598 #ifdef HAVE_GXX_BUILTIN_H
21599 #include <g++/builtin.h>
21600 #elif HAVE_GPP_BUILTIN_H
21601 #include <gpp/builtin.h>
21602 #elif HAVE_BUILTIN_H
21603 #include <builtin.h>
21604 #endif
21605
21606 #else
21607
21608 #if $cf_cv_header_stdbool_h
21609 #include <stdbool.h>
21610 #endif
21611
21612 #endif
21613
21614 int main(void)
21615 {
21616         FILE *fp = fopen("cf_test.out", "w");
21617         if (fp != 0) {
21618                 bool x = true;
21619                 if ((bool)(-x) >= 0)
21620                         fputs("unsigned ", fp);
21621                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21622                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21623                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21624                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21625                 fclose(fp);
21626         }
21627         ${cf_cv_main_return:-return}(0);
21628 }
21629
21630 _ACEOF
21631 rm -f conftest$ac_exeext
21632 if { (eval echo "$as_me:21632: \"$ac_link\"") >&5
21633   (eval $ac_link) 2>&5
21634   ac_status=$?
21635   echo "$as_me:21635: \$? = $ac_status" >&5
21636   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21637   { (eval echo "$as_me:21637: \"$ac_try\"") >&5
21638   (eval $ac_try) 2>&5
21639   ac_status=$?
21640   echo "$as_me:21640: \$? = $ac_status" >&5
21641   (exit $ac_status); }; }; then
21642   cf_cv_type_of_bool=`cat cf_test.out`
21643                  if test -z "$cf_cv_type_of_bool"; then
21644                    cf_cv_type_of_bool=unknown
21645                  fi
21646 else
21647   echo "$as_me: program exited with status $ac_status" >&5
21648 echo "$as_me: failed program was:" >&5
21649 cat conftest.$ac_ext >&5
21650 cf_cv_type_of_bool=unknown
21651 fi
21652 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21653 fi
21654
21655 fi
21656
21657         rm -f cf_test.out
21658 echo "$as_me:21658: result: $cf_cv_type_of_bool" >&5
21659 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21660 if test "$cf_cv_type_of_bool" = unknown ; then
21661         case .$NCURSES_BOOL in
21662         (.auto|.) NCURSES_BOOL=unsigned;;
21663         esac
21664         { echo "$as_me:21664: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21665 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21666         cf_cv_type_of_bool=$NCURSES_BOOL
21667 fi
21668
21669                 else
21670                         echo "$as_me:21670: checking for fallback type of bool" >&5
21671 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21672                         case "$host_cpu" in
21673                         (i?86)  cf_cv_type_of_bool=char ;;
21674                         (*)     cf_cv_type_of_bool=int  ;;
21675                         esac
21676                         echo "$as_me:21676: result: $cf_cv_type_of_bool" >&5
21677 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21678                 fi
21679         fi
21680 fi
21681
21682 # If the C compiler did not declare bool, and we did not determine that the C++
21683 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21684 # ncurses library use the same type as C++ bool.  Note that this allows one to
21685 # specify the type of bool in a configure-script option and postpone
21686 # integration with the C++ compiler provided that the types are compatible.
21687 USE_CXX_BOOL=1
21688 if test $cf_cv_cc_bool_type = 1
21689 then
21690         # oops: C has a bool.  Unlikely, but C++ could differ.
21691         USE_CXX_BOOL=0
21692 elif test $cf_cv_builtin_bool = 0
21693 then
21694         # C++ has no bool
21695         USE_CXX_BOOL=0
21696 else
21697         # this is the normal case
21698         USE_CXX_BOOL='defined(__cplusplus)'
21699 fi
21700
21701 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21702
21703         if test "$cf_with_ada" != "no" ; then
21704                 if test "$with_libtool" != "no"; then
21705                         { echo "$as_me:21705: WARNING: libtool does not support Ada - disabling feature" >&5
21706 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21707                         cf_with_ada=no
21708                 fi
21709         fi
21710
21711         if test "$cf_with_ada" != "no" ; then
21712
21713 cf_ada_make=gnatmake
21714 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21715 set dummy $cf_ada_make; ac_word=$2
21716 echo "$as_me:21716: checking for $ac_word" >&5
21717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21718 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21719   echo $ECHO_N "(cached) $ECHO_C" >&6
21720 else
21721   if test -n "$gnat_exists"; then
21722   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21723 else
21724   ac_save_IFS=$IFS; IFS=$ac_path_separator
21725 ac_dummy="$PATH"
21726 for ac_dir in $ac_dummy; do
21727   IFS=$ac_save_IFS
21728   test -z "$ac_dir" && ac_dir=.
21729   $as_executable_p "$ac_dir/$ac_word" || continue
21730 ac_cv_prog_gnat_exists="yes"
21731 echo "$as_me:21731: found $ac_dir/$ac_word" >&5
21732 break
21733 done
21734
21735   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21736 fi
21737 fi
21738 gnat_exists=$ac_cv_prog_gnat_exists
21739 if test -n "$gnat_exists"; then
21740   echo "$as_me:21740: result: $gnat_exists" >&5
21741 echo "${ECHO_T}$gnat_exists" >&6
21742 else
21743   echo "$as_me:21743: result: no" >&5
21744 echo "${ECHO_T}no" >&6
21745 fi
21746
21747 if test "$ac_cv_prog_gnat_exists" = no; then
21748         cf_ada_make=
21749         cf_cv_prog_gnat_correct=no
21750 else
21751
21752 echo "$as_me:21752: checking for gnat version" >&5
21753 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21754 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21755         grep '[0-9].[0-9][0-9]*' |\
21756         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21757 echo "$as_me:21757: result: $cf_gnat_version" >&5
21758 echo "${ECHO_T}$cf_gnat_version" >&6
21759
21760 case $cf_gnat_version in
21761 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21762         cf_cv_prog_gnat_correct=yes
21763         ;;
21764 (*)
21765         { echo "$as_me:21765: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21766 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21767         cf_cv_prog_gnat_correct=no
21768         ;;
21769 esac
21770
21771         # Extract the first word of "m4", so it can be a program name with args.
21772 set dummy m4; ac_word=$2
21773 echo "$as_me:21773: checking for $ac_word" >&5
21774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21775 if test "${ac_cv_prog_M4_exists+set}" = set; then
21776   echo $ECHO_N "(cached) $ECHO_C" >&6
21777 else
21778   if test -n "$M4_exists"; then
21779   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21780 else
21781   ac_save_IFS=$IFS; IFS=$ac_path_separator
21782 ac_dummy="$PATH"
21783 for ac_dir in $ac_dummy; do
21784   IFS=$ac_save_IFS
21785   test -z "$ac_dir" && ac_dir=.
21786   $as_executable_p "$ac_dir/$ac_word" || continue
21787 ac_cv_prog_M4_exists="yes"
21788 echo "$as_me:21788: found $ac_dir/$ac_word" >&5
21789 break
21790 done
21791
21792   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21793 fi
21794 fi
21795 M4_exists=$ac_cv_prog_M4_exists
21796 if test -n "$M4_exists"; then
21797   echo "$as_me:21797: result: $M4_exists" >&5
21798 echo "${ECHO_T}$M4_exists" >&6
21799 else
21800   echo "$as_me:21800: result: no" >&5
21801 echo "${ECHO_T}no" >&6
21802 fi
21803
21804         if test "$ac_cv_prog_M4_exists" = no; then
21805                 cf_cv_prog_gnat_correct=no
21806                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21807         fi
21808         if test "$cf_cv_prog_gnat_correct" = yes; then
21809                 echo "$as_me:21809: checking if GNAT works" >&5
21810 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21811
21812 rm -rf conftest* *~conftest*
21813 cat >>conftest.ads <<CF_EOF
21814 procedure conftest;
21815 CF_EOF
21816 cat >>conftest.adb <<CF_EOF
21817 with Text_IO;
21818 with GNAT.OS_Lib;
21819 procedure conftest is
21820 begin
21821    Text_IO.Put ("Hello World");
21822    Text_IO.New_Line;
21823    GNAT.OS_Lib.OS_Exit (0);
21824 end conftest;
21825 CF_EOF
21826 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21827    if ( ./conftest 1>&5 2>&1 ) ; then
21828       cf_cv_prog_gnat_correct=yes
21829    else
21830       cf_cv_prog_gnat_correct=no
21831    fi
21832 else
21833    cf_cv_prog_gnat_correct=no
21834 fi
21835 rm -rf conftest* *~conftest*
21836
21837                 echo "$as_me:21837: result: $cf_cv_prog_gnat_correct" >&5
21838 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21839         fi
21840 fi
21841
21842                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21843
21844         ADAFLAGS="$ADAFLAGS -gnatpn"
21845
21846         echo "$as_me:21846: checking optimization options for ADAFLAGS" >&5
21847 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21848         case "$CFLAGS" in
21849         (*-g*)
21850
21851         ADAFLAGS="$ADAFLAGS -g"
21852
21853                 ;;
21854         esac
21855         case "$CFLAGS" in
21856         (*-O*)
21857                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21858
21859         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21860
21861                 ;;
21862         esac
21863         echo "$as_me:21863: result: $ADAFLAGS" >&5
21864 echo "${ECHO_T}$ADAFLAGS" >&6
21865
21866 echo "$as_me:21866: checking if GNATPREP supports -T option" >&5
21867 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21868 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21869   echo $ECHO_N "(cached) $ECHO_C" >&6
21870 else
21871
21872 cf_cv_gnatprep_opt_t=no
21873 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21874
21875 fi
21876 echo "$as_me:21876: result: $cf_cv_gnatprep_opt_t" >&5
21877 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21878 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21879
21880 echo "$as_me:21880: checking if GNAT supports generics" >&5
21881 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21882 case $cf_gnat_version in
21883 (3.[1-9]*|[4-9].*)
21884         cf_gnat_generics=yes
21885         ;;
21886 (*)
21887         cf_gnat_generics=no
21888         ;;
21889 esac
21890 echo "$as_me:21890: result: $cf_gnat_generics" >&5
21891 echo "${ECHO_T}$cf_gnat_generics" >&6
21892
21893 if test "$cf_gnat_generics" = yes
21894 then
21895         cf_compile_generics=generics
21896         cf_generic_objects="\${GENOBJS}"
21897 else
21898         cf_compile_generics=
21899         cf_generic_objects=
21900 fi
21901
21902 echo "$as_me:21902: checking if GNAT supports SIGINT" >&5
21903 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21904 if test "${cf_cv_gnat_sigint+set}" = set; then
21905   echo $ECHO_N "(cached) $ECHO_C" >&6
21906 else
21907
21908 rm -rf conftest* *~conftest*
21909 cat >>conftest.ads <<CF_EOF
21910 with Ada.Interrupts.Names;
21911
21912 package ConfTest is
21913
21914    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21915    pragma Unreserve_All_Interrupts;
21916    pragma Warnings (On);
21917
21918    protected Process is
21919       procedure Stop;
21920       function Continue return Boolean;
21921       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21922    private
21923       Done : Boolean := False;
21924    end Process;
21925
21926 end ConfTest;
21927 CF_EOF
21928 cat >>conftest.adb <<CF_EOF
21929 package body ConfTest is
21930    protected body Process is
21931       procedure Stop is
21932       begin
21933          Done := True;
21934       end Stop;
21935       function Continue return Boolean is
21936       begin
21937          return not Done;
21938       end Continue;
21939    end Process;
21940 end ConfTest;
21941 CF_EOF
21942 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21943       cf_cv_gnat_sigint=yes
21944 else
21945    cf_cv_gnat_sigint=no
21946 fi
21947 rm -rf conftest* *~conftest*
21948
21949 fi
21950 echo "$as_me:21950: result: $cf_cv_gnat_sigint" >&5
21951 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21952
21953 if test $cf_cv_gnat_sigint = yes ; then
21954         USE_GNAT_SIGINT=""
21955 else
21956         USE_GNAT_SIGINT="#"
21957 fi
21958
21959 cf_gnat_libraries=no
21960 cf_gnat_projects=no
21961
21962 if test "$enable_gnat_projects" != no ; then
21963 echo "$as_me:21963: checking if GNAT supports project files" >&5
21964 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21965 case $cf_gnat_version in
21966 (3.[0-9]*)
21967         ;;
21968 (*)
21969         case $cf_cv_system_name in
21970         (cygwin*|msys*)
21971                 ;;
21972         (*)
21973                 mkdir conftest.src conftest.bin conftest.lib
21974                 cd conftest.src
21975                 rm -rf conftest* *~conftest*
21976                 cat >>library.gpr <<CF_EOF
21977 project Library is
21978   Kind := External ("LIB_KIND");
21979   for Library_Name use "ConfTest";
21980   for Object_Dir use ".";
21981   for Library_ALI_Dir use External("LIBRARY_DIR");
21982   for Library_Version use External ("SONAME");
21983   for Library_Kind use Kind;
21984   for Library_Dir use External("BUILD_DIR");
21985   Source_Dir := External ("SOURCE_DIR");
21986   for Source_Dirs use (Source_Dir);
21987 end Library;
21988 CF_EOF
21989                 cat >>confpackage.ads <<CF_EOF
21990 package ConfPackage is
21991    procedure conftest;
21992 end ConfPackage;
21993 CF_EOF
21994                 cat >>confpackage.adb <<CF_EOF
21995 with Text_IO;
21996 package body ConfPackage is
21997    procedure conftest is
21998    begin
21999       Text_IO.Put ("Hello World");
22000       Text_IO.New_Line;
22001    end conftest;
22002 end ConfPackage;
22003 CF_EOF
22004                 if ( $cf_ada_make $ADAFLAGS \
22005                                 -Plibrary.gpr \
22006                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22007                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22008                                 -XSOURCE_DIR=`pwd` \
22009                                 -XSONAME=libConfTest.so.1 \
22010                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
22011                         cf_gnat_projects=yes
22012                 fi
22013                 cd ..
22014                 if test -f conftest.lib/confpackage.ali
22015                 then
22016                         cf_gnat_libraries=yes
22017                 fi
22018                 rm -rf conftest* *~conftest*
22019                 ;;
22020         esac
22021         ;;
22022 esac
22023 echo "$as_me:22023: result: $cf_gnat_projects" >&5
22024 echo "${ECHO_T}$cf_gnat_projects" >&6
22025 fi # enable_gnat_projects
22026
22027 if test $cf_gnat_projects = yes
22028 then
22029         echo "$as_me:22029: checking if GNAT supports libraries" >&5
22030 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22031         echo "$as_me:22031: result: $cf_gnat_libraries" >&5
22032 echo "${ECHO_T}$cf_gnat_libraries" >&6
22033 fi
22034
22035 if test "$cf_gnat_projects" = yes
22036 then
22037         USE_OLD_MAKERULES="#"
22038         USE_GNAT_PROJECTS=""
22039 else
22040         USE_OLD_MAKERULES=""
22041         USE_GNAT_PROJECTS="#"
22042 fi
22043
22044 if test "$cf_gnat_libraries" = yes
22045 then
22046         USE_GNAT_LIBRARIES=""
22047 else
22048         USE_GNAT_LIBRARIES="#"
22049 fi
22050
22051 echo "$as_me:22051: checking for ada-compiler" >&5
22052 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22053
22054 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22055 if test "${with_ada_compiler+set}" = set; then
22056   withval="$with_ada_compiler"
22057   cf_ada_compiler=$withval
22058 else
22059   cf_ada_compiler=gnatmake
22060 fi;
22061
22062 echo "$as_me:22062: result: $cf_ada_compiler" >&5
22063 echo "${ECHO_T}$cf_ada_compiler" >&6
22064
22065                         cf_ada_package=terminal_interface
22066
22067 echo "$as_me:22067: checking for ada-include" >&5
22068 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22069
22070 # Check whether --with-ada-include or --without-ada-include was given.
22071 if test "${with_ada_include+set}" = set; then
22072   withval="$with_ada_include"
22073
22074 else
22075   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22076 fi; if test -n "$prefix/share/ada/adainclude" ; then
22077
22078 if test "x$prefix" != xNONE; then
22079         cf_path_syntax="$prefix"
22080 else
22081         cf_path_syntax="$ac_default_prefix"
22082 fi
22083
22084 case ".$withval" in
22085 (.\$\(*\)*|.\'*\'*)
22086         ;;
22087 (..|./*|.\\*)
22088         ;;
22089 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22090         ;;
22091 (.\${*prefix}*|.\${*dir}*)
22092         eval withval="$withval"
22093         case ".$withval" in
22094         (.NONE/*)
22095                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22096                 ;;
22097         esac
22098         ;;
22099 (.no|.NONE/*)
22100         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22101         ;;
22102 (*)
22103         { { echo "$as_me:22103: error: expected a pathname, not \"$withval\"" >&5
22104 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22105    { (exit 1); exit 1; }; }
22106         ;;
22107 esac
22108
22109 fi
22110 eval ADA_INCLUDE="$withval"
22111
22112 echo "$as_me:22112: result: $ADA_INCLUDE" >&5
22113 echo "${ECHO_T}$ADA_INCLUDE" >&6
22114
22115 echo "$as_me:22115: checking for ada-objects" >&5
22116 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22117
22118 # Check whether --with-ada-objects or --without-ada-objects was given.
22119 if test "${with_ada_objects+set}" = set; then
22120   withval="$with_ada_objects"
22121
22122 else
22123   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22124 fi; if test -n "$prefix/lib/ada/adalib" ; then
22125
22126 if test "x$prefix" != xNONE; then
22127         cf_path_syntax="$prefix"
22128 else
22129         cf_path_syntax="$ac_default_prefix"
22130 fi
22131
22132 case ".$withval" in
22133 (.\$\(*\)*|.\'*\'*)
22134         ;;
22135 (..|./*|.\\*)
22136         ;;
22137 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22138         ;;
22139 (.\${*prefix}*|.\${*dir}*)
22140         eval withval="$withval"
22141         case ".$withval" in
22142         (.NONE/*)
22143                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22144                 ;;
22145         esac
22146         ;;
22147 (.no|.NONE/*)
22148         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22149         ;;
22150 (*)
22151         { { echo "$as_me:22151: error: expected a pathname, not \"$withval\"" >&5
22152 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22153    { (exit 1); exit 1; }; }
22154         ;;
22155 esac
22156
22157 fi
22158 eval ADA_OBJECTS="$withval"
22159
22160 echo "$as_me:22160: result: $ADA_OBJECTS" >&5
22161 echo "${ECHO_T}$ADA_OBJECTS" >&6
22162
22163 echo "$as_me:22163: checking if an Ada95 shared-library should be built" >&5
22164 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22165
22166 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22167 if test "${with_ada_sharedlib+set}" = set; then
22168   withval="$with_ada_sharedlib"
22169   with_ada_sharedlib=$withval
22170 else
22171   with_ada_sharedlib=no
22172 fi;
22173 echo "$as_me:22173: result: $with_ada_sharedlib" >&5
22174 echo "${ECHO_T}$with_ada_sharedlib" >&6
22175
22176 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22177 MAKE_ADA_SHAREDLIB="#"
22178
22179 if test "x$with_ada_sharedlib" != xno
22180 then
22181         MAKE_ADA_SHAREDLIB=
22182         if test "x$with_ada_sharedlib" != xyes
22183         then
22184                 ADA_SHAREDLIB="$with_ada_sharedlib"
22185         fi
22186 fi
22187
22188                 fi
22189         fi
22190 else
22191         cf_with_ada=no
22192 fi
22193
22194 # do this "late" to avoid conflict with header-checks
22195 if test "x$with_widec" = xyes ; then
22196         echo "$as_me:22196: checking for wchar_t" >&5
22197 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22198 if test "${ac_cv_type_wchar_t+set}" = set; then
22199   echo $ECHO_N "(cached) $ECHO_C" >&6
22200 else
22201   cat >conftest.$ac_ext <<_ACEOF
22202 #line 22202 "configure"
22203 #include "confdefs.h"
22204 $ac_includes_default
22205 int
22206 main (void)
22207 {
22208 if ((wchar_t *) 0)
22209   return 0;
22210 if (sizeof (wchar_t))
22211   return 0;
22212   ;
22213   return 0;
22214 }
22215 _ACEOF
22216 rm -f conftest.$ac_objext
22217 if { (eval echo "$as_me:22217: \"$ac_compile\"") >&5
22218   (eval $ac_compile) 2>&5
22219   ac_status=$?
22220   echo "$as_me:22220: \$? = $ac_status" >&5
22221   (exit $ac_status); } &&
22222          { ac_try='test -s conftest.$ac_objext'
22223   { (eval echo "$as_me:22223: \"$ac_try\"") >&5
22224   (eval $ac_try) 2>&5
22225   ac_status=$?
22226   echo "$as_me:22226: \$? = $ac_status" >&5
22227   (exit $ac_status); }; }; then
22228   ac_cv_type_wchar_t=yes
22229 else
22230   echo "$as_me: failed program was:" >&5
22231 cat conftest.$ac_ext >&5
22232 ac_cv_type_wchar_t=no
22233 fi
22234 rm -f conftest.$ac_objext conftest.$ac_ext
22235 fi
22236 echo "$as_me:22236: result: $ac_cv_type_wchar_t" >&5
22237 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22238
22239 echo "$as_me:22239: checking size of wchar_t" >&5
22240 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22241 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22242   echo $ECHO_N "(cached) $ECHO_C" >&6
22243 else
22244   if test "$ac_cv_type_wchar_t" = yes; then
22245   if test "$cross_compiling" = yes; then
22246   # Depending upon the size, compute the lo and hi bounds.
22247 cat >conftest.$ac_ext <<_ACEOF
22248 #line 22248 "configure"
22249 #include "confdefs.h"
22250 $ac_includes_default
22251 int
22252 main (void)
22253 {
22254 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22255   ;
22256   return 0;
22257 }
22258 _ACEOF
22259 rm -f conftest.$ac_objext
22260 if { (eval echo "$as_me:22260: \"$ac_compile\"") >&5
22261   (eval $ac_compile) 2>&5
22262   ac_status=$?
22263   echo "$as_me:22263: \$? = $ac_status" >&5
22264   (exit $ac_status); } &&
22265          { ac_try='test -s conftest.$ac_objext'
22266   { (eval echo "$as_me:22266: \"$ac_try\"") >&5
22267   (eval $ac_try) 2>&5
22268   ac_status=$?
22269   echo "$as_me:22269: \$? = $ac_status" >&5
22270   (exit $ac_status); }; }; then
22271   ac_lo=0 ac_mid=0
22272   while :; do
22273     cat >conftest.$ac_ext <<_ACEOF
22274 #line 22274 "configure"
22275 #include "confdefs.h"
22276 $ac_includes_default
22277 int
22278 main (void)
22279 {
22280 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22281   ;
22282   return 0;
22283 }
22284 _ACEOF
22285 rm -f conftest.$ac_objext
22286 if { (eval echo "$as_me:22286: \"$ac_compile\"") >&5
22287   (eval $ac_compile) 2>&5
22288   ac_status=$?
22289   echo "$as_me:22289: \$? = $ac_status" >&5
22290   (exit $ac_status); } &&
22291          { ac_try='test -s conftest.$ac_objext'
22292   { (eval echo "$as_me:22292: \"$ac_try\"") >&5
22293   (eval $ac_try) 2>&5
22294   ac_status=$?
22295   echo "$as_me:22295: \$? = $ac_status" >&5
22296   (exit $ac_status); }; }; then
22297   ac_hi=$ac_mid; break
22298 else
22299   echo "$as_me: failed program was:" >&5
22300 cat conftest.$ac_ext >&5
22301 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22302 fi
22303 rm -f conftest.$ac_objext conftest.$ac_ext
22304   done
22305 else
22306   echo "$as_me: failed program was:" >&5
22307 cat conftest.$ac_ext >&5
22308 ac_hi=-1 ac_mid=-1
22309   while :; do
22310     cat >conftest.$ac_ext <<_ACEOF
22311 #line 22311 "configure"
22312 #include "confdefs.h"
22313 $ac_includes_default
22314 int
22315 main (void)
22316 {
22317 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22318   ;
22319   return 0;
22320 }
22321 _ACEOF
22322 rm -f conftest.$ac_objext
22323 if { (eval echo "$as_me:22323: \"$ac_compile\"") >&5
22324   (eval $ac_compile) 2>&5
22325   ac_status=$?
22326   echo "$as_me:22326: \$? = $ac_status" >&5
22327   (exit $ac_status); } &&
22328          { ac_try='test -s conftest.$ac_objext'
22329   { (eval echo "$as_me:22329: \"$ac_try\"") >&5
22330   (eval $ac_try) 2>&5
22331   ac_status=$?
22332   echo "$as_me:22332: \$? = $ac_status" >&5
22333   (exit $ac_status); }; }; then
22334   ac_lo=$ac_mid; break
22335 else
22336   echo "$as_me: failed program was:" >&5
22337 cat conftest.$ac_ext >&5
22338 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22339 fi
22340 rm -f conftest.$ac_objext conftest.$ac_ext
22341   done
22342 fi
22343 rm -f conftest.$ac_objext conftest.$ac_ext
22344 # Binary search between lo and hi bounds.
22345 while test "x$ac_lo" != "x$ac_hi"; do
22346   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22347   cat >conftest.$ac_ext <<_ACEOF
22348 #line 22348 "configure"
22349 #include "confdefs.h"
22350 $ac_includes_default
22351 int
22352 main (void)
22353 {
22354 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22355   ;
22356   return 0;
22357 }
22358 _ACEOF
22359 rm -f conftest.$ac_objext
22360 if { (eval echo "$as_me:22360: \"$ac_compile\"") >&5
22361   (eval $ac_compile) 2>&5
22362   ac_status=$?
22363   echo "$as_me:22363: \$? = $ac_status" >&5
22364   (exit $ac_status); } &&
22365          { ac_try='test -s conftest.$ac_objext'
22366   { (eval echo "$as_me:22366: \"$ac_try\"") >&5
22367   (eval $ac_try) 2>&5
22368   ac_status=$?
22369   echo "$as_me:22369: \$? = $ac_status" >&5
22370   (exit $ac_status); }; }; then
22371   ac_hi=$ac_mid
22372 else
22373   echo "$as_me: failed program was:" >&5
22374 cat conftest.$ac_ext >&5
22375 ac_lo=`expr $ac_mid + 1`
22376 fi
22377 rm -f conftest.$ac_objext conftest.$ac_ext
22378 done
22379 ac_cv_sizeof_wchar_t=$ac_lo
22380 else
22381   if test "$cross_compiling" = yes; then
22382   { { echo "$as_me:22382: error: cannot run test program while cross compiling" >&5
22383 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22384    { (exit 1); exit 1; }; }
22385 else
22386   cat >conftest.$ac_ext <<_ACEOF
22387 #line 22387 "configure"
22388 #include "confdefs.h"
22389 $ac_includes_default
22390 int
22391 main (void)
22392 {
22393 FILE *f = fopen ("conftest.val", "w");
22394 if (!f)
22395   $ac_main_return (1);
22396 fprintf (f, "%d", (sizeof (wchar_t)));
22397 fclose (f);
22398   ;
22399   return 0;
22400 }
22401 _ACEOF
22402 rm -f conftest$ac_exeext
22403 if { (eval echo "$as_me:22403: \"$ac_link\"") >&5
22404   (eval $ac_link) 2>&5
22405   ac_status=$?
22406   echo "$as_me:22406: \$? = $ac_status" >&5
22407   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22408   { (eval echo "$as_me:22408: \"$ac_try\"") >&5
22409   (eval $ac_try) 2>&5
22410   ac_status=$?
22411   echo "$as_me:22411: \$? = $ac_status" >&5
22412   (exit $ac_status); }; }; then
22413   ac_cv_sizeof_wchar_t=`cat conftest.val`
22414 else
22415   echo "$as_me: program exited with status $ac_status" >&5
22416 echo "$as_me: failed program was:" >&5
22417 cat conftest.$ac_ext >&5
22418 fi
22419 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22420 fi
22421 fi
22422 rm -f conftest.val
22423 else
22424   ac_cv_sizeof_wchar_t=0
22425 fi
22426 fi
22427 echo "$as_me:22427: result: $ac_cv_sizeof_wchar_t" >&5
22428 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22429 cat >>confdefs.h <<EOF
22430 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22431 EOF
22432
22433 fi
22434
22435 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22436 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22437 ###
22438 ### ticlib modules may be a separate library, otherwise contained in termlib.
22439 ### termlib modules may be a separate library, otherwise contained in ncurses.
22440 ###
22441 ### The of "+" or " " between the tokens controls the way the script
22442 ### chooses to split module lists into libraries.
22443 ###
22444 ### (see CF_LIB_RULES).
22445 echo "$as_me:22445: checking for library subsets" >&5
22446 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22447 LIB_SUBSETS=
22448
22449 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22450         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22451         if test "$with_ticlib" != no ; then
22452                 LIB_SUBSETS="${LIB_SUBSETS} "
22453         else
22454                 LIB_SUBSETS="${LIB_SUBSETS}+"
22455         fi
22456 fi
22457
22458 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22459 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22460
22461 if test "$with_termlib" != no ; then
22462         LIB_SUBSETS="${LIB_SUBSETS} "
22463 else
22464         LIB_SUBSETS="${LIB_SUBSETS}+"
22465 fi
22466
22467 LIB_SUBSETS="${LIB_SUBSETS}base"
22468
22469 # Most term-driver calls are to tinfo, but some like init_pair are to the
22470 # base library (so it resides in base).
22471 if test "$with_term_driver" != no ; then
22472         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22473         case $cf_cv_system_name in
22474         (*mingw32*|*mingw64*)
22475                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22476                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22477                 ;;
22478         (*)
22479                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22480                 ;;
22481         esac
22482 fi
22483
22484 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22485 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22486
22487 echo "$as_me:22487: result: $LIB_SUBSETS" >&5
22488 echo "${ECHO_T}$LIB_SUBSETS" >&6
22489
22490 ### Construct the list of include-directories to be generated
22491
22492 if test "$srcdir" != "."; then
22493         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22494 fi
22495 CPPFLAGS="-I../include $CPPFLAGS"
22496 if test "$srcdir" != "."; then
22497         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22498 fi
22499 CPPFLAGS="-I. $CPPFLAGS"
22500
22501 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22502 if test "$srcdir" != "."; then
22503         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22504 fi
22505 if test "$GCC" != yes; then
22506         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22507 elif test "$includedir" != "/usr/include"; then
22508         if test "$includedir" = '${prefix}/include' ; then
22509                 if test x$prefix != x/usr ; then
22510                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22511                 fi
22512         else
22513                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22514         fi
22515 fi
22516
22517 ### Build up pieces for makefile rules
22518 echo "$as_me:22518: checking default library suffix" >&5
22519 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22520
22521         case $DFT_LWR_MODEL in
22522         (libtool) DFT_ARG_SUFFIX=''   ;;
22523         (normal)  DFT_ARG_SUFFIX=''   ;;
22524         (debug)   DFT_ARG_SUFFIX='_g' ;;
22525         (profile) DFT_ARG_SUFFIX='_p' ;;
22526         (shared)  DFT_ARG_SUFFIX=''   ;;
22527         esac
22528         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22529 echo "$as_me:22529: result: $DFT_ARG_SUFFIX" >&5
22530 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22531
22532 echo "$as_me:22532: checking default library-dependency suffix" >&5
22533 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22534
22535         case X$DFT_LWR_MODEL in
22536         (Xlibtool)
22537                 DFT_LIB_SUFFIX='.la'
22538                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22539                 ;;
22540         (Xdebug)
22541                 DFT_LIB_SUFFIX='_g.a'
22542                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22543                 ;;
22544         (Xprofile)
22545                 DFT_LIB_SUFFIX='_p.a'
22546                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22547                 ;;
22548         (Xshared)
22549                 case $cf_cv_system_name in
22550                 (aix[5-7]*)
22551                         DFT_LIB_SUFFIX='.so'
22552                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22553                         ;;
22554                 (cygwin*|msys*|mingw*)
22555                         DFT_LIB_SUFFIX='.dll'
22556                         DFT_DEP_SUFFIX='.dll.a'
22557                         ;;
22558                 (darwin*)
22559                         DFT_LIB_SUFFIX='.dylib'
22560                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22561                         ;;
22562                 (hpux*)
22563                         case $target in
22564                         (ia64*)
22565                                 DFT_LIB_SUFFIX='.so'
22566                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22567                                 ;;
22568                         (*)
22569                                 DFT_LIB_SUFFIX='.sl'
22570                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22571                                 ;;
22572                         esac
22573                         ;;
22574                 (*)
22575                         DFT_LIB_SUFFIX='.so'
22576                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22577                         ;;
22578                 esac
22579                 ;;
22580         (*)
22581                 DFT_LIB_SUFFIX='.a'
22582                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22583                 ;;
22584         esac
22585         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22586         then
22587                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22588                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22589         fi
22590 echo "$as_me:22590: result: $DFT_DEP_SUFFIX" >&5
22591 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22592
22593 echo "$as_me:22593: checking default object directory" >&5
22594 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22595
22596         case $DFT_LWR_MODEL in
22597         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22598         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22599         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22600         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22601         (shared)
22602                 case $cf_cv_system_name in
22603                 (cygwin|msys)
22604                         DFT_OBJ_SUBDIR='objects' ;;
22605                 (*)
22606                         DFT_OBJ_SUBDIR='obj_s' ;;
22607                 esac
22608         esac
22609 echo "$as_me:22609: result: $DFT_OBJ_SUBDIR" >&5
22610 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22611
22612 if test "x$cf_with_cxx" = xyes ; then
22613 echo "$as_me:22613: checking c++ library-dependency suffix" >&5
22614 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22615 if test "$with_libtool" != "no"; then
22616         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22617         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22618 elif test "$with_shared_cxx" != "no"; then
22619         # also for g++ users...
22620         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22621 else
22622         # we normally make a static library because C/C++ library rules differ
22623
22624         case Xnormal in
22625         (Xlibtool)
22626                 CXX_LIB_SUFFIX='.la'
22627                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22628                 ;;
22629         (Xdebug)
22630                 CXX_LIB_SUFFIX='_g.a'
22631                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22632                 ;;
22633         (Xprofile)
22634                 CXX_LIB_SUFFIX='_p.a'
22635                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22636                 ;;
22637         (Xshared)
22638                 case $cf_cv_system_name in
22639                 (aix[5-7]*)
22640                         CXX_LIB_SUFFIX='.so'
22641                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22642                         ;;
22643                 (cygwin*|msys*|mingw*)
22644                         CXX_LIB_SUFFIX='.dll'
22645                         CXX_DEP_SUFFIX='.dll.a'
22646                         ;;
22647                 (darwin*)
22648                         CXX_LIB_SUFFIX='.dylib'
22649                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22650                         ;;
22651                 (hpux*)
22652                         case $target in
22653                         (ia64*)
22654                                 CXX_LIB_SUFFIX='.so'
22655                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22656                                 ;;
22657                         (*)
22658                                 CXX_LIB_SUFFIX='.sl'
22659                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22660                                 ;;
22661                         esac
22662                         ;;
22663                 (*)
22664                         CXX_LIB_SUFFIX='.so'
22665                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22666                         ;;
22667                 esac
22668                 ;;
22669         (*)
22670                 CXX_LIB_SUFFIX='.a'
22671                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22672                 ;;
22673         esac
22674         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22675         then
22676                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22677                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22678         fi
22679
22680 fi
22681 echo "$as_me:22681: result: $CXX_LIB_SUFFIX" >&5
22682 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22683
22684 fi
22685
22686 # do not want -ldl in build except as needed for -lncurses dependency
22687 if test "x$with_dlsym" = xyes ; then
22688 if test $DFT_LWR_MODEL = shared || \
22689    test $DFT_LWR_MODEL = libtool ; then
22690
22691 # remove dl library from $LIBS
22692 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22693
22694 fi
22695 fi
22696 ### Set up low-level terminfo dependencies for makefiles.
22697
22698 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22699 # do not need libdl
22700 TICS_LIST=
22701 if test "x$with_dlsym" = xyes ; then
22702
22703 # remove dl library from $SHLIB_LIST
22704 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22705
22706 fi
22707
22708 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22709 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22710 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22711 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22712 then
22713         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22714 fi
22715
22716 if test "$with_ticlib" != no ; then
22717
22718         if test "x$with_ticlib" != xyes ; then
22719                 TICS_NAME=$with_ticlib
22720                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22721                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22722                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22723                 TICS_LIB_SUFFIX="${with_ticlib}"
22724         else
22725                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22726                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22727                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22728                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22729         fi
22730         TICS_LDFLAGS="-L${LIB_DIR}"
22731         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22732 else
22733         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22734         TICS_LDFLAGS="-L${LIB_DIR}"
22735         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22736 fi
22737
22738 if test "$with_termlib" != no ; then
22739
22740         if test "x$with_termlib" != xyes ; then
22741                 TINFO_NAME=$with_termlib
22742                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22743                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22744                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22745                 TINFO_LIB_SUFFIX="${with_termlib}"
22746         else
22747                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22748                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22749                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22750                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22751         fi
22752
22753         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22754         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22755         if test "$DFT_LWR_MODEL" = "libtool"; then
22756                 TEST_ARGS="${TEST_DEPS}"
22757                 TEST_ARG2="${TEST_DEP2}"
22758                 TINFO_LDFLAGS="-L${LIB_DIR}"
22759                 TINFO_LIBS="$TEST_ARGS"
22760                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22761                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22762         else
22763                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22764                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22765                 if test "x$with_term_driver" != xno ; then
22766                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22767                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22768                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22769                 else
22770                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22771                         TINFO_LIBS="$TEST_ARGS"
22772                 fi
22773                 TINFO_LDFLAGS="-L${LIB_DIR}"
22774                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22775         fi
22776 else
22777         # the next lines are needed for linking libtic over libncurses
22778         TINFO_NAME=${LIB_NAME}
22779         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22780         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22781         if test "x$with_tic_depends" = xyes ; then
22782                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22783         else
22784                 TICS_LIST="$SHLIB_LIST"
22785         fi
22786
22787         TINFO_LDFLAGS="-L${LIB_DIR}"
22788         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22789 fi
22790
22791 if test "$DFT_LWR_MODEL" = shared ; then
22792         case $cf_cv_system_name in
22793         (cygwin*|msys*)
22794                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22795                 TINFO_SUFFIX=.dll
22796                 ;;
22797         esac
22798 fi
22799
22800 if test "x$with_dlsym" = xyes ; then
22801
22802 # remove dl library from $TICS_LIST
22803 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22804
22805 fi
22806
22807 if test "$DFT_LWR_MODEL" = "libtool"; then
22808         OBJEXT=lo
22809 fi
22810
22811 # needed for Ada95
22812 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22813
22814 case $DFT_LWR_MODEL in
22815 (normal|debug|profile)
22816
22817 if test "$GCC" = yes ; then
22818         case $cf_cv_system_name in
22819         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22820                 LDFLAGS_STATIC=
22821                 LDFLAGS_SHARED=
22822                 ;;
22823         (*)     # normally, except when broken
22824                 LDFLAGS_STATIC=-static
22825                 LDFLAGS_SHARED=-dynamic
22826                 ;;
22827         esac
22828 else
22829         case $cf_cv_system_name in
22830         (aix[4-7]*)     # from ld manpage
22831                 LDFLAGS_STATIC=-bstatic
22832                 LDFLAGS_SHARED=-bdynamic
22833                 ;;
22834         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22835                 # We could also use just "archive" and "shared".
22836                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22837                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22838                 ;;
22839         (irix*)         # from ld manpage IRIX64
22840                 LDFLAGS_STATIC=-Bstatic
22841                 LDFLAGS_SHARED=-Bdynamic
22842                 ;;
22843         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22844                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22845                 LDFLAGS_STATIC=-noso
22846                 LDFLAGS_SHARED=-so_archive
22847                 ;;
22848         (solaris2*)
22849                 LDFLAGS_STATIC=-Bstatic
22850                 LDFLAGS_SHARED=-Bdynamic
22851                 ;;
22852         esac
22853 fi
22854
22855 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22856 then
22857         echo "$as_me:22857: checking if linker supports switching between static/dynamic" >&5
22858 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22859
22860         rm -f libconftest.a
22861         cat >conftest.$ac_ext <<EOF
22862 #line 22862 "configure"
22863 #include <stdio.h>
22864 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22865 EOF
22866         if { (eval echo "$as_me:22866: \"$ac_compile\"") >&5
22867   (eval $ac_compile) 2>&5
22868   ac_status=$?
22869   echo "$as_me:22869: \$? = $ac_status" >&5
22870   (exit $ac_status); } ; then
22871                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22872                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22873         fi
22874         rm -f conftest.*
22875
22876         cf_save_LIBS="$LIBS"
22877
22878         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22879         cat >conftest.$ac_ext <<_ACEOF
22880 #line 22880 "configure"
22881 #include "confdefs.h"
22882
22883 #line 22883 "configure"
22884 #include <stdio.h>
22885 int cf_ldflags_static(FILE *fp);
22886
22887 int
22888 main (void)
22889 {
22890
22891         return cf_ldflags_static(stdin);
22892
22893   ;
22894   return 0;
22895 }
22896 _ACEOF
22897 rm -f conftest.$ac_objext conftest$ac_exeext
22898 if { (eval echo "$as_me:22898: \"$ac_link\"") >&5
22899   (eval $ac_link) 2>&5
22900   ac_status=$?
22901   echo "$as_me:22901: \$? = $ac_status" >&5
22902   (exit $ac_status); } &&
22903          { ac_try='test -s conftest$ac_exeext'
22904   { (eval echo "$as_me:22904: \"$ac_try\"") >&5
22905   (eval $ac_try) 2>&5
22906   ac_status=$?
22907   echo "$as_me:22907: \$? = $ac_status" >&5
22908   (exit $ac_status); }; }; then
22909
22910         # some linkers simply ignore the -dynamic
22911         case x`file conftest$ac_exeext 2>/dev/null` in
22912         (*static*)
22913                 cf_ldflags_static=no
22914                 ;;
22915         (*)
22916                 cf_ldflags_static=yes
22917                 ;;
22918         esac
22919
22920 else
22921   echo "$as_me: failed program was:" >&5
22922 cat conftest.$ac_ext >&5
22923 cf_ldflags_static=no
22924 fi
22925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22926
22927         rm -f libconftest.*
22928         LIBS="$cf_save_LIBS"
22929
22930         echo "$as_me:22930: result: $cf_ldflags_static" >&5
22931 echo "${ECHO_T}$cf_ldflags_static" >&6
22932
22933         if test $cf_ldflags_static != yes
22934         then
22935                 LDFLAGS_STATIC=
22936                 LDFLAGS_SHARED=
22937         fi
22938 else
22939         LDFLAGS_STATIC=
22940         LDFLAGS_SHARED=
22941 fi
22942
22943         ;;
22944 esac
22945
22946 echo "$as_me:22946: checking where we will install curses.h" >&5
22947 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22948
22949 includesubdir=
22950 if test "$with_overwrite" = no && \
22951  ( test "x$includedir" = 'x${prefix}/include' || \
22952    test "x$includedir" = "x${prefix}/include" )
22953 then
22954         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22955 fi
22956 echo "$as_me:22956: result: ${includedir}${includesubdir}" >&5
22957 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22958
22959 ### Resolve a conflict between normal and wide-curses by forcing applications
22960 ### that will need libutf8 to add it to their configure script.
22961 if test "$with_overwrite" != no ; then
22962 if test "$NCURSES_LIBUTF8" = 1 ; then
22963         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22964         { echo "$as_me:22964: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22965 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22966 fi
22967 fi
22968 WITH_OVERWRITE=$with_overwrite
22969
22970 # used to separate tack out of the tree
22971 NCURSES_TREE=
22972
22973 ### predefined stuff for the test programs
22974
22975 cat >>confdefs.h <<\EOF
22976 #define HAVE_SLK_COLOR 1
22977 EOF
22978
22979 ### Construct the list of subdirectories for which we'll customize makefiles
22980 ### with the appropriate compile-rules.
22981
22982 echo "$as_me:22982: checking for src modules" >&5
22983 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22984
22985 # dependencies and linker-arguments for test-programs
22986 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22987 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22988 if test "$DFT_LWR_MODEL" = "libtool"; then
22989         TEST_ARGS="${TEST_DEPS}"
22990         TEST_ARG2="${TEST_DEP2}"
22991 else
22992         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22993         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22994 fi
22995
22996 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22997 cf_cv_src_modules=
22998 for cf_dir in $modules_to_build
22999 do
23000         if test -f $srcdir/$cf_dir/modules; then
23001
23002                 # We may/may not have tack in the distribution, though the
23003                 # makefile is.
23004                 if test $cf_dir = tack ; then
23005                         if test "x$cf_with_tack" != "xyes"; then
23006                                 continue
23007                         fi
23008                 fi
23009
23010                 if test -z "$cf_cv_src_modules"; then
23011                         cf_cv_src_modules=$cf_dir
23012                 else
23013                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23014                 fi
23015
23016                 # Make the ncurses_cfg.h file record the library interface files as
23017                 # well.  These are header files that are the same name as their
23018                 # directory.  Ncurses is the only library that does not follow
23019                 # that pattern.
23020                 if test $cf_dir = tack ; then
23021                         continue
23022                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23023
23024 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23025
23026                         cat >>confdefs.h <<EOF
23027 #define HAVE_${cf_have_include}_H 1
23028 EOF
23029
23030                         cat >>confdefs.h <<EOF
23031 #define HAVE_LIB${cf_have_include} 1
23032 EOF
23033
23034                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23035                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23036                         if test "$DFT_LWR_MODEL" = "libtool"; then
23037                                 TEST_ARGS="${TEST_DEPS}"
23038                                 TEST_ARG2="${TEST_DEP2}"
23039                         else
23040                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23041                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23042                         fi
23043                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23044                 fi
23045         fi
23046 done
23047 echo "$as_me:23047: result: $cf_cv_src_modules" >&5
23048 echo "${ECHO_T}$cf_cv_src_modules" >&6
23049
23050 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23051 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23052
23053 SRC_SUBDIRS=
23054 if test "x$cf_with_manpages" != xno ; then
23055         SRC_SUBDIRS="$SRC_SUBDIRS man"
23056 fi
23057 SRC_SUBDIRS="$SRC_SUBDIRS include"
23058 for cf_dir in $cf_cv_src_modules
23059 do
23060         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23061 done
23062 if test "x$cf_with_tests" != "xno" ; then
23063         SRC_SUBDIRS="$SRC_SUBDIRS test"
23064 fi
23065 # always make this, to install the ncurses-config script
23066 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23067 if test "$cf_with_cxx_binding" != no; then
23068         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23069         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23070 fi
23071
23072 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23073 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23074
23075 ADA_SUBDIRS=
23076 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23077         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23078         ADA_SUBDIRS="gen src"
23079         if test "x$cf_with_tests" != "xno" ; then
23080                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23081         fi
23082 fi
23083
23084 SUB_MAKEFILES=
23085 for cf_dir in $SRC_SUBDIRS
23086 do
23087         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23088 done
23089
23090 if test -n "$ADA_SUBDIRS"; then
23091         for cf_dir in $ADA_SUBDIRS
23092         do
23093                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23094         done
23095
23096 fi
23097
23098 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23099    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23100    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23101 fi
23102
23103 DIRS_TO_MAKE="lib"
23104 for cf_item in $cf_list_models
23105 do
23106
23107         case $cf_item in
23108         (libtool) cf_subdir='obj_lo'  ;;
23109         (normal)  cf_subdir='objects' ;;
23110         (debug)   cf_subdir='obj_g' ;;
23111         (profile) cf_subdir='obj_p' ;;
23112         (shared)
23113                 case $cf_cv_system_name in
23114                 (cygwin|msys)
23115                         cf_subdir='objects' ;;
23116                 (*)
23117                         cf_subdir='obj_s' ;;
23118                 esac
23119         esac
23120
23121         for cf_item2 in $DIRS_TO_MAKE
23122         do
23123                 test $cf_item2 = $cf_subdir && break
23124         done
23125         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23126 done
23127 for cf_dir in $DIRS_TO_MAKE
23128 do
23129         test ! -d $cf_dir && mkdir $cf_dir
23130 done
23131
23132 # symbols that differ when compiling Ada95 by itself.
23133 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23134
23135 # values to use as strings
23136
23137 cat >>confdefs.h <<EOF
23138 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23139 EOF
23140
23141 cat >>confdefs.h <<EOF
23142 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23143 EOF
23144
23145 ### Now that we're done running tests, add the compiler-warnings, if any
23146
23147 cf_fix_cppflags=no
23148 cf_new_cflags=
23149 cf_new_cppflags=
23150 cf_new_extra_cppflags=
23151
23152 for cf_add_cflags in $EXTRA_CFLAGS
23153 do
23154 case $cf_fix_cppflags in
23155 (no)
23156         case $cf_add_cflags in
23157         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23158                 case $cf_add_cflags in
23159                 (-D*)
23160                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23161
23162                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23163                                 && test -z "${cf_tst_cflags}" \
23164                                 && cf_fix_cppflags=yes
23165
23166                         if test $cf_fix_cppflags = yes ; then
23167
23168         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23169         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23170
23171                                 continue
23172                         elif test "${cf_tst_cflags}" = "\"'" ; then
23173
23174         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23175         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23176
23177                                 continue
23178                         fi
23179                         ;;
23180                 esac
23181                 case "$CPPFLAGS" in
23182                 (*$cf_add_cflags)
23183                         ;;
23184                 (*)
23185                         case $cf_add_cflags in
23186                         (-D*)
23187                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23188
23189 CPPFLAGS=`echo "$CPPFLAGS" | \
23190         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23191                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23192
23193                                 ;;
23194                         esac
23195
23196         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23197         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23198
23199                         ;;
23200                 esac
23201                 ;;
23202         (*)
23203
23204         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23205         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23206
23207                 ;;
23208         esac
23209         ;;
23210 (yes)
23211
23212         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23213         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23214
23215         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23216
23217         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23218                 && test -z "${cf_tst_cflags}" \
23219                 && cf_fix_cppflags=no
23220         ;;
23221 esac
23222 done
23223
23224 if test -n "$cf_new_cflags" ; then
23225
23226         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23227         CFLAGS="${CFLAGS}$cf_new_cflags"
23228
23229 fi
23230
23231 if test -n "$cf_new_cppflags" ; then
23232
23233         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23234         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23235
23236 fi
23237
23238 if test -n "$cf_new_extra_cppflags" ; then
23239
23240         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23241         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23242
23243 fi
23244
23245 ### Define substitutions for header files to avoid name-pollution
23246
23247 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23248         HAVE_TCGETATTR=1
23249 else
23250         HAVE_TCGETATTR=0
23251 fi
23252
23253 if test "x$ac_cv_header_stdint_h" = xyes ; then
23254         HAVE_STDINT_H=1
23255 else
23256         HAVE_STDINT_H=0
23257 fi
23258
23259 if test "x$ac_cv_header_termio_h" = xyes ; then
23260         HAVE_TERMIO_H=1
23261 else
23262         HAVE_TERMIO_H=0
23263 fi
23264
23265 if test "x$ac_cv_header_termios_h" = xyes ; then
23266         HAVE_TERMIOS_H=1
23267 else
23268         HAVE_TERMIOS_H=0
23269 fi
23270
23271 ################################################################################
23272 test "x$use_database" = xyes && \
23273 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23274
23275 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23276 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23277
23278 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23279 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23280 fi
23281
23282 # Extract the first word of "tic", so it can be a program name with args.
23283 set dummy tic; ac_word=$2
23284 echo "$as_me:23284: checking for $ac_word" >&5
23285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23286 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23287   echo $ECHO_N "(cached) $ECHO_C" >&6
23288 else
23289   case $TIC_PATH in
23290   [\\/]* | ?:[\\/]*)
23291   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23292   ;;
23293   *)
23294   ac_save_IFS=$IFS; IFS=$ac_path_separator
23295 ac_dummy="$PATH:/usr/local/ncurses/bin"
23296 for ac_dir in $ac_dummy; do
23297   IFS=$ac_save_IFS
23298   test -z "$ac_dir" && ac_dir=.
23299   if $as_executable_p "$ac_dir/$ac_word"; then
23300    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23301    echo "$as_me:23301: found $ac_dir/$ac_word" >&5
23302    break
23303 fi
23304 done
23305
23306   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23307   ;;
23308 esac
23309 fi
23310 TIC_PATH=$ac_cv_path_TIC_PATH
23311
23312 if test -n "$TIC_PATH"; then
23313   echo "$as_me:23313: result: $TIC_PATH" >&5
23314 echo "${ECHO_T}$TIC_PATH" >&6
23315 else
23316   echo "$as_me:23316: result: no" >&5
23317 echo "${ECHO_T}no" >&6
23318 fi
23319
23320 if test -n "$FALLBACK_LIST"
23321 then
23322         if test "$TIC_PATH" = unknown
23323         then
23324                 { echo "$as_me:23324: WARNING: no tic program found for fallbacks" >&5
23325 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23326         fi
23327 fi
23328
23329 if test "x$cf_with_tests" != xno ; then
23330         MAKE_TESTS=
23331 else
23332         MAKE_TESTS="#"
23333 fi
23334
23335 ADAHTML_DIR=../../doc/html/ada
23336
23337 # these could be configurable, but are not currently
23338 PANEL_NAME=panel
23339 MENU_NAME=menu
23340 FORM_NAME=form
23341 CXX_NAME=ncurses++
23342
23343 # workaround for OS/2 (20151017)
23344 case $cf_cv_system_name in
23345 (os2*)
23346         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23347         ;;
23348 (*)
23349         LIBTOOL_OPTS_CXX=
23350         ;;
23351 esac
23352
23353 # workaround for g++ versus Solaris (20131116)
23354 case $cf_cv_system_name in
23355 (solaris2*)
23356         case "x$CPPFLAGS" in
23357         (*-D_XOPEN_SOURCE_EXTENDED*)
23358                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23359
23360 echo "${as_me:-configure}:23360: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23361
23362                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23363                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23364                 ;;
23365         esac
23366         ;;
23367 esac
23368
23369 # Help to automatically enable the extended curses features when using either
23370 # the *-config or the ".pc" files by adding defines.
23371 echo "$as_me:23371: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23372 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23373 PKG_CFLAGS=
23374 for cf_loop1 in $CPPFLAGS_after_XOPEN
23375 do
23376         cf_found=no
23377         for cf_loop2 in $CPPFLAGS_before_XOPEN
23378         do
23379                 if test "x$cf_loop1" = "x$cf_loop2"
23380                 then
23381                         cf_found=yes
23382                         break
23383                 fi
23384         done
23385         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23386 done
23387 echo "$as_me:23387: result: $PKG_CFLAGS" >&5
23388 echo "${ECHO_T}$PKG_CFLAGS" >&6
23389
23390 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23391 case "x$NCURSES_OSPEED" in
23392 (*short*)
23393         cf_compatible=1
23394         ;;
23395 (*)
23396         cf_compatible=0
23397         ;;
23398 esac
23399
23400 cat >>confdefs.h <<EOF
23401 #define NCURSES_OSPEED_COMPAT $cf_compatible
23402 EOF
23403
23404 case "x$cf_cv_typeof_chtype" in
23405 (xshort|xint|xlong)
23406         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23407         ;;
23408 esac
23409
23410 case "x$cf_cv_typeof_mmask_t" in
23411 (xshort|xint|xlong)
23412         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23413         ;;
23414 esac
23415
23416 # substitute into misc/Makefile to suppress
23417 # (un)install.data from the
23418 # (un)install rules.
23419 if test "x$cf_with_db_install" = "xno"; then
23420         MISC_INSTALL_DATA=
23421         MISC_UNINSTALL_DATA=
23422 else
23423         MISC_INSTALL_DATA=install.data
23424         MISC_UNINSTALL_DATA=uninstall.data
23425 fi
23426
23427 SUB_SCRIPTS=
23428
23429 if test -n "$PACKAGE"
23430 then
23431         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23432         export PACKAGE
23433         echo "package: $PACKAGE"
23434 fi
23435
23436 UNALTERED_SYMS=
23437 cf_filter_syms=no
23438
23439 if test -n "$RESULTING_SYMS"
23440 then
23441         cf_filter_syms=$cf_dft_filter_syms
23442         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23443
23444 echo "${as_me:-configure}:23444: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23445
23446 fi
23447
23448 if test "x$WILDCARD_SYMS" = xno
23449 then
23450         cf_filter_syms=yes
23451 fi
23452
23453 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23454
23455 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23456 if test $cf_filter_syms = yes
23457 then
23458         RESULTING_SYMS=resulting.map
23459 fi
23460
23461 if test "x$cross_compiling" = xyes ; then
23462         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23463         CHECK_BUILD="#"
23464 else
23465         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23466         CHECK_BUILD=
23467 fi
23468
23469 cat >>confdefs.h <<\EOF
23470 #define HAVE_CURSES_DATA_BOOLNAMES 1
23471 EOF
23472
23473 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"
23474 ac_config_commands="$ac_config_commands default"
23475 cat >confcache <<\_ACEOF
23476 # This file is a shell script that caches the results of configure
23477 # tests run on this system so they can be shared between configure
23478 # scripts and configure runs, see configure's option --config-cache.
23479 # It is not useful on other systems.  If it contains results you don't
23480 # want to keep, you may remove or edit it.
23481 #
23482 # config.status only pays attention to the cache file if you give it
23483 # the --recheck option to rerun configure.
23484 #
23485 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23486 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23487 # following values.
23488
23489 _ACEOF
23490
23491 # The following way of writing the cache mishandles newlines in values,
23492 # but we know of no workaround that is simple, portable, and efficient.
23493 # So, don't put newlines in cache variables' values.
23494 # Ultrix sh set writes to stderr and can't be redirected directly,
23495 # and sets the high bit in the cache file unless we assign to the vars.
23496 {
23497   (set) 2>&1 |
23498     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23499     *ac_space=\ *)
23500       # `set' does not quote correctly, so add quotes (double-quote
23501       # substitution turns \\\\ into \\, and sed turns \\ into \).
23502       sed -n \
23503         "s/'/'\\\\''/g;
23504           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23505       ;;
23506     *)
23507       # `set' quotes correctly as required by POSIX, so do not add quotes.
23508       sed -n \
23509         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23510       ;;
23511     esac;
23512 } |
23513   sed '
23514      t clear
23515      : clear
23516      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23517      t end
23518      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23519      : end' >>confcache
23520 if cmp -s $cache_file confcache; then :; else
23521   if test -w $cache_file; then
23522     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23523     cat confcache >$cache_file
23524   else
23525     echo "not updating unwritable cache $cache_file"
23526   fi
23527 fi
23528 rm -f confcache
23529
23530 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23531 # Let make expand exec_prefix.
23532 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23533
23534 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23535 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23536 # trailing colons and then remove the whole line if VPATH becomes empty
23537 # (actually we leave an empty line to preserve line numbers).
23538 if test "x$srcdir" = x.; then
23539   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23540 s/:*\$(srcdir):*/:/;
23541 s/:*\${srcdir}:*/:/;
23542 s/:*@srcdir@:*/:/;
23543 s/^\([^=]*=[    ]*\):*/\1/;
23544 s/:*$//;
23545 s/^[^=]*=[      ]*$//;
23546 }'
23547 fi
23548
23549 DEFS=-DHAVE_CONFIG_H
23550
23551 : ${CONFIG_STATUS=./config.status}
23552 ac_clean_files_save=$ac_clean_files
23553 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23554 { echo "$as_me:23554: creating $CONFIG_STATUS" >&5
23555 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23556 cat >$CONFIG_STATUS <<_ACEOF
23557 #! $SHELL
23558 # Generated automatically by configure.
23559 # Run this file to recreate the current configuration.
23560 # Compiler output produced by configure, useful for debugging
23561 # configure, is in config.log if it exists.
23562
23563 debug=false
23564 SHELL=\${CONFIG_SHELL-$SHELL}
23565 ac_cs_invocation="\$0 \$@"
23566
23567 _ACEOF
23568
23569 cat >>$CONFIG_STATUS <<\_ACEOF
23570 # Be Bourne compatible
23571 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23572   emulate sh
23573   NULLCMD=:
23574 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23575   set -o posix
23576 fi
23577
23578 # Name of the executable.
23579 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23580
23581 if expr a : '\(a\)' >/dev/null 2>&1; then
23582   as_expr=expr
23583 else
23584   as_expr=false
23585 fi
23586
23587 rm -f conf$$ conf$$.exe conf$$.file
23588 echo >conf$$.file
23589 if ln -s conf$$.file conf$$ 2>/dev/null; then
23590   # We could just check for DJGPP; but this test a) works b) is more generic
23591   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23592   if test -f conf$$.exe; then
23593     # Don't use ln at all; we don't have any links
23594     as_ln_s='cp -p'
23595   else
23596     as_ln_s='ln -s'
23597   fi
23598 elif ln conf$$.file conf$$ 2>/dev/null; then
23599   as_ln_s=ln
23600 else
23601   as_ln_s='cp -p'
23602 fi
23603 rm -f conf$$ conf$$.exe conf$$.file
23604
23605 as_executable_p="test -f"
23606
23607 # Support unset when possible.
23608 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23609   as_unset=unset
23610 else
23611   as_unset=false
23612 fi
23613
23614 # NLS nuisances.
23615 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23616 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23617 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23618 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23619 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23620 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23621 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23622 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23623
23624 # IFS
23625 # We need space, tab and new line, in precisely that order.
23626 as_nl='
23627 '
23628 IFS="   $as_nl"
23629
23630 # CDPATH.
23631 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23632
23633 exec 6>&1
23634
23635 _ACEOF
23636
23637 # Files that config.status was made for.
23638 if test -n "$ac_config_files"; then
23639   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23640 fi
23641
23642 if test -n "$ac_config_headers"; then
23643   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23644 fi
23645
23646 if test -n "$ac_config_links"; then
23647   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23648 fi
23649
23650 if test -n "$ac_config_commands"; then
23651   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23652 fi
23653
23654 cat >>$CONFIG_STATUS <<\EOF
23655
23656 ac_cs_usage="\
23657 \`$as_me' instantiates files from templates according to the
23658 current configuration.
23659
23660 Usage: $0 [OPTIONS] [FILE]...
23661
23662   -h, --help       print this help, then exit
23663   -V, --version    print version number, then exit
23664   -d, --debug      don't remove temporary files
23665       --recheck    update $as_me by reconfiguring in the same conditions
23666   --file=FILE[:TEMPLATE]
23667                    instantiate the configuration file FILE
23668   --header=FILE[:TEMPLATE]
23669                    instantiate the configuration header FILE
23670
23671 Configuration files:
23672 $config_files
23673
23674 Configuration headers:
23675 $config_headers
23676
23677 Configuration commands:
23678 $config_commands
23679
23680 Report bugs to <dickey@invisible-island.net>."
23681 EOF
23682
23683 cat >>$CONFIG_STATUS <<EOF
23684 ac_cs_version="\\
23685 config.status
23686 configured by $0, generated by GNU Autoconf 2.52.20170501,
23687   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23688
23689 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23690 Free Software Foundation, Inc.
23691 This config.status script is free software; the Free Software Foundation
23692 gives unlimited permission to copy, distribute and modify it."
23693 srcdir=$srcdir
23694 INSTALL="$INSTALL"
23695 EOF
23696
23697 cat >>$CONFIG_STATUS <<\EOF
23698 # If no file are specified by the user, then we need to provide default
23699 # value.  By we need to know if files were specified by the user.
23700 ac_need_defaults=:
23701 while test $# != 0
23702 do
23703   case $1 in
23704   --*=*)
23705     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23706     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23707     shift
23708     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23709     shift
23710     ;;
23711   -*);;
23712   *) # This is not an option, so the user has probably given explicit
23713      # arguments.
23714      ac_need_defaults=false;;
23715   esac
23716
23717   case $1 in
23718   # Handling of the options.
23719 EOF
23720 cat >>$CONFIG_STATUS <<EOF
23721   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23722     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23723     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23724 EOF
23725 cat >>$CONFIG_STATUS <<\EOF
23726   --version | --vers* | -V )
23727     echo "$ac_cs_version"; exit 0 ;;
23728   --he | --h)
23729     # Conflict between --help and --header
23730     { { echo "$as_me:23730: error: ambiguous option: $1
23731 Try \`$0 --help' for more information." >&5
23732 echo "$as_me: error: ambiguous option: $1
23733 Try \`$0 --help' for more information." >&2;}
23734    { (exit 1); exit 1; }; };;
23735   --help | --hel | -h )
23736     echo "$ac_cs_usage"; exit 0 ;;
23737   --debug | --d* | -d )
23738     debug=: ;;
23739   --file | --fil | --fi | --f )
23740     shift
23741     CONFIG_FILES="$CONFIG_FILES $1"
23742     ac_need_defaults=false;;
23743   --header | --heade | --head | --hea )
23744     shift
23745     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23746     ac_need_defaults=false;;
23747
23748   # This is an error.
23749   -*) { { echo "$as_me:23749: error: unrecognized option: $1
23750 Try \`$0 --help' for more information." >&5
23751 echo "$as_me: error: unrecognized option: $1
23752 Try \`$0 --help' for more information." >&2;}
23753    { (exit 1); exit 1; }; } ;;
23754
23755   *) ac_config_targets="$ac_config_targets $1" ;;
23756
23757   esac
23758   shift
23759 done
23760
23761 exec 5>>config.log
23762 cat >&5 << _ACEOF
23763
23764 ## ----------------------- ##
23765 ## Running config.status.  ##
23766 ## ----------------------- ##
23767
23768 This file was extended by $as_me 2.52.20170501, executed with
23769   CONFIG_FILES    = $CONFIG_FILES
23770   CONFIG_HEADERS  = $CONFIG_HEADERS
23771   CONFIG_LINKS    = $CONFIG_LINKS
23772   CONFIG_COMMANDS = $CONFIG_COMMANDS
23773   > $ac_cs_invocation
23774 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23775
23776 _ACEOF
23777 EOF
23778
23779 cat >>$CONFIG_STATUS <<EOF
23780 #
23781 # INIT-COMMANDS section.
23782 #
23783
23784 ### Special initialization commands, used to pass information from the
23785 ### configuration-run into config.status
23786
23787 AWK="$AWK"
23788 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23789 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23790 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23791 ECHO_LD="$ECHO_LD"
23792 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23793 LDCONFIG="$LDCONFIG"
23794 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23795 LIB_NAME="$LIB_NAME"
23796 LIB_PREFIX="$LIB_PREFIX"
23797 LIB_SUBSETS="$LIB_SUBSETS"
23798 LIB_SUFFIX="$LIB_SUFFIX"
23799 LIB_TRACING="$LIB_TRACING"
23800 LN_S="$LN_S"
23801 MAKE_TERMINFO="$MAKE_TERMINFO"
23802 NCURSES_MAJOR="$NCURSES_MAJOR"
23803 NCURSES_MINOR="$NCURSES_MINOR"
23804 NCURSES_OSPEED="$NCURSES_OSPEED"
23805 NCURSES_PATCH="$NCURSES_PATCH"
23806 SRC_SUBDIRS="$SRC_SUBDIRS"
23807 TERMINFO="$TERMINFO"
23808 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23809 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23810 TICS_NAME="$TICS_NAME"
23811 TICS_SUFFIX="$TICS_SUFFIX"
23812 TIC_PATH="$TIC_PATH"
23813 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23814 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23815 TINFO_NAME="$TINFO_NAME"
23816 TINFO_SUFFIX="$TINFO_SUFFIX"
23817 UNALTERED_SYMS="$UNALTERED_SYMS"
23818 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23819 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23820 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23821 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23822 WILDCARD_SYMS="$WILDCARD_SYMS"
23823 WITH_CURSES_H="$with_curses_h"
23824 WITH_ECHO="${enable_echo:=yes}"
23825 WITH_OVERWRITE="$with_overwrite"
23826 cf_LIST_MODELS="$cf_list_models"
23827 cf_cv_abi_version="$cf_cv_abi_version"
23828 cf_cv_do_relink="$cf_cv_do_relink"
23829 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23830 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23831 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23832 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23833 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23834 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23835 cf_cv_rel_version="$cf_cv_rel_version"
23836 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23837 cf_cv_shared_soname='$cf_cv_shared_soname'
23838 cf_cv_shlib_version="$cf_cv_shlib_version"
23839 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23840 cf_cv_system_name="$cf_cv_system_name"
23841 cf_cv_term_driver="$with_term_driver"
23842 cf_with_ada="$cf_with_ada"
23843 cf_with_cxx_binding="$cf_with_cxx_binding"
23844 cf_with_db_install="$cf_with_db_install"
23845 cf_with_manpages="$cf_with_manpages"
23846 cf_with_tests="$cf_with_tests"
23847 host="$host"
23848 target="$target"
23849 with_shared_cxx="$with_shared_cxx"
23850
23851 EOF
23852
23853 cat >>$CONFIG_STATUS <<\EOF
23854 for ac_config_target in $ac_config_targets
23855 do
23856   case "$ac_config_target" in
23857   # Handling of arguments.
23858   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23859   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23860   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23861   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23862   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23863   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23864   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23865   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23866   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23867   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23868   *) { { echo "$as_me:23868: error: invalid argument: $ac_config_target" >&5
23869 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23870    { (exit 1); exit 1; }; };;
23871   esac
23872 done
23873
23874 # If the user did not use the arguments to specify the items to instantiate,
23875 # then the envvar interface is used.  Set only those that are not.
23876 # We use the long form for the default assignment because of an extremely
23877 # bizarre bug on SunOS 4.1.3.
23878 if $ac_need_defaults; then
23879   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23880   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23881   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23882 fi
23883
23884 # Create a temporary directory, and hook for its removal unless debugging.
23885 $debug ||
23886 {
23887   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23888   trap '{ (exit 1); exit 1; }' 1 2 13 15
23889 }
23890
23891 # Create a (secure) tmp directory for tmp files.
23892 : ${TMPDIR=/tmp}
23893 {
23894   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23895   test -n "$tmp" && test -d "$tmp"
23896 }  ||
23897 {
23898   tmp=$TMPDIR/cs$$-$RANDOM
23899   (umask 077 && mkdir $tmp)
23900 } ||
23901 {
23902    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23903    { (exit 1); exit 1; }
23904 }
23905
23906 EOF
23907
23908 cat >>$CONFIG_STATUS <<EOF
23909
23910 #
23911 # CONFIG_FILES section.
23912 #
23913
23914 # No need to generate the scripts if there are no CONFIG_FILES.
23915 # This happens for instance when ./config.status config.h
23916 if test -n "\$CONFIG_FILES"; then
23917   # Protect against being on the right side of a sed subst in config.status.
23918   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23919    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23920 s,@SHELL@,$SHELL,;t t
23921 s,@exec_prefix@,$exec_prefix,;t t
23922 s,@prefix@,$prefix,;t t
23923 s,@program_transform_name@,$program_transform_name,;t t
23924 s,@bindir@,$bindir,;t t
23925 s,@sbindir@,$sbindir,;t t
23926 s,@libexecdir@,$libexecdir,;t t
23927 s,@datarootdir@,$datarootdir,;t t
23928 s,@datadir@,$datadir,;t t
23929 s,@sysconfdir@,$sysconfdir,;t t
23930 s,@sharedstatedir@,$sharedstatedir,;t t
23931 s,@localstatedir@,$localstatedir,;t t
23932 s,@libdir@,$libdir,;t t
23933 s,@includedir@,$includedir,;t t
23934 s,@oldincludedir@,$oldincludedir,;t t
23935 s,@infodir@,$infodir,;t t
23936 s,@mandir@,$mandir,;t t
23937 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23938 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23939 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23940 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23941 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23942 s,@build_alias@,$build_alias,;t t
23943 s,@host_alias@,$host_alias,;t t
23944 s,@target_alias@,$target_alias,;t t
23945 s,@ECHO_C@,$ECHO_C,;t t
23946 s,@ECHO_N@,$ECHO_N,;t t
23947 s,@ECHO_T@,$ECHO_T,;t t
23948 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23949 s,@DEFS@,$DEFS,;t t
23950 s,@LIBS@,$LIBS,;t t
23951 s,@top_builddir@,$top_builddir,;t t
23952 s,@EGREP@,$EGREP,;t t
23953 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23954 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23955 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23956 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23957 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23958 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23959 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23960 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23961 s,@VERSION@,$VERSION,;t t
23962 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23963 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23964 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23965 s,@PACKAGE@,$PACKAGE,;t t
23966 s,@build@,$build,;t t
23967 s,@build_cpu@,$build_cpu,;t t
23968 s,@build_vendor@,$build_vendor,;t t
23969 s,@build_os@,$build_os,;t t
23970 s,@host@,$host,;t t
23971 s,@host_cpu@,$host_cpu,;t t
23972 s,@host_vendor@,$host_vendor,;t t
23973 s,@host_os@,$host_os,;t t
23974 s,@target@,$target,;t t
23975 s,@target_cpu@,$target_cpu,;t t
23976 s,@target_vendor@,$target_vendor,;t t
23977 s,@target_os@,$target_os,;t t
23978 s,@CC@,$CC,;t t
23979 s,@CFLAGS@,$CFLAGS,;t t
23980 s,@LDFLAGS@,$LDFLAGS,;t t
23981 s,@CPPFLAGS@,$CPPFLAGS,;t t
23982 s,@ac_ct_CC@,$ac_ct_CC,;t t
23983 s,@EXEEXT@,$EXEEXT,;t t
23984 s,@OBJEXT@,$OBJEXT,;t t
23985 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23986 s,@CPP@,$CPP,;t t
23987 s,@LDCONFIG@,$LDCONFIG,;t t
23988 s,@CXX@,$CXX,;t t
23989 s,@CXXFLAGS@,$CXXFLAGS,;t t
23990 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23991 s,@AWK@,$AWK,;t t
23992 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23993 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23994 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23995 s,@LINT@,$LINT,;t t
23996 s,@LINT_OPTS@,$LINT_OPTS,;t t
23997 s,@LN_S@,$LN_S,;t t
23998 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23999 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24000 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24001 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24002 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24003 s,@SET_MAKE@,$SET_MAKE,;t t
24004 s,@CTAGS@,$CTAGS,;t t
24005 s,@ETAGS@,$ETAGS,;t t
24006 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24007 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24008 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24009 s,@RANLIB@,$RANLIB,;t t
24010 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24011 s,@LD@,$LD,;t t
24012 s,@ac_ct_LD@,$ac_ct_LD,;t t
24013 s,@AR@,$AR,;t t
24014 s,@ac_ct_AR@,$ac_ct_AR,;t t
24015 s,@NM@,$NM,;t t
24016 s,@ac_ct_NM@,$ac_ct_NM,;t t
24017 s,@ARFLAGS@,$ARFLAGS,;t t
24018 s,@DESTDIR@,$DESTDIR,;t t
24019 s,@BUILD_CC@,$BUILD_CC,;t t
24020 s,@BUILD_CPP@,$BUILD_CPP,;t t
24021 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24022 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24023 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24024 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24025 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24026 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24027 s,@cf_list_models@,$cf_list_models,;t t
24028 s,@ABI_VERSION@,$ABI_VERSION,;t t
24029 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24030 s,@LIBTOOL@,$LIBTOOL,;t t
24031 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24032 s,@LT_UNDEF@,$LT_UNDEF,;t t
24033 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24034 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24035 s,@LIB_CREATE@,$LIB_CREATE,;t t
24036 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24037 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24038 s,@LIB_PREP@,$LIB_PREP,;t t
24039 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24040 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24041 s,@LIB_LINK@,$LIB_LINK,;t t
24042 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24043 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24044 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24045 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24046 s,@TICS_NAME@,$TICS_NAME,;t t
24047 s,@TINFO_NAME@,$TINFO_NAME,;t t
24048 s,@LIB_NAME@,$LIB_NAME,;t t
24049 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24050 s,@CC_G_OPT@,$CC_G_OPT,;t t
24051 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24052 s,@LD_MODEL@,$LD_MODEL,;t t
24053 s,@shlibdir@,$shlibdir,;t t
24054 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24055 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24056 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24057 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24058 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24059 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24060 s,@LINK_PROGS@,$LINK_PROGS,;t t
24061 s,@LINK_TESTS@,$LINK_TESTS,;t t
24062 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24063 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24064 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24065 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24066 s,@RPATH_LIST@,$RPATH_LIST,;t t
24067 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24068 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24069 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24070 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24071 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24072 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24073 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24074 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24075 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24076 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24077 s,@XTERM_KBS@,$XTERM_KBS,;t t
24078 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24079 s,@TERMINFO@,$TERMINFO,;t t
24080 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24081 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24082 s,@TERMPATH@,$TERMPATH,;t t
24083 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24084 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24085 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24086 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24087 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24088 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24089 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24090 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24091 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24092 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24093 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24094 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24095 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24096 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24097 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24098 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24099 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24100 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24101 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24102 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24103 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24104 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24105 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24106 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24107 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24108 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24109 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24110 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24111 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24112 s,@PTHREAD@,$PTHREAD,;t t
24113 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24114 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24115 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24116 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24117 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24118 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24119 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24120 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24121 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24122 s,@ECHO_LT@,$ECHO_LT,;t t
24123 s,@ECHO_LD@,$ECHO_LD,;t t
24124 s,@RULE_CC@,$RULE_CC,;t t
24125 s,@SHOW_CC@,$SHOW_CC,;t t
24126 s,@ECHO_CC@,$ECHO_CC,;t t
24127 s,@ECHO_LINK@,$ECHO_LINK,;t t
24128 s,@ADAFLAGS@,$ADAFLAGS,;t t
24129 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24130 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24131 s,@ADA_TRACE@,$ADA_TRACE,;t t
24132 s,@MATH_LIB@,$MATH_LIB,;t t
24133 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24134 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24135 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24136 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24137 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24138 s,@TEST_LIBS@,$TEST_LIBS,;t t
24139 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24140 s,@CXXCPP@,$CXXCPP,;t t
24141 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24142 s,@CXX_AR@,$CXX_AR,;t t
24143 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24144 s,@CXXLIBS@,$CXXLIBS,;t t
24145 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24146 s,@gnat_exists@,$gnat_exists,;t t
24147 s,@M4_exists@,$M4_exists,;t t
24148 s,@cf_ada_make@,$cf_ada_make,;t t
24149 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24150 s,@cf_compile_generics@,$cf_compile_generics,;t t
24151 s,@cf_generic_objects@,$cf_generic_objects,;t t
24152 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24153 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24154 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24155 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24156 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24157 s,@cf_ada_package@,$cf_ada_package,;t t
24158 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24159 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24160 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24161 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24162 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24163 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24164 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24165 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24166 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24167 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24168 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24169 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24170 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24171 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24172 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24173 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24174 s,@TICS_LIBS@,$TICS_LIBS,;t t
24175 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24176 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24177 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24178 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24179 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24180 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24181 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24182 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24183 s,@includesubdir@,$includesubdir,;t t
24184 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24185 s,@TICS_LIST@,$TICS_LIST,;t t
24186 s,@TINFO_LIST@,$TINFO_LIST,;t t
24187 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24188 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24189 s,@TEST_ARGS@,$TEST_ARGS,;t t
24190 s,@TEST_DEPS@,$TEST_DEPS,;t t
24191 s,@TEST_ARG2@,$TEST_ARG2,;t t
24192 s,@TEST_DEP2@,$TEST_DEP2,;t t
24193 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24194 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24195 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24196 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24197 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24198 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24199 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24200 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24201 s,@cross_compiling@,$cross_compiling,;t t
24202 s,@TIC_PATH@,$TIC_PATH,;t t
24203 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24204 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24205 s,@PANEL_NAME@,$PANEL_NAME,;t t
24206 s,@MENU_NAME@,$MENU_NAME,;t t
24207 s,@FORM_NAME@,$FORM_NAME,;t t
24208 s,@CXX_NAME@,$CXX_NAME,;t t
24209 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24210 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24211 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24212 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24213 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24214 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24215 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24216 CEOF
24217
24218 EOF
24219
24220   cat >>$CONFIG_STATUS <<\EOF
24221   # Split the substitutions into bite-sized pieces for seds with
24222   # small command number limits, like on Digital OSF/1 and HP-UX.
24223   ac_max_sed_lines=48
24224   ac_sed_frag=1 # Number of current file.
24225   ac_beg=1 # First line for current file.
24226   ac_end=$ac_max_sed_lines # Line after last line for current file.
24227   ac_more_lines=:
24228   ac_sed_cmds=
24229   while $ac_more_lines; do
24230     if test $ac_beg -gt 1; then
24231       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24232     else
24233       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24234     fi
24235     if test ! -s $tmp/subs.frag; then
24236       ac_more_lines=false
24237     else
24238       # The purpose of the label and of the branching condition is to
24239       # speed up the sed processing (if there are no `@' at all, there
24240       # is no need to browse any of the substitutions).
24241       # These are the two extra sed commands mentioned above.
24242       (echo ':t
24243   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24244       # It is possible to make a multiline substitution using escaped newlines.
24245       # Ensure that we do not split the substitution between script fragments.
24246       ac_BEG=$ac_end
24247       ac_END=`expr $ac_end + $ac_max_sed_lines`
24248       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24249       if test -s $tmp/subs.next; then
24250         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24251         if test ! -s $tmp/subs.edit; then
24252           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24253           if test ! -s $tmp/subs.edit; then
24254             if test $ac_beg -gt 1; then
24255               ac_end=`expr $ac_end - 1`
24256               continue
24257             fi
24258           fi
24259         fi
24260       fi
24261
24262       if test -z "$ac_sed_cmds"; then
24263         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24264       else
24265         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24266       fi
24267       ac_sed_frag=`expr $ac_sed_frag + 1`
24268       ac_beg=$ac_end
24269       ac_end=`expr $ac_end + $ac_max_sed_lines`
24270     fi
24271   done
24272   if test -z "$ac_sed_cmds"; then
24273     ac_sed_cmds=cat
24274   fi
24275 fi # test -n "$CONFIG_FILES"
24276
24277 EOF
24278 cat >>$CONFIG_STATUS <<\EOF
24279 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24280   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24281   case $ac_file in
24282   - | *:- | *:-:* ) # input from stdin
24283         cat >$tmp/stdin
24284         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24285         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24286   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24287         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24288   * )   ac_file_in=$ac_file.in ;;
24289   esac
24290
24291   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24292   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24293          X"$ac_file" : 'X\(//\)[^/]' \| \
24294          X"$ac_file" : 'X\(//\)$' \| \
24295          X"$ac_file" : 'X\(/\)' \| \
24296          .     : '\(.\)' 2>/dev/null ||
24297 echo X"$ac_file" |
24298     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24299           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24300           /^X\(\/\/\)$/{ s//\1/; q; }
24301           /^X\(\/\).*/{ s//\1/; q; }
24302           s/.*/./; q'`
24303   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24304     { case "$ac_dir" in
24305   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24306   *)                      as_incr_dir=.;;
24307 esac
24308 as_dummy="$ac_dir"
24309 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24310   case $as_mkdir_dir in
24311     # Skip DOS drivespec
24312     ?:) as_incr_dir=$as_mkdir_dir ;;
24313     *)
24314       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24315       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24316     ;;
24317   esac
24318 done; }
24319
24320     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24321     # A "../" for each directory in $ac_dir_suffix.
24322     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24323   else
24324     ac_dir_suffix= ac_dots=
24325   fi
24326
24327   case $srcdir in
24328   .)  ac_srcdir=.
24329       if test -z "$ac_dots"; then
24330          ac_top_srcdir=.
24331       else
24332          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24333       fi ;;
24334   [\\/]* | ?:[\\/]* )
24335       ac_srcdir=$srcdir$ac_dir_suffix;
24336       ac_top_srcdir=$srcdir ;;
24337   *) # Relative path.
24338     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24339     ac_top_srcdir=$ac_dots$srcdir ;;
24340   esac
24341
24342   case $INSTALL in
24343   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24344   *) ac_INSTALL=$ac_dots$INSTALL ;;
24345   esac
24346
24347   if test x"$ac_file" != x-; then
24348     { echo "$as_me:24348: creating $ac_file" >&5
24349 echo "$as_me: creating $ac_file" >&6;}
24350     rm -f "$ac_file"
24351   fi
24352   # Let's still pretend it is `configure' which instantiates (i.e., don't
24353   # use $as_me), people would be surprised to read:
24354   #    /* config.h.  Generated automatically by config.status.  */
24355   configure_input="Generated automatically from `echo $ac_file_in |
24356                                                  sed 's,.*/,,'` by configure."
24357
24358   # First look for the input files in the build tree, otherwise in the
24359   # src tree.
24360   ac_file_inputs=`IFS=:
24361     for f in $ac_file_in; do
24362       case $f in
24363       -) echo $tmp/stdin ;;
24364       [\\/$]*)
24365          # Absolute (can't be DOS-style, as IFS=:)
24366          test -f "$f" || { { echo "$as_me:24366: error: cannot find input file: $f" >&5
24367 echo "$as_me: error: cannot find input file: $f" >&2;}
24368    { (exit 1); exit 1; }; }
24369          echo $f;;
24370       *) # Relative
24371          if test -f "$f"; then
24372            # Build tree
24373            echo $f
24374          elif test -f "$srcdir/$f"; then
24375            # Source tree
24376            echo $srcdir/$f
24377          else
24378            # /dev/null tree
24379            { { echo "$as_me:24379: error: cannot find input file: $f" >&5
24380 echo "$as_me: error: cannot find input file: $f" >&2;}
24381    { (exit 1); exit 1; }; }
24382          fi;;
24383       esac
24384     done` || { (exit 1); exit 1; }
24385 EOF
24386 cat >>$CONFIG_STATUS <<\EOF
24387   ac_warn_datarootdir=no
24388   if test x"$ac_file" != x-; then
24389     for ac_item in $ac_file_inputs
24390     do
24391       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24392       if test -n "$ac_seen"; then
24393         ac_used=`grep '@datarootdir@' $ac_item`
24394         if test -z "$ac_used"; then
24395           { echo "$as_me:24395: WARNING: datarootdir was used implicitly but not set:
24396 $ac_seen" >&5
24397 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24398 $ac_seen" >&2;}
24399           ac_warn_datarootdir=yes
24400         fi
24401       fi
24402       ac_seen=`grep '${datarootdir}' $ac_item`
24403       if test -n "$ac_seen"; then
24404         { echo "$as_me:24404: WARNING: datarootdir was used explicitly but not set:
24405 $ac_seen" >&5
24406 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24407 $ac_seen" >&2;}
24408         ac_warn_datarootdir=yes
24409       fi
24410     done
24411   fi
24412
24413 if test "x$ac_warn_datarootdir" = xyes; then
24414   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24415 fi
24416
24417 EOF
24418 cat >>$CONFIG_STATUS <<EOF
24419   sed "$ac_vpsub
24420 $extrasub
24421 EOF
24422 cat >>$CONFIG_STATUS <<\EOF
24423 :t
24424 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24425 s,@configure_input@,$configure_input,;t t
24426 s,@srcdir@,$ac_srcdir,;t t
24427 s,@top_srcdir@,$ac_top_srcdir,;t t
24428 s,@INSTALL@,$ac_INSTALL,;t t
24429 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24430   rm -f $tmp/stdin
24431   if test x"$ac_file" != x-; then
24432     cp $tmp/out $ac_file
24433
24434     for ac_name in prefix exec_prefix datarootdir
24435     do
24436         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24437         if test -n "$ac_seen"; then
24438             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24439             if test -z "$ac_init"; then
24440               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24441               { echo "$as_me:24441: WARNING: Variable $ac_name is used but was not set:
24442 $ac_seen" >&5
24443 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24444 $ac_seen" >&2;}
24445             fi
24446         fi
24447     done
24448     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24449     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24450     if test -s $tmp/out; then
24451       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24452       { echo "$as_me:24452: WARNING: Some variables may not be substituted:
24453 $ac_seen" >&5
24454 echo "$as_me: WARNING: Some variables may not be substituted:
24455 $ac_seen" >&2;}
24456     fi
24457   else
24458     cat $tmp/out
24459   fi
24460   rm -f $tmp/out
24461
24462 done
24463 EOF
24464 cat >>$CONFIG_STATUS <<\EOF
24465
24466 #
24467 # CONFIG_HEADER section.
24468 #
24469
24470 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24471 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24472 #
24473 # ac_d sets the value in "#define NAME VALUE" lines.
24474 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24475 ac_dB='[        ].*$,\1#\2'
24476 ac_dC=' '
24477 ac_dD=',;t'
24478 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24479 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24480 ac_iB='\([      ]\),\1#\2define\3'
24481 ac_iC=' '
24482 ac_iD='\4,;t'
24483 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24484 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24485 ac_uB='$,\1#\2define\3'
24486 ac_uC=' '
24487 ac_uD=',;t'
24488
24489 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24490   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24491   case $ac_file in
24492   - | *:- | *:-:* ) # input from stdin
24493         cat >$tmp/stdin
24494         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24495         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24496   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24497         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24498   * )   ac_file_in=$ac_file.in ;;
24499   esac
24500
24501   test x"$ac_file" != x- && { echo "$as_me:24501: creating $ac_file" >&5
24502 echo "$as_me: creating $ac_file" >&6;}
24503
24504   # First look for the input files in the build tree, otherwise in the
24505   # src tree.
24506   ac_file_inputs=`IFS=:
24507     for f in $ac_file_in; do
24508       case $f in
24509       -) echo $tmp/stdin ;;
24510       [\\/$]*)
24511          # Absolute (can't be DOS-style, as IFS=:)
24512          test -f "$f" || { { echo "$as_me:24512: error: cannot find input file: $f" >&5
24513 echo "$as_me: error: cannot find input file: $f" >&2;}
24514    { (exit 1); exit 1; }; }
24515          echo $f;;
24516       *) # Relative
24517          if test -f "$f"; then
24518            # Build tree
24519            echo $f
24520          elif test -f "$srcdir/$f"; then
24521            # Source tree
24522            echo $srcdir/$f
24523          else
24524            # /dev/null tree
24525            { { echo "$as_me:24525: error: cannot find input file: $f" >&5
24526 echo "$as_me: error: cannot find input file: $f" >&2;}
24527    { (exit 1); exit 1; }; }
24528          fi;;
24529       esac
24530     done` || { (exit 1); exit 1; }
24531   # Remove the trailing spaces.
24532   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24533
24534 EOF
24535
24536 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24537 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24538 # be either 'cat' or 'sort'.
24539 cat confdefs.h | uniq >conftest.vals
24540
24541 # Break up conftest.vals because some shells have a limit on
24542 # the size of here documents, and old seds have small limits too.
24543
24544 rm -f conftest.tail
24545 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24546 while grep . conftest.vals >/dev/null
24547 do
24548   # Write chunks of a limited-size here document to conftest.frag.
24549   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24550   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24551   echo 'CEOF' >> $CONFIG_STATUS
24552   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24553   rm -f conftest.vals
24554   mv conftest.tail conftest.vals
24555 done
24556 rm -f conftest.vals
24557
24558 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24559 # marker @DEFS@.
24560 echo '  cat >> conftest.edit <<CEOF
24561 /@DEFS@/r conftest.frag
24562 /@DEFS@/d
24563 CEOF
24564 sed -f conftest.edit $tmp/in > $tmp/out
24565 rm -f $tmp/in
24566 mv $tmp/out $tmp/in
24567 rm -f conftest.edit conftest.frag
24568 ' >> $CONFIG_STATUS
24569
24570 cat >>$CONFIG_STATUS <<\EOF
24571   # Let's still pretend it is `configure' which instantiates (i.e., don't
24572   # use $as_me), people would be surprised to read:
24573   #    /* config.h.  Generated automatically by config.status.  */
24574   if test x"$ac_file" = x-; then
24575     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24576   else
24577     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24578   fi
24579   cat $tmp/in >>$tmp/config.h
24580   rm -f $tmp/in
24581   if test x"$ac_file" != x-; then
24582     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24583       { echo "$as_me:24583: $ac_file is unchanged" >&5
24584 echo "$as_me: $ac_file is unchanged" >&6;}
24585     else
24586       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24587          X"$ac_file" : 'X\(//\)[^/]' \| \
24588          X"$ac_file" : 'X\(//\)$' \| \
24589          X"$ac_file" : 'X\(/\)' \| \
24590          .     : '\(.\)' 2>/dev/null ||
24591 echo X"$ac_file" |
24592     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24593           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24594           /^X\(\/\/\)$/{ s//\1/; q; }
24595           /^X\(\/\).*/{ s//\1/; q; }
24596           s/.*/./; q'`
24597       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24598         { case "$ac_dir" in
24599   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24600   *)                      as_incr_dir=.;;
24601 esac
24602 as_dummy="$ac_dir"
24603 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24604   case $as_mkdir_dir in
24605     # Skip DOS drivespec
24606     ?:) as_incr_dir=$as_mkdir_dir ;;
24607     *)
24608       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24609       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24610     ;;
24611   esac
24612 done; }
24613
24614       fi
24615       rm -f $ac_file
24616       mv $tmp/config.h $ac_file
24617     fi
24618   else
24619     cat $tmp/config.h
24620     rm -f $tmp/config.h
24621   fi
24622 done
24623 EOF
24624 cat >>$CONFIG_STATUS <<\EOF
24625 #
24626 # CONFIG_COMMANDS section.
24627 #
24628 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24629   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24630   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24631
24632   case $ac_dest in
24633     default )
24634 if test "x$cf_with_tests" != xno ; then
24635
24636 for cf_dir in test
24637 do
24638         if test ! -d $srcdir/$cf_dir; then
24639                 continue
24640         elif test -f $srcdir/$cf_dir/programs; then
24641                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24642         fi
24643 done
24644
24645 fi
24646
24647 cf_prefix=$LIB_PREFIX
24648
24649 case $cf_cv_shlib_version in
24650 (cygdll|msysdll|mingw)
24651         TINFO_NAME=$TINFO_ARG_SUFFIX
24652         TINFO_SUFFIX=.dll
24653         ;;
24654 esac
24655
24656 if test -n "$TINFO_SUFFIX" ; then
24657         case $TINFO_SUFFIX in
24658         (tw*)
24659                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24660                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24661                 ;;
24662         (t*)
24663                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24664                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24665                 ;;
24666         (w*)
24667                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24668                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24669                 ;;
24670         esac
24671 fi
24672
24673 for cf_dir in $SRC_SUBDIRS
24674 do
24675         if test ! -d $srcdir/$cf_dir ; then
24676                 continue
24677         elif test -f $srcdir/$cf_dir/modules; then
24678
24679                 SHARED_LIB=
24680                 Libs_To_Make=
24681                 cf_awk_program=
24682                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24683                 then
24684                         cf_awk_program="$cf_awk_program\
24685 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24686 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24687 "
24688                 fi
24689
24690                 if test "x$WILDCARD_SYMS" = xno
24691                 then
24692                         cf_awk_program="$cf_awk_program\
24693 /[      ]_\\*;/ { skip=1; next; }\
24694 "
24695                 fi
24696
24697                 if test "x$cf_awk_program" != "x"
24698                 then
24699                         cat >>$cf_dir/Makefile <<CF_EOF
24700
24701 # Generated by CF_LIB_RULES
24702 resulting.map: $UNALTERED_SYMS
24703         $AWK 'BEGIN { skip = 1; last=""; } \
24704 $cf_awk_program \
24705 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24706  skip = 0; last = \$\$0; } \
24707 END { print last; }' < $UNALTERED_SYMS >\$@
24708
24709 distclean::
24710         rm -f resulting.map
24711 CF_EOF
24712                 fi
24713
24714                 for cf_item in $cf_LIST_MODELS
24715                 do
24716
24717         case X$cf_item in
24718         (Xlibtool)
24719                 cf_suffix='.la'
24720                 cf_depsuf=$cf_suffix
24721                 ;;
24722         (Xdebug)
24723                 cf_suffix='_g.a'
24724                 cf_depsuf=$cf_suffix
24725                 ;;
24726         (Xprofile)
24727                 cf_suffix='_p.a'
24728                 cf_depsuf=$cf_suffix
24729                 ;;
24730         (Xshared)
24731                 case $cf_cv_system_name in
24732                 (aix[5-7]*)
24733                         cf_suffix='.so'
24734                         cf_depsuf=$cf_suffix
24735                         ;;
24736                 (cygwin*|msys*|mingw*)
24737                         cf_suffix='.dll'
24738                         cf_depsuf='.dll.a'
24739                         ;;
24740                 (darwin*)
24741                         cf_suffix='.dylib'
24742                         cf_depsuf=$cf_suffix
24743                         ;;
24744                 (hpux*)
24745                         case $target in
24746                         (ia64*)
24747                                 cf_suffix='.so'
24748                                 cf_depsuf=$cf_suffix
24749                                 ;;
24750                         (*)
24751                                 cf_suffix='.sl'
24752                                 cf_depsuf=$cf_suffix
24753                                 ;;
24754                         esac
24755                         ;;
24756                 (*)
24757                         cf_suffix='.so'
24758                         cf_depsuf=$cf_suffix
24759                         ;;
24760                 esac
24761                 ;;
24762         (*)
24763                 cf_suffix='.a'
24764                 cf_depsuf=$cf_suffix
24765                 ;;
24766         esac
24767         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24768         then
24769                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24770                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24771         fi
24772
24773                         cf_libname=$cf_dir
24774                         test "$cf_dir" = c++ && cf_libname=ncurses++
24775                         if test $cf_item = shared ; then
24776                                 if test -n "${LIB_SUFFIX}"
24777                                 then
24778                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24779                                 else
24780                                         cf_shared_suffix="$cf_suffix"
24781                                 fi
24782                                 if test "$cf_cv_do_symlinks" = yes ; then
24783                                         cf_version_name=
24784
24785                                         case "$cf_cv_shlib_version" in
24786                                         (rel)
24787                                                 cf_version_name=REL_VERSION
24788                                                 ;;
24789                                         (abi)
24790                                                 cf_version_name=ABI_VERSION
24791                                                 ;;
24792                                         esac
24793
24794                                         if test -n "$cf_version_name"
24795                                         then
24796                                                 case "$cf_cv_system_name" in
24797                                                 (darwin*)
24798                                                         # "w", etc?
24799                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24800                                                         ;;
24801                                                 (*)
24802                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24803                                                         ;;
24804                                                 esac
24805                                         fi
24806                                         if test -n "${USE_LIB_SUFFIX}"
24807                                         then
24808                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24809                                         else
24810                                                 cf_shared_suffix="$cf_suffix"
24811                                         fi
24812                                 fi
24813                                 # cygwin needs import library, and has unique naming convention
24814                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24815                                 # use 'cyg' prefix for shared lib.
24816                                 case $cf_cv_shlib_version in
24817                                 (cygdll)
24818                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24819                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24820                                         ;;
24821                                 (msysdll)
24822                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24823                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24824                                         ;;
24825                                 (mingw)
24826                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24827                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24828                                         ;;
24829                                 (*)
24830                                         cf_add_lib=
24831                                         ;;
24832                                 esac
24833                                 if test -n "$cf_add_lib"
24834                                 then
24835                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24836                                         continue
24837                                 fi
24838                         fi
24839                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24840                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24841                 done
24842
24843                 if test $cf_dir = ncurses ; then
24844                         cf_subsets="$LIB_SUBSETS"
24845                         cf_r_parts="$cf_subsets"
24846                         cf_liblist="$Libs_To_Make"
24847
24848                         while test -n "$cf_r_parts"
24849                         do
24850                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24851                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24852                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24853                                         cf_add_lib=
24854                                         case $cf_l_parts in
24855                                         (*termlib*)
24856                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24857                                                 ;;
24858                                         (*ticlib*)
24859                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24860                                                 ;;
24861                                         (*)
24862                                                 break
24863                                                 ;;
24864                                         esac
24865                                         if test -n "$cf_add_lib"; then
24866                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24867                                         fi
24868                                 else
24869                                         break
24870                                 fi
24871                         done
24872                 else
24873                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24874                 fi
24875
24876                 if test $cf_dir = c++; then
24877                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24878                                 cf_list=
24879                                 for cf_item in $Libs_To_Make
24880                                 do
24881                                         case $cf_item in
24882                                         (*.a)
24883                                                 ;;
24884                                         (*)
24885                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24886                                                 ;;
24887                                         esac
24888                                         for cf_test in $cf_list
24889                                         do
24890                                                 if test "$cf_test" = "$cf_item"
24891                                                 then
24892                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24893                                                         cf_item=
24894                                                         break
24895                                                 fi
24896                                         done
24897                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24898                                 done
24899                                 Libs_To_Make="$cf_list"
24900                         fi
24901                 fi
24902
24903                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24904                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24905                         $cf_dir/Makefile >$cf_dir/Makefile.out
24906                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24907
24908                 $AWK -f $srcdir/mk-0th.awk \
24909                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24910                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24911
24912                 for cf_subset in $cf_subsets
24913                 do
24914                         cf_subdirs=
24915                         for cf_item in $cf_LIST_MODELS
24916                         do
24917
24918                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24919
24920 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24921
24922                         CXX_MODEL=$cf_ITEM
24923                         if test "$CXX_MODEL" = SHARED; then
24924                                 case $cf_cv_shlib_version in
24925                                 (cygdll|msysdll|mingw)
24926                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24927
24928 echo "${as_me:-configure}:24928: testing overriding CXX_MODEL to SHARED ..." 1>&5
24929
24930                                         with_shared_cxx=yes
24931                                         ;;
24932                                 (*)
24933                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24934                                         ;;
24935                                 esac
24936                         fi
24937
24938         case X$cf_item in
24939         (Xlibtool)
24940                 cf_suffix='.la'
24941                 cf_depsuf=$cf_suffix
24942                 ;;
24943         (Xdebug)
24944                 cf_suffix='_g.a'
24945                 cf_depsuf=$cf_suffix
24946                 ;;
24947         (Xprofile)
24948                 cf_suffix='_p.a'
24949                 cf_depsuf=$cf_suffix
24950                 ;;
24951         (Xshared)
24952                 case $cf_cv_system_name in
24953                 (aix[5-7]*)
24954                         cf_suffix='.so'
24955                         cf_depsuf=$cf_suffix
24956                         ;;
24957                 (cygwin*|msys*|mingw*)
24958                         cf_suffix='.dll'
24959                         cf_depsuf='.dll.a'
24960                         ;;
24961                 (darwin*)
24962                         cf_suffix='.dylib'
24963                         cf_depsuf=$cf_suffix
24964                         ;;
24965                 (hpux*)
24966                         case $target in
24967                         (ia64*)
24968                                 cf_suffix='.so'
24969                                 cf_depsuf=$cf_suffix
24970                                 ;;
24971                         (*)
24972                                 cf_suffix='.sl'
24973                                 cf_depsuf=$cf_suffix
24974                                 ;;
24975                         esac
24976                         ;;
24977                 (*)
24978                         cf_suffix='.so'
24979                         cf_depsuf=$cf_suffix
24980                         ;;
24981                 esac
24982                 ;;
24983         (*)
24984                 cf_suffix='.a'
24985                 cf_depsuf=$cf_suffix
24986                 ;;
24987         esac
24988         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24989         then
24990                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24991                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24992         fi
24993
24994         case $cf_item in
24995         (libtool) cf_subdir='obj_lo'  ;;
24996         (normal)  cf_subdir='objects' ;;
24997         (debug)   cf_subdir='obj_g' ;;
24998         (profile) cf_subdir='obj_p' ;;
24999         (shared)
25000                 case $cf_cv_system_name in
25001                 (cygwin|msys)
25002                         cf_subdir='objects' ;;
25003                 (*)
25004                         cf_subdir='obj_s' ;;
25005                 esac
25006         esac
25007
25008                         # Test for case where we build libtinfo with a different name.
25009                         cf_libname=$cf_dir
25010                         if test $cf_dir = ncurses ; then
25011                                 case $cf_subset in
25012                                 (*base*)
25013                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25014                                         ;;
25015                                 (*termlib*)
25016                                         cf_libname=$TINFO_LIB_SUFFIX
25017                                         ;;
25018                                 (ticlib*)
25019                                         cf_libname=$TICS_LIB_SUFFIX
25020                                         ;;
25021                                 esac
25022                         elif test $cf_dir = c++ ; then
25023                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25024                         else
25025                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25026                         fi
25027                         if test -n "${USE_ARG_SUFFIX}" ; then
25028                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25029                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25030                         fi
25031
25032                         # These dependencies really are for development, not
25033                         # builds, but they are useful in porting, too.
25034                         cf_depend="../include/ncurses_cfg.h"
25035                         if test "$srcdir" = "."; then
25036                                 cf_reldir="."
25037                         else
25038                                 cf_reldir="\${srcdir}"
25039                         fi
25040
25041                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25042                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25043                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25044                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25045                         fi
25046
25047                         cf_dir_suffix=
25048                         old_cf_suffix="$cf_suffix"
25049                         if test "$cf_cv_shlib_version_infix" = yes ; then
25050                         if test -n "$USE_LIB_SUFFIX" ; then
25051                                 case $USE_LIB_SUFFIX in
25052                                 (tw*)
25053                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25054                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25055                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25056                                         ;;
25057                                 (t*)
25058                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25059                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25060                                         cf_dir_suffix=t$EXTRA_SUFFIX
25061                                         ;;
25062                                 (w*)
25063                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25064                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25065                                         cf_dir_suffix=w$EXTRA_SUFFIX
25066                                         ;;
25067                                 (*)
25068                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25069                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25070                                         cf_dir_suffix=$EXTRA_SUFFIX
25071                                         ;;
25072                                 esac
25073                         fi
25074                         fi
25075
25076                         $AWK -f $srcdir/mk-1st.awk \
25077                                 name=${cf_libname}${cf_dir_suffix} \
25078                                 traces=$LIB_TRACING \
25079                                 MODEL=$cf_ITEM \
25080                                 CXX_MODEL=$CXX_MODEL \
25081                                 model=$cf_subdir \
25082                                 prefix=$cf_prefix \
25083                                 suffix=$cf_suffix \
25084                                 subset=$cf_subset \
25085                                 driver=$cf_cv_term_driver \
25086                                 SymLink="$LN_S" \
25087                                 TermlibRoot=$TINFO_NAME \
25088                                 TermlibSuffix=$TINFO_SUFFIX \
25089                                 ShlibVer=$cf_cv_shlib_version \
25090                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25091                                 ReLink=${cf_cv_do_relink:-no} \
25092                                 DoLinks=$cf_cv_do_symlinks \
25093                                 rmSoLocs=$cf_cv_rm_so_locs \
25094                                 ldconfig="$LDCONFIG" \
25095                                 overwrite=$WITH_OVERWRITE \
25096                                 depend="$cf_depend" \
25097                                 host="$host" \
25098                                 libtool_version="$LIBTOOL_VERSION" \
25099                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25100
25101                         cf_suffix="$old_cf_suffix"
25102
25103                         for cf_subdir2 in $cf_subdirs lib
25104                         do
25105                                 test $cf_subdir = $cf_subdir2 && break
25106                         done
25107                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25108                         $AWK -f $srcdir/mk-2nd.awk \
25109                                 name=$cf_dir \
25110                                 traces=$LIB_TRACING \
25111                                 MODEL=$cf_ITEM \
25112                                 model=$cf_subdir \
25113                                 subset=$cf_subset \
25114                                 srcdir=$srcdir \
25115                                 echo=$WITH_ECHO \
25116                                 crenames=$cf_cv_prog_CC_c_o \
25117                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25118                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25119                         cf_subdirs="$cf_subdirs $cf_subdir"
25120                         done
25121                 done
25122         fi
25123
25124         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25125 done
25126
25127 for cf_dir in $SRC_SUBDIRS
25128 do
25129         if test ! -d $srcdir/$cf_dir ; then
25130                 continue
25131         fi
25132
25133         if test -f $cf_dir/Makefile ; then
25134                 case "$cf_dir" in
25135                 (Ada95)
25136                         echo 'libs \' >> Makefile
25137                         echo 'install.libs \' >> Makefile
25138                         echo 'uninstall.libs ::' >> Makefile
25139                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25140                         ;;
25141                 esac
25142         fi
25143
25144         if test -f $srcdir/$cf_dir/modules; then
25145                 echo >> Makefile
25146                 if test -f $srcdir/$cf_dir/headers; then
25147 cat >> Makefile <<CF_EOF
25148 install.includes \\
25149 uninstall.includes \\
25150 CF_EOF
25151                 fi
25152 if test "$cf_dir" != "c++" ; then
25153 echo 'lint \' >> Makefile
25154 fi
25155 cat >> Makefile <<CF_EOF
25156 libs \\
25157 lintlib \\
25158 install.libs \\
25159 uninstall.libs \\
25160 install.$cf_dir \\
25161 uninstall.$cf_dir ::
25162         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25163 CF_EOF
25164         elif test -f $srcdir/$cf_dir/headers; then
25165 cat >> Makefile <<CF_EOF
25166
25167 libs \\
25168 install.libs \\
25169 uninstall.libs \\
25170 install.includes \\
25171 uninstall.includes ::
25172         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25173 CF_EOF
25174 fi
25175 done
25176
25177 if test "x$cf_with_db_install" = xyes; then
25178 cat >> Makefile <<CF_EOF
25179
25180 install.libs uninstall.libs \\
25181 install.data uninstall.data ::
25182 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25183 CF_EOF
25184 else
25185 cat >> Makefile <<CF_EOF
25186
25187 install.libs uninstall.libs ::
25188         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25189 CF_EOF
25190 fi
25191
25192 if test "x$cf_with_manpages" = xyes; then
25193 cat >> Makefile <<CF_EOF
25194
25195 install.man \\
25196 uninstall.man ::
25197         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25198 CF_EOF
25199 fi
25200
25201 cat >> Makefile <<CF_EOF
25202
25203 distclean ::
25204         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25205         rm -f headers.sh headers.sed mk_shared_lib.sh
25206         rm -f edit_man.* man_alias.*
25207         rm -rf \${DIRS_TO_MAKE}
25208 CF_EOF
25209
25210 # Special case: tack's manpage lives in its own directory.
25211 if test "x$cf_with_manpages" = xyes; then
25212 if test "x$cf_with_tack" = "xyes"; then
25213 cat >> Makefile <<CF_EOF
25214
25215 install.man \\
25216 uninstall.man ::
25217         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25218 CF_EOF
25219 fi
25220 fi
25221
25222 rm -f headers.sed headers.sh
25223
25224 echo creating headers.sh
25225 cat >headers.sh <<CF_EOF
25226 #! $SHELL
25227 # This shell script is generated by the 'configure' script.  It is invoked in a
25228 # subdirectory of the build tree.  It generates a sed-script in the parent
25229 # directory that is used to adjust includes for header files that reside in a
25230 # subdirectory of /usr/include, etc.
25231 PRG=""
25232 while test \$# != 3
25233 do
25234 PRG="\$PRG \$1"; shift
25235 done
25236 DST=\$1
25237 REF=\$2
25238 SRC=\$3
25239 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25240 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25241 echo installing \$SRC in \$DST
25242 CF_EOF
25243
25244 if test $WITH_CURSES_H = yes; then
25245         cat >>headers.sh <<CF_EOF
25246 case \$DST in
25247 (/*/include/*)
25248         END=\`basename \$DST\`
25249         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25250         do
25251                 NAME=\`basename \$i\`
25252                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25253         done
25254         ;;
25255 (*)
25256         echo "" >> \$TMPSED
25257         ;;
25258 esac
25259 CF_EOF
25260
25261 else
25262         cat >>headers.sh <<CF_EOF
25263 case \$DST in
25264 (/*/include/*)
25265         END=\`basename \$DST\`
25266         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25267         do
25268                 NAME=\`basename \$i\`
25269                 if test "\$NAME" = "curses.h"
25270                 then
25271                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25272                         NAME=ncurses.h
25273                 fi
25274                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25275         done
25276         ;;
25277 (*)
25278         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25279         ;;
25280 esac
25281 CF_EOF
25282 fi
25283 cat >>headers.sh <<CF_EOF
25284 rm -f \$TMPSRC
25285 sed -f \$TMPSED \$SRC > \$TMPSRC
25286 NAME=\`basename \$SRC\`
25287 CF_EOF
25288 if test $WITH_CURSES_H != yes; then
25289         cat >>headers.sh <<CF_EOF
25290 test "\$NAME" = "curses.h" && NAME=ncurses.h
25291 CF_EOF
25292 fi
25293 cat >>headers.sh <<CF_EOF
25294 # Just in case someone gzip'd manpages, remove the conflicting copy.
25295 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25296
25297 eval \$PRG \$TMPSRC \$DST/\$NAME
25298 rm -f \$TMPSRC \$TMPSED
25299 CF_EOF
25300
25301 chmod 0755 headers.sh
25302
25303 for cf_dir in $SRC_SUBDIRS
25304 do
25305         if test ! -d $srcdir/$cf_dir ; then
25306                 continue
25307         fi
25308
25309         if test -f $srcdir/$cf_dir/headers; then
25310                 $AWK -f $srcdir/mk-hdr.awk \
25311                         subset="$LIB_SUBSETS" \
25312                         compat="$WITH_CURSES_H" \
25313                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25314         fi
25315
25316         if test -f $srcdir/$cf_dir/modules; then
25317                 if test "$cf_dir" != "c++" ; then
25318                         cat >>$cf_dir/Makefile <<"CF_EOF"
25319 depend : ${AUTO_SRC}
25320         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25321
25322 # DO NOT DELETE THIS LINE -- make depend depends on it.
25323 CF_EOF
25324                 fi
25325         fi
25326 done
25327
25328 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25329 if test -z "$USE_OLD_MAKERULES" ; then
25330         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25331 fi
25332 fi
25333  ;;
25334   esac
25335 done
25336 EOF
25337
25338 cat >>$CONFIG_STATUS <<\EOF
25339
25340 { (exit 0); exit 0; }
25341 EOF
25342 chmod +x $CONFIG_STATUS
25343 ac_clean_files=$ac_clean_files_save
25344
25345 # configure is writing to config.log, and then calls config.status.
25346 # config.status does its own redirection, appending to config.log.
25347 # Unfortunately, on DOS this fails, as config.log is still kept open
25348 # by configure, so config.status won't be able to write to it; its
25349 # output is simply discarded.  So we exec the FD to /dev/null,
25350 # effectively closing config.log, so it can be properly (re)opened and
25351 # appended to by config.status.  When coming back to configure, we
25352 # need to make the FD available again.
25353 if test "$no_create" != yes; then
25354   ac_cs_success=:
25355   exec 5>/dev/null
25356   $SHELL $CONFIG_STATUS || ac_cs_success=false
25357   exec 5>>config.log
25358   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25359   # would make configure fail if this is the last instruction.
25360   $ac_cs_success || { (exit 1); exit 1; }
25361 fi
25362 ${MAKE:-make} preinstall