]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20150815
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.619 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
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-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable SCREEN-extensions
794   --enable-term-driver    enable terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302
1303         if test "x$cf_cv_abi_version" != "x$withval"
1304         then
1305                 { echo "$as_me:1305: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1306 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1307                 case $cf_cv_rel_version in
1308                 (5.*)
1309                         cf_cv_rel_version=$withval.0
1310                         ;;
1311                 (6.*)
1312                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1313                         ;;
1314                 esac
1315         fi
1316         cf_cv_abi_version=$withval
1317 fi;
1318
1319 if test -n "$cf_cv_abi_version" ; then
1320   case $cf_cv_abi_version in
1321   ([0-9]*)
1322         ;;
1323   (*)
1324         { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
1325 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326    { (exit 1); exit 1; }; }
1327         ;;
1328   esac
1329 else
1330   { { echo "$as_me:1330: error: ABI version value is empty" >&5
1331 echo "$as_me: error: ABI version value is empty" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336 then
1337         case $cf_cv_rel_version in
1338         (5.*)
1339                 cf_cv_rel_version=$with_abi_version.0
1340                 ;;
1341         esac
1342 fi
1343
1344 ac_aux_dir=
1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1346   if test -f $ac_dir/install-sh; then
1347     ac_aux_dir=$ac_dir
1348     ac_install_sh="$ac_aux_dir/install-sh -c"
1349     break
1350   elif test -f $ac_dir/install.sh; then
1351     ac_aux_dir=$ac_dir
1352     ac_install_sh="$ac_aux_dir/install.sh -c"
1353     break
1354   elif test -f $ac_dir/shtool; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/shtool install -c"
1357     break
1358   fi
1359 done
1360 if test -z "$ac_aux_dir"; then
1361   { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1368
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371   { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373    { (exit 1); exit 1; }; }
1374
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378   echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380   ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382   ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384   { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386    { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407   ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1422         echo "$as_me:1422: checking target system type" >&5
1423 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424 if test "${ac_cv_target+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_target_alias=$target_alias
1428 test "x$ac_cv_target_alias" = "x" &&
1429   ac_cv_target_alias=$ac_cv_host_alias
1430 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_target" >&5
1437 echo "${ECHO_T}$ac_cv_target" >&6
1438 target=$ac_cv_target
1439 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 # The aliases save the names the user supplied, while $host etc.
1444 # will get canonicalized.
1445 test -n "$target_alias" &&
1446   test "$program_prefix$program_suffix$program_transform_name" = \
1447     NONENONEs,x,x, &&
1448   program_prefix=${target_alias}-
1449         system_name="$host_os"
1450 else
1451         system_name="`(uname -s -r) 2>/dev/null`"
1452         if test -z "$system_name" ; then
1453                 system_name="`(hostname) 2>/dev/null`"
1454         fi
1455 fi
1456 test -n "$system_name" &&
1457 cat >>confdefs.h <<EOF
1458 #define SYSTEM_NAME "$system_name"
1459 EOF
1460
1461 if test "${cf_cv_system_name+set}" = set; then
1462   echo $ECHO_N "(cached) $ECHO_C" >&6
1463 else
1464   cf_cv_system_name="$system_name"
1465 fi
1466
1467 test -z "$system_name" && system_name="$cf_cv_system_name"
1468 test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
1469 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1470
1471 if test ".$system_name" != ".$cf_cv_system_name" ; then
1472         echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1473 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1474         { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
1475 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476    { (exit 1); exit 1; }; }
1477 fi
1478
1479 # Check whether --with-system-type or --without-system-type was given.
1480 if test "${with_system_type+set}" = set; then
1481   withval="$with_system_type"
1482   { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
1483 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1484         cf_cv_system_name=$withval
1485         host_os=$withval
1486
1487 fi;
1488
1489 ###     Save the given $CFLAGS to allow user-override.
1490 cf_user_CFLAGS="$CFLAGS"
1491
1492 ###     Default install-location
1493
1494 echo "$as_me:1494: checking for prefix" >&5
1495 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496 if test "x$prefix" = "xNONE" ; then
1497         case "$cf_cv_system_name" in
1498                 # non-vendor systems don't have a conflict
1499         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1500                 prefix=/usr
1501                 ;;
1502         (*)     prefix=$ac_default_prefix
1503                 ;;
1504         esac
1505 fi
1506 echo "$as_me:1506: result: $prefix" >&5
1507 echo "${ECHO_T}$prefix" >&6
1508
1509 if test "x$prefix" = "xNONE" ; then
1510 echo "$as_me:1510: checking for default include-directory" >&5
1511 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512 test -n "$verbose" && echo 1>&6
1513 for cf_symbol in \
1514         $includedir \
1515         $includedir/ncurses \
1516         $prefix/include \
1517         $prefix/include/ncurses \
1518         /usr/local/include \
1519         /usr/local/include/ncurses \
1520         /usr/include \
1521         /usr/include/ncurses
1522 do
1523         cf_dir=`eval echo $cf_symbol`
1524         if test -f $cf_dir/curses.h ; then
1525         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1526                 includedir="$cf_symbol"
1527                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1528                 break
1529         fi
1530         fi
1531         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1532 done
1533 echo "$as_me:1533: result: $includedir" >&5
1534 echo "${ECHO_T}$includedir" >&6
1535 fi
1536
1537 ### Defaults for ncurses ABI
1538
1539 case x$cf_cv_abi_version in
1540 (x[6789])
1541         cf_dft_ext_colors=yes
1542         cf_dft_ext_const=yes
1543         cf_dft_ext_mouse=yes
1544         cf_dft_ext_putwin=yes
1545         cf_dft_ext_spfuncs=yes
1546         cf_dft_filter_syms=yes
1547         cf_dft_chtype=uint32_t
1548         cf_dft_mmask_t=uint32_t
1549         cf_dft_interop=yes
1550         cf_dft_tparm_arg=intptr_t
1551         cf_dft_with_lp64=yes
1552         ;;
1553 (*)
1554         cf_dft_ext_colors=no
1555         cf_dft_ext_const=no
1556         cf_dft_ext_mouse=no
1557         cf_dft_ext_putwin=no
1558         cf_dft_ext_spfuncs=no
1559         cf_dft_filter_syms=no
1560         cf_dft_chtype=auto
1561         cf_dft_mmask_t=auto
1562         cf_dft_interop=no
1563         cf_dft_tparm_arg=long
1564         cf_dft_with_lp64=no
1565         ;;
1566 esac
1567
1568 ###     Checks for programs.
1569
1570 # Check whether --with-ada or --without-ada was given.
1571 if test "${with_ada+set}" = set; then
1572   withval="$with_ada"
1573   cf_with_ada=$withval
1574 else
1575   cf_with_ada=yes
1576 fi;
1577 if test "x$cf_with_ada" = xyes
1578 then
1579         cf_PROG_CC="gnatgcc gcc cc"
1580 else
1581         cf_PROG_CC="gcc cc"
1582 fi
1583
1584 ac_ext=c
1585 ac_cpp='$CPP $CPPFLAGS'
1586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589 ac_main_return=return
1590 if test -n "$ac_tool_prefix"; then
1591   for ac_prog in $cf_PROG_CC
1592   do
1593     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1595 echo "$as_me:1595: checking for $ac_word" >&5
1596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597 if test "${ac_cv_prog_CC+set}" = set; then
1598   echo $ECHO_N "(cached) $ECHO_C" >&6
1599 else
1600   if test -n "$CC"; then
1601   ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603   ac_save_IFS=$IFS; IFS=$ac_path_separator
1604 ac_dummy="$PATH"
1605 for ac_dir in $ac_dummy; do
1606   IFS=$ac_save_IFS
1607   test -z "$ac_dir" && ac_dir=.
1608   $as_executable_p "$ac_dir/$ac_word" || continue
1609 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1610 echo "$as_me:1610: found $ac_dir/$ac_word" >&5
1611 break
1612 done
1613
1614 fi
1615 fi
1616 CC=$ac_cv_prog_CC
1617 if test -n "$CC"; then
1618   echo "$as_me:1618: result: $CC" >&5
1619 echo "${ECHO_T}$CC" >&6
1620 else
1621   echo "$as_me:1621: result: no" >&5
1622 echo "${ECHO_T}no" >&6
1623 fi
1624
1625     test -n "$CC" && break
1626   done
1627 fi
1628 if test -z "$CC"; then
1629   ac_ct_CC=$CC
1630   for ac_prog in $cf_PROG_CC
1631 do
1632   # Extract the first word of "$ac_prog", so it can be a program name with args.
1633 set dummy $ac_prog; ac_word=$2
1634 echo "$as_me:1634: checking for $ac_word" >&5
1635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637   echo $ECHO_N "(cached) $ECHO_C" >&6
1638 else
1639   if test -n "$ac_ct_CC"; then
1640   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641 else
1642   ac_save_IFS=$IFS; IFS=$ac_path_separator
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645   IFS=$ac_save_IFS
1646   test -z "$ac_dir" && ac_dir=.
1647   $as_executable_p "$ac_dir/$ac_word" || continue
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:1649: found $ac_dir/$ac_word" >&5
1650 break
1651 done
1652
1653 fi
1654 fi
1655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656 if test -n "$ac_ct_CC"; then
1657   echo "$as_me:1657: result: $ac_ct_CC" >&5
1658 echo "${ECHO_T}$ac_ct_CC" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$ac_ct_CC" && break
1665 done
1666
1667   CC=$ac_ct_CC
1668 fi
1669
1670 test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
1671 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672    { (exit 1); exit 1; }; }
1673
1674 # Provide some information about the compiler.
1675 echo "$as_me:1675:" \
1676      "checking for C compiler version" >&5
1677 ac_compiler=`set X $ac_compile; echo $2`
1678 { (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
1679   (eval $ac_compiler --version </dev/null >&5) 2>&5
1680   ac_status=$?
1681   echo "$as_me:1681: \$? = $ac_status" >&5
1682   (exit $ac_status); }
1683 { (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
1684   (eval $ac_compiler -v </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -V </dev/null >&5\"") >&5
1689   (eval $ac_compiler -V </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693
1694 cat >conftest.$ac_ext <<_ACEOF
1695 #line 1695 "configure"
1696 #include "confdefs.h"
1697
1698 int
1699 main ()
1700 {
1701
1702   ;
1703   return 0;
1704 }
1705 _ACEOF
1706 ac_clean_files_save=$ac_clean_files
1707 ac_clean_files="$ac_clean_files a.out a.exe"
1708 # Try to create an executable without -o first, disregard a.out.
1709 # It will help us diagnose broken compilers, and finding out an intuition
1710 # of exeext.
1711 echo "$as_me:1711: checking for C compiler default output" >&5
1712 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714 if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
1715   (eval $ac_link_default) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }; then
1719   # Find the output, starting from the most likely.  This scheme is
1720 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721 # resort.
1722 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1723                 ls a.out conftest 2>/dev/null;
1724                 ls a.* conftest.* 2>/dev/null`; do
1725   case $ac_file in
1726     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1727     a.out ) # We found the default executable, but exeext='' is most
1728             # certainly right.
1729             break;;
1730     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1731           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1732           export ac_cv_exeext
1733           break;;
1734     * ) break;;
1735   esac
1736 done
1737 else
1738   echo "$as_me: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 { { echo "$as_me:1740: error: C compiler cannot create executables" >&5
1741 echo "$as_me: error: C compiler cannot create executables" >&2;}
1742    { (exit 77); exit 77; }; }
1743 fi
1744
1745 ac_exeext=$ac_cv_exeext
1746 echo "$as_me:1746: result: $ac_file" >&5
1747 echo "${ECHO_T}$ac_file" >&6
1748
1749 # Check the compiler produces executables we can run.  If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:1751: checking whether the C compiler works" >&5
1752 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1753 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1754 # If not cross compiling, check that we can run a simple program.
1755 if test "$cross_compiling" != yes; then
1756   if { ac_try='./$ac_file'
1757   { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1758   (eval $ac_try) 2>&5
1759   ac_status=$?
1760   echo "$as_me:1760: \$? = $ac_status" >&5
1761   (exit $ac_status); }; }; then
1762     cross_compiling=no
1763   else
1764     if test "$cross_compiling" = maybe; then
1765         cross_compiling=yes
1766     else
1767         { { echo "$as_me:1767: error: cannot run C compiled programs.
1768 If you meant to cross compile, use \`--host'." >&5
1769 echo "$as_me: error: cannot run C compiled programs.
1770 If you meant to cross compile, use \`--host'." >&2;}
1771    { (exit 1); exit 1; }; }
1772     fi
1773   fi
1774 fi
1775 echo "$as_me:1775: result: yes" >&5
1776 echo "${ECHO_T}yes" >&6
1777
1778 rm -f a.out a.exe conftest$ac_cv_exeext
1779 ac_clean_files=$ac_clean_files_save
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether we are cross compiling" >&5
1783 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1784 echo "$as_me:1784: result: $cross_compiling" >&5
1785 echo "${ECHO_T}$cross_compiling" >&6
1786
1787 echo "$as_me:1787: checking for executable suffix" >&5
1788 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1789 if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
1790   (eval $ac_link) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; then
1794   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1795 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1796 # work properly (i.e., refer to `conftest.exe'), while it won't with
1797 # `rm'.
1798 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799   case $ac_file in
1800     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1801     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802           export ac_cv_exeext
1803           break;;
1804     * ) break;;
1805   esac
1806 done
1807 else
1808   { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810    { (exit 1); exit 1; }; }
1811 fi
1812
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:1814: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:1820: checking for object suffix" >&5
1821 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823   echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825   cat >conftest.$ac_ext <<_ACEOF
1826 #line 1826 "configure"
1827 #include "confdefs.h"
1828
1829 int
1830 main ()
1831 {
1832
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
1839   (eval $ac_compile) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; then
1843   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844   case $ac_file in
1845     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1846     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847        break;;
1848   esac
1849 done
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
1854 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855    { (exit 1); exit 1; }; }
1856 fi
1857
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859 fi
1860 echo "$as_me:1860: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867   echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869   cat >conftest.$ac_ext <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1872
1873 int
1874 main ()
1875 {
1876 #ifndef __GNUC__
1877        choke me
1878 #endif
1879
1880   ;
1881   return 0;
1882 }
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
1886   (eval $ac_compile) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit $ac_status); } &&
1890          { ac_try='test -s conftest.$ac_objext'
1891   { (eval echo "$as_me:1891: \"$ac_try\"") >&5
1892   (eval $ac_try) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); }; }; then
1896   ac_compiler_gnu=yes
1897 else
1898   echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1901 fi
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905 fi
1906 echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:1912: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915   echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1920
1921 int
1922 main ()
1923 {
1924
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
1931   (eval $ac_compile) 2>&5
1932   ac_status=$?
1933   echo "$as_me:1933: \$? = $ac_status" >&5
1934   (exit $ac_status); } &&
1935          { ac_try='test -s conftest.$ac_objext'
1936   { (eval echo "$as_me:1936: \"$ac_try\"") >&5
1937   (eval $ac_try) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); }; }; then
1941   ac_cv_prog_cc_g=yes
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1946 fi
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952   CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954   if test "$GCC" = yes; then
1955     CFLAGS="-g -O2"
1956   else
1957     CFLAGS="-g"
1958   fi
1959 else
1960   if test "$GCC" = yes; then
1961     CFLAGS="-O2"
1962   else
1963     CFLAGS=
1964   fi
1965 fi
1966 # Some people use a C++ compiler to compile C.  Since we use `exit',
1967 # in C++ we need to declare it.  In case someone uses the same compiler
1968 # for both compiling C and C++ we need to have the C++ compiler decide
1969 # the declaration of exit, since it's the most demanding environment.
1970 cat >conftest.$ac_ext <<_ACEOF
1971 #ifndef __cplusplus
1972   choke me
1973 #endif
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977   (eval $ac_compile) 2>&5
1978   ac_status=$?
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); } &&
1981          { ac_try='test -s conftest.$ac_objext'
1982   { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983   (eval $ac_try) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); }; }; then
1987   for ac_declaration in \
1988    ''\
1989    '#include <stdlib.h>' \
1990    'extern "C" void std::exit (int) throw (); using std::exit;' \
1991    'extern "C" void std::exit (int); using std::exit;' \
1992    'extern "C" void exit (int) throw ();' \
1993    'extern "C" void exit (int);' \
1994    'void exit (int);'
1995 do
1996   cat >conftest.$ac_ext <<_ACEOF
1997 #line 1997 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 $ac_declaration
2001 int
2002 main ()
2003 {
2004 exit (42);
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 rm -f conftest.$ac_objext
2010 if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
2011   (eval $ac_compile) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); } &&
2015          { ac_try='test -s conftest.$ac_objext'
2016   { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017   (eval $ac_try) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); }; }; then
2021   :
2022 else
2023   echo "$as_me: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 continue
2026 fi
2027 rm -f conftest.$ac_objext conftest.$ac_ext
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   break
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058 done
2059 rm -rf conftest*
2060 if test -n "$ac_declaration"; then
2061   echo '#ifdef __cplusplus' >>confdefs.h
2062   echo $ac_declaration      >>confdefs.h
2063   echo '#endif'             >>confdefs.h
2064 fi
2065
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 ac_main_return=return
2077
2078 GCC_VERSION=none
2079 if test "$GCC" = yes ; then
2080         echo "$as_me:2080: checking version of $CC" >&5
2081 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2082         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.].*//'`"
2083         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2084         echo "$as_me:2084: result: $GCC_VERSION" >&5
2085 echo "${ECHO_T}$GCC_VERSION" >&6
2086 fi
2087
2088 echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
2089 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091   echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093   ac_cv_prog_cc_stdc=no
2094 ac_save_CC=$CC
2095 cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <stdarg.h>
2099 #include <stdio.h>
2100 #include <sys/types.h>
2101 #include <sys/stat.h>
2102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2103 struct buf { int x; };
2104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105 static char *e (p, i)
2106      char **p;
2107      int i;
2108 {
2109   return p[i];
2110 }
2111 static char *f (char * (*g) (char **, int), char **p, ...)
2112 {
2113   char *s;
2114   va_list v;
2115   va_start (v,p);
2116   s = g (p, va_arg (v,int));
2117   va_end (v);
2118   return s;
2119 }
2120 int test (int i, double x);
2121 struct s1 {int (*f) (int a);};
2122 struct s2 {int (*f) (double a);};
2123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124 int argc;
2125 char **argv;
2126 int
2127 main ()
2128 {
2129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 # Don't try gcc -ansi; that turns off useful extensions and
2135 # breaks some systems' header files.
2136 # AIX                   -qlanglvl=ansi
2137 # Ultrix and OSF/1      -std1
2138 # HP-UX 10.20 and later -Ae
2139 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2140 # SVR4                  -Xc -D__EXTENSIONS__
2141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2142 do
2143   CC="$ac_save_CC $ac_arg"
2144   rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146   (eval $ac_compile) 2>&5
2147   ac_status=$?
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } &&
2150          { ac_try='test -s conftest.$ac_objext'
2151   { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); }; }; then
2156   ac_cv_prog_cc_stdc=$ac_arg
2157 break
2158 else
2159   echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 fi
2162 rm -f conftest.$ac_objext
2163 done
2164 rm -f conftest.$ac_ext conftest.$ac_objext
2165 CC=$ac_save_CC
2166
2167 fi
2168
2169 case "x$ac_cv_prog_cc_stdc" in
2170   x|xno)
2171     echo "$as_me:2171: result: none needed" >&5
2172 echo "${ECHO_T}none needed" >&6 ;;
2173   *)
2174     echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
2175 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176     CC="$CC $ac_cv_prog_cc_stdc" ;;
2177 esac
2178
2179 # This should have been defined by AC_PROG_CC
2180 : ${CC:=cc}
2181
2182 echo "$as_me:2182: checking \$CC variable" >&5
2183 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184 case "$CC" in
2185 (*[\ \  ]-[IUD]*)
2186         echo "$as_me:2186: result: broken" >&5
2187 echo "${ECHO_T}broken" >&6
2188         { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2190         # humor him...
2191         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2192         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2193
2194 cf_fix_cppflags=no
2195 cf_new_cflags=
2196 cf_new_cppflags=
2197 cf_new_extra_cppflags=
2198
2199 for cf_add_cflags in $cf_flags
2200 do
2201 case $cf_fix_cppflags in
2202 (no)
2203         case $cf_add_cflags in
2204         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2205                 case $cf_add_cflags in
2206                 (-D*)
2207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2208
2209                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2210                                 && test -z "${cf_tst_cflags}" \
2211                                 && cf_fix_cppflags=yes
2212
2213                         if test $cf_fix_cppflags = yes ; then
2214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2215                                 continue
2216                         elif test "${cf_tst_cflags}" = "\"'" ; then
2217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2218                                 continue
2219                         fi
2220                         ;;
2221                 esac
2222                 case "$CPPFLAGS" in
2223                 (*$cf_add_cflags)
2224                         ;;
2225                 (*)
2226                         case $cf_add_cflags in
2227                         (-D*)
2228                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2229
2230 CPPFLAGS=`echo "$CPPFLAGS" | \
2231         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2232                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2233
2234                                 ;;
2235                         esac
2236                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2237                         ;;
2238                 esac
2239                 ;;
2240         (*)
2241                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2242                 ;;
2243         esac
2244         ;;
2245 (yes)
2246         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247
2248         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2249
2250         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2251                 && test -z "${cf_tst_cflags}" \
2252                 && cf_fix_cppflags=no
2253         ;;
2254 esac
2255 done
2256
2257 if test -n "$cf_new_cflags" ; then
2258
2259         CFLAGS="$CFLAGS $cf_new_cflags"
2260 fi
2261
2262 if test -n "$cf_new_cppflags" ; then
2263
2264         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2265 fi
2266
2267 if test -n "$cf_new_extra_cppflags" ; then
2268
2269         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2270 fi
2271
2272         ;;
2273 (*)
2274         echo "$as_me:2274: result: ok" >&5
2275 echo "${ECHO_T}ok" >&6
2276         ;;
2277 esac
2278
2279 ac_ext=c
2280 ac_cpp='$CPP $CPPFLAGS'
2281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284 ac_main_return=return
2285 echo "$as_me:2285: checking how to run the C preprocessor" >&5
2286 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2287 # On Suns, sometimes $CPP names a directory.
2288 if test -n "$CPP" && test -d "$CPP"; then
2289   CPP=
2290 fi
2291 if test -z "$CPP"; then
2292   if test "${ac_cv_prog_CPP+set}" = set; then
2293   echo $ECHO_N "(cached) $ECHO_C" >&6
2294 else
2295       # Double quotes because CPP needs to be expanded
2296     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2297     do
2298       ac_preproc_ok=false
2299 for ac_c_preproc_warn_flag in '' yes
2300 do
2301   # Use a header file that comes with gcc, so configuring glibc
2302   # with a fresh cross-compiler works.
2303   # On the NeXT, cc -E runs the code through the compiler's parser,
2304   # not just through cpp. "Syntax error" is here to catch this case.
2305   cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309                      Syntax error
2310 _ACEOF
2311 if { (eval echo "$as_me:2311: \"$ac_cpp conftest.$ac_ext\"") >&5
2312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2313   ac_status=$?
2314   egrep -v '^ *\+' conftest.er1 >conftest.err
2315   rm -f conftest.er1
2316   cat conftest.err >&5
2317   echo "$as_me:2317: \$? = $ac_status" >&5
2318   (exit $ac_status); } >/dev/null; then
2319   if test -s conftest.err; then
2320     ac_cpp_err=$ac_c_preproc_warn_flag
2321   else
2322     ac_cpp_err=
2323   fi
2324 else
2325   ac_cpp_err=yes
2326 fi
2327 if test -z "$ac_cpp_err"; then
2328   :
2329 else
2330   echo "$as_me: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   # Broken: fails on valid input.
2333 continue
2334 fi
2335 rm -f conftest.err conftest.$ac_ext
2336
2337   # OK, works on sane cases.  Now check whether non-existent headers
2338   # can be detected and how.
2339   cat >conftest.$ac_ext <<_ACEOF
2340 #line 2340 "configure"
2341 #include "confdefs.h"
2342 #include <ac_nonexistent.h>
2343 _ACEOF
2344 if { (eval echo "$as_me:2344: \"$ac_cpp conftest.$ac_ext\"") >&5
2345   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2346   ac_status=$?
2347   egrep -v '^ *\+' conftest.er1 >conftest.err
2348   rm -f conftest.er1
2349   cat conftest.err >&5
2350   echo "$as_me:2350: \$? = $ac_status" >&5
2351   (exit $ac_status); } >/dev/null; then
2352   if test -s conftest.err; then
2353     ac_cpp_err=$ac_c_preproc_warn_flag
2354   else
2355     ac_cpp_err=
2356   fi
2357 else
2358   ac_cpp_err=yes
2359 fi
2360 if test -z "$ac_cpp_err"; then
2361   # Broken: success on invalid input.
2362 continue
2363 else
2364   echo "$as_me: failed program was:" >&5
2365   cat conftest.$ac_ext >&5
2366   # Passes both tests.
2367 ac_preproc_ok=:
2368 break
2369 fi
2370 rm -f conftest.err conftest.$ac_ext
2371
2372 done
2373 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2374 rm -f conftest.err conftest.$ac_ext
2375 if $ac_preproc_ok; then
2376   break
2377 fi
2378
2379     done
2380     ac_cv_prog_CPP=$CPP
2381
2382 fi
2383   CPP=$ac_cv_prog_CPP
2384 else
2385   ac_cv_prog_CPP=$CPP
2386 fi
2387 echo "$as_me:2387: result: $CPP" >&5
2388 echo "${ECHO_T}$CPP" >&6
2389 ac_preproc_ok=false
2390 for ac_c_preproc_warn_flag in '' yes
2391 do
2392   # Use a header file that comes with gcc, so configuring glibc
2393   # with a fresh cross-compiler works.
2394   # On the NeXT, cc -E runs the code through the compiler's parser,
2395   # not just through cpp. "Syntax error" is here to catch this case.
2396   cat >conftest.$ac_ext <<_ACEOF
2397 #line 2397 "configure"
2398 #include "confdefs.h"
2399 #include <assert.h>
2400                      Syntax error
2401 _ACEOF
2402 if { (eval echo "$as_me:2402: \"$ac_cpp conftest.$ac_ext\"") >&5
2403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2404   ac_status=$?
2405   egrep -v '^ *\+' conftest.er1 >conftest.err
2406   rm -f conftest.er1
2407   cat conftest.err >&5
2408   echo "$as_me:2408: \$? = $ac_status" >&5
2409   (exit $ac_status); } >/dev/null; then
2410   if test -s conftest.err; then
2411     ac_cpp_err=$ac_c_preproc_warn_flag
2412   else
2413     ac_cpp_err=
2414   fi
2415 else
2416   ac_cpp_err=yes
2417 fi
2418 if test -z "$ac_cpp_err"; then
2419   :
2420 else
2421   echo "$as_me: failed program was:" >&5
2422   cat conftest.$ac_ext >&5
2423   # Broken: fails on valid input.
2424 continue
2425 fi
2426 rm -f conftest.err conftest.$ac_ext
2427
2428   # OK, works on sane cases.  Now check whether non-existent headers
2429   # can be detected and how.
2430   cat >conftest.$ac_ext <<_ACEOF
2431 #line 2431 "configure"
2432 #include "confdefs.h"
2433 #include <ac_nonexistent.h>
2434 _ACEOF
2435 if { (eval echo "$as_me:2435: \"$ac_cpp conftest.$ac_ext\"") >&5
2436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2437   ac_status=$?
2438   egrep -v '^ *\+' conftest.er1 >conftest.err
2439   rm -f conftest.er1
2440   cat conftest.err >&5
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit $ac_status); } >/dev/null; then
2443   if test -s conftest.err; then
2444     ac_cpp_err=$ac_c_preproc_warn_flag
2445   else
2446     ac_cpp_err=
2447   fi
2448 else
2449   ac_cpp_err=yes
2450 fi
2451 if test -z "$ac_cpp_err"; then
2452   # Broken: success on invalid input.
2453 continue
2454 else
2455   echo "$as_me: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   # Passes both tests.
2458 ac_preproc_ok=:
2459 break
2460 fi
2461 rm -f conftest.err conftest.$ac_ext
2462
2463 done
2464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2465 rm -f conftest.err conftest.$ac_ext
2466 if $ac_preproc_ok; then
2467   :
2468 else
2469   { { echo "$as_me:2469: error: C preprocessor \"$CPP\" fails sanity check" >&5
2470 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2471    { (exit 1); exit 1; }; }
2472 fi
2473
2474 ac_ext=c
2475 ac_cpp='$CPP $CPPFLAGS'
2476 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2477 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2478 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2479 ac_main_return=return
2480
2481 if test $ac_cv_c_compiler_gnu = yes; then
2482     echo "$as_me:2482: checking whether $CC needs -traditional" >&5
2483 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2484 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2485   echo $ECHO_N "(cached) $ECHO_C" >&6
2486 else
2487     ac_pattern="Autoconf.*'x'"
2488   cat >conftest.$ac_ext <<_ACEOF
2489 #line 2489 "configure"
2490 #include "confdefs.h"
2491 #include <sgtty.h>
2492 int Autoconf = TIOCGETP;
2493 _ACEOF
2494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2495   egrep "$ac_pattern" >/dev/null 2>&1; then
2496   ac_cv_prog_gcc_traditional=yes
2497 else
2498   ac_cv_prog_gcc_traditional=no
2499 fi
2500 rm -rf conftest*
2501
2502   if test $ac_cv_prog_gcc_traditional = no; then
2503     cat >conftest.$ac_ext <<_ACEOF
2504 #line 2504 "configure"
2505 #include "confdefs.h"
2506 #include <termio.h>
2507 int Autoconf = TCGETA;
2508 _ACEOF
2509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2510   egrep "$ac_pattern" >/dev/null 2>&1; then
2511   ac_cv_prog_gcc_traditional=yes
2512 fi
2513 rm -rf conftest*
2514
2515   fi
2516 fi
2517 echo "$as_me:2517: result: $ac_cv_prog_gcc_traditional" >&5
2518 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2519   if test $ac_cv_prog_gcc_traditional = yes; then
2520     CC="$CC -traditional"
2521   fi
2522 fi
2523
2524 echo "$as_me:2524: checking whether $CC understands -c and -o together" >&5
2525 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2526 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2527   echo $ECHO_N "(cached) $ECHO_C" >&6
2528 else
2529
2530 cat > conftest.$ac_ext <<CF_EOF
2531 #include <stdio.h>
2532 int main()
2533 {
2534         ${cf_cv_main_return:-return}(0);
2535 }
2536 CF_EOF
2537 # We do the test twice because some compilers refuse to overwrite an
2538 # existing .o file with -o, though they will create one.
2539 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2540 if { (eval echo "$as_me:2540: \"$ac_try\"") >&5
2541   (eval $ac_try) 2>&5
2542   ac_status=$?
2543   echo "$as_me:2543: \$? = $ac_status" >&5
2544   (exit $ac_status); } &&
2545   test -f conftest2.$ac_objext && { (eval echo "$as_me:2545: \"$ac_try\"") >&5
2546   (eval $ac_try) 2>&5
2547   ac_status=$?
2548   echo "$as_me:2548: \$? = $ac_status" >&5
2549   (exit $ac_status); };
2550 then
2551   eval cf_cv_prog_CC_c_o=yes
2552 else
2553   eval cf_cv_prog_CC_c_o=no
2554 fi
2555 rm -rf conftest*
2556
2557 fi
2558 if test $cf_cv_prog_CC_c_o = yes; then
2559   echo "$as_me:2559: result: yes" >&5
2560 echo "${ECHO_T}yes" >&6
2561 else
2562   echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2564 fi
2565
2566 if test "$cross_compiling" = yes ; then
2567         LDCONFIG=:
2568 else
2569         case "$cf_cv_system_name" in
2570         (dragonfly*|mirbsd*|freebsd*)
2571                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2572                 ;;
2573         (*) LDPATH=$PATH:/sbin:/usr/sbin
2574                 # Extract the first word of "ldconfig", so it can be a program name with args.
2575 set dummy ldconfig; ac_word=$2
2576 echo "$as_me:2576: checking for $ac_word" >&5
2577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2578 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2579   echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581   case $LDCONFIG in
2582   [\\/]* | ?:[\\/]*)
2583   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2584   ;;
2585   *)
2586   ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 ac_dummy="$LDPATH"
2588 for ac_dir in $ac_dummy; do
2589   IFS=$ac_save_IFS
2590   test -z "$ac_dir" && ac_dir=.
2591   if $as_executable_p "$ac_dir/$ac_word"; then
2592    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2593    echo "$as_me:2593: found $ac_dir/$ac_word" >&5
2594    break
2595 fi
2596 done
2597
2598   ;;
2599 esac
2600 fi
2601 LDCONFIG=$ac_cv_path_LDCONFIG
2602
2603 if test -n "$LDCONFIG"; then
2604   echo "$as_me:2604: result: $LDCONFIG" >&5
2605 echo "${ECHO_T}$LDCONFIG" >&6
2606 else
2607   echo "$as_me:2607: result: no" >&5
2608 echo "${ECHO_T}no" >&6
2609 fi
2610
2611                 ;;
2612         esac
2613 fi
2614
2615 echo "$as_me:2615: checking if you want to ensure bool is consistent with C++" >&5
2616 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2617
2618 # Check whether --with-cxx or --without-cxx was given.
2619 if test "${with_cxx+set}" = set; then
2620   withval="$with_cxx"
2621   cf_with_cxx=$withval
2622 else
2623   cf_with_cxx=yes
2624 fi;
2625 echo "$as_me:2625: result: $cf_with_cxx" >&5
2626 echo "${ECHO_T}$cf_with_cxx" >&6
2627 if test "X$cf_with_cxx" = Xno ; then
2628         CXX=""
2629         GXX=""
2630 else
2631         # with autoconf 2.13, we can change the error to a warning:
2632                 ac_ext=cc
2633 ac_cpp='$CXXCPP $CPPFLAGS'
2634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2637 ac_main_return=return
2638 if test -n "$ac_tool_prefix"; then
2639   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2640   do
2641     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2643 echo "$as_me:2643: checking for $ac_word" >&5
2644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2645 if test "${ac_cv_prog_CXX+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   if test -n "$CXX"; then
2649   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2650 else
2651   ac_save_IFS=$IFS; IFS=$ac_path_separator
2652 ac_dummy="$PATH"
2653 for ac_dir in $ac_dummy; do
2654   IFS=$ac_save_IFS
2655   test -z "$ac_dir" && ac_dir=.
2656   $as_executable_p "$ac_dir/$ac_word" || continue
2657 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2658 echo "$as_me:2658: found $ac_dir/$ac_word" >&5
2659 break
2660 done
2661
2662 fi
2663 fi
2664 CXX=$ac_cv_prog_CXX
2665 if test -n "$CXX"; then
2666   echo "$as_me:2666: result: $CXX" >&5
2667 echo "${ECHO_T}$CXX" >&6
2668 else
2669   echo "$as_me:2669: result: no" >&5
2670 echo "${ECHO_T}no" >&6
2671 fi
2672
2673     test -n "$CXX" && break
2674   done
2675 fi
2676 if test -z "$CXX"; then
2677   ac_ct_CXX=$CXX
2678   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2679 do
2680   # Extract the first word of "$ac_prog", so it can be a program name with args.
2681 set dummy $ac_prog; ac_word=$2
2682 echo "$as_me:2682: checking for $ac_word" >&5
2683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2684 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2685   echo $ECHO_N "(cached) $ECHO_C" >&6
2686 else
2687   if test -n "$ac_ct_CXX"; then
2688   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2689 else
2690   ac_save_IFS=$IFS; IFS=$ac_path_separator
2691 ac_dummy="$PATH"
2692 for ac_dir in $ac_dummy; do
2693   IFS=$ac_save_IFS
2694   test -z "$ac_dir" && ac_dir=.
2695   $as_executable_p "$ac_dir/$ac_word" || continue
2696 ac_cv_prog_ac_ct_CXX="$ac_prog"
2697 echo "$as_me:2697: found $ac_dir/$ac_word" >&5
2698 break
2699 done
2700
2701 fi
2702 fi
2703 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2704 if test -n "$ac_ct_CXX"; then
2705   echo "$as_me:2705: result: $ac_ct_CXX" >&5
2706 echo "${ECHO_T}$ac_ct_CXX" >&6
2707 else
2708   echo "$as_me:2708: result: no" >&5
2709 echo "${ECHO_T}no" >&6
2710 fi
2711
2712   test -n "$ac_ct_CXX" && break
2713 done
2714 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2715
2716   CXX=$ac_ct_CXX
2717 fi
2718
2719 # Provide some information about the compiler.
2720 echo "$as_me:2720:" \
2721      "checking for C++ compiler version" >&5
2722 ac_compiler=`set X $ac_compile; echo $2`
2723 { (eval echo "$as_me:2723: \"$ac_compiler --version </dev/null >&5\"") >&5
2724   (eval $ac_compiler --version </dev/null >&5) 2>&5
2725   ac_status=$?
2726   echo "$as_me:2726: \$? = $ac_status" >&5
2727   (exit $ac_status); }
2728 { (eval echo "$as_me:2728: \"$ac_compiler -v </dev/null >&5\"") >&5
2729   (eval $ac_compiler -v </dev/null >&5) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }
2733 { (eval echo "$as_me:2733: \"$ac_compiler -V </dev/null >&5\"") >&5
2734   (eval $ac_compiler -V </dev/null >&5) 2>&5
2735   ac_status=$?
2736   echo "$as_me:2736: \$? = $ac_status" >&5
2737   (exit $ac_status); }
2738
2739 echo "$as_me:2739: checking whether we are using the GNU C++ compiler" >&5
2740 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2741 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2742   echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744   cat >conftest.$ac_ext <<_ACEOF
2745 #line 2745 "configure"
2746 #include "confdefs.h"
2747
2748 int
2749 main ()
2750 {
2751 #ifndef __GNUC__
2752        choke me
2753 #endif
2754
2755   ;
2756   return 0;
2757 }
2758 _ACEOF
2759 rm -f conftest.$ac_objext
2760 if { (eval echo "$as_me:2760: \"$ac_compile\"") >&5
2761   (eval $ac_compile) 2>&5
2762   ac_status=$?
2763   echo "$as_me:2763: \$? = $ac_status" >&5
2764   (exit $ac_status); } &&
2765          { ac_try='test -s conftest.$ac_objext'
2766   { (eval echo "$as_me:2766: \"$ac_try\"") >&5
2767   (eval $ac_try) 2>&5
2768   ac_status=$?
2769   echo "$as_me:2769: \$? = $ac_status" >&5
2770   (exit $ac_status); }; }; then
2771   ac_compiler_gnu=yes
2772 else
2773   echo "$as_me: failed program was:" >&5
2774 cat conftest.$ac_ext >&5
2775 ac_compiler_gnu=no
2776 fi
2777 rm -f conftest.$ac_objext conftest.$ac_ext
2778 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2779
2780 fi
2781 echo "$as_me:2781: result: $ac_cv_cxx_compiler_gnu" >&5
2782 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2783 GXX=`test $ac_compiler_gnu = yes && echo yes`
2784 ac_test_CXXFLAGS=${CXXFLAGS+set}
2785 ac_save_CXXFLAGS=$CXXFLAGS
2786 CXXFLAGS="-g"
2787 echo "$as_me:2787: checking whether $CXX accepts -g" >&5
2788 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2789 if test "${ac_cv_prog_cxx_g+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 ()
2798 {
2799
2800   ;
2801   return 0;
2802 }
2803 _ACEOF
2804 rm -f conftest.$ac_objext
2805 if { (eval echo "$as_me:2805: \"$ac_compile\"") >&5
2806   (eval $ac_compile) 2>&5
2807   ac_status=$?
2808   echo "$as_me:2808: \$? = $ac_status" >&5
2809   (exit $ac_status); } &&
2810          { ac_try='test -s conftest.$ac_objext'
2811   { (eval echo "$as_me:2811: \"$ac_try\"") >&5
2812   (eval $ac_try) 2>&5
2813   ac_status=$?
2814   echo "$as_me:2814: \$? = $ac_status" >&5
2815   (exit $ac_status); }; }; then
2816   ac_cv_prog_cxx_g=yes
2817 else
2818   echo "$as_me: failed program was:" >&5
2819 cat conftest.$ac_ext >&5
2820 ac_cv_prog_cxx_g=no
2821 fi
2822 rm -f conftest.$ac_objext conftest.$ac_ext
2823 fi
2824 echo "$as_me:2824: result: $ac_cv_prog_cxx_g" >&5
2825 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2826 if test "$ac_test_CXXFLAGS" = set; then
2827   CXXFLAGS=$ac_save_CXXFLAGS
2828 elif test $ac_cv_prog_cxx_g = yes; then
2829   if test "$GXX" = yes; then
2830     CXXFLAGS="-g -O2"
2831   else
2832     CXXFLAGS="-g"
2833   fi
2834 else
2835   if test "$GXX" = yes; then
2836     CXXFLAGS="-O2"
2837   else
2838     CXXFLAGS=
2839   fi
2840 fi
2841 for ac_declaration in \
2842    ''\
2843    '#include <stdlib.h>' \
2844    'extern "C" void std::exit (int) throw (); using std::exit;' \
2845    'extern "C" void std::exit (int); using std::exit;' \
2846    'extern "C" void exit (int) throw ();' \
2847    'extern "C" void exit (int);' \
2848    'void exit (int);'
2849 do
2850   cat >conftest.$ac_ext <<_ACEOF
2851 #line 2851 "configure"
2852 #include "confdefs.h"
2853 #include <stdlib.h>
2854 $ac_declaration
2855 int
2856 main ()
2857 {
2858 exit (42);
2859   ;
2860   return 0;
2861 }
2862 _ACEOF
2863 rm -f conftest.$ac_objext
2864 if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
2865   (eval $ac_compile) 2>&5
2866   ac_status=$?
2867   echo "$as_me:2867: \$? = $ac_status" >&5
2868   (exit $ac_status); } &&
2869          { ac_try='test -s conftest.$ac_objext'
2870   { (eval echo "$as_me:2870: \"$ac_try\"") >&5
2871   (eval $ac_try) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); }; }; then
2875   :
2876 else
2877   echo "$as_me: failed program was:" >&5
2878 cat conftest.$ac_ext >&5
2879 continue
2880 fi
2881 rm -f conftest.$ac_objext conftest.$ac_ext
2882   cat >conftest.$ac_ext <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885 $ac_declaration
2886 int
2887 main ()
2888 {
2889 exit (42);
2890   ;
2891   return 0;
2892 }
2893 _ACEOF
2894 rm -f conftest.$ac_objext
2895 if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5
2896   (eval $ac_compile) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); } &&
2900          { ac_try='test -s conftest.$ac_objext'
2901   { (eval echo "$as_me:2901: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); }; }; then
2906   break
2907 else
2908   echo "$as_me: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 done
2913 rm -rf conftest*
2914 if test -n "$ac_declaration"; then
2915   echo '#ifdef __cplusplus' >>confdefs.h
2916   echo $ac_declaration      >>confdefs.h
2917   echo '#endif'             >>confdefs.h
2918 fi
2919
2920 ac_ext=c
2921 ac_cpp='$CPP $CPPFLAGS'
2922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2925 ac_main_return=return
2926
2927         ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933
2934         if test "x$cf_with_cxx" != xno
2935         then
2936                 # Several of the C++ configurations do not work, particularly when
2937                 # cross-compiling (20140913 -TD)
2938                 echo "$as_me:2938: checking if $CXX works" >&5
2939 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2940
2941                 save_CPPFLAGS="$CPPFLAGS"
2942                 eval cf_includedir=${includedir}
2943                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2944
2945 cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948
2949 #include <stdlib.h>
2950 #include <stdio.h>
2951
2952 int
2953 main ()
2954 {
2955
2956                 printf("Hello world!\n")
2957
2958   ;
2959   return 0;
2960 }
2961 _ACEOF
2962 rm -f conftest.$ac_objext
2963 if { (eval echo "$as_me:2963: \"$ac_compile\"") >&5
2964   (eval $ac_compile) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); } &&
2968          { ac_try='test -s conftest.$ac_objext'
2969   { (eval echo "$as_me:2969: \"$ac_try\"") >&5
2970   (eval $ac_try) 2>&5
2971   ac_status=$?
2972   echo "$as_me:2972: \$? = $ac_status" >&5
2973   (exit $ac_status); }; }; then
2974   cf_cxx_works=yes
2975 else
2976   echo "$as_me: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 cf_cxx_works=no
2979 fi
2980 rm -f conftest.$ac_objext conftest.$ac_ext
2981                 CPPFLAGS="$save_CPPFLAGS"
2982
2983                 echo "$as_me:2983: result: $cf_cxx_works" >&5
2984 echo "${ECHO_T}$cf_cxx_works" >&6
2985                 if test "x$cf_cxx_works" = xno
2986                 then
2987                         { echo "$as_me:2987: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2988 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2989                         cf_with_cxx=no; CXX=""; GXX="";
2990                 fi
2991         fi
2992         ac_ext=c
2993 ac_cpp='$CPP $CPPFLAGS'
2994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997 ac_main_return=return
2998
2999         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3000         if test "$CXX" = "g++" ; then
3001                 # Extract the first word of "g++", so it can be a program name with args.
3002 set dummy g++; ac_word=$2
3003 echo "$as_me:3003: checking for $ac_word" >&5
3004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005 if test "${ac_cv_path_CXX+set}" = set; then
3006   echo $ECHO_N "(cached) $ECHO_C" >&6
3007 else
3008   case $CXX in
3009   [\\/]* | ?:[\\/]*)
3010   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3011   ;;
3012   *)
3013   ac_save_IFS=$IFS; IFS=$ac_path_separator
3014 ac_dummy="$PATH"
3015 for ac_dir in $ac_dummy; do
3016   IFS=$ac_save_IFS
3017   test -z "$ac_dir" && ac_dir=.
3018   if $as_executable_p "$ac_dir/$ac_word"; then
3019    ac_cv_path_CXX="$ac_dir/$ac_word"
3020    echo "$as_me:3020: found $ac_dir/$ac_word" >&5
3021    break
3022 fi
3023 done
3024
3025   ;;
3026 esac
3027 fi
3028 CXX=$ac_cv_path_CXX
3029
3030 if test -n "$CXX"; then
3031   echo "$as_me:3031: result: $CXX" >&5
3032 echo "${ECHO_T}$CXX" >&6
3033 else
3034   echo "$as_me:3034: result: no" >&5
3035 echo "${ECHO_T}no" >&6
3036 fi
3037
3038         fi
3039         case "x$CXX" in
3040         (x|xg++)
3041                 { echo "$as_me:3041: WARNING: You don't have any C++ compiler, too bad" >&5
3042 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3043                 cf_with_cxx=no; CXX=""; GXX="";
3044                 ;;
3045         esac
3046 fi
3047
3048 GXX_VERSION=none
3049 if test "$GXX" = yes; then
3050         echo "$as_me:3050: checking version of ${CXX:-g++}" >&5
3051 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3052         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3053         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3054         echo "$as_me:3054: result: $GXX_VERSION" >&5
3055 echo "${ECHO_T}$GXX_VERSION" >&6
3056 fi
3057
3058 case $GXX_VERSION in
3059 (1*|2.[0-6]*)
3060         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3061         # cf_cxx_library=no
3062         { echo "$as_me:3062: WARNING: templates do not work" >&5
3063 echo "$as_me: WARNING: templates do not work" >&2;}
3064         ;;
3065 esac
3066
3067 echo "$as_me:3067: checking if you want to build C++ binding and demo" >&5
3068 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3069
3070 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3071 if test "${with_cxx_binding+set}" = set; then
3072   withval="$with_cxx_binding"
3073   cf_with_cxx_binding=$withval
3074 else
3075   cf_with_cxx_binding=$cf_with_cxx
3076 fi;
3077 echo "$as_me:3077: result: $cf_with_cxx_binding" >&5
3078 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3079
3080 echo "$as_me:3080: checking if you want to build with Ada95" >&5
3081 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3082 echo "$as_me:3082: result: $cf_with_ada" >&5
3083 echo "${ECHO_T}$cf_with_ada" >&6
3084
3085 echo "$as_me:3085: checking if you want to install terminal database" >&5
3086 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3087
3088 # Check whether --enable-db-install or --disable-db-install was given.
3089 if test "${enable_db_install+set}" = set; then
3090   enableval="$enable_db_install"
3091   cf_with_db_install=$enableval
3092 else
3093   cf_with_db_install=yes
3094 fi;
3095 echo "$as_me:3095: result: $cf_with_db_install" >&5
3096 echo "${ECHO_T}$cf_with_db_install" >&6
3097
3098 echo "$as_me:3098: checking if you want to install manpages" >&5
3099 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3100
3101 # Check whether --with-manpages or --without-manpages was given.
3102 if test "${with_manpages+set}" = set; then
3103   withval="$with_manpages"
3104   cf_with_manpages=$withval
3105 else
3106   cf_with_manpages=yes
3107 fi;
3108 echo "$as_me:3108: result: $cf_with_manpages" >&5
3109 echo "${ECHO_T}$cf_with_manpages" >&6
3110
3111 echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3113
3114 # Check whether --with-progs or --without-progs was given.
3115 if test "${with_progs+set}" = set; then
3116   withval="$with_progs"
3117   cf_with_progs=$withval
3118 else
3119   cf_with_progs=yes
3120 fi;
3121 echo "$as_me:3121: result: $cf_with_progs" >&5
3122 echo "${ECHO_T}$cf_with_progs" >&6
3123
3124 echo "$as_me:3124: checking if you want to build test-programs" >&5
3125 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3126
3127 # Check whether --with-tests or --without-tests was given.
3128 if test "${with_tests+set}" = set; then
3129   withval="$with_tests"
3130   cf_with_tests=$withval
3131 else
3132   cf_with_tests=yes
3133 fi;
3134 echo "$as_me:3134: result: $cf_with_tests" >&5
3135 echo "${ECHO_T}$cf_with_tests" >&6
3136
3137 echo "$as_me:3137: checking if you wish to install curses.h" >&5
3138 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3139
3140 # Check whether --with-curses-h or --without-curses-h was given.
3141 if test "${with_curses_h+set}" = set; then
3142   withval="$with_curses_h"
3143   with_curses_h=$withval
3144 else
3145   with_curses_h=yes
3146 fi;
3147 echo "$as_me:3147: result: $with_curses_h" >&5
3148 echo "${ECHO_T}$with_curses_h" >&6
3149
3150 modules_to_build="ncurses"
3151 if test "X$cf_with_progs" != Xno ; then
3152 modules_to_build="$modules_to_build progs tack"
3153 fi
3154 modules_to_build="$modules_to_build panel menu form"
3155
3156 test "$program_prefix" != NONE &&
3157   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3158 # Use a double $ so make ignores it.
3159 test "$program_suffix" != NONE &&
3160   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3161 # Double any \ or $.  echo might interpret backslashes.
3162 # By default was `s,x,x', remove it if useless.
3163 cat <<\_ACEOF >conftest.sed
3164 s/[\\$]/&&/g;s/;s,x,x,$//
3165 _ACEOF
3166 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3167 rm conftest.sed
3168
3169 for ac_prog in mawk gawk nawk awk
3170 do
3171   # Extract the first word of "$ac_prog", so it can be a program name with args.
3172 set dummy $ac_prog; ac_word=$2
3173 echo "$as_me:3173: checking for $ac_word" >&5
3174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3175 if test "${ac_cv_prog_AWK+set}" = set; then
3176   echo $ECHO_N "(cached) $ECHO_C" >&6
3177 else
3178   if test -n "$AWK"; then
3179   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3180 else
3181   ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 ac_dummy="$PATH"
3183 for ac_dir in $ac_dummy; do
3184   IFS=$ac_save_IFS
3185   test -z "$ac_dir" && ac_dir=.
3186   $as_executable_p "$ac_dir/$ac_word" || continue
3187 ac_cv_prog_AWK="$ac_prog"
3188 echo "$as_me:3188: found $ac_dir/$ac_word" >&5
3189 break
3190 done
3191
3192 fi
3193 fi
3194 AWK=$ac_cv_prog_AWK
3195 if test -n "$AWK"; then
3196   echo "$as_me:3196: result: $AWK" >&5
3197 echo "${ECHO_T}$AWK" >&6
3198 else
3199   echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3201 fi
3202
3203   test -n "$AWK" && break
3204 done
3205
3206 test -z "$AWK" && { { echo "$as_me:3206: error: No awk program found" >&5
3207 echo "$as_me: error: No awk program found" >&2;}
3208    { (exit 1); exit 1; }; }
3209
3210 echo "$as_me:3210: checking for egrep" >&5
3211 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3212 if test "${ac_cv_prog_egrep+set}" = set; then
3213   echo $ECHO_N "(cached) $ECHO_C" >&6
3214 else
3215   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3216                 then ac_cv_prog_egrep='grep -E'
3217                 else ac_cv_prog_egrep='egrep'
3218         fi
3219 fi
3220 echo "$as_me:3220: result: $ac_cv_prog_egrep" >&5
3221 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3222         EGREP=$ac_cv_prog_egrep
3223
3224         test -z "$EGREP" && { { echo "$as_me:3224: error: No egrep program found" >&5
3225 echo "$as_me: error: No egrep program found" >&2;}
3226    { (exit 1); exit 1; }; }
3227
3228 # Find a good install program.  We prefer a C program (faster),
3229 # so one script is as good as another.  But avoid the broken or
3230 # incompatible versions:
3231 # SysV /etc/install, /usr/sbin/install
3232 # SunOS /usr/etc/install
3233 # IRIX /sbin/install
3234 # AIX /bin/install
3235 # AmigaOS /C/install, which installs bootblocks on floppy discs
3236 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3237 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3238 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3239 # ./install, which can be erroneously created by make from ./install.sh.
3240 echo "$as_me:3240: checking for a BSD compatible install" >&5
3241 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3242 if test -z "$INSTALL"; then
3243 if test "${ac_cv_path_install+set}" = set; then
3244   echo $ECHO_N "(cached) $ECHO_C" >&6
3245 else
3246     ac_save_IFS=$IFS; IFS=$ac_path_separator
3247   for ac_dir in $PATH; do
3248     IFS=$ac_save_IFS
3249     # Account for people who put trailing slashes in PATH elements.
3250     case $ac_dir/ in
3251     / | ./ | .// | /cC/* \
3252     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3253     | /usr/ucb/* ) ;;
3254     *)
3255       # OSF1 and SCO ODT 3.0 have their own names for install.
3256       # Don't use installbsd from OSF since it installs stuff as root
3257       # by default.
3258       for ac_prog in ginstall scoinst install; do
3259         if $as_executable_p "$ac_dir/$ac_prog"; then
3260           if test $ac_prog = install &&
3261             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3262             # AIX install.  It has an incompatible calling convention.
3263             :
3264           elif test $ac_prog = install &&
3265             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3266             # program-specific install script used by HP pwplus--don't use.
3267             :
3268           else
3269             ac_cv_path_install="$ac_dir/$ac_prog -c"
3270             break 2
3271           fi
3272         fi
3273       done
3274       ;;
3275     esac
3276   done
3277
3278 fi
3279   if test "${ac_cv_path_install+set}" = set; then
3280     INSTALL=$ac_cv_path_install
3281   else
3282     # As a last resort, use the slow shell script.  We don't cache a
3283     # path for INSTALL within a source directory, because that will
3284     # break other packages using the cache if that directory is
3285     # removed, or if the path is relative.
3286     INSTALL=$ac_install_sh
3287   fi
3288 fi
3289 echo "$as_me:3289: result: $INSTALL" >&5
3290 echo "${ECHO_T}$INSTALL" >&6
3291
3292 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3293 # It thinks the first close brace ends the variable substitution.
3294 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3295
3296 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3297
3298 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3299
3300 case $INSTALL in
3301 (/*)
3302         ;;
3303 (*)
3304         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3305         test -z "$cf_dir" && cf_dir=.
3306         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3307         ;;
3308 esac
3309
3310 for ac_prog in tdlint lint alint splint lclint
3311 do
3312   # Extract the first word of "$ac_prog", so it can be a program name with args.
3313 set dummy $ac_prog; ac_word=$2
3314 echo "$as_me:3314: checking for $ac_word" >&5
3315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316 if test "${ac_cv_prog_LINT+set}" = set; then
3317   echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319   if test -n "$LINT"; then
3320   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3321 else
3322   ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 ac_dummy="$PATH"
3324 for ac_dir in $ac_dummy; do
3325   IFS=$ac_save_IFS
3326   test -z "$ac_dir" && ac_dir=.
3327   $as_executable_p "$ac_dir/$ac_word" || continue
3328 ac_cv_prog_LINT="$ac_prog"
3329 echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3330 break
3331 done
3332
3333 fi
3334 fi
3335 LINT=$ac_cv_prog_LINT
3336 if test -n "$LINT"; then
3337   echo "$as_me:3337: result: $LINT" >&5
3338 echo "${ECHO_T}$LINT" >&6
3339 else
3340   echo "$as_me:3340: result: no" >&5
3341 echo "${ECHO_T}no" >&6
3342 fi
3343
3344   test -n "$LINT" && break
3345 done
3346
3347 echo "$as_me:3347: checking whether ln -s works" >&5
3348 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3349 LN_S=$as_ln_s
3350 if test "$LN_S" = "ln -s"; then
3351   echo "$as_me:3351: result: yes" >&5
3352 echo "${ECHO_T}yes" >&6
3353 else
3354   echo "$as_me:3354: result: no, using $LN_S" >&5
3355 echo "${ECHO_T}no, using $LN_S" >&6
3356 fi
3357
3358 echo "$as_me:3358: checking if $LN_S -f options work" >&5
3359 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3360
3361 rm -f conf$$.src conf$$dst
3362 echo >conf$$.dst
3363 echo first >conf$$.src
3364 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3365         cf_prog_ln_sf=yes
3366 else
3367         cf_prog_ln_sf=no
3368 fi
3369 rm -f conf$$.dst conf$$src
3370 echo "$as_me:3370: result: $cf_prog_ln_sf" >&5
3371 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3372
3373 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3374
3375 echo "$as_me:3375: checking for long file names" >&5
3376 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3377 if test "${ac_cv_sys_long_file_names+set}" = set; then
3378   echo $ECHO_N "(cached) $ECHO_C" >&6
3379 else
3380   ac_cv_sys_long_file_names=yes
3381 # Test for long file names in all the places we know might matter:
3382 #      .                the current directory, where building will happen
3383 #      $prefix/lib      where we will be installing things
3384 #      $exec_prefix/lib likewise
3385 # eval it to expand exec_prefix.
3386 #      $TMPDIR          if set, where it might want to write temporary files
3387 # if $TMPDIR is not set:
3388 #      /tmp             where it might want to write temporary files
3389 #      /var/tmp         likewise
3390 #      /usr/tmp         likewise
3391 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3392   ac_tmpdirs=$TMPDIR
3393 else
3394   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3395 fi
3396 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3397   test -d $ac_dir || continue
3398   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3399   ac_xdir=$ac_dir/cf$$
3400   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3401   ac_tf1=$ac_xdir/conftest9012345
3402   ac_tf2=$ac_xdir/conftest9012346
3403   (echo 1 >$ac_tf1) 2>/dev/null
3404   (echo 2 >$ac_tf2) 2>/dev/null
3405   ac_val=`cat $ac_tf1 2>/dev/null`
3406   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3407     ac_cv_sys_long_file_names=no
3408     rm -rf $ac_xdir 2>/dev/null
3409     break
3410   fi
3411   rm -rf $ac_xdir 2>/dev/null
3412 done
3413 fi
3414 echo "$as_me:3414: result: $ac_cv_sys_long_file_names" >&5
3415 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3416 if test $ac_cv_sys_long_file_names = yes; then
3417
3418 cat >>confdefs.h <<\EOF
3419 #define HAVE_LONG_FILE_NAMES 1
3420 EOF
3421
3422 fi
3423
3424 # if we find pkg-config, check if we should install the ".pc" files.
3425
3426 echo "$as_me:3426: checking if you want to use pkg-config" >&5
3427 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3428
3429 # Check whether --with-pkg-config or --without-pkg-config was given.
3430 if test "${with_pkg_config+set}" = set; then
3431   withval="$with_pkg_config"
3432   cf_pkg_config=$withval
3433 else
3434   cf_pkg_config=yes
3435 fi;
3436 echo "$as_me:3436: result: $cf_pkg_config" >&5
3437 echo "${ECHO_T}$cf_pkg_config" >&6
3438
3439 case $cf_pkg_config in
3440 (no)
3441         PKG_CONFIG=none
3442         ;;
3443 (yes)
3444
3445 if test -n "$ac_tool_prefix"; then
3446   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3447 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3448 echo "$as_me:3448: checking for $ac_word" >&5
3449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3451   echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453   case $PKG_CONFIG in
3454   [\\/]* | ?:[\\/]*)
3455   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3456   ;;
3457   *)
3458   ac_save_IFS=$IFS; IFS=$ac_path_separator
3459 ac_dummy="$PATH"
3460 for ac_dir in $ac_dummy; do
3461   IFS=$ac_save_IFS
3462   test -z "$ac_dir" && ac_dir=.
3463   if $as_executable_p "$ac_dir/$ac_word"; then
3464    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3465    echo "$as_me:3465: found $ac_dir/$ac_word" >&5
3466    break
3467 fi
3468 done
3469
3470   ;;
3471 esac
3472 fi
3473 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3474
3475 if test -n "$PKG_CONFIG"; then
3476   echo "$as_me:3476: result: $PKG_CONFIG" >&5
3477 echo "${ECHO_T}$PKG_CONFIG" >&6
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481 fi
3482
3483 fi
3484 if test -z "$ac_cv_path_PKG_CONFIG"; then
3485   ac_pt_PKG_CONFIG=$PKG_CONFIG
3486   # Extract the first word of "pkg-config", so it can be a program name with args.
3487 set dummy pkg-config; ac_word=$2
3488 echo "$as_me:3488: checking for $ac_word" >&5
3489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   case $ac_pt_PKG_CONFIG in
3494   [\\/]* | ?:[\\/]*)
3495   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3496   ;;
3497   *)
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   if $as_executable_p "$ac_dir/$ac_word"; then
3504    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3505    echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506    break
3507 fi
3508 done
3509
3510   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3511   ;;
3512 esac
3513 fi
3514 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3515
3516 if test -n "$ac_pt_PKG_CONFIG"; then
3517   echo "$as_me:3517: result: $ac_pt_PKG_CONFIG" >&5
3518 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3519 else
3520   echo "$as_me:3520: result: no" >&5
3521 echo "${ECHO_T}no" >&6
3522 fi
3523
3524   PKG_CONFIG=$ac_pt_PKG_CONFIG
3525 else
3526   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3527 fi
3528
3529         ;;
3530 (*)
3531         PKG_CONFIG=$withval
3532         ;;
3533 esac
3534
3535 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3536 if test "$PKG_CONFIG" != none ; then
3537
3538 if test "x$prefix" != xNONE; then
3539         cf_path_syntax="$prefix"
3540 else
3541         cf_path_syntax="$ac_default_prefix"
3542 fi
3543
3544 case ".$PKG_CONFIG" in
3545 (.\$\(*\)*|.\'*\'*)
3546         ;;
3547 (..|./*|.\\*)
3548         ;;
3549 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3550         ;;
3551 (.\${*prefix}*|.\${*dir}*)
3552         eval PKG_CONFIG="$PKG_CONFIG"
3553         case ".$PKG_CONFIG" in
3554         (.NONE/*)
3555                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3556                 ;;
3557         esac
3558         ;;
3559 (.no|.NONE/*)
3560         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3561         ;;
3562 (*)
3563         { { echo "$as_me:3563: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3564 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3565    { (exit 1); exit 1; }; }
3566         ;;
3567 esac
3568
3569 elif test "x$cf_pkg_config" != xno ; then
3570         { echo "$as_me:3570: WARNING: pkg-config is not installed" >&5
3571 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3572 fi
3573
3574 if test "x$PKG_CONFIG" = xnone ; then
3575         PKG_CONFIG_LIBDIR=no
3576 else
3577         echo "$as_me:3577: checking for $PKG_CONFIG library directory" >&5
3578 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3579
3580 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3581 if test "${with_pkg_config_libdir+set}" = set; then
3582   withval="$with_pkg_config_libdir"
3583   PKG_CONFIG_LIBDIR=$withval
3584 else
3585   PKG_CONFIG_LIBDIR=yes
3586 fi;
3587 fi
3588
3589 case x$PKG_CONFIG_LIBDIR in
3590 (x/*)
3591         ;;
3592 (xyes)
3593         # Look for the library directory using the same prefix as the executable
3594         if test "x$PKG_CONFIG" = xnone
3595         then
3596                 cf_path=$prefix
3597         else
3598                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3599         fi
3600
3601         # If you don't like using the default architecture, you have to specify the
3602         # intended library directory and corresponding compiler/linker options.
3603         #
3604         # This case allows for Debian's 2014-flavor of multiarch, along with the
3605         # most common variations before that point.  Some other variants spell the
3606         # directory differently, e.g., "pkg-config", and put it in unusual places.
3607         # pkg-config has always been poorly standardized, which is ironic...
3608         case x`(arch) 2>/dev/null` in
3609         (*64)
3610                 cf_search_path="\
3611                         $cf_path/lib/*64-linux-gnu \
3612                         $cf_path/share \
3613                         $cf_path/lib64 \
3614                         $cf_path/lib32 \
3615                         $cf_path/lib"
3616                 ;;
3617         (*)
3618                 cf_search_path="\
3619                         $cf_path/lib/*-linux-gnu \
3620                         $cf_path/share \
3621                         $cf_path/lib32 \
3622                         $cf_path/lib \
3623                         $cf_path/libdata"
3624                 ;;
3625         esac
3626
3627         test -n "$verbose" && echo "    list..." 1>&6
3628
3629 echo "${as_me:-configure}:3629: testing list... ..." 1>&5
3630
3631         for cf_config in $cf_search_path
3632         do
3633                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3634
3635 echo "${as_me:-configure}:3635: testing checking $cf_config/pkgconfig ..." 1>&5
3636
3637                 if test -d $cf_config/pkgconfig
3638                 then
3639                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3640                         echo "$as_me:3640: checking done" >&5
3641 echo $ECHO_N "checking done... $ECHO_C" >&6
3642                         break
3643                 fi
3644         done
3645         ;;
3646 (*)
3647         ;;
3648 esac
3649
3650 if test "x$PKG_CONFIG" != xnone ; then
3651         echo "$as_me:3651: result: $PKG_CONFIG_LIBDIR" >&5
3652 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3653 fi
3654
3655 if test "x$PKG_CONFIG" != xnone
3656 then
3657         echo "$as_me:3657: checking if we should install .pc files for $PKG_CONFIG" >&5
3658 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3659 else
3660         echo "$as_me:3660: checking if we should install .pc files" >&5
3661 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3662 fi
3663
3664 # Check whether --enable-pc-files or --disable-pc-files was given.
3665 if test "${enable_pc_files+set}" = set; then
3666   enableval="$enable_pc_files"
3667   enable_pc_files=$enableval
3668 else
3669   enable_pc_files=no
3670 fi;
3671 echo "$as_me:3671: result: $enable_pc_files" >&5
3672 echo "${ECHO_T}$enable_pc_files" >&6
3673
3674 if test "x$enable_pc_files" != xno
3675 then
3676         case "x$PKG_CONFIG_LIBDIR" in
3677         (xno|xyes)
3678                 { echo "$as_me:3678: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3679 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3680                 MAKE_PC_FILES="#"
3681                 ;;
3682         (*)
3683
3684 if test "x$prefix" != xNONE; then
3685         cf_path_syntax="$prefix"
3686 else
3687         cf_path_syntax="$ac_default_prefix"
3688 fi
3689
3690 case ".$PKG_CONFIG_LIBDIR" in
3691 (.\$\(*\)*|.\'*\'*)
3692         ;;
3693 (..|./*|.\\*)
3694         ;;
3695 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3696         ;;
3697 (.\${*prefix}*|.\${*dir}*)
3698         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3699         case ".$PKG_CONFIG_LIBDIR" in
3700         (.NONE/*)
3701                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3702                 ;;
3703         esac
3704         ;;
3705 (.no|.NONE/*)
3706         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3707         ;;
3708 (*)
3709         { { echo "$as_me:3709: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3710 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3711    { (exit 1); exit 1; }; }
3712         ;;
3713 esac
3714
3715                 MAKE_PC_FILES=
3716                 ;;
3717         esac
3718 else
3719         MAKE_PC_FILES="#"
3720 fi
3721
3722 if test -z "$MAKE_PC_FILES"
3723 then
3724         echo "$as_me:3724: checking for suffix to add to pc-files" >&5
3725 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3726
3727 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3728 if test "${with_pc_suffix+set}" = set; then
3729   withval="$with_pc_suffix"
3730   case "x$withval" in
3731         (xyes|xno)
3732                 PC_MODULE_SUFFIX=
3733                 ;;
3734         (*)     PC_MODULE_SUFFIX="$withval"
3735                 ;;
3736         esac
3737 fi;
3738         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3739         echo "$as_me:3739: result: $PC_MODULE_SUFFIX" >&5
3740 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3741         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3742
3743 fi
3744
3745 echo "$as_me:3745: checking if we should assume mixed-case filenames" >&5
3746 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3747
3748 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3749 if test "${enable_mixed_case+set}" = set; then
3750   enableval="$enable_mixed_case"
3751   enable_mixedcase=$enableval
3752 else
3753   enable_mixedcase=auto
3754 fi;
3755 echo "$as_me:3755: result: $enable_mixedcase" >&5
3756 echo "${ECHO_T}$enable_mixedcase" >&6
3757 if test "$enable_mixedcase" = "auto" ; then
3758
3759 echo "$as_me:3759: checking if filesystem supports mixed-case filenames" >&5
3760 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3761 if test "${cf_cv_mixedcase+set}" = set; then
3762   echo $ECHO_N "(cached) $ECHO_C" >&6
3763 else
3764
3765 if test "$cross_compiling" = yes ; then
3766         case $target_alias in
3767         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3768                 cf_cv_mixedcase=no
3769                 ;;
3770         (*)
3771                 cf_cv_mixedcase=yes
3772                 ;;
3773         esac
3774 else
3775         rm -f conftest CONFTEST
3776         echo test >conftest
3777         if test -f CONFTEST ; then
3778                 cf_cv_mixedcase=no
3779         else
3780                 cf_cv_mixedcase=yes
3781         fi
3782         rm -f conftest CONFTEST
3783 fi
3784
3785 fi
3786 echo "$as_me:3786: result: $cf_cv_mixedcase" >&5
3787 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3788 test "$cf_cv_mixedcase" = yes &&
3789 cat >>confdefs.h <<\EOF
3790 #define MIXEDCASE_FILENAMES 1
3791 EOF
3792
3793 else
3794         cf_cv_mixedcase=$enable_mixedcase
3795         if test "x$enable_mixedcase" = "xyes" ; then
3796
3797 cat >>confdefs.h <<\EOF
3798 #define MIXEDCASE_FILENAMES 1
3799 EOF
3800
3801         fi
3802 fi
3803
3804 # do this after mixed-case option (tags/TAGS is not as important as tic).
3805 echo "$as_me:3805: checking whether ${MAKE-make} sets \${MAKE}" >&5
3806 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3807 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3808 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3809   echo $ECHO_N "(cached) $ECHO_C" >&6
3810 else
3811   cat >conftest.make <<\EOF
3812 all:
3813         @echo 'ac_maketemp="${MAKE}"'
3814 EOF
3815 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3816 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3817 if test -n "$ac_maketemp"; then
3818   eval ac_cv_prog_make_${ac_make}_set=yes
3819 else
3820   eval ac_cv_prog_make_${ac_make}_set=no
3821 fi
3822 rm -f conftest.make
3823 fi
3824 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3825   echo "$as_me:3825: result: yes" >&5
3826 echo "${ECHO_T}yes" >&6
3827   SET_MAKE=
3828 else
3829   echo "$as_me:3829: result: no" >&5
3830 echo "${ECHO_T}no" >&6
3831   SET_MAKE="MAKE=${MAKE-make}"
3832 fi
3833
3834 for ac_prog in exctags ctags
3835 do
3836   # Extract the first word of "$ac_prog", so it can be a program name with args.
3837 set dummy $ac_prog; ac_word=$2
3838 echo "$as_me:3838: checking for $ac_word" >&5
3839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3840 if test "${ac_cv_prog_CTAGS+set}" = set; then
3841   echo $ECHO_N "(cached) $ECHO_C" >&6
3842 else
3843   if test -n "$CTAGS"; then
3844   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3845 else
3846   ac_save_IFS=$IFS; IFS=$ac_path_separator
3847 ac_dummy="$PATH"
3848 for ac_dir in $ac_dummy; do
3849   IFS=$ac_save_IFS
3850   test -z "$ac_dir" && ac_dir=.
3851   $as_executable_p "$ac_dir/$ac_word" || continue
3852 ac_cv_prog_CTAGS="$ac_prog"
3853 echo "$as_me:3853: found $ac_dir/$ac_word" >&5
3854 break
3855 done
3856
3857 fi
3858 fi
3859 CTAGS=$ac_cv_prog_CTAGS
3860 if test -n "$CTAGS"; then
3861   echo "$as_me:3861: result: $CTAGS" >&5
3862 echo "${ECHO_T}$CTAGS" >&6
3863 else
3864   echo "$as_me:3864: result: no" >&5
3865 echo "${ECHO_T}no" >&6
3866 fi
3867
3868   test -n "$CTAGS" && break
3869 done
3870
3871 for ac_prog in exetags etags
3872 do
3873   # Extract the first word of "$ac_prog", so it can be a program name with args.
3874 set dummy $ac_prog; ac_word=$2
3875 echo "$as_me:3875: checking for $ac_word" >&5
3876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3877 if test "${ac_cv_prog_ETAGS+set}" = set; then
3878   echo $ECHO_N "(cached) $ECHO_C" >&6
3879 else
3880   if test -n "$ETAGS"; then
3881   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3882 else
3883   ac_save_IFS=$IFS; IFS=$ac_path_separator
3884 ac_dummy="$PATH"
3885 for ac_dir in $ac_dummy; do
3886   IFS=$ac_save_IFS
3887   test -z "$ac_dir" && ac_dir=.
3888   $as_executable_p "$ac_dir/$ac_word" || continue
3889 ac_cv_prog_ETAGS="$ac_prog"
3890 echo "$as_me:3890: found $ac_dir/$ac_word" >&5
3891 break
3892 done
3893
3894 fi
3895 fi
3896 ETAGS=$ac_cv_prog_ETAGS
3897 if test -n "$ETAGS"; then
3898   echo "$as_me:3898: result: $ETAGS" >&5
3899 echo "${ECHO_T}$ETAGS" >&6
3900 else
3901   echo "$as_me:3901: result: no" >&5
3902 echo "${ECHO_T}no" >&6
3903 fi
3904
3905   test -n "$ETAGS" && break
3906 done
3907
3908 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3909 set dummy ${CTAGS:-ctags}; ac_word=$2
3910 echo "$as_me:3910: checking for $ac_word" >&5
3911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3912 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3913   echo $ECHO_N "(cached) $ECHO_C" >&6
3914 else
3915   if test -n "$MAKE_LOWER_TAGS"; then
3916   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3917 else
3918   ac_save_IFS=$IFS; IFS=$ac_path_separator
3919 ac_dummy="$PATH"
3920 for ac_dir in $ac_dummy; do
3921   IFS=$ac_save_IFS
3922   test -z "$ac_dir" && ac_dir=.
3923   $as_executable_p "$ac_dir/$ac_word" || continue
3924 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3925 echo "$as_me:3925: found $ac_dir/$ac_word" >&5
3926 break
3927 done
3928
3929   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3930 fi
3931 fi
3932 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3933 if test -n "$MAKE_LOWER_TAGS"; then
3934   echo "$as_me:3934: result: $MAKE_LOWER_TAGS" >&5
3935 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3936 else
3937   echo "$as_me:3937: result: no" >&5
3938 echo "${ECHO_T}no" >&6
3939 fi
3940
3941 if test "$cf_cv_mixedcase" = yes ; then
3942         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3943 set dummy ${ETAGS:-etags}; ac_word=$2
3944 echo "$as_me:3944: checking for $ac_word" >&5
3945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3946 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3947   echo $ECHO_N "(cached) $ECHO_C" >&6
3948 else
3949   if test -n "$MAKE_UPPER_TAGS"; then
3950   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3951 else
3952   ac_save_IFS=$IFS; IFS=$ac_path_separator
3953 ac_dummy="$PATH"
3954 for ac_dir in $ac_dummy; do
3955   IFS=$ac_save_IFS
3956   test -z "$ac_dir" && ac_dir=.
3957   $as_executable_p "$ac_dir/$ac_word" || continue
3958 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3959 echo "$as_me:3959: found $ac_dir/$ac_word" >&5
3960 break
3961 done
3962
3963   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3964 fi
3965 fi
3966 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3967 if test -n "$MAKE_UPPER_TAGS"; then
3968   echo "$as_me:3968: result: $MAKE_UPPER_TAGS" >&5
3969 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3970 else
3971   echo "$as_me:3971: result: no" >&5
3972 echo "${ECHO_T}no" >&6
3973 fi
3974
3975 else
3976         MAKE_UPPER_TAGS=no
3977 fi
3978
3979 if test "$MAKE_UPPER_TAGS" = yes ; then
3980         MAKE_UPPER_TAGS=
3981 else
3982         MAKE_UPPER_TAGS="#"
3983 fi
3984
3985 if test "$MAKE_LOWER_TAGS" = yes ; then
3986         MAKE_LOWER_TAGS=
3987 else
3988         MAKE_LOWER_TAGS="#"
3989 fi
3990
3991 echo "$as_me:3991: checking for makeflags variable" >&5
3992 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3993 if test "${cf_cv_makeflags+set}" = set; then
3994   echo $ECHO_N "(cached) $ECHO_C" >&6
3995 else
3996
3997         cf_cv_makeflags=''
3998         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3999         do
4000                 cat >cf_makeflags.tmp <<CF_EOF
4001 SHELL = $SHELL
4002 all :
4003         @ echo '.$cf_option'
4004 CF_EOF
4005                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4006                 case "$cf_result" in
4007                 (.*k|.*kw)
4008                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4009                         case "$cf_result" in
4010                         (.*CC=*)        cf_cv_makeflags=
4011                                 ;;
4012                         (*)     cf_cv_makeflags=$cf_option
4013                                 ;;
4014                         esac
4015                         break
4016                         ;;
4017                 (.-)    ;;
4018                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4019                         ;;
4020                 esac
4021         done
4022         rm -f cf_makeflags.tmp
4023
4024 fi
4025 echo "$as_me:4025: result: $cf_cv_makeflags" >&5
4026 echo "${ECHO_T}$cf_cv_makeflags" >&6
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_prog_RANLIB+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   if test -n "$RANLIB"; then
4037   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4038 else
4039   ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042   IFS=$ac_save_IFS
4043   test -z "$ac_dir" && ac_dir=.
4044   $as_executable_p "$ac_dir/$ac_word" || continue
4045 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4046 echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047 break
4048 done
4049
4050 fi
4051 fi
4052 RANLIB=$ac_cv_prog_RANLIB
4053 if test -n "$RANLIB"; then
4054   echo "$as_me:4054: result: $RANLIB" >&5
4055 echo "${ECHO_T}$RANLIB" >&6
4056 else
4057   echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4059 fi
4060
4061 fi
4062 if test -z "$ac_cv_prog_RANLIB"; then
4063   ac_ct_RANLIB=$RANLIB
4064   # Extract the first word of "ranlib", so it can be a program name with args.
4065 set dummy ranlib; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   if test -n "$ac_ct_RANLIB"; then
4072   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4073 else
4074   ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077   IFS=$ac_save_IFS
4078   test -z "$ac_dir" && ac_dir=.
4079   $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_ac_ct_RANLIB="ranlib"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4084
4085   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4086 fi
4087 fi
4088 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4089 if test -n "$ac_ct_RANLIB"; then
4090   echo "$as_me:4090: result: $ac_ct_RANLIB" >&5
4091 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   RANLIB=$ac_ct_RANLIB
4098 else
4099   RANLIB="$ac_cv_prog_RANLIB"
4100 fi
4101
4102 if test -n "$ac_tool_prefix"; then
4103   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4104 set dummy ${ac_tool_prefix}ld; ac_word=$2
4105 echo "$as_me:4105: checking for $ac_word" >&5
4106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4107 if test "${ac_cv_prog_LD+set}" = set; then
4108   echo $ECHO_N "(cached) $ECHO_C" >&6
4109 else
4110   if test -n "$LD"; then
4111   ac_cv_prog_LD="$LD" # Let the user override the test.
4112 else
4113   ac_save_IFS=$IFS; IFS=$ac_path_separator
4114 ac_dummy="$PATH"
4115 for ac_dir in $ac_dummy; do
4116   IFS=$ac_save_IFS
4117   test -z "$ac_dir" && ac_dir=.
4118   $as_executable_p "$ac_dir/$ac_word" || continue
4119 ac_cv_prog_LD="${ac_tool_prefix}ld"
4120 echo "$as_me:4120: found $ac_dir/$ac_word" >&5
4121 break
4122 done
4123
4124 fi
4125 fi
4126 LD=$ac_cv_prog_LD
4127 if test -n "$LD"; then
4128   echo "$as_me:4128: result: $LD" >&5
4129 echo "${ECHO_T}$LD" >&6
4130 else
4131   echo "$as_me:4131: result: no" >&5
4132 echo "${ECHO_T}no" >&6
4133 fi
4134
4135 fi
4136 if test -z "$ac_cv_prog_LD"; then
4137   ac_ct_LD=$LD
4138   # Extract the first word of "ld", so it can be a program name with args.
4139 set dummy ld; ac_word=$2
4140 echo "$as_me:4140: checking for $ac_word" >&5
4141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4143   echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145   if test -n "$ac_ct_LD"; then
4146   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4147 else
4148   ac_save_IFS=$IFS; IFS=$ac_path_separator
4149 ac_dummy="$PATH"
4150 for ac_dir in $ac_dummy; do
4151   IFS=$ac_save_IFS
4152   test -z "$ac_dir" && ac_dir=.
4153   $as_executable_p "$ac_dir/$ac_word" || continue
4154 ac_cv_prog_ac_ct_LD="ld"
4155 echo "$as_me:4155: found $ac_dir/$ac_word" >&5
4156 break
4157 done
4158
4159   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4160 fi
4161 fi
4162 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4163 if test -n "$ac_ct_LD"; then
4164   echo "$as_me:4164: result: $ac_ct_LD" >&5
4165 echo "${ECHO_T}$ac_ct_LD" >&6
4166 else
4167   echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4169 fi
4170
4171   LD=$ac_ct_LD
4172 else
4173   LD="$ac_cv_prog_LD"
4174 fi
4175
4176 if test -n "$ac_tool_prefix"; then
4177   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4178 set dummy ${ac_tool_prefix}ar; ac_word=$2
4179 echo "$as_me:4179: checking for $ac_word" >&5
4180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4181 if test "${ac_cv_prog_AR+set}" = set; then
4182   echo $ECHO_N "(cached) $ECHO_C" >&6
4183 else
4184   if test -n "$AR"; then
4185   ac_cv_prog_AR="$AR" # Let the user override the test.
4186 else
4187   ac_save_IFS=$IFS; IFS=$ac_path_separator
4188 ac_dummy="$PATH"
4189 for ac_dir in $ac_dummy; do
4190   IFS=$ac_save_IFS
4191   test -z "$ac_dir" && ac_dir=.
4192   $as_executable_p "$ac_dir/$ac_word" || continue
4193 ac_cv_prog_AR="${ac_tool_prefix}ar"
4194 echo "$as_me:4194: found $ac_dir/$ac_word" >&5
4195 break
4196 done
4197
4198 fi
4199 fi
4200 AR=$ac_cv_prog_AR
4201 if test -n "$AR"; then
4202   echo "$as_me:4202: result: $AR" >&5
4203 echo "${ECHO_T}$AR" >&6
4204 else
4205   echo "$as_me:4205: result: no" >&5
4206 echo "${ECHO_T}no" >&6
4207 fi
4208
4209 fi
4210 if test -z "$ac_cv_prog_AR"; then
4211   ac_ct_AR=$AR
4212   # Extract the first word of "ar", so it can be a program name with args.
4213 set dummy ar; ac_word=$2
4214 echo "$as_me:4214: checking for $ac_word" >&5
4215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4216 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219   if test -n "$ac_ct_AR"; then
4220   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4221 else
4222   ac_save_IFS=$IFS; IFS=$ac_path_separator
4223 ac_dummy="$PATH"
4224 for ac_dir in $ac_dummy; do
4225   IFS=$ac_save_IFS
4226   test -z "$ac_dir" && ac_dir=.
4227   $as_executable_p "$ac_dir/$ac_word" || continue
4228 ac_cv_prog_ac_ct_AR="ar"
4229 echo "$as_me:4229: found $ac_dir/$ac_word" >&5
4230 break
4231 done
4232
4233   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4234 fi
4235 fi
4236 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4237 if test -n "$ac_ct_AR"; then
4238   echo "$as_me:4238: result: $ac_ct_AR" >&5
4239 echo "${ECHO_T}$ac_ct_AR" >&6
4240 else
4241   echo "$as_me:4241: result: no" >&5
4242 echo "${ECHO_T}no" >&6
4243 fi
4244
4245   AR=$ac_ct_AR
4246 else
4247   AR="$ac_cv_prog_AR"
4248 fi
4249
4250 if test -n "$ac_tool_prefix"; then
4251   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4252 set dummy ${ac_tool_prefix}nm; ac_word=$2
4253 echo "$as_me:4253: checking for $ac_word" >&5
4254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4255 if test "${ac_cv_prog_NM+set}" = set; then
4256   echo $ECHO_N "(cached) $ECHO_C" >&6
4257 else
4258   if test -n "$NM"; then
4259   ac_cv_prog_NM="$NM" # Let the user override the test.
4260 else
4261   ac_save_IFS=$IFS; IFS=$ac_path_separator
4262 ac_dummy="$PATH"
4263 for ac_dir in $ac_dummy; do
4264   IFS=$ac_save_IFS
4265   test -z "$ac_dir" && ac_dir=.
4266   $as_executable_p "$ac_dir/$ac_word" || continue
4267 ac_cv_prog_NM="${ac_tool_prefix}nm"
4268 echo "$as_me:4268: found $ac_dir/$ac_word" >&5
4269 break
4270 done
4271
4272 fi
4273 fi
4274 NM=$ac_cv_prog_NM
4275 if test -n "$NM"; then
4276   echo "$as_me:4276: result: $NM" >&5
4277 echo "${ECHO_T}$NM" >&6
4278 else
4279   echo "$as_me:4279: result: no" >&5
4280 echo "${ECHO_T}no" >&6
4281 fi
4282
4283 fi
4284 if test -z "$ac_cv_prog_NM"; then
4285   ac_ct_NM=$NM
4286   # Extract the first word of "nm", so it can be a program name with args.
4287 set dummy nm; ac_word=$2
4288 echo "$as_me:4288: checking for $ac_word" >&5
4289 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4290 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4291   echo $ECHO_N "(cached) $ECHO_C" >&6
4292 else
4293   if test -n "$ac_ct_NM"; then
4294   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4295 else
4296   ac_save_IFS=$IFS; IFS=$ac_path_separator
4297 ac_dummy="$PATH"
4298 for ac_dir in $ac_dummy; do
4299   IFS=$ac_save_IFS
4300   test -z "$ac_dir" && ac_dir=.
4301   $as_executable_p "$ac_dir/$ac_word" || continue
4302 ac_cv_prog_ac_ct_NM="nm"
4303 echo "$as_me:4303: found $ac_dir/$ac_word" >&5
4304 break
4305 done
4306
4307   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4308 fi
4309 fi
4310 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4311 if test -n "$ac_ct_NM"; then
4312   echo "$as_me:4312: result: $ac_ct_NM" >&5
4313 echo "${ECHO_T}$ac_ct_NM" >&6
4314 else
4315   echo "$as_me:4315: result: no" >&5
4316 echo "${ECHO_T}no" >&6
4317 fi
4318
4319   NM=$ac_ct_NM
4320 else
4321   NM="$ac_cv_prog_NM"
4322 fi
4323
4324 if test -n "$ac_tool_prefix"; then
4325   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4326 set dummy ${ac_tool_prefix}ar; ac_word=$2
4327 echo "$as_me:4327: checking for $ac_word" >&5
4328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4329 if test "${ac_cv_prog_AR+set}" = set; then
4330   echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332   if test -n "$AR"; then
4333   ac_cv_prog_AR="$AR" # Let the user override the test.
4334 else
4335   ac_save_IFS=$IFS; IFS=$ac_path_separator
4336 ac_dummy="$PATH"
4337 for ac_dir in $ac_dummy; do
4338   IFS=$ac_save_IFS
4339   test -z "$ac_dir" && ac_dir=.
4340   $as_executable_p "$ac_dir/$ac_word" || continue
4341 ac_cv_prog_AR="${ac_tool_prefix}ar"
4342 echo "$as_me:4342: found $ac_dir/$ac_word" >&5
4343 break
4344 done
4345
4346 fi
4347 fi
4348 AR=$ac_cv_prog_AR
4349 if test -n "$AR"; then
4350   echo "$as_me:4350: result: $AR" >&5
4351 echo "${ECHO_T}$AR" >&6
4352 else
4353   echo "$as_me:4353: result: no" >&5
4354 echo "${ECHO_T}no" >&6
4355 fi
4356
4357 fi
4358 if test -z "$ac_cv_prog_AR"; then
4359   ac_ct_AR=$AR
4360   # Extract the first word of "ar", so it can be a program name with args.
4361 set dummy ar; ac_word=$2
4362 echo "$as_me:4362: checking for $ac_word" >&5
4363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4364 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4365   echo $ECHO_N "(cached) $ECHO_C" >&6
4366 else
4367   if test -n "$ac_ct_AR"; then
4368   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4369 else
4370   ac_save_IFS=$IFS; IFS=$ac_path_separator
4371 ac_dummy="$PATH"
4372 for ac_dir in $ac_dummy; do
4373   IFS=$ac_save_IFS
4374   test -z "$ac_dir" && ac_dir=.
4375   $as_executable_p "$ac_dir/$ac_word" || continue
4376 ac_cv_prog_ac_ct_AR="ar"
4377 echo "$as_me:4377: found $ac_dir/$ac_word" >&5
4378 break
4379 done
4380
4381   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4382 fi
4383 fi
4384 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4385 if test -n "$ac_ct_AR"; then
4386   echo "$as_me:4386: result: $ac_ct_AR" >&5
4387 echo "${ECHO_T}$ac_ct_AR" >&6
4388 else
4389   echo "$as_me:4389: result: no" >&5
4390 echo "${ECHO_T}no" >&6
4391 fi
4392
4393   AR=$ac_ct_AR
4394 else
4395   AR="$ac_cv_prog_AR"
4396 fi
4397
4398 echo "$as_me:4398: checking for options to update archives" >&5
4399 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4400 if test "${cf_cv_ar_flags+set}" = set; then
4401   echo $ECHO_N "(cached) $ECHO_C" >&6
4402 else
4403
4404         cf_cv_ar_flags=unknown
4405         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4406         do
4407
4408                 # check if $ARFLAGS already contains this choice
4409                 if test "x$ARFLAGS" != "x" ; then
4410                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4411                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4412                                 cf_cv_ar_flags=
4413                                 break
4414                         fi
4415                 fi
4416
4417                 rm -f conftest.$ac_cv_objext
4418                 rm -f conftest.a
4419
4420                 cat >conftest.$ac_ext <<EOF
4421 #line 4421 "configure"
4422 int     testdata[3] = { 123, 456, 789 };
4423 EOF
4424                 if { (eval echo "$as_me:4424: \"$ac_compile\"") >&5
4425   (eval $ac_compile) 2>&5
4426   ac_status=$?
4427   echo "$as_me:4427: \$? = $ac_status" >&5
4428   (exit $ac_status); } ; then
4429                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4430                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4431                         if test -f conftest.a ; then
4432                                 cf_cv_ar_flags=$cf_ar_flags
4433                                 break
4434                         fi
4435                 else
4436                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4437
4438 echo "${as_me:-configure}:4438: testing cannot compile test-program ..." 1>&5
4439
4440                         break
4441                 fi
4442         done
4443         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4444
4445 fi
4446 echo "$as_me:4446: result: $cf_cv_ar_flags" >&5
4447 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4448
4449 if test -n "$ARFLAGS" ; then
4450         if test -n "$cf_cv_ar_flags" ; then
4451                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4452         fi
4453 else
4454         ARFLAGS=$cf_cv_ar_flags
4455 fi
4456
4457 echo "$as_me:4457: checking if you have specified an install-prefix" >&5
4458 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4459
4460 # Check whether --with-install-prefix or --without-install-prefix was given.
4461 if test "${with_install_prefix+set}" = set; then
4462   withval="$with_install_prefix"
4463   case "x$withval" in
4464         (xyes|xno)
4465                 ;;
4466         (*)     DESTDIR="$withval"
4467                 ;;
4468         esac
4469 fi;
4470 echo "$as_me:4470: result: $DESTDIR" >&5
4471 echo "${ECHO_T}$DESTDIR" >&6
4472
4473 ###############################################################################
4474
4475 # If we're cross-compiling, allow the user to override the tools and their
4476 # options.  The configure script is oriented toward identifying the host
4477 # compiler, etc., but we need a build compiler to generate parts of the source.
4478
4479 if test "$cross_compiling" = yes ; then
4480
4481         # defaults that we might want to override
4482         : ${BUILD_CFLAGS:=''}
4483         : ${BUILD_CPPFLAGS:=''}
4484         : ${BUILD_LDFLAGS:=''}
4485         : ${BUILD_LIBS:=''}
4486         : ${BUILD_EXEEXT:='$x'}
4487         : ${BUILD_OBJEXT:='o'}
4488
4489 # Check whether --with-build-cc or --without-build-cc was given.
4490 if test "${with_build_cc+set}" = set; then
4491   withval="$with_build_cc"
4492   BUILD_CC="$withval"
4493 else
4494   for ac_prog in gcc cc cl
4495 do
4496   # Extract the first word of "$ac_prog", so it can be a program name with args.
4497 set dummy $ac_prog; ac_word=$2
4498 echo "$as_me:4498: checking for $ac_word" >&5
4499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4500 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503   if test -n "$BUILD_CC"; then
4504   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4505 else
4506   ac_save_IFS=$IFS; IFS=$ac_path_separator
4507 ac_dummy="$PATH"
4508 for ac_dir in $ac_dummy; do
4509   IFS=$ac_save_IFS
4510   test -z "$ac_dir" && ac_dir=.
4511   $as_executable_p "$ac_dir/$ac_word" || continue
4512 ac_cv_prog_BUILD_CC="$ac_prog"
4513 echo "$as_me:4513: found $ac_dir/$ac_word" >&5
4514 break
4515 done
4516
4517 fi
4518 fi
4519 BUILD_CC=$ac_cv_prog_BUILD_CC
4520 if test -n "$BUILD_CC"; then
4521   echo "$as_me:4521: result: $BUILD_CC" >&5
4522 echo "${ECHO_T}$BUILD_CC" >&6
4523 else
4524   echo "$as_me:4524: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   test -n "$BUILD_CC" && break
4529 done
4530
4531 fi;
4532         echo "$as_me:4532: checking for native build C compiler" >&5
4533 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4534         echo "$as_me:4534: result: $BUILD_CC" >&5
4535 echo "${ECHO_T}$BUILD_CC" >&6
4536
4537         echo "$as_me:4537: checking for native build C preprocessor" >&5
4538 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4539
4540 # Check whether --with-build-cpp or --without-build-cpp was given.
4541 if test "${with_build_cpp+set}" = set; then
4542   withval="$with_build_cpp"
4543   BUILD_CPP="$withval"
4544 else
4545   BUILD_CPP='${BUILD_CC} -E'
4546 fi;
4547         echo "$as_me:4547: result: $BUILD_CPP" >&5
4548 echo "${ECHO_T}$BUILD_CPP" >&6
4549
4550         echo "$as_me:4550: checking for native build C flags" >&5
4551 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4552
4553 # Check whether --with-build-cflags or --without-build-cflags was given.
4554 if test "${with_build_cflags+set}" = set; then
4555   withval="$with_build_cflags"
4556   BUILD_CFLAGS="$withval"
4557 fi;
4558         echo "$as_me:4558: result: $BUILD_CFLAGS" >&5
4559 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4560
4561         echo "$as_me:4561: checking for native build C preprocessor-flags" >&5
4562 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4563
4564 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4565 if test "${with_build_cppflags+set}" = set; then
4566   withval="$with_build_cppflags"
4567   BUILD_CPPFLAGS="$withval"
4568 fi;
4569         echo "$as_me:4569: result: $BUILD_CPPFLAGS" >&5
4570 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4571
4572         echo "$as_me:4572: checking for native build linker-flags" >&5
4573 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4574
4575 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4576 if test "${with_build_ldflags+set}" = set; then
4577   withval="$with_build_ldflags"
4578   BUILD_LDFLAGS="$withval"
4579 fi;
4580         echo "$as_me:4580: result: $BUILD_LDFLAGS" >&5
4581 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4582
4583         echo "$as_me:4583: checking for native build linker-libraries" >&5
4584 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4585
4586 # Check whether --with-build-libs or --without-build-libs was given.
4587 if test "${with_build_libs+set}" = set; then
4588   withval="$with_build_libs"
4589   BUILD_LIBS="$withval"
4590 fi;
4591         echo "$as_me:4591: result: $BUILD_LIBS" >&5
4592 echo "${ECHO_T}$BUILD_LIBS" >&6
4593
4594         # this assumes we're on Unix.
4595         BUILD_EXEEXT=
4596         BUILD_OBJEXT=o
4597
4598         : ${BUILD_CC:='${CC}'}
4599
4600         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4601                 { { echo "$as_me:4601: error: Cross-build requires two compilers.
4602 Use --with-build-cc to specify the native compiler." >&5
4603 echo "$as_me: error: Cross-build requires two compilers.
4604 Use --with-build-cc to specify the native compiler." >&2;}
4605    { (exit 1); exit 1; }; }
4606         fi
4607
4608 else
4609         : ${BUILD_CC:='${CC}'}
4610         : ${BUILD_CPP:='${CPP}'}
4611         : ${BUILD_CFLAGS:='${CFLAGS}'}
4612         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4613         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4614         : ${BUILD_LIBS:='${LIBS}'}
4615         : ${BUILD_EXEEXT:='$x'}
4616         : ${BUILD_OBJEXT:='o'}
4617 fi
4618
4619 ###############################################################################
4620
4621 ### Options to allow the user to specify the set of libraries which are used.
4622 ### Use "--without-normal --with-shared" to allow the default model to be
4623 ### shared, for example.
4624 cf_list_models=""
4625
4626 echo "$as_me:4626: checking if libtool -version-number should be used" >&5
4627 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4628
4629 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4630 if test "${enable_libtool_version+set}" = set; then
4631   enableval="$enable_libtool_version"
4632   test "$enableval" != no && enableval=yes
4633         if test "$enableval" != "yes" ; then
4634     cf_libtool_version=no
4635         else
4636                 cf_libtool_version=yes
4637         fi
4638 else
4639   enableval=yes
4640         cf_libtool_version=yes
4641
4642 fi;
4643 echo "$as_me:4643: result: $cf_libtool_version" >&5
4644 echo "${ECHO_T}$cf_libtool_version" >&6
4645
4646 if test "$cf_libtool_version" = yes ; then
4647         LIBTOOL_VERSION="-version-number"
4648 else
4649         LIBTOOL_VERSION="-version-info"
4650         case "x$VERSION" in
4651         (x)
4652                 { echo "$as_me:4652: WARNING: VERSION was not set" >&5
4653 echo "$as_me: WARNING: VERSION was not set" >&2;}
4654                 ;;
4655         (x*.*.*)
4656                 ABI_VERSION="$VERSION"
4657                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4658
4659 echo "${as_me:-configure}:4659: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4660
4661                 ;;
4662         (x*:*:*)
4663                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4664                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4665
4666 echo "${as_me:-configure}:4666: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4667
4668                 ;;
4669         (*)
4670                 { echo "$as_me:4670: WARNING: unexpected VERSION value: $VERSION" >&5
4671 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4672                 ;;
4673         esac
4674 fi
4675
4676 LIBTOOL=
4677
4678 # common library maintenance symbols that are convenient for libtool scripts:
4679 LIB_CREATE='${AR} -cr'
4680 LIB_OBJECT='${OBJECTS}'
4681 LIB_SUFFIX=.a
4682 LIB_PREP="$RANLIB"
4683
4684 # symbols used to prop libtool up to enable it to determine what it should be
4685 # doing:
4686 LIB_CLEAN=
4687 LIB_COMPILE=
4688 LIB_LINK='${CC}'
4689 LIB_INSTALL=
4690 LIB_UNINSTALL=
4691
4692 echo "$as_me:4692: checking if you want to build libraries with libtool" >&5
4693 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4694
4695 # Check whether --with-libtool or --without-libtool was given.
4696 if test "${with_libtool+set}" = set; then
4697   withval="$with_libtool"
4698   with_libtool=$withval
4699 else
4700   with_libtool=no
4701 fi;
4702 echo "$as_me:4702: result: $with_libtool" >&5
4703 echo "${ECHO_T}$with_libtool" >&6
4704 if test "$with_libtool" != "no"; then
4705
4706         if test "$with_libtool" != "yes" ; then
4707
4708 if test "x$prefix" != xNONE; then
4709         cf_path_syntax="$prefix"
4710 else
4711         cf_path_syntax="$ac_default_prefix"
4712 fi
4713
4714 case ".$with_libtool" in
4715 (.\$\(*\)*|.\'*\'*)
4716         ;;
4717 (..|./*|.\\*)
4718         ;;
4719 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4720         ;;
4721 (.\${*prefix}*|.\${*dir}*)
4722         eval with_libtool="$with_libtool"
4723         case ".$with_libtool" in
4724         (.NONE/*)
4725                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4726                 ;;
4727         esac
4728         ;;
4729 (.no|.NONE/*)
4730         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4731         ;;
4732 (*)
4733         { { echo "$as_me:4733: error: expected a pathname, not \"$with_libtool\"" >&5
4734 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4735    { (exit 1); exit 1; }; }
4736         ;;
4737 esac
4738
4739                 LIBTOOL=$with_libtool
4740         else
4741                 if test -n "$ac_tool_prefix"; then
4742   for ac_prog in libtool glibtool
4743   do
4744     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4745 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4746 echo "$as_me:4746: checking for $ac_word" >&5
4747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4748 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4749   echo $ECHO_N "(cached) $ECHO_C" >&6
4750 else
4751   if test -n "$LIBTOOL"; then
4752   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4753 else
4754   ac_save_IFS=$IFS; IFS=$ac_path_separator
4755 ac_dummy="$PATH"
4756 for ac_dir in $ac_dummy; do
4757   IFS=$ac_save_IFS
4758   test -z "$ac_dir" && ac_dir=.
4759   $as_executable_p "$ac_dir/$ac_word" || continue
4760 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4761 echo "$as_me:4761: found $ac_dir/$ac_word" >&5
4762 break
4763 done
4764
4765 fi
4766 fi
4767 LIBTOOL=$ac_cv_prog_LIBTOOL
4768 if test -n "$LIBTOOL"; then
4769   echo "$as_me:4769: result: $LIBTOOL" >&5
4770 echo "${ECHO_T}$LIBTOOL" >&6
4771 else
4772   echo "$as_me:4772: result: no" >&5
4773 echo "${ECHO_T}no" >&6
4774 fi
4775
4776     test -n "$LIBTOOL" && break
4777   done
4778 fi
4779 if test -z "$LIBTOOL"; then
4780   ac_ct_LIBTOOL=$LIBTOOL
4781   for ac_prog in libtool glibtool
4782 do
4783   # Extract the first word of "$ac_prog", so it can be a program name with args.
4784 set dummy $ac_prog; ac_word=$2
4785 echo "$as_me:4785: checking for $ac_word" >&5
4786 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4787 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4788   echo $ECHO_N "(cached) $ECHO_C" >&6
4789 else
4790   if test -n "$ac_ct_LIBTOOL"; then
4791   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4792 else
4793   ac_save_IFS=$IFS; IFS=$ac_path_separator
4794 ac_dummy="$PATH"
4795 for ac_dir in $ac_dummy; do
4796   IFS=$ac_save_IFS
4797   test -z "$ac_dir" && ac_dir=.
4798   $as_executable_p "$ac_dir/$ac_word" || continue
4799 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4800 echo "$as_me:4800: found $ac_dir/$ac_word" >&5
4801 break
4802 done
4803
4804 fi
4805 fi
4806 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4807 if test -n "$ac_ct_LIBTOOL"; then
4808   echo "$as_me:4808: result: $ac_ct_LIBTOOL" >&5
4809 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4810 else
4811   echo "$as_me:4811: result: no" >&5
4812 echo "${ECHO_T}no" >&6
4813 fi
4814
4815   test -n "$ac_ct_LIBTOOL" && break
4816 done
4817 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4818
4819   LIBTOOL=$ac_ct_LIBTOOL
4820 fi
4821
4822 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4823 then
4824         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.].*//'`
4825 else
4826         cf_cv_libtool_version=
4827 fi
4828 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4829
4830                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4831                 then
4832
4833 unset ac_cv_prog_ac_ct_LIBTOOL
4834 unset ac_ct_LIBTOOL
4835 unset LIBTOOL
4836
4837                         if test -n "$ac_tool_prefix"; then
4838   for ac_prog in glibtool
4839   do
4840     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4841 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4842 echo "$as_me:4842: checking for $ac_word" >&5
4843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4844 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4845   echo $ECHO_N "(cached) $ECHO_C" >&6
4846 else
4847   if test -n "$LIBTOOL"; then
4848   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4849 else
4850   ac_save_IFS=$IFS; IFS=$ac_path_separator
4851 ac_dummy="$PATH"
4852 for ac_dir in $ac_dummy; do
4853   IFS=$ac_save_IFS
4854   test -z "$ac_dir" && ac_dir=.
4855   $as_executable_p "$ac_dir/$ac_word" || continue
4856 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4857 echo "$as_me:4857: found $ac_dir/$ac_word" >&5
4858 break
4859 done
4860
4861 fi
4862 fi
4863 LIBTOOL=$ac_cv_prog_LIBTOOL
4864 if test -n "$LIBTOOL"; then
4865   echo "$as_me:4865: result: $LIBTOOL" >&5
4866 echo "${ECHO_T}$LIBTOOL" >&6
4867 else
4868   echo "$as_me:4868: result: no" >&5
4869 echo "${ECHO_T}no" >&6
4870 fi
4871
4872     test -n "$LIBTOOL" && break
4873   done
4874 fi
4875 if test -z "$LIBTOOL"; then
4876   ac_ct_LIBTOOL=$LIBTOOL
4877   for ac_prog in glibtool
4878 do
4879   # Extract the first word of "$ac_prog", so it can be a program name with args.
4880 set dummy $ac_prog; ac_word=$2
4881 echo "$as_me:4881: checking for $ac_word" >&5
4882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4883 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4884   echo $ECHO_N "(cached) $ECHO_C" >&6
4885 else
4886   if test -n "$ac_ct_LIBTOOL"; then
4887   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4888 else
4889   ac_save_IFS=$IFS; IFS=$ac_path_separator
4890 ac_dummy="$PATH"
4891 for ac_dir in $ac_dummy; do
4892   IFS=$ac_save_IFS
4893   test -z "$ac_dir" && ac_dir=.
4894   $as_executable_p "$ac_dir/$ac_word" || continue
4895 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4896 echo "$as_me:4896: found $ac_dir/$ac_word" >&5
4897 break
4898 done
4899
4900 fi
4901 fi
4902 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4903 if test -n "$ac_ct_LIBTOOL"; then
4904   echo "$as_me:4904: result: $ac_ct_LIBTOOL" >&5
4905 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4906 else
4907   echo "$as_me:4907: result: no" >&5
4908 echo "${ECHO_T}no" >&6
4909 fi
4910
4911   test -n "$ac_ct_LIBTOOL" && break
4912 done
4913 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4914
4915   LIBTOOL=$ac_ct_LIBTOOL
4916 fi
4917
4918 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4919 then
4920         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.].*//'`
4921 else
4922         cf_cv_libtool_version=
4923 fi
4924 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4925
4926                 fi
4927         fi
4928         if test -z "$LIBTOOL" ; then
4929                 { { echo "$as_me:4929: error: Cannot find libtool" >&5
4930 echo "$as_me: error: Cannot find libtool" >&2;}
4931    { (exit 1); exit 1; }; }
4932         fi
4933         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4934         LIB_OBJECT='${OBJECTS:.o=.lo}'
4935         LIB_SUFFIX=.la
4936         LIB_CLEAN='${LIBTOOL} --mode=clean'
4937         LIB_COMPILE='${LIBTOOL} --mode=compile'
4938         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4939         LIB_INSTALL='${LIBTOOL} --mode=install'
4940         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4941         LIB_PREP=:
4942
4943 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4944 then
4945         echo "$as_me:4945: checking version of $LIBTOOL" >&5
4946 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4947
4948 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4949 then
4950         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.].*//'`
4951 else
4952         cf_cv_libtool_version=
4953 fi
4954 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4955
4956         echo "$as_me:4956: result: $cf_cv_libtool_version" >&5
4957 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4958         if test -z "$cf_cv_libtool_version" ; then
4959                 { { echo "$as_me:4959: error: This is not GNU libtool" >&5
4960 echo "$as_me: error: This is not GNU libtool" >&2;}
4961    { (exit 1); exit 1; }; }
4962         fi
4963 else
4964         { { echo "$as_me:4964: error: GNU libtool has not been found" >&5
4965 echo "$as_me: error: GNU libtool has not been found" >&2;}
4966    { (exit 1); exit 1; }; }
4967 fi
4968
4969         # special hack to add -no-undefined (which libtool should do for itself)
4970         LT_UNDEF=
4971         case "$cf_cv_system_name" in
4972         (cygwin*|msys*|mingw32*|uwin*|aix[4-7])
4973                 LT_UNDEF=-no-undefined
4974                 ;;
4975         esac
4976
4977         # special hack to add --tag option for C++ compiler
4978         case $cf_cv_libtool_version in
4979         (1.[5-9]*|[2-9].[0-9.a-z]*)
4980                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4981                 LIBTOOL="$LIBTOOL --tag=CC"
4982                 ;;
4983         (*)
4984                 LIBTOOL_CXX="$LIBTOOL"
4985                 ;;
4986         esac
4987 else
4988         LIBTOOL=""
4989         LIBTOOL_CXX=""
4990 fi
4991
4992 test -z "$LIBTOOL" && ECHO_LT=
4993
4994 if test "$with_libtool" != "no" ; then
4995
4996 cf_list_models="$cf_list_models libtool"
4997
4998 else
4999
5000 echo "$as_me:5000: checking if you want to build shared libraries" >&5
5001 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5002
5003 # Check whether --with-shared or --without-shared was given.
5004 if test "${with_shared+set}" = set; then
5005   withval="$with_shared"
5006   with_shared=$withval
5007 else
5008   with_shared=no
5009 fi;
5010 echo "$as_me:5010: result: $with_shared" >&5
5011 echo "${ECHO_T}$with_shared" >&6
5012 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5013
5014 echo "$as_me:5014: checking if you want to build static libraries" >&5
5015 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5016
5017 # Check whether --with-normal or --without-normal was given.
5018 if test "${with_normal+set}" = set; then
5019   withval="$with_normal"
5020   with_normal=$withval
5021 else
5022   with_normal=yes
5023 fi;
5024 echo "$as_me:5024: result: $with_normal" >&5
5025 echo "${ECHO_T}$with_normal" >&6
5026 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5027
5028 echo "$as_me:5028: checking if you want to build debug libraries" >&5
5029 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5030
5031 # Check whether --with-debug or --without-debug was given.
5032 if test "${with_debug+set}" = set; then
5033   withval="$with_debug"
5034   with_debug=$withval
5035 else
5036   with_debug=yes
5037 fi;
5038 echo "$as_me:5038: result: $with_debug" >&5
5039 echo "${ECHO_T}$with_debug" >&6
5040 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5041
5042 echo "$as_me:5042: checking if you want to build profiling libraries" >&5
5043 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5044
5045 # Check whether --with-profile or --without-profile was given.
5046 if test "${with_profile+set}" = set; then
5047   withval="$with_profile"
5048   with_profile=$withval
5049 else
5050   with_profile=no
5051 fi;
5052 echo "$as_me:5052: result: $with_profile" >&5
5053 echo "${ECHO_T}$with_profile" >&6
5054 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5055
5056 fi
5057
5058 if test "X$cf_with_cxx_binding" != Xno; then
5059 if test "x$with_shared" = "xyes"; then
5060 echo "$as_me:5060: checking if you want to build C++ shared libraries" >&5
5061 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5062
5063 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5064 if test "${with_cxx_shared+set}" = set; then
5065   withval="$with_cxx_shared"
5066   with_shared_cxx=$withval
5067 else
5068   with_shared_cxx=no
5069 fi;
5070 echo "$as_me:5070: result: $with_shared_cxx" >&5
5071 echo "${ECHO_T}$with_shared_cxx" >&6
5072 fi
5073 fi
5074
5075 ###############################################################################
5076
5077 echo "$as_me:5077: checking for specified models" >&5
5078 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5079 test -z "$cf_list_models" && cf_list_models=normal
5080 test "$with_libtool" != "no" && cf_list_models=libtool
5081 echo "$as_me:5081: result: $cf_list_models" >&5
5082 echo "${ECHO_T}$cf_list_models" >&6
5083
5084 ### Use the first model as the default, and save its suffix for use in building
5085 ### up test-applications.
5086 echo "$as_me:5086: checking for default model" >&5
5087 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5088 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5089 echo "$as_me:5089: result: $DFT_LWR_MODEL" >&5
5090 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5091
5092 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5093
5094 TICS_NAME=tic
5095
5096 TINFO_NAME=tinfo
5097
5098 LIB_NAME=ncurses
5099
5100 LIB_DIR=../lib
5101 LIB_2ND=../../lib
5102
5103 echo "$as_me:5103: checking if you want to have a library-prefix" >&5
5104 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5105
5106 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5107 if test "${with_lib_prefix+set}" = set; then
5108   withval="$with_lib_prefix"
5109   with_lib_prefix=$withval
5110 else
5111   with_lib_prefix=auto
5112 fi;
5113 echo "$as_me:5113: result: $with_lib_prefix" >&5
5114 echo "${ECHO_T}$with_lib_prefix" >&6
5115
5116 if test $with_lib_prefix = auto
5117 then
5118
5119         case $cf_cv_system_name in
5120         (OS/2*|os2*)
5121                 LIB_PREFIX=''
5122                 ;;
5123         (*)     LIB_PREFIX='lib'
5124                 ;;
5125         esac
5126 cf_prefix=$LIB_PREFIX
5127
5128 elif test $with_lib_prefix = no
5129 then
5130         LIB_PREFIX=
5131 else
5132         LIB_PREFIX=$with_lib_prefix
5133 fi
5134
5135 LIB_SUFFIX=
5136
5137         echo "$as_me:5137: checking for PATH separator" >&5
5138 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5139         case $cf_cv_system_name in
5140         (os2*)  PATH_SEPARATOR=';'  ;;
5141         (*)     ${PATH_SEPARATOR:=':'}  ;;
5142         esac
5143
5144         echo "$as_me:5144: result: $PATH_SEPARATOR" >&5
5145 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5146
5147 ###############################################################################
5148
5149 echo "$as_me:5149: checking if you want to build a separate terminfo library" >&5
5150 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5151
5152 # Check whether --with-termlib or --without-termlib was given.
5153 if test "${with_termlib+set}" = set; then
5154   withval="$with_termlib"
5155   with_termlib=$withval
5156 else
5157   with_termlib=no
5158 fi;
5159 echo "$as_me:5159: result: $with_termlib" >&5
5160 echo "${ECHO_T}$with_termlib" >&6
5161
5162 echo "$as_me:5162: checking if you want to build a separate tic library" >&5
5163 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5164
5165 # Check whether --with-ticlib or --without-ticlib was given.
5166 if test "${with_ticlib+set}" = set; then
5167   withval="$with_ticlib"
5168   with_ticlib=$withval
5169 else
5170   with_ticlib=no
5171 fi;
5172 echo "$as_me:5172: result: $with_ticlib" >&5
5173 echo "${ECHO_T}$with_ticlib" >&6
5174
5175 ### Checks for special libraries, must be done up-front.
5176 SHLIB_LIST=""
5177
5178 echo "$as_me:5178: checking if you want to link with the GPM mouse library" >&5
5179 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5180
5181 # Check whether --with-gpm or --without-gpm was given.
5182 if test "${with_gpm+set}" = set; then
5183   withval="$with_gpm"
5184   with_gpm=$withval
5185 else
5186   with_gpm=maybe
5187 fi;
5188 echo "$as_me:5188: result: $with_gpm" >&5
5189 echo "${ECHO_T}$with_gpm" >&6
5190
5191 if test "$with_gpm" != no ; then
5192         echo "$as_me:5192: checking for gpm.h" >&5
5193 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5194 if test "${ac_cv_header_gpm_h+set}" = set; then
5195   echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197   cat >conftest.$ac_ext <<_ACEOF
5198 #line 5198 "configure"
5199 #include "confdefs.h"
5200 #include <gpm.h>
5201 _ACEOF
5202 if { (eval echo "$as_me:5202: \"$ac_cpp conftest.$ac_ext\"") >&5
5203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5204   ac_status=$?
5205   egrep -v '^ *\+' conftest.er1 >conftest.err
5206   rm -f conftest.er1
5207   cat conftest.err >&5
5208   echo "$as_me:5208: \$? = $ac_status" >&5
5209   (exit $ac_status); } >/dev/null; then
5210   if test -s conftest.err; then
5211     ac_cpp_err=$ac_c_preproc_warn_flag
5212   else
5213     ac_cpp_err=
5214   fi
5215 else
5216   ac_cpp_err=yes
5217 fi
5218 if test -z "$ac_cpp_err"; then
5219   ac_cv_header_gpm_h=yes
5220 else
5221   echo "$as_me: failed program was:" >&5
5222   cat conftest.$ac_ext >&5
5223   ac_cv_header_gpm_h=no
5224 fi
5225 rm -f conftest.err conftest.$ac_ext
5226 fi
5227 echo "$as_me:5227: result: $ac_cv_header_gpm_h" >&5
5228 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5229 if test $ac_cv_header_gpm_h = yes; then
5230
5231 cat >>confdefs.h <<\EOF
5232 #define HAVE_GPM_H 1
5233 EOF
5234
5235                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5236                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5237
5238 echo "${as_me:-configure}:5238: testing assuming we really have GPM library ..." 1>&5
5239
5240 cat >>confdefs.h <<\EOF
5241 #define HAVE_LIBGPM 1
5242 EOF
5243
5244                 else
5245                         echo "$as_me:5245: checking for Gpm_Open in -lgpm" >&5
5246 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5247 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5248   echo $ECHO_N "(cached) $ECHO_C" >&6
5249 else
5250   ac_check_lib_save_LIBS=$LIBS
5251 LIBS="-lgpm  $LIBS"
5252 cat >conftest.$ac_ext <<_ACEOF
5253 #line 5253 "configure"
5254 #include "confdefs.h"
5255
5256 /* Override any gcc2 internal prototype to avoid an error.  */
5257 #ifdef __cplusplus
5258 extern "C"
5259 #endif
5260 /* We use char because int might match the return type of a gcc2
5261    builtin and then its argument prototype would still apply.  */
5262 char Gpm_Open ();
5263 int
5264 main ()
5265 {
5266 Gpm_Open ();
5267   ;
5268   return 0;
5269 }
5270 _ACEOF
5271 rm -f conftest.$ac_objext conftest$ac_exeext
5272 if { (eval echo "$as_me:5272: \"$ac_link\"") >&5
5273   (eval $ac_link) 2>&5
5274   ac_status=$?
5275   echo "$as_me:5275: \$? = $ac_status" >&5
5276   (exit $ac_status); } &&
5277          { ac_try='test -s conftest$ac_exeext'
5278   { (eval echo "$as_me:5278: \"$ac_try\"") >&5
5279   (eval $ac_try) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); }; }; then
5283   ac_cv_lib_gpm_Gpm_Open=yes
5284 else
5285   echo "$as_me: failed program was:" >&5
5286 cat conftest.$ac_ext >&5
5287 ac_cv_lib_gpm_Gpm_Open=no
5288 fi
5289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5290 LIBS=$ac_check_lib_save_LIBS
5291 fi
5292 echo "$as_me:5292: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5293 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5294 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5295   :
5296 else
5297
5298                                 { { echo "$as_me:5298: error: Cannot link with GPM library" >&5
5299 echo "$as_me: error: Cannot link with GPM library" >&2;}
5300    { (exit 1); exit 1; }; }
5301                 fi
5302                 with_gpm=yes
5303
5304 fi
5305
5306 else
5307
5308                 test "$with_gpm" != maybe && { echo "$as_me:5308: WARNING: Cannot find GPM header" >&5
5309 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5310                 with_gpm=no
5311
5312 fi
5313
5314 fi
5315
5316 if test "$with_gpm" != no ; then
5317         echo "$as_me:5317: checking if you want to load GPM dynamically" >&5
5318 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5319
5320 # Check whether --with-dlsym or --without-dlsym was given.
5321 if test "${with_dlsym+set}" = set; then
5322   withval="$with_dlsym"
5323   with_dlsym=$withval
5324 else
5325   with_dlsym=yes
5326 fi;
5327         echo "$as_me:5327: result: $with_dlsym" >&5
5328 echo "${ECHO_T}$with_dlsym" >&6
5329         if test "x$with_dlsym" = xyes ; then
5330
5331 cf_have_dlsym=no
5332 echo "$as_me:5332: checking for dlsym" >&5
5333 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5334 if test "${ac_cv_func_dlsym+set}" = set; then
5335   echo $ECHO_N "(cached) $ECHO_C" >&6
5336 else
5337   cat >conftest.$ac_ext <<_ACEOF
5338 #line 5338 "configure"
5339 #include "confdefs.h"
5340 /* System header to define __stub macros and hopefully few prototypes,
5341     which can conflict with char dlsym (); below.  */
5342 #include <assert.h>
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 #ifdef __cplusplus
5345 extern "C"
5346 #endif
5347 /* We use char because int might match the return type of a gcc2
5348    builtin and then its argument prototype would still apply.  */
5349 char dlsym ();
5350 char (*f) ();
5351
5352 int
5353 main ()
5354 {
5355 /* The GNU C library defines this for functions which it implements
5356     to always fail with ENOSYS.  Some functions are actually named
5357     something starting with __ and the normal name is an alias.  */
5358 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5359 choke me
5360 #else
5361 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5362 #endif
5363
5364   ;
5365   return 0;
5366 }
5367 _ACEOF
5368 rm -f conftest.$ac_objext conftest$ac_exeext
5369 if { (eval echo "$as_me:5369: \"$ac_link\"") >&5
5370   (eval $ac_link) 2>&5
5371   ac_status=$?
5372   echo "$as_me:5372: \$? = $ac_status" >&5
5373   (exit $ac_status); } &&
5374          { ac_try='test -s conftest$ac_exeext'
5375   { (eval echo "$as_me:5375: \"$ac_try\"") >&5
5376   (eval $ac_try) 2>&5
5377   ac_status=$?
5378   echo "$as_me:5378: \$? = $ac_status" >&5
5379   (exit $ac_status); }; }; then
5380   ac_cv_func_dlsym=yes
5381 else
5382   echo "$as_me: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
5384 ac_cv_func_dlsym=no
5385 fi
5386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5387 fi
5388 echo "$as_me:5388: result: $ac_cv_func_dlsym" >&5
5389 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5390 if test $ac_cv_func_dlsym = yes; then
5391   cf_have_dlsym=yes
5392 else
5393
5394 cf_have_libdl=no
5395 echo "$as_me:5395: checking for dlsym in -ldl" >&5
5396 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5397 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5398   echo $ECHO_N "(cached) $ECHO_C" >&6
5399 else
5400   ac_check_lib_save_LIBS=$LIBS
5401 LIBS="-ldl  $LIBS"
5402 cat >conftest.$ac_ext <<_ACEOF
5403 #line 5403 "configure"
5404 #include "confdefs.h"
5405
5406 /* Override any gcc2 internal prototype to avoid an error.  */
5407 #ifdef __cplusplus
5408 extern "C"
5409 #endif
5410 /* We use char because int might match the return type of a gcc2
5411    builtin and then its argument prototype would still apply.  */
5412 char dlsym ();
5413 int
5414 main ()
5415 {
5416 dlsym ();
5417   ;
5418   return 0;
5419 }
5420 _ACEOF
5421 rm -f conftest.$ac_objext conftest$ac_exeext
5422 if { (eval echo "$as_me:5422: \"$ac_link\"") >&5
5423   (eval $ac_link) 2>&5
5424   ac_status=$?
5425   echo "$as_me:5425: \$? = $ac_status" >&5
5426   (exit $ac_status); } &&
5427          { ac_try='test -s conftest$ac_exeext'
5428   { (eval echo "$as_me:5428: \"$ac_try\"") >&5
5429   (eval $ac_try) 2>&5
5430   ac_status=$?
5431   echo "$as_me:5431: \$? = $ac_status" >&5
5432   (exit $ac_status); }; }; then
5433   ac_cv_lib_dl_dlsym=yes
5434 else
5435   echo "$as_me: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5437 ac_cv_lib_dl_dlsym=no
5438 fi
5439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5440 LIBS=$ac_check_lib_save_LIBS
5441 fi
5442 echo "$as_me:5442: result: $ac_cv_lib_dl_dlsym" >&5
5443 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5444 if test $ac_cv_lib_dl_dlsym = yes; then
5445
5446         cf_have_dlsym=yes
5447         cf_have_libdl=yes
5448 fi
5449
5450 fi
5451
5452 if test "$cf_have_dlsym" = yes ; then
5453         test "$cf_have_libdl" = yes &&
5454 cf_add_libs="-ldl"
5455 # Filter out duplicates - this happens with badly-designed ".pc" files...
5456 for cf_add_1lib in $LIBS
5457 do
5458         for cf_add_2lib in $cf_add_libs
5459         do
5460                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5461                 then
5462                         cf_add_1lib=
5463                         break
5464                 fi
5465         done
5466         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5467 done
5468 LIBS="$cf_add_libs"
5469
5470         echo "$as_me:5470: checking whether able to link to dl*() functions" >&5
5471 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5472         cat >conftest.$ac_ext <<_ACEOF
5473 #line 5473 "configure"
5474 #include "confdefs.h"
5475 #include <dlfcn.h>
5476 int
5477 main ()
5478 {
5479
5480                 void *obj;
5481                 if ((obj = dlopen("filename", 0)) != 0) {
5482                         if (dlsym(obj, "symbolname") == 0) {
5483                         dlclose(obj);
5484                         }
5485                 }
5486   ;
5487   return 0;
5488 }
5489 _ACEOF
5490 rm -f conftest.$ac_objext conftest$ac_exeext
5491 if { (eval echo "$as_me:5491: \"$ac_link\"") >&5
5492   (eval $ac_link) 2>&5
5493   ac_status=$?
5494   echo "$as_me:5494: \$? = $ac_status" >&5
5495   (exit $ac_status); } &&
5496          { ac_try='test -s conftest$ac_exeext'
5497   { (eval echo "$as_me:5497: \"$ac_try\"") >&5
5498   (eval $ac_try) 2>&5
5499   ac_status=$?
5500   echo "$as_me:5500: \$? = $ac_status" >&5
5501   (exit $ac_status); }; }; then
5502
5503 cat >>confdefs.h <<\EOF
5504 #define HAVE_LIBDL 1
5505 EOF
5506
5507 else
5508   echo "$as_me: failed program was:" >&5
5509 cat conftest.$ac_ext >&5
5510
5511                 { { echo "$as_me:5511: error: Cannot link test program for libdl" >&5
5512 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5513    { (exit 1); exit 1; }; }
5514 fi
5515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5516         echo "$as_me:5516: result: ok" >&5
5517 echo "${ECHO_T}ok" >&6
5518 else
5519         { { echo "$as_me:5519: error: Cannot find dlsym function" >&5
5520 echo "$as_me: error: Cannot find dlsym function" >&2;}
5521    { (exit 1); exit 1; }; }
5522 fi
5523
5524                 if test "x$with_gpm" != xyes ; then
5525                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5526
5527 echo "${as_me:-configure}:5527: testing assuming soname for gpm is $with_gpm ..." 1>&5
5528
5529                         cf_cv_gpm_soname="$with_gpm"
5530                 else
5531
5532 echo "$as_me:5532: checking for soname of gpm library" >&5
5533 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5534 if test "${cf_cv_gpm_soname+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537
5538 cf_cv_gpm_soname=unknown
5539 if test "$cross_compiling" != yes ; then
5540 cat >conftest.$ac_ext <<CF_EOF
5541 #include <gpm.h>
5542 int main()
5543 {
5544 if (Gpm_Open(0,0)) Gpm_Close();
5545         ${cf_cv_main_return:-return}(0);
5546 }
5547 CF_EOF
5548 cf_save_LIBS="$LIBS"
5549
5550 cf_add_libs="-lgpm"
5551 # Filter out duplicates - this happens with badly-designed ".pc" files...
5552 for cf_add_1lib in $LIBS
5553 do
5554         for cf_add_2lib in $cf_add_libs
5555         do
5556                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5557                 then
5558                         cf_add_1lib=
5559                         break
5560                 fi
5561         done
5562         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5563 done
5564 LIBS="$cf_add_libs"
5565
5566         if { (eval echo "$as_me:5566: \"$ac_compile\"") >&5
5567   (eval $ac_compile) 2>&5
5568   ac_status=$?
5569   echo "$as_me:5569: \$? = $ac_status" >&5
5570   (exit $ac_status); } ; then
5571                 if { (eval echo "$as_me:5571: \"$ac_link\"") >&5
5572   (eval $ac_link) 2>&5
5573   ac_status=$?
5574   echo "$as_me:5574: \$? = $ac_status" >&5
5575   (exit $ac_status); } ; then
5576                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5577                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5578                 fi
5579         fi
5580 rm -rf conftest*
5581 LIBS="$cf_save_LIBS"
5582 fi
5583
5584 fi
5585 echo "$as_me:5585: result: $cf_cv_gpm_soname" >&5
5586 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5587
5588                 fi
5589                 test "$cf_cv_gpm_soname" != "unknown" &&
5590 cat >>confdefs.h <<EOF
5591 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5592 EOF
5593
5594                 SHLIB_LIST="-ldl $SHLIB_LIST"
5595         else
5596                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5597
5598 cf_add_libs="-lgpm"
5599 # Filter out duplicates - this happens with badly-designed ".pc" files...
5600 for cf_add_1lib in $TEST_LIBS
5601 do
5602         for cf_add_2lib in $cf_add_libs
5603         do
5604                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5605                 then
5606                         cf_add_1lib=
5607                         break
5608                 fi
5609         done
5610         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5611 done
5612 TEST_LIBS="$cf_add_libs"
5613
5614         fi
5615
5616 cat >>confdefs.h <<\EOF
5617 #define HAVE_LIBGPM 1
5618 EOF
5619
5620 echo "$as_me:5620: checking for Gpm_Wgetch in -lgpm" >&5
5621 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5622 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5623   echo $ECHO_N "(cached) $ECHO_C" >&6
5624 else
5625   ac_check_lib_save_LIBS=$LIBS
5626 LIBS="-lgpm  $LIBS"
5627 cat >conftest.$ac_ext <<_ACEOF
5628 #line 5628 "configure"
5629 #include "confdefs.h"
5630
5631 /* Override any gcc2 internal prototype to avoid an error.  */
5632 #ifdef __cplusplus
5633 extern "C"
5634 #endif
5635 /* We use char because int might match the return type of a gcc2
5636    builtin and then its argument prototype would still apply.  */
5637 char Gpm_Wgetch ();
5638 int
5639 main ()
5640 {
5641 Gpm_Wgetch ();
5642   ;
5643   return 0;
5644 }
5645 _ACEOF
5646 rm -f conftest.$ac_objext conftest$ac_exeext
5647 if { (eval echo "$as_me:5647: \"$ac_link\"") >&5
5648   (eval $ac_link) 2>&5
5649   ac_status=$?
5650   echo "$as_me:5650: \$? = $ac_status" >&5
5651   (exit $ac_status); } &&
5652          { ac_try='test -s conftest$ac_exeext'
5653   { (eval echo "$as_me:5653: \"$ac_try\"") >&5
5654   (eval $ac_try) 2>&5
5655   ac_status=$?
5656   echo "$as_me:5656: \$? = $ac_status" >&5
5657   (exit $ac_status); }; }; then
5658   ac_cv_lib_gpm_Gpm_Wgetch=yes
5659 else
5660   echo "$as_me: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 ac_cv_lib_gpm_Gpm_Wgetch=no
5663 fi
5664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5665 LIBS=$ac_check_lib_save_LIBS
5666 fi
5667 echo "$as_me:5667: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5668 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5669 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5670
5671 echo "$as_me:5671: checking if GPM is weakly bound to curses library" >&5
5672 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5673 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5674   echo $ECHO_N "(cached) $ECHO_C" >&6
5675 else
5676
5677 cf_cv_check_gpm_wgetch=unknown
5678 if test "$cross_compiling" != yes ; then
5679
5680 cat >conftest.$ac_ext <<CF_EOF
5681 #include <gpm.h>
5682 int main()
5683 {
5684         Gpm_Wgetch();
5685         ${cf_cv_main_return:-return}(0);
5686 }
5687 CF_EOF
5688
5689         cf_save_LIBS="$LIBS"
5690         # This only works if we can look at the symbol table.  If a shared
5691         # library is stripped for install, we cannot use that.  So we're forced
5692         # to rely on the static library, noting that some packagers may not
5693         # include it.
5694         LIBS="-static -lgpm -dynamic $LIBS"
5695         if { (eval echo "$as_me:5695: \"$ac_compile\"") >&5
5696   (eval $ac_compile) 2>&5
5697   ac_status=$?
5698   echo "$as_me:5698: \$? = $ac_status" >&5
5699   (exit $ac_status); } ; then
5700                 if { (eval echo "$as_me:5700: \"$ac_link\"") >&5
5701   (eval $ac_link) 2>&5
5702   ac_status=$?
5703   echo "$as_me:5703: \$? = $ac_status" >&5
5704   (exit $ac_status); } ; then
5705                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5706                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5707                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5708                 fi
5709         fi
5710         rm -rf conftest*
5711         LIBS="$cf_save_LIBS"
5712 fi
5713
5714 fi
5715 echo "$as_me:5715: result: $cf_cv_check_gpm_wgetch" >&5
5716 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5717
5718 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5719         { echo "$as_me:5719: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5720 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5721 fi
5722
5723 fi
5724
5725 fi
5726
5727 # not everyone has "test -c"
5728 if test -c /dev/sysmouse 2>/dev/null ; then
5729 echo "$as_me:5729: checking if you want to use sysmouse" >&5
5730 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5731
5732 # Check whether --with-sysmouse or --without-sysmouse was given.
5733 if test "${with_sysmouse+set}" = set; then
5734   withval="$with_sysmouse"
5735   cf_with_sysmouse=$withval
5736 else
5737   cf_with_sysmouse=maybe
5738 fi;
5739         if test "$cf_with_sysmouse" != no ; then
5740         cat >conftest.$ac_ext <<_ACEOF
5741 #line 5741 "configure"
5742 #include "confdefs.h"
5743
5744 #include <osreldate.h>
5745 #if (__FreeBSD_version >= 400017)
5746 #include <sys/consio.h>
5747 #include <sys/fbio.h>
5748 #else
5749 #include <machine/console.h>
5750 #endif
5751
5752 int
5753 main ()
5754 {
5755
5756         struct mouse_info the_mouse;
5757         ioctl(0, CONS_MOUSECTL, &the_mouse);
5758
5759   ;
5760   return 0;
5761 }
5762 _ACEOF
5763 rm -f conftest.$ac_objext
5764 if { (eval echo "$as_me:5764: \"$ac_compile\"") >&5
5765   (eval $ac_compile) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); } &&
5769          { ac_try='test -s conftest.$ac_objext'
5770   { (eval echo "$as_me:5770: \"$ac_try\"") >&5
5771   (eval $ac_try) 2>&5
5772   ac_status=$?
5773   echo "$as_me:5773: \$? = $ac_status" >&5
5774   (exit $ac_status); }; }; then
5775   cf_with_sysmouse=yes
5776 else
5777   echo "$as_me: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
5779 cf_with_sysmouse=no
5780 fi
5781 rm -f conftest.$ac_objext conftest.$ac_ext
5782         fi
5783 echo "$as_me:5783: result: $cf_with_sysmouse" >&5
5784 echo "${ECHO_T}$cf_with_sysmouse" >&6
5785 test "$cf_with_sysmouse" = yes &&
5786 cat >>confdefs.h <<\EOF
5787 #define USE_SYSMOUSE 1
5788 EOF
5789
5790 fi
5791
5792 if test X"$CC_G_OPT" = X"" ; then
5793         CC_G_OPT='-g'
5794         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5795 fi
5796
5797 if test X"$CXX_G_OPT" = X"" ; then
5798         CXX_G_OPT='-g'
5799         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5800 fi
5801
5802 echo "$as_me:5802: checking for default loader flags" >&5
5803 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5804 case $DFT_LWR_MODEL in
5805 (libtool) LD_MODEL=''   ;;
5806 (normal)  LD_MODEL=''   ;;
5807 (debug)   LD_MODEL=$CC_G_OPT ;;
5808 (profile) LD_MODEL='-pg';;
5809 (shared)  LD_MODEL=''   ;;
5810 esac
5811 echo "$as_me:5811: result: $LD_MODEL" >&5
5812 echo "${ECHO_T}$LD_MODEL" >&6
5813
5814 case $DFT_LWR_MODEL in
5815 (shared)
5816
5817 echo "$as_me:5817: checking if rpath option should be used" >&5
5818 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5819
5820 # Check whether --enable-rpath or --disable-rpath was given.
5821 if test "${enable_rpath+set}" = set; then
5822   enableval="$enable_rpath"
5823   cf_cv_enable_rpath=$enableval
5824 else
5825   cf_cv_enable_rpath=no
5826 fi;
5827 echo "$as_me:5827: result: $cf_cv_enable_rpath" >&5
5828 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5829
5830 echo "$as_me:5830: checking if shared libraries should be relinked during install" >&5
5831 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5832
5833 # Check whether --enable-relink or --disable-relink was given.
5834 if test "${enable_relink+set}" = set; then
5835   enableval="$enable_relink"
5836   cf_cv_do_relink=$enableval
5837 else
5838   cf_cv_do_relink=yes
5839 fi;
5840 echo "$as_me:5840: result: $cf_cv_do_relink" >&5
5841 echo "${ECHO_T}$cf_cv_do_relink" >&6
5842         ;;
5843 esac
5844
5845 # we will build libraries one-level down.
5846 rel_builddir=..
5847
5848 LD_RPATH_OPT=
5849 echo "$as_me:5849: checking for an rpath option" >&5
5850 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5851 case $cf_cv_system_name in
5852 (irix*)
5853         if test "$GCC" = yes; then
5854                 LD_RPATH_OPT="-Wl,-rpath,"
5855         else
5856                 LD_RPATH_OPT="-rpath "
5857         fi
5858         ;;
5859 (linux*|gnu*|k*bsd*-gnu)
5860         LD_RPATH_OPT="-Wl,-rpath,"
5861         ;;
5862 (openbsd[2-9].*|mirbsd*)
5863         LD_RPATH_OPT="-Wl,-rpath,"
5864         ;;
5865 (dragonfly*|freebsd*)
5866         LD_RPATH_OPT="-rpath "
5867         ;;
5868 (netbsd*)
5869         LD_RPATH_OPT="-Wl,-rpath,"
5870         ;;
5871 (osf*|mls+*)
5872         LD_RPATH_OPT="-rpath "
5873         ;;
5874 (solaris2*)
5875         LD_RPATH_OPT="-R"
5876         ;;
5877 (*)
5878         ;;
5879 esac
5880 echo "$as_me:5880: result: $LD_RPATH_OPT" >&5
5881 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5882
5883 case "x$LD_RPATH_OPT" in
5884 (x-R*)
5885         echo "$as_me:5885: checking if we need a space after rpath option" >&5
5886 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5887         cf_save_LIBS="$LIBS"
5888
5889 cf_add_libs="${LD_RPATH_OPT}$libdir"
5890 # Filter out duplicates - this happens with badly-designed ".pc" files...
5891 for cf_add_1lib in $LIBS
5892 do
5893         for cf_add_2lib in $cf_add_libs
5894         do
5895                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5896                 then
5897                         cf_add_1lib=
5898                         break
5899                 fi
5900         done
5901         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5902 done
5903 LIBS="$cf_add_libs"
5904
5905         cat >conftest.$ac_ext <<_ACEOF
5906 #line 5906 "configure"
5907 #include "confdefs.h"
5908
5909 int
5910 main ()
5911 {
5912
5913   ;
5914   return 0;
5915 }
5916 _ACEOF
5917 rm -f conftest.$ac_objext conftest$ac_exeext
5918 if { (eval echo "$as_me:5918: \"$ac_link\"") >&5
5919   (eval $ac_link) 2>&5
5920   ac_status=$?
5921   echo "$as_me:5921: \$? = $ac_status" >&5
5922   (exit $ac_status); } &&
5923          { ac_try='test -s conftest$ac_exeext'
5924   { (eval echo "$as_me:5924: \"$ac_try\"") >&5
5925   (eval $ac_try) 2>&5
5926   ac_status=$?
5927   echo "$as_me:5927: \$? = $ac_status" >&5
5928   (exit $ac_status); }; }; then
5929   cf_rpath_space=no
5930 else
5931   echo "$as_me: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5933 cf_rpath_space=yes
5934 fi
5935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5936         LIBS="$cf_save_LIBS"
5937         echo "$as_me:5937: result: $cf_rpath_space" >&5
5938 echo "${ECHO_T}$cf_rpath_space" >&6
5939         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5940         ;;
5941 esac
5942
5943         RM_SHARED_OPTS=
5944         LOCAL_LDFLAGS=
5945         LOCAL_LDFLAGS2=
5946         LD_SHARED_OPTS=
5947         INSTALL_LIB="-m 644"
5948         : ${rel_builddir:=.}
5949
5950         shlibdir=$libdir
5951
5952         MAKE_DLLS="#"
5953
5954         cf_cv_do_symlinks=no
5955         cf_ld_rpath_opt=
5956         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5957
5958         echo "$as_me:5958: checking if release/abi version should be used for shared libs" >&5
5959 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5960
5961 # Check whether --with-shlib-version or --without-shlib-version was given.
5962 if test "${with_shlib_version+set}" = set; then
5963   withval="$with_shlib_version"
5964   test -z "$withval" && withval=auto
5965         case $withval in
5966         (yes)
5967                 cf_cv_shlib_version=auto
5968                 ;;
5969         (rel|abi|auto)
5970                 cf_cv_shlib_version=$withval
5971                 ;;
5972         (*)
5973                 echo "$as_me:5973: result: $withval" >&5
5974 echo "${ECHO_T}$withval" >&6
5975                 { { echo "$as_me:5975: error: option value must be one of: rel, abi, or auto" >&5
5976 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5977    { (exit 1); exit 1; }; }
5978                 ;;
5979         esac
5980
5981 else
5982   cf_cv_shlib_version=auto
5983 fi;
5984         echo "$as_me:5984: result: $cf_cv_shlib_version" >&5
5985 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5986
5987         cf_cv_rm_so_locs=no
5988         cf_try_cflags=
5989
5990         # Some less-capable ports of gcc support only -fpic
5991         CC_SHARED_OPTS=
5992         if test "$GCC" = yes
5993         then
5994                 echo "$as_me:5994: checking which $CC option to use" >&5
5995 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5996                 cf_save_CFLAGS="$CFLAGS"
5997                 for CC_SHARED_OPTS in -fPIC -fpic ''
5998                 do
5999                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6000                         cat >conftest.$ac_ext <<_ACEOF
6001 #line 6001 "configure"
6002 #include "confdefs.h"
6003 #include <stdio.h>
6004 int
6005 main ()
6006 {
6007 int x = 1
6008   ;
6009   return 0;
6010 }
6011 _ACEOF
6012 rm -f conftest.$ac_objext
6013 if { (eval echo "$as_me:6013: \"$ac_compile\"") >&5
6014   (eval $ac_compile) 2>&5
6015   ac_status=$?
6016   echo "$as_me:6016: \$? = $ac_status" >&5
6017   (exit $ac_status); } &&
6018          { ac_try='test -s conftest.$ac_objext'
6019   { (eval echo "$as_me:6019: \"$ac_try\"") >&5
6020   (eval $ac_try) 2>&5
6021   ac_status=$?
6022   echo "$as_me:6022: \$? = $ac_status" >&5
6023   (exit $ac_status); }; }; then
6024   break
6025 else
6026   echo "$as_me: failed program was:" >&5
6027 cat conftest.$ac_ext >&5
6028 fi
6029 rm -f conftest.$ac_objext conftest.$ac_ext
6030                 done
6031                 echo "$as_me:6031: result: $CC_SHARED_OPTS" >&5
6032 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6033                 CFLAGS="$cf_save_CFLAGS"
6034         fi
6035
6036         cf_cv_shlib_version_infix=no
6037
6038         case $cf_cv_system_name in
6039         (aix4.3-9*|aix[5-7]*)
6040                 if test "$GCC" = yes; then
6041                         CC_SHARED_OPTS='-Wl,-brtl'
6042                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6043                 else
6044                         CC_SHARED_OPTS='-brtl'
6045                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6046                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6047                 fi
6048                 ;;
6049         (beos*)
6050                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6051                 ;;
6052         (cygwin*)
6053                 CC_SHARED_OPTS=
6054                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6055                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6056                 cf_cv_shlib_version=cygdll
6057                 cf_cv_shlib_version_infix=cygdll
6058                 shlibdir=$bindir
6059                 MAKE_DLLS=
6060                 cat >mk_shared_lib.sh <<-CF_EOF
6061                 #!$SHELL
6062                 SHARED_LIB=\$1
6063                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6064                 shift
6065                 cat <<-EOF
6066                 Linking shared library
6067                 ** SHARED_LIB \$SHARED_LIB
6068                 ** IMPORT_LIB \$IMPORT_LIB
6069 EOF
6070                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6071 CF_EOF
6072                 chmod +x mk_shared_lib.sh
6073                 ;;
6074         (msys*)
6075                 CC_SHARED_OPTS=
6076                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6077                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6078                 cf_cv_shlib_version=msysdll
6079                 cf_cv_shlib_version_infix=msysdll
6080                 shlibdir=$bindir
6081                 MAKE_DLLS=
6082                 cat >mk_shared_lib.sh <<-CF_EOF
6083                 #!$SHELL
6084                 SHARED_LIB=\$1
6085                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6086                 shift
6087                 cat <<-EOF
6088                 Linking shared library
6089                 ** SHARED_LIB \$SHARED_LIB
6090                 ** IMPORT_LIB \$IMPORT_LIB
6091 EOF
6092                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6093 CF_EOF
6094                 chmod +x mk_shared_lib.sh
6095                 ;;
6096         (darwin*)
6097                 cf_try_cflags="no-cpp-precomp"
6098                 CC_SHARED_OPTS="-dynamic"
6099                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6100                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6101                 cf_cv_shlib_version_infix=yes
6102                 echo "$as_me:6102: checking if ld -search_paths_first works" >&5
6103 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6104 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6105   echo $ECHO_N "(cached) $ECHO_C" >&6
6106 else
6107
6108                         cf_save_LDFLAGS=$LDFLAGS
6109                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6110                         cat >conftest.$ac_ext <<_ACEOF
6111 #line 6111 "configure"
6112 #include "confdefs.h"
6113
6114 int
6115 main ()
6116 {
6117 int i;
6118   ;
6119   return 0;
6120 }
6121 _ACEOF
6122 rm -f conftest.$ac_objext conftest$ac_exeext
6123 if { (eval echo "$as_me:6123: \"$ac_link\"") >&5
6124   (eval $ac_link) 2>&5
6125   ac_status=$?
6126   echo "$as_me:6126: \$? = $ac_status" >&5
6127   (exit $ac_status); } &&
6128          { ac_try='test -s conftest$ac_exeext'
6129   { (eval echo "$as_me:6129: \"$ac_try\"") >&5
6130   (eval $ac_try) 2>&5
6131   ac_status=$?
6132   echo "$as_me:6132: \$? = $ac_status" >&5
6133   (exit $ac_status); }; }; then
6134   cf_cv_ldflags_search_paths_first=yes
6135 else
6136   echo "$as_me: failed program was:" >&5
6137 cat conftest.$ac_ext >&5
6138 cf_cv_ldflags_search_paths_first=no
6139 fi
6140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6141                                 LDFLAGS=$cf_save_LDFLAGS
6142 fi
6143 echo "$as_me:6143: result: $cf_cv_ldflags_search_paths_first" >&5
6144 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6145                 if test $cf_cv_ldflags_search_paths_first = yes; then
6146                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6147                 fi
6148                 ;;
6149         (hpux[7-8]*)
6150                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6151                 if test "$GCC" != yes; then
6152                         CC_SHARED_OPTS='+Z'
6153                 fi
6154                 MK_SHARED_LIB='${LD} -b -o $@'
6155                 INSTALL_LIB="-m 555"
6156                 ;;
6157         (hpux*)
6158                 # (tested with gcc 2.7.2 -- I don't have c89)
6159                 if test "$GCC" = yes; then
6160                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6161                 else
6162                         CC_SHARED_OPTS='+Z'
6163                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6164                 fi
6165                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6166                 # HP-UX shared libraries must be executable, and should be
6167                 # readonly to exploit a quirk in the memory manager.
6168                 INSTALL_LIB="-m 555"
6169                 ;;
6170         (interix*)
6171                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6172                 if test "$cf_cv_shlib_version" = rel; then
6173                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6174                 else
6175                         cf_shared_soname='`basename `'
6176                 fi
6177                 CC_SHARED_OPTS=
6178                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6179                 ;;
6180         (irix*)
6181                 if test "$cf_cv_enable_rpath" = yes ; then
6182                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6183                 fi
6184                 # tested with IRIX 5.2 and 'cc'.
6185                 if test "$GCC" != yes; then
6186                         CC_SHARED_OPTS='-KPIC'
6187                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6188                 else
6189                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6190                 fi
6191                 cf_cv_rm_so_locs=yes
6192                 ;;
6193         (linux*|gnu*|k*bsd*-gnu)
6194                 if test "$DFT_LWR_MODEL" = "shared" ; then
6195                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6196                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6197                 fi
6198                 if test "$cf_cv_enable_rpath" = yes ; then
6199                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6200                 fi
6201
6202         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6203         if test "$cf_cv_shlib_version" = rel; then
6204                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6205         else
6206                 cf_cv_shared_soname='`basename $@`'
6207         fi
6208
6209                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6210                 ;;
6211         (mingw*)
6212                 cf_cv_shlib_version=mingw
6213                 cf_cv_shlib_version_infix=mingw
6214                 shlibdir=$bindir
6215                 MAKE_DLLS=
6216                 if test "$DFT_LWR_MODEL" = "shared" ; then
6217                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6218                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6219                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6220                 fi
6221                 CC_SHARED_OPTS=
6222                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6223                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6224                 cat >mk_shared_lib.sh <<-CF_EOF
6225                 #!$SHELL
6226                 SHARED_LIB=\$1
6227                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6228                 shift
6229                 cat <<-EOF
6230                 Linking shared library
6231                 ** SHARED_LIB \$SHARED_LIB
6232                 ** IMPORT_LIB \$IMPORT_LIB
6233 EOF
6234                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6235 CF_EOF
6236                 chmod +x mk_shared_lib.sh
6237                 ;;
6238         (openbsd[2-9].*|mirbsd*)
6239                 if test "$DFT_LWR_MODEL" = "shared" ; then
6240                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6241                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6242                 fi
6243                 if test "$cf_cv_enable_rpath" = yes ; then
6244                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6245                 fi
6246                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6247
6248         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6249         if test "$cf_cv_shlib_version" = rel; then
6250                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6251         else
6252                 cf_cv_shared_soname='`basename $@`'
6253         fi
6254
6255                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6256                 ;;
6257         (nto-qnx*|openbsd*|freebsd[12].*)
6258                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6259                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6260                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6261                 ;;
6262         (dragonfly*|freebsd*)
6263                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6264                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6265                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6266                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6267                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6268                 fi
6269
6270         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6271         if test "$cf_cv_shlib_version" = rel; then
6272                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6273         else
6274                 cf_cv_shared_soname='`basename $@`'
6275         fi
6276
6277                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6278                 ;;
6279         (netbsd*)
6280                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6281                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6282                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6283                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6284                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6285                         if test "$cf_cv_shlib_version" = auto; then
6286                         if test -f /usr/libexec/ld.elf_so; then
6287                                 cf_cv_shlib_version=abi
6288                         else
6289                                 cf_cv_shlib_version=rel
6290                         fi
6291                         fi
6292
6293         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6294         if test "$cf_cv_shlib_version" = rel; then
6295                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6296         else
6297                 cf_cv_shared_soname='`basename $@`'
6298         fi
6299
6300                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6301                 else
6302                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6303                 fi
6304                 ;;
6305         (osf*|mls+*)
6306                 # tested with OSF/1 V3.2 and 'cc'
6307                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6308                 # link with shared libs).
6309                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6310                 case $host_os in
6311                 (osf4*)
6312                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6313                         ;;
6314                 esac
6315                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6316                 if test "$DFT_LWR_MODEL" = "shared" ; then
6317                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6318                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6319                 fi
6320                 cf_cv_rm_so_locs=yes
6321                 ;;
6322         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6323                 # tested with osr5.0.5
6324                 if test "$GCC" != yes; then
6325                         CC_SHARED_OPTS='-belf -KPIC'
6326                 fi
6327                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6328                 if test "$cf_cv_enable_rpath" = yes ; then
6329                         # only way is to set LD_RUN_PATH but no switch for it
6330                         RUN_PATH=$libdir
6331                 fi
6332                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6333                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6334                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6335                 ;;
6336         (sunos4*)
6337                 # tested with SunOS 4.1.1 and gcc 2.7.0
6338                 if test "$GCC" != yes; then
6339                         CC_SHARED_OPTS='-KPIC'
6340                 fi
6341                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6342                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6343                 ;;
6344         (solaris2*)
6345                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6346                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6347                 if test "$DFT_LWR_MODEL" = "shared" ; then
6348                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6349                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6350                 fi
6351                 if test "$cf_cv_enable_rpath" = yes ; then
6352                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6353                 fi
6354
6355         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6356         if test "$cf_cv_shlib_version" = rel; then
6357                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6358         else
6359                 cf_cv_shared_soname='`basename $@`'
6360         fi
6361
6362                 if test "$GCC" != yes; then
6363                         cf_save_CFLAGS="$CFLAGS"
6364                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6365                         do
6366                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6367                                 cat >conftest.$ac_ext <<_ACEOF
6368 #line 6368 "configure"
6369 #include "confdefs.h"
6370 #include <stdio.h>
6371 int
6372 main ()
6373 {
6374 printf("Hello\n");
6375   ;
6376   return 0;
6377 }
6378 _ACEOF
6379 rm -f conftest.$ac_objext
6380 if { (eval echo "$as_me:6380: \"$ac_compile\"") >&5
6381   (eval $ac_compile) 2>&5
6382   ac_status=$?
6383   echo "$as_me:6383: \$? = $ac_status" >&5
6384   (exit $ac_status); } &&
6385          { ac_try='test -s conftest.$ac_objext'
6386   { (eval echo "$as_me:6386: \"$ac_try\"") >&5
6387   (eval $ac_try) 2>&5
6388   ac_status=$?
6389   echo "$as_me:6389: \$? = $ac_status" >&5
6390   (exit $ac_status); }; }; then
6391   break
6392 else
6393   echo "$as_me: failed program was:" >&5
6394 cat conftest.$ac_ext >&5
6395 fi
6396 rm -f conftest.$ac_objext conftest.$ac_ext
6397                         done
6398                         CFLAGS="$cf_save_CFLAGS"
6399                         CC_SHARED_OPTS=$cf_shared_opts
6400                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6401                 else
6402                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6403                 fi
6404                 ;;
6405         (sysv5uw7*|unix_sv*)
6406                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6407                 if test "$GCC" != yes; then
6408                         CC_SHARED_OPTS='-KPIC'
6409                 fi
6410                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6411                 ;;
6412         (*)
6413                 CC_SHARED_OPTS='unknown'
6414                 MK_SHARED_LIB='echo unknown'
6415                 ;;
6416         esac
6417
6418         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6419         case "$cf_cv_shlib_version" in
6420         (rel|abi)
6421                 case "$MK_SHARED_LIB" in
6422                 (*'-o $@')
6423                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6424                         ;;
6425                 (*)
6426                         { echo "$as_me:6426: WARNING: ignored --with-shlib-version" >&5
6427 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6428                         ;;
6429                 esac
6430                 ;;
6431         esac
6432
6433         if test -n "$cf_try_cflags"
6434         then
6435 cat > conftest.$ac_ext <<EOF
6436 #line 6436 "${as_me:-configure}"
6437 #include <stdio.h>
6438 int main(int argc, char *argv[])
6439 {
6440         printf("hello\n");
6441         return (argv[argc-1] == 0) ;
6442 }
6443 EOF
6444                 cf_save_CFLAGS="$CFLAGS"
6445                 for cf_opt in $cf_try_cflags
6446                 do
6447                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6448                         echo "$as_me:6448: checking if CFLAGS option -$cf_opt works" >&5
6449 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6450                         if { (eval echo "$as_me:6450: \"$ac_compile\"") >&5
6451   (eval $ac_compile) 2>&5
6452   ac_status=$?
6453   echo "$as_me:6453: \$? = $ac_status" >&5
6454   (exit $ac_status); }; then
6455                                 echo "$as_me:6455: result: yes" >&5
6456 echo "${ECHO_T}yes" >&6
6457                                 cf_save_CFLAGS="$CFLAGS"
6458                         else
6459                                 echo "$as_me:6459: result: no" >&5
6460 echo "${ECHO_T}no" >&6
6461                         fi
6462                 done
6463                 CFLAGS="$cf_save_CFLAGS"
6464         fi
6465
6466         # RPATH_LIST is a colon-separated list of directories
6467         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6468         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6469
6470         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6471
6472         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6473
6474 echo "${as_me:-configure}:6474: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6475
6476         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6477
6478 echo "${as_me:-configure}:6478: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6479
6480 for model in $cf_list_models; do
6481         case $model in
6482         (libtool)
6483
6484 echo "$as_me:6484: checking for additional libtool options" >&5
6485 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6486
6487 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6488 if test "${with_libtool_opts+set}" = set; then
6489   withval="$with_libtool_opts"
6490   with_libtool_opts=$withval
6491 else
6492   with_libtool_opts=no
6493 fi;
6494 echo "$as_me:6494: result: $with_libtool_opts" >&5
6495 echo "${ECHO_T}$with_libtool_opts" >&6
6496
6497 case .$with_libtool_opts in
6498 (.yes|.no|.)
6499         ;;
6500 (*)
6501         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6502         ;;
6503 esac
6504
6505 echo "$as_me:6505: checking if exported-symbols file should be used" >&5
6506 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6507
6508 # Check whether --with-export-syms or --without-export-syms was given.
6509 if test "${with_export_syms+set}" = set; then
6510   withval="$with_export_syms"
6511   with_export_syms=$withval
6512 else
6513   with_export_syms=no
6514 fi;
6515 if test "x$with_export_syms" = xyes
6516 then
6517         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6518
6519 fi
6520 echo "$as_me:6520: result: $with_export_syms" >&5
6521 echo "${ECHO_T}$with_export_syms" >&6
6522 if test "x$with_export_syms" != xno
6523 then
6524         EXPORT_SYMS="-export-symbols $with_export_syms"
6525
6526 fi
6527
6528                 ;;
6529         (shared)
6530                 if test "$CC_SHARED_OPTS" = "unknown"; then
6531                         { { echo "$as_me:6531: error: Shared libraries are not supported in this version" >&5
6532 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6533    { (exit 1); exit 1; }; }
6534                 fi
6535
6536 echo "$as_me:6536: checking if versioned-symbols file should be used" >&5
6537 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6538
6539 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6540 if test "${with_versioned_syms+set}" = set; then
6541   withval="$with_versioned_syms"
6542   with_versioned_syms=$withval
6543 else
6544   with_versioned_syms=no
6545 fi;
6546 if test "x$with_versioned_syms" = xyes
6547 then
6548         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6549
6550 fi
6551 echo "$as_me:6551: result: $with_versioned_syms" >&5
6552 echo "${ECHO_T}$with_versioned_syms" >&6
6553
6554 RESULTING_SYMS=
6555 VERSIONED_SYMS=
6556 WILDCARD_SYMS=
6557
6558 if test "x$with_versioned_syms" != xno
6559 then
6560         RESULTING_SYMS=$with_versioned_syms
6561         case "x$MK_SHARED_LIB" in
6562         (*-Wl,*)
6563                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6564                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6565                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6566
6567 echo "${as_me:-configure}:6567: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6568
6569                 ;;
6570         (*-dy\ *)
6571                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6572                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6573                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6574
6575 echo "${as_me:-configure}:6575: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6576
6577                 ;;
6578         (*)
6579                 { echo "$as_me:6579: WARNING: this system does not support versioned-symbols" >&5
6580 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6581                 ;;
6582         esac
6583
6584         # Linux ld can selectively override scope, e.g., of symbols beginning with
6585         # "_" by first declaring some as global, and then using a wildcard to
6586         # declare the others as local.  Some other loaders cannot do this.  Check
6587         # by constructing a (very) simple shared library and inspecting its
6588         # symbols.
6589         if test "x$VERSIONED_SYMS" != "x"
6590         then
6591                 echo "$as_me:6591: checking if wildcards can be used to selectively omit symbols" >&5
6592 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6593                 WILDCARD_SYMS=no
6594
6595                 # make sources
6596                 rm -f conftest.*
6597
6598                 cat >conftest.ver <<EOF
6599 module_1.0 {
6600 global:
6601         globalf1;
6602 local:
6603         localf1;
6604 };
6605 module_2.0 {
6606 global:
6607         globalf2;
6608 local:
6609         localf2;
6610         _*;
6611 } module_1.0;
6612 submodule_1.0 {
6613 global:
6614         subglobalf1;
6615         _ismissing;
6616 local:
6617         sublocalf1;
6618 };
6619 submodule_2.0 {
6620 global:
6621         subglobalf2;
6622 local:
6623         sublocalf2;
6624         _*;
6625 } submodule_1.0;
6626 EOF
6627                 cat >conftest.$ac_ext <<EOF
6628 #line 6628 "configure"
6629 int     _ismissing(void) { return 1; }
6630 int     _localf1(void) { return 1; }
6631 int     _localf2(void) { return 2; }
6632 int     globalf1(void) { return 1; }
6633 int     globalf2(void) { return 2; }
6634 int     _sublocalf1(void) { return 1; }
6635 int     _sublocalf2(void) { return 2; }
6636 int     subglobalf1(void) { return 1; }
6637 int     subglobalf2(void) { return 2; }
6638 EOF
6639                 cat >conftest.mk <<EOF
6640 CC=${CC}
6641 CFLAGS=${CFLAGS}
6642 CPPFLAGS=${CPPFLAGS}
6643 LDFLAGS=${LDFLAGS}
6644 LIBS=${LIBS}
6645 VERSIONED_SYMS=${VERSIONED_SYMS}
6646 RESULTING_SYMS=conftest.ver
6647 MK_SHARED_LIB=${MK_SHARED_LIB}
6648 conftest.so: conftest.$ac_cv_objext
6649                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6650 EOF
6651
6652                 # compile source, make library
6653                 if make -f conftest.mk 2>&5 >/dev/null
6654                 then
6655                         # test for missing symbol
6656                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6657                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6658                 fi
6659                 echo "$as_me:6659: result: $WILDCARD_SYMS" >&5
6660 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6661                 rm -f conftest.*
6662         fi
6663 fi
6664
6665                 ;;
6666         esac
6667 done
6668
6669 # pretend that ncurses==ncursesw==ncursest
6670 echo "$as_me:6670: checking if you want to disable library suffixes" >&5
6671 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6672
6673 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6674 if test "${enable_lib_suffixes+set}" = set; then
6675   enableval="$enable_lib_suffixes"
6676   test "$enableval" != no && enableval=yes
6677         if test "$enableval" != "yes" ; then
6678     disable_lib_suffixes=yes
6679         else
6680                 disable_lib_suffixes=no
6681         fi
6682 else
6683   enableval=yes
6684         disable_lib_suffixes=no
6685
6686 fi;
6687 echo "$as_me:6687: result: $disable_lib_suffixes" >&5
6688 echo "${ECHO_T}$disable_lib_suffixes" >&6
6689
6690 ### If we're building with rpath, try to link non-standard libs that way too.
6691 if test "$DFT_LWR_MODEL" = "shared"; then
6692
6693 echo "$as_me:6693: checking if rpath-hack should be disabled" >&5
6694 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6695
6696 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6697 if test "${enable_rpath_hack+set}" = set; then
6698   enableval="$enable_rpath_hack"
6699   test "$enableval" != no && enableval=yes
6700         if test "$enableval" != "yes" ; then
6701     cf_disable_rpath_hack=yes
6702         else
6703                 cf_disable_rpath_hack=no
6704         fi
6705 else
6706   enableval=yes
6707         cf_disable_rpath_hack=no
6708
6709 fi;
6710 echo "$as_me:6710: result: $cf_disable_rpath_hack" >&5
6711 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6712 if test "$cf_disable_rpath_hack" = no ; then
6713
6714 echo "$as_me:6714: checking for updated LDFLAGS" >&5
6715 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6716 if test -n "$LD_RPATH_OPT" ; then
6717         echo "$as_me:6717: result: maybe" >&5
6718 echo "${ECHO_T}maybe" >&6
6719
6720         for ac_prog in ldd
6721 do
6722   # Extract the first word of "$ac_prog", so it can be a program name with args.
6723 set dummy $ac_prog; ac_word=$2
6724 echo "$as_me:6724: checking for $ac_word" >&5
6725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6726 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6727   echo $ECHO_N "(cached) $ECHO_C" >&6
6728 else
6729   if test -n "$cf_ldd_prog"; then
6730   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6731 else
6732   ac_save_IFS=$IFS; IFS=$ac_path_separator
6733 ac_dummy="$PATH"
6734 for ac_dir in $ac_dummy; do
6735   IFS=$ac_save_IFS
6736   test -z "$ac_dir" && ac_dir=.
6737   $as_executable_p "$ac_dir/$ac_word" || continue
6738 ac_cv_prog_cf_ldd_prog="$ac_prog"
6739 echo "$as_me:6739: found $ac_dir/$ac_word" >&5
6740 break
6741 done
6742
6743 fi
6744 fi
6745 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6746 if test -n "$cf_ldd_prog"; then
6747   echo "$as_me:6747: result: $cf_ldd_prog" >&5
6748 echo "${ECHO_T}$cf_ldd_prog" >&6
6749 else
6750   echo "$as_me:6750: result: no" >&5
6751 echo "${ECHO_T}no" >&6
6752 fi
6753
6754   test -n "$cf_ldd_prog" && break
6755 done
6756 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6757
6758         cf_rpath_list="/usr/lib /lib"
6759         if test "$cf_ldd_prog" != no
6760         then
6761                 cf_rpath_oops=
6762
6763 cat >conftest.$ac_ext <<_ACEOF
6764 #line 6764 "configure"
6765 #include "confdefs.h"
6766 #include <stdio.h>
6767 int
6768 main ()
6769 {
6770 printf("Hello");
6771   ;
6772   return 0;
6773 }
6774 _ACEOF
6775 rm -f conftest.$ac_objext conftest$ac_exeext
6776 if { (eval echo "$as_me:6776: \"$ac_link\"") >&5
6777   (eval $ac_link) 2>&5
6778   ac_status=$?
6779   echo "$as_me:6779: \$? = $ac_status" >&5
6780   (exit $ac_status); } &&
6781          { ac_try='test -s conftest$ac_exeext'
6782   { (eval echo "$as_me:6782: \"$ac_try\"") >&5
6783   (eval $ac_try) 2>&5
6784   ac_status=$?
6785   echo "$as_me:6785: \$? = $ac_status" >&5
6786   (exit $ac_status); }; }; then
6787   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6788                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6789 else
6790   echo "$as_me: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6792 fi
6793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6794
6795                 # If we passed the link-test, but get a "not found" on a given library,
6796                 # this could be due to inept reconfiguration of gcc to make it only
6797                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6798                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6799                 # /usr/local libraries.
6800                 if test -n "$cf_rpath_oops"
6801                 then
6802                         for cf_rpath_src in $cf_rpath_oops
6803                         do
6804                                 for cf_rpath_dir in \
6805                                         /usr/local \
6806                                         /usr/pkg \
6807                                         /opt/sfw
6808                                 do
6809                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6810                                         then
6811                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6812
6813 echo "${as_me:-configure}:6813: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6814
6815                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6816                                                 break
6817                                         fi
6818                                 done
6819                         done
6820                 fi
6821         fi
6822
6823         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6824
6825 echo "${as_me:-configure}:6825: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6826
6827 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6828
6829 echo "${as_me:-configure}:6829: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6830
6831 cf_rpath_dst=
6832 for cf_rpath_src in $LDFLAGS
6833 do
6834         case $cf_rpath_src in
6835         (-L*)
6836
6837                 # check if this refers to a directory which we will ignore
6838                 cf_rpath_skip=no
6839                 if test -n "$cf_rpath_list"
6840                 then
6841                         for cf_rpath_item in $cf_rpath_list
6842                         do
6843                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6844                                 then
6845                                         cf_rpath_skip=yes
6846                                         break
6847                                 fi
6848                         done
6849                 fi
6850
6851                 if test "$cf_rpath_skip" = no
6852                 then
6853                         # transform the option
6854                         if test "$LD_RPATH_OPT" = "-R " ; then
6855                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6856                         else
6857                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6858                         fi
6859
6860                         # if we have not already added this, add it now
6861                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6862                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6863                         then
6864                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6865
6866 echo "${as_me:-configure}:6866: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6867
6868                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6869                         fi
6870                 fi
6871                 ;;
6872         esac
6873         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6874 done
6875 LDFLAGS=$cf_rpath_dst
6876
6877 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6878
6879 echo "${as_me:-configure}:6879: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6880
6881 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6882
6883 echo "${as_me:-configure}:6883: testing ...checking LIBS $LIBS ..." 1>&5
6884
6885 cf_rpath_dst=
6886 for cf_rpath_src in $LIBS
6887 do
6888         case $cf_rpath_src in
6889         (-L*)
6890
6891                 # check if this refers to a directory which we will ignore
6892                 cf_rpath_skip=no
6893                 if test -n "$cf_rpath_list"
6894                 then
6895                         for cf_rpath_item in $cf_rpath_list
6896                         do
6897                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6898                                 then
6899                                         cf_rpath_skip=yes
6900                                         break
6901                                 fi
6902                         done
6903                 fi
6904
6905                 if test "$cf_rpath_skip" = no
6906                 then
6907                         # transform the option
6908                         if test "$LD_RPATH_OPT" = "-R " ; then
6909                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6910                         else
6911                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6912                         fi
6913
6914                         # if we have not already added this, add it now
6915                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6916                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6917                         then
6918                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6919
6920 echo "${as_me:-configure}:6920: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6921
6922                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6923                         fi
6924                 fi
6925                 ;;
6926         esac
6927         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6928 done
6929 LIBS=$cf_rpath_dst
6930
6931 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6932
6933 echo "${as_me:-configure}:6933: testing ...checked LIBS $LIBS ..." 1>&5
6934
6935         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6936
6937 echo "${as_me:-configure}:6937: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6938
6939 else
6940         echo "$as_me:6940: result: no" >&5
6941 echo "${ECHO_T}no" >&6
6942 fi
6943
6944 fi
6945
6946 fi
6947
6948 ###############################################################################
6949
6950 ###     use option --with-extra-suffix to append suffix to headers and libraries
6951 echo "$as_me:6951: checking if you wish to append extra suffix to header/library paths" >&5
6952 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6953 EXTRA_SUFFIX=
6954
6955 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6956 if test "${with_extra_suffix+set}" = set; then
6957   withval="$with_extra_suffix"
6958   case x$withval in
6959         (no)
6960                 ;;
6961         (xyes|x)
6962                 EXTRA_SUFFIX=$cf_cv_abi_version
6963                 ;;
6964         (*)
6965                 EXTRA_SUFFIX=$withval
6966                 ;;
6967         esac
6968
6969 fi;
6970 echo "$as_me:6970: result: $EXTRA_SUFFIX" >&5
6971 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6972
6973 ###     use option --disable-overwrite to leave out the link to -lcurses
6974 echo "$as_me:6974: checking if you wish to install ncurses overwriting curses" >&5
6975 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6976
6977 # Check whether --enable-overwrite or --disable-overwrite was given.
6978 if test "${enable_overwrite+set}" = set; then
6979   enableval="$enable_overwrite"
6980   with_overwrite=$enableval
6981 else
6982   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6983 fi;
6984 echo "$as_me:6984: result: $with_overwrite" >&5
6985 echo "${ECHO_T}$with_overwrite" >&6
6986
6987 echo "$as_me:6987: checking if external terminfo-database is used" >&5
6988 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6989
6990 # Check whether --enable-database or --disable-database was given.
6991 if test "${enable_database+set}" = set; then
6992   enableval="$enable_database"
6993   use_database=$enableval
6994 else
6995   use_database=yes
6996 fi;
6997 echo "$as_me:6997: result: $use_database" >&5
6998 echo "${ECHO_T}$use_database" >&6
6999
7000 case $host_os in
7001 (os2*)
7002         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7003         ;;
7004 (*)
7005         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7006         ;;
7007 esac
7008
7009 NCURSES_USE_DATABASE=0
7010 if test "$use_database" != no ; then
7011         NCURSES_USE_DATABASE=1
7012
7013         echo "$as_me:7013: checking which terminfo source-file will be installed" >&5
7014 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7015
7016 # Check whether --with-database or --without-database was given.
7017 if test "${with_database+set}" = set; then
7018   withval="$with_database"
7019   TERMINFO_SRC=$withval
7020 fi;
7021         echo "$as_me:7021: result: $TERMINFO_SRC" >&5
7022 echo "${ECHO_T}$TERMINFO_SRC" >&6
7023
7024         echo "$as_me:7024: checking whether to use hashed database instead of directory/tree" >&5
7025 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7026
7027 # Check whether --with-hashed-db or --without-hashed-db was given.
7028 if test "${with_hashed_db+set}" = set; then
7029   withval="$with_hashed_db"
7030
7031 else
7032   with_hashed_db=no
7033 fi;
7034         echo "$as_me:7034: result: $with_hashed_db" >&5
7035 echo "${ECHO_T}$with_hashed_db" >&6
7036 else
7037         with_hashed_db=no
7038 fi
7039
7040 echo "$as_me:7040: checking for list of fallback descriptions" >&5
7041 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7042
7043 # Check whether --with-fallbacks or --without-fallbacks was given.
7044 if test "${with_fallbacks+set}" = set; then
7045   withval="$with_fallbacks"
7046   with_fallback=$withval
7047 else
7048   with_fallback=
7049 fi;
7050 echo "$as_me:7050: result: $with_fallback" >&5
7051 echo "${ECHO_T}$with_fallback" >&6
7052 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7053
7054 echo "$as_me:7054: checking if you want modern xterm or antique" >&5
7055 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7056
7057 # Check whether --with-xterm-new or --without-xterm-new was given.
7058 if test "${with_xterm_new+set}" = set; then
7059   withval="$with_xterm_new"
7060   with_xterm_new=$withval
7061 else
7062   with_xterm_new=yes
7063 fi;
7064 case $with_xterm_new in
7065 (no) with_xterm_new=xterm-old;;
7066 (*)      with_xterm_new=xterm-new;;
7067 esac
7068 echo "$as_me:7068: result: $with_xterm_new" >&5
7069 echo "${ECHO_T}$with_xterm_new" >&6
7070 WHICH_XTERM=$with_xterm_new
7071
7072 echo "$as_me:7072: checking if xterm backspace sends BS or DEL" >&5
7073 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7074
7075 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7076 if test "${with_xterm_kbs+set}" = set; then
7077   withval="$with_xterm_kbs"
7078   with_xterm_kbs=$withval
7079 else
7080   with_xterm_kbs=BS
7081 fi;
7082 case x$with_xterm_kbs in
7083 (xyes|xno|xBS|xbs|x8)
7084         with_xterm_kbs=BS
7085         ;;
7086 (xDEL|xdel|x127)
7087         with_xterm_kbs=DEL
7088         ;;
7089 (*)
7090         with_xterm_kbs=$withval
7091         ;;
7092 esac
7093 echo "$as_me:7093: result: $with_xterm_kbs" >&5
7094 echo "${ECHO_T}$with_xterm_kbs" >&6
7095 XTERM_KBS=$with_xterm_kbs
7096
7097 MAKE_TERMINFO=
7098 if test "$use_database" = no ; then
7099         TERMINFO="${datadir}/terminfo"
7100         MAKE_TERMINFO="#"
7101 else
7102
7103 echo "$as_me:7103: checking for list of terminfo directories" >&5
7104 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7105
7106 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7107 if test "${with_terminfo_dirs+set}" = set; then
7108   withval="$with_terminfo_dirs"
7109
7110 else
7111   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7112 fi;
7113 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7114 cf_dst_path=
7115 for cf_src_path in $withval
7116 do
7117
7118 if test "x$prefix" != xNONE; then
7119         cf_path_syntax="$prefix"
7120 else
7121         cf_path_syntax="$ac_default_prefix"
7122 fi
7123
7124 case ".$cf_src_path" in
7125 (.\$\(*\)*|.\'*\'*)
7126         ;;
7127 (..|./*|.\\*)
7128         ;;
7129 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7130         ;;
7131 (.\${*prefix}*|.\${*dir}*)
7132         eval cf_src_path="$cf_src_path"
7133         case ".$cf_src_path" in
7134         (.NONE/*)
7135                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7136                 ;;
7137         esac
7138         ;;
7139 (.no|.NONE/*)
7140         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7141         ;;
7142 (*)
7143         { { echo "$as_me:7143: error: expected a pathname, not \"$cf_src_path\"" >&5
7144 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7145    { (exit 1); exit 1; }; }
7146         ;;
7147 esac
7148
7149   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7150   cf_dst_path="${cf_dst_path}${cf_src_path}"
7151 done
7152 IFS="$ac_save_ifs"
7153
7154 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7155 # so we have to check/work around.  We do prefer the result of "eval"...
7156 eval cf_dst_eval="$cf_dst_path"
7157 case "x$cf_dst_eval" in
7158 (xNONE*)
7159         TERMINFO_DIRS=$cf_dst_path
7160         ;;
7161 (*)
7162         TERMINFO_DIRS="$cf_dst_eval"
7163         ;;
7164 esac
7165
7166 echo "$as_me:7166: result: $TERMINFO_DIRS" >&5
7167 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7168 test -n "$TERMINFO_DIRS" &&
7169 cat >>confdefs.h <<EOF
7170 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7171 EOF
7172
7173 echo "$as_me:7173: checking for default terminfo directory" >&5
7174 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7175
7176 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7177 if test "${with_default_terminfo_dir+set}" = set; then
7178   withval="$with_default_terminfo_dir"
7179
7180 else
7181   withval="${TERMINFO:-${datadir}/terminfo}"
7182 fi; if test -n "${datadir}/terminfo" ; then
7183
7184 if test "x$prefix" != xNONE; then
7185         cf_path_syntax="$prefix"
7186 else
7187         cf_path_syntax="$ac_default_prefix"
7188 fi
7189
7190 case ".$withval" in
7191 (.\$\(*\)*|.\'*\'*)
7192         ;;
7193 (..|./*|.\\*)
7194         ;;
7195 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7196         ;;
7197 (.\${*prefix}*|.\${*dir}*)
7198         eval withval="$withval"
7199         case ".$withval" in
7200         (.NONE/*)
7201                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7202                 ;;
7203         esac
7204         ;;
7205 (.no|.NONE/*)
7206         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7207         ;;
7208 (*)
7209         { { echo "$as_me:7209: error: expected a pathname, not \"$withval\"" >&5
7210 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7211    { (exit 1); exit 1; }; }
7212         ;;
7213 esac
7214
7215 fi
7216 eval TERMINFO="$withval"
7217
7218 echo "$as_me:7218: result: $TERMINFO" >&5
7219 echo "${ECHO_T}$TERMINFO" >&6
7220
7221 cat >>confdefs.h <<EOF
7222 #define TERMINFO "$TERMINFO"
7223 EOF
7224
7225 fi
7226
7227 ###     use option --disable-big-core to make tic run on small machines
7228 ###     We need 4Mb, check if we can allocate 50% more than that.
7229 echo "$as_me:7229: checking if big-core option selected" >&5
7230 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7231
7232 # Check whether --enable-big-core or --disable-big-core was given.
7233 if test "${enable_big_core+set}" = set; then
7234   enableval="$enable_big_core"
7235   with_big_core=$enableval
7236 else
7237   if test "$cross_compiling" = yes; then
7238   with_big_core=no
7239 else
7240   cat >conftest.$ac_ext <<_ACEOF
7241 #line 7241 "configure"
7242 #include "confdefs.h"
7243
7244 #include <stdlib.h>
7245 #include <string.h>
7246 int main() {
7247         unsigned long n = 6000000L;
7248         char *s = malloc(n);
7249         if (s != 0)
7250                 s[0] = s[n-1] = 0;
7251         ${cf_cv_main_return:-return}(s == 0);
7252 }
7253 _ACEOF
7254 rm -f conftest$ac_exeext
7255 if { (eval echo "$as_me:7255: \"$ac_link\"") >&5
7256   (eval $ac_link) 2>&5
7257   ac_status=$?
7258   echo "$as_me:7258: \$? = $ac_status" >&5
7259   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7260   { (eval echo "$as_me:7260: \"$ac_try\"") >&5
7261   (eval $ac_try) 2>&5
7262   ac_status=$?
7263   echo "$as_me:7263: \$? = $ac_status" >&5
7264   (exit $ac_status); }; }; then
7265   with_big_core=yes
7266 else
7267   echo "$as_me: program exited with status $ac_status" >&5
7268 echo "$as_me: failed program was:" >&5
7269 cat conftest.$ac_ext >&5
7270 with_big_core=no
7271 fi
7272 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7273 fi
7274 fi;
7275 echo "$as_me:7275: result: $with_big_core" >&5
7276 echo "${ECHO_T}$with_big_core" >&6
7277 test "x$with_big_core" = "xyes" &&
7278 cat >>confdefs.h <<\EOF
7279 #define HAVE_BIG_CORE 1
7280 EOF
7281
7282 ### ISO C only guarantees 512-char strings, we have tables which load faster
7283 ### when constructed using "big" strings.  More than the C compiler, the awk
7284 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7285 echo "$as_me:7285: checking if big-strings option selected" >&5
7286 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7287
7288 # Check whether --enable-big-strings or --disable-big-strings was given.
7289 if test "${enable_big_strings+set}" = set; then
7290   enableval="$enable_big_strings"
7291   with_big_strings=$enableval
7292 else
7293
7294         case x$AWK in
7295         (x)
7296                 eval with_big_strings=no
7297                 ;;
7298         (*)
7299                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7300                         | $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
7301                         eval with_big_strings=yes
7302                 else
7303                         eval with_big_strings=no
7304                 fi
7305                 ;;
7306         esac
7307
7308 fi;
7309 echo "$as_me:7309: result: $with_big_strings" >&5
7310 echo "${ECHO_T}$with_big_strings" >&6
7311
7312 USE_BIG_STRINGS=0
7313 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7314
7315 ###     use option --enable-termcap to compile in the termcap fallback support
7316 echo "$as_me:7316: checking if you want termcap-fallback support" >&5
7317 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7318
7319 # Check whether --enable-termcap or --disable-termcap was given.
7320 if test "${enable_termcap+set}" = set; then
7321   enableval="$enable_termcap"
7322   with_termcap=$enableval
7323 else
7324   with_termcap=no
7325 fi;
7326 echo "$as_me:7326: result: $with_termcap" >&5
7327 echo "${ECHO_T}$with_termcap" >&6
7328
7329 NCURSES_USE_TERMCAP=0
7330 if test "x$with_termcap" != "xyes" ; then
7331         if test "$use_database" = no ; then
7332                 if test -z "$with_fallback" ; then
7333                         { { echo "$as_me:7333: error: You have disabled the database w/o specifying fallbacks" >&5
7334 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7335    { (exit 1); exit 1; }; }
7336                 fi
7337         fi
7338
7339 cat >>confdefs.h <<\EOF
7340 #define PURE_TERMINFO 1
7341 EOF
7342
7343 else
7344
7345         if test "$with_ticlib" != no ; then
7346                 { { echo "$as_me:7346: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7347 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7348    { (exit 1); exit 1; }; }
7349         fi
7350
7351         NCURSES_USE_TERMCAP=1
7352         echo "$as_me:7352: checking for list of termcap files" >&5
7353 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7354
7355 # Check whether --with-termpath or --without-termpath was given.
7356 if test "${with_termpath+set}" = set; then
7357   withval="$with_termpath"
7358
7359 else
7360   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7361 fi;
7362 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7363 cf_dst_path=
7364 for cf_src_path in $withval
7365 do
7366
7367 if test "x$prefix" != xNONE; then
7368         cf_path_syntax="$prefix"
7369 else
7370         cf_path_syntax="$ac_default_prefix"
7371 fi
7372
7373 case ".$cf_src_path" in
7374 (.\$\(*\)*|.\'*\'*)
7375         ;;
7376 (..|./*|.\\*)
7377         ;;
7378 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7379         ;;
7380 (.\${*prefix}*|.\${*dir}*)
7381         eval cf_src_path="$cf_src_path"
7382         case ".$cf_src_path" in
7383         (.NONE/*)
7384                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7385                 ;;
7386         esac
7387         ;;
7388 (.no|.NONE/*)
7389         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7390         ;;
7391 (*)
7392         { { echo "$as_me:7392: error: expected a pathname, not \"$cf_src_path\"" >&5
7393 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7394    { (exit 1); exit 1; }; }
7395         ;;
7396 esac
7397
7398   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7399   cf_dst_path="${cf_dst_path}${cf_src_path}"
7400 done
7401 IFS="$ac_save_ifs"
7402
7403 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7404 # so we have to check/work around.  We do prefer the result of "eval"...
7405 eval cf_dst_eval="$cf_dst_path"
7406 case "x$cf_dst_eval" in
7407 (xNONE*)
7408         TERMPATH=$cf_dst_path
7409         ;;
7410 (*)
7411         TERMPATH="$cf_dst_eval"
7412         ;;
7413 esac
7414
7415         echo "$as_me:7415: result: $TERMPATH" >&5
7416 echo "${ECHO_T}$TERMPATH" >&6
7417         test -n "$TERMPATH" &&
7418 cat >>confdefs.h <<EOF
7419 #define TERMPATH "$TERMPATH"
7420 EOF
7421
7422         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7423         echo "$as_me:7423: checking if fast termcap-loader is needed" >&5
7424 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7425
7426 # Check whether --enable-getcap or --disable-getcap was given.
7427 if test "${enable_getcap+set}" = set; then
7428   enableval="$enable_getcap"
7429   with_getcap=$enableval
7430 else
7431   with_getcap=no
7432 fi;
7433         echo "$as_me:7433: result: $with_getcap" >&5
7434 echo "${ECHO_T}$with_getcap" >&6
7435         test "x$with_getcap" = "xyes" &&
7436 cat >>confdefs.h <<\EOF
7437 #define USE_GETCAP 1
7438 EOF
7439
7440         echo "$as_me:7440: checking if translated termcaps will be cached in ~/.terminfo" >&5
7441 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7442
7443 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7444 if test "${enable_getcap_cache+set}" = set; then
7445   enableval="$enable_getcap_cache"
7446   with_getcap_cache=$enableval
7447 else
7448   with_getcap_cache=no
7449 fi;
7450         echo "$as_me:7450: result: $with_getcap_cache" >&5
7451 echo "${ECHO_T}$with_getcap_cache" >&6
7452         test "x$with_getcap_cache" = "xyes" &&
7453 cat >>confdefs.h <<\EOF
7454 #define USE_GETCAP_CACHE 1
7455 EOF
7456
7457 fi
7458
7459 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7460 echo "$as_me:7460: checking if ~/.terminfo is wanted" >&5
7461 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7462
7463 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7464 if test "${enable_home_terminfo+set}" = set; then
7465   enableval="$enable_home_terminfo"
7466   with_home_terminfo=$enableval
7467 else
7468   with_home_terminfo=yes
7469 fi;
7470 echo "$as_me:7470: result: $with_home_terminfo" >&5
7471 echo "${ECHO_T}$with_home_terminfo" >&6
7472 test "x$with_home_terminfo" = "xyes" &&
7473 cat >>confdefs.h <<\EOF
7474 #define USE_HOME_TERMINFO 1
7475 EOF
7476
7477 echo "$as_me:7477: checking if you want to use restricted environment when running as root" >&5
7478 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7479
7480 # Check whether --enable-root-environ or --disable-root-environ was given.
7481 if test "${enable_root_environ+set}" = set; then
7482   enableval="$enable_root_environ"
7483   with_root_environ=$enableval
7484 else
7485   with_root_environ=yes
7486 fi;
7487 echo "$as_me:7487: result: $with_root_environ" >&5
7488 echo "${ECHO_T}$with_root_environ" >&6
7489 test "x$with_root_environ" = xyes &&
7490 cat >>confdefs.h <<\EOF
7491 #define USE_ROOT_ENVIRON 1
7492 EOF
7493
7494 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7495 ###   to reduce storage requirements for the terminfo database.
7496
7497 for ac_func in \
7498         remove \
7499         unlink
7500 do
7501 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7502 echo "$as_me:7502: checking for $ac_func" >&5
7503 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7504 if eval "test \"\${$as_ac_var+set}\" = set"; then
7505   echo $ECHO_N "(cached) $ECHO_C" >&6
7506 else
7507   cat >conftest.$ac_ext <<_ACEOF
7508 #line 7508 "configure"
7509 #include "confdefs.h"
7510 /* System header to define __stub macros and hopefully few prototypes,
7511     which can conflict with char $ac_func (); below.  */
7512 #include <assert.h>
7513 /* Override any gcc2 internal prototype to avoid an error.  */
7514 #ifdef __cplusplus
7515 extern "C"
7516 #endif
7517 /* We use char because int might match the return type of a gcc2
7518    builtin and then its argument prototype would still apply.  */
7519 char $ac_func ();
7520 char (*f) ();
7521
7522 int
7523 main ()
7524 {
7525 /* The GNU C library defines this for functions which it implements
7526     to always fail with ENOSYS.  Some functions are actually named
7527     something starting with __ and the normal name is an alias.  */
7528 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7529 choke me
7530 #else
7531 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7532 #endif
7533
7534   ;
7535   return 0;
7536 }
7537 _ACEOF
7538 rm -f conftest.$ac_objext conftest$ac_exeext
7539 if { (eval echo "$as_me:7539: \"$ac_link\"") >&5
7540   (eval $ac_link) 2>&5
7541   ac_status=$?
7542   echo "$as_me:7542: \$? = $ac_status" >&5
7543   (exit $ac_status); } &&
7544          { ac_try='test -s conftest$ac_exeext'
7545   { (eval echo "$as_me:7545: \"$ac_try\"") >&5
7546   (eval $ac_try) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit $ac_status); }; }; then
7550   eval "$as_ac_var=yes"
7551 else
7552   echo "$as_me: failed program was:" >&5
7553 cat conftest.$ac_ext >&5
7554 eval "$as_ac_var=no"
7555 fi
7556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7557 fi
7558 echo "$as_me:7558: result: `eval echo '${'$as_ac_var'}'`" >&5
7559 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7560 if test `eval echo '${'$as_ac_var'}'` = yes; then
7561   cat >>confdefs.h <<EOF
7562 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7563 EOF
7564
7565 fi
7566 done
7567
7568 if test "$cross_compiling" = yes ; then
7569
7570 for ac_func in \
7571                 link \
7572                 symlink
7573 do
7574 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7575 echo "$as_me:7575: checking for $ac_func" >&5
7576 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7577 if eval "test \"\${$as_ac_var+set}\" = set"; then
7578   echo $ECHO_N "(cached) $ECHO_C" >&6
7579 else
7580   cat >conftest.$ac_ext <<_ACEOF
7581 #line 7581 "configure"
7582 #include "confdefs.h"
7583 /* System header to define __stub macros and hopefully few prototypes,
7584     which can conflict with char $ac_func (); below.  */
7585 #include <assert.h>
7586 /* Override any gcc2 internal prototype to avoid an error.  */
7587 #ifdef __cplusplus
7588 extern "C"
7589 #endif
7590 /* We use char because int might match the return type of a gcc2
7591    builtin and then its argument prototype would still apply.  */
7592 char $ac_func ();
7593 char (*f) ();
7594
7595 int
7596 main ()
7597 {
7598 /* The GNU C library defines this for functions which it implements
7599     to always fail with ENOSYS.  Some functions are actually named
7600     something starting with __ and the normal name is an alias.  */
7601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7602 choke me
7603 #else
7604 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7605 #endif
7606
7607   ;
7608   return 0;
7609 }
7610 _ACEOF
7611 rm -f conftest.$ac_objext conftest$ac_exeext
7612 if { (eval echo "$as_me:7612: \"$ac_link\"") >&5
7613   (eval $ac_link) 2>&5
7614   ac_status=$?
7615   echo "$as_me:7615: \$? = $ac_status" >&5
7616   (exit $ac_status); } &&
7617          { ac_try='test -s conftest$ac_exeext'
7618   { (eval echo "$as_me:7618: \"$ac_try\"") >&5
7619   (eval $ac_try) 2>&5
7620   ac_status=$?
7621   echo "$as_me:7621: \$? = $ac_status" >&5
7622   (exit $ac_status); }; }; then
7623   eval "$as_ac_var=yes"
7624 else
7625   echo "$as_me: failed program was:" >&5
7626 cat conftest.$ac_ext >&5
7627 eval "$as_ac_var=no"
7628 fi
7629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7630 fi
7631 echo "$as_me:7631: result: `eval echo '${'$as_ac_var'}'`" >&5
7632 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7633 if test `eval echo '${'$as_ac_var'}'` = yes; then
7634   cat >>confdefs.h <<EOF
7635 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7636 EOF
7637
7638 fi
7639 done
7640
7641 else
7642         echo "$as_me:7642: checking if link/symlink functions work" >&5
7643 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7644 if test "${cf_cv_link_funcs+set}" = set; then
7645   echo $ECHO_N "(cached) $ECHO_C" >&6
7646 else
7647
7648                 cf_cv_link_funcs=
7649                 for cf_func in link symlink ; do
7650                         if test "$cross_compiling" = yes; then
7651
7652                         eval 'ac_cv_func_'$cf_func'=error'
7653 else
7654   cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7657
7658 #include <sys/types.h>
7659 #include <sys/stat.h>
7660 #ifdef HAVE_UNISTD_H
7661 #include <unistd.h>
7662 #endif
7663 int main()
7664 {
7665         int fail = 0;
7666         char *src = "config.log";
7667         char *dst = "conftest.chk";
7668         struct stat src_sb;
7669         struct stat dst_sb;
7670
7671         stat(src, &src_sb);
7672         fail = ($cf_func("config.log", "conftest.chk") < 0)
7673             || (stat(dst, &dst_sb) < 0)
7674             || (dst_sb.st_mtime != src_sb.st_mtime);
7675 #ifdef HAVE_UNLINK
7676         unlink(dst);
7677 #else
7678         remove(dst);
7679 #endif
7680         ${cf_cv_main_return:-return} (fail);
7681 }
7682
7683 _ACEOF
7684 rm -f conftest$ac_exeext
7685 if { (eval echo "$as_me:7685: \"$ac_link\"") >&5
7686   (eval $ac_link) 2>&5
7687   ac_status=$?
7688   echo "$as_me:7688: \$? = $ac_status" >&5
7689   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7690   { (eval echo "$as_me:7690: \"$ac_try\"") >&5
7691   (eval $ac_try) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); }; }; then
7695
7696                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7697                         eval 'ac_cv_func_'$cf_func'=yes'
7698 else
7699   echo "$as_me: program exited with status $ac_status" >&5
7700 echo "$as_me: failed program was:" >&5
7701 cat conftest.$ac_ext >&5
7702
7703                         eval 'ac_cv_func_'$cf_func'=no'
7704 fi
7705 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7706 fi
7707                 done
7708                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7709
7710 fi
7711 echo "$as_me:7711: result: $cf_cv_link_funcs" >&5
7712 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7713         test "$ac_cv_func_link"    = yes &&
7714 cat >>confdefs.h <<\EOF
7715 #define HAVE_LINK 1
7716 EOF
7717
7718         test "$ac_cv_func_symlink" = yes &&
7719 cat >>confdefs.h <<\EOF
7720 #define HAVE_SYMLINK 1
7721 EOF
7722
7723 fi
7724
7725 with_links=no
7726 with_symlinks=no
7727
7728 # soft links (symbolic links) are useful for some systems where hard links do
7729 # not work, or to make it simpler to copy terminfo trees around.
7730 if test "x$ac_cv_func_symlink" = xyes ; then
7731         echo "$as_me:7731: checking if tic should use symbolic links" >&5
7732 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7733
7734 # Check whether --enable-symlinks or --disable-symlinks was given.
7735 if test "${enable_symlinks+set}" = set; then
7736   enableval="$enable_symlinks"
7737   with_symlinks=$enableval
7738 else
7739   with_symlinks=no
7740 fi;
7741         echo "$as_me:7741: result: $with_symlinks" >&5
7742 echo "${ECHO_T}$with_symlinks" >&6
7743 fi
7744
7745 # If we have hard links and did not choose to use soft links instead, there is
7746 # no reason to make this choice optional - use the hard links.
7747 if test "$with_symlinks" = no ; then
7748         echo "$as_me:7748: checking if tic should use hard links" >&5
7749 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7750         if test "x$ac_cv_func_link" = xyes ; then
7751                 with_links=yes
7752         else
7753                 with_links=no
7754         fi
7755         echo "$as_me:7755: result: $with_links" >&5
7756 echo "${ECHO_T}$with_links" >&6
7757 fi
7758
7759 test "x$with_links" = xyes &&
7760 cat >>confdefs.h <<\EOF
7761 #define USE_LINKS 1
7762 EOF
7763
7764 test "x$with_symlinks" = xyes &&
7765 cat >>confdefs.h <<\EOF
7766 #define USE_SYMLINKS 1
7767 EOF
7768
7769 ###   use option --enable-broken-linker to force on use of broken-linker support
7770 echo "$as_me:7770: checking if you want broken-linker support code" >&5
7771 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7772
7773 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7774 if test "${enable_broken_linker+set}" = set; then
7775   enableval="$enable_broken_linker"
7776   with_broken_linker=$enableval
7777 else
7778   with_broken_linker=${BROKEN_LINKER:-no}
7779 fi;
7780 echo "$as_me:7780: result: $with_broken_linker" >&5
7781 echo "${ECHO_T}$with_broken_linker" >&6
7782
7783 BROKEN_LINKER=0
7784 if test "x$with_broken_linker" = xyes ; then
7785
7786 cat >>confdefs.h <<\EOF
7787 #define BROKEN_LINKER 1
7788 EOF
7789
7790         BROKEN_LINKER=1
7791 elif test "$DFT_LWR_MODEL" = shared ; then
7792         case $cf_cv_system_name in
7793         (cygwin*)
7794
7795 cat >>confdefs.h <<\EOF
7796 #define BROKEN_LINKER 1
7797 EOF
7798
7799                 BROKEN_LINKER=1
7800                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7801
7802 echo "${as_me:-configure}:7802: testing cygwin linker is broken anyway ..." 1>&5
7803
7804                 ;;
7805         esac
7806 fi
7807
7808 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7809 echo "$as_me:7809: checking if tputs should process BSD-style prefix padding" >&5
7810 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7811
7812 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7813 if test "${enable_bsdpad+set}" = set; then
7814   enableval="$enable_bsdpad"
7815   with_bsdpad=$enableval
7816 else
7817   with_bsdpad=no
7818 fi;
7819 echo "$as_me:7819: result: $with_bsdpad" >&5
7820 echo "${ECHO_T}$with_bsdpad" >&6
7821 test "x$with_bsdpad" = xyes &&
7822 cat >>confdefs.h <<\EOF
7823 #define BSD_TPUTS 1
7824 EOF
7825
7826 ###   use option --enable-widec to turn on use of wide-character support
7827 NCURSES_CH_T=chtype
7828 NCURSES_LIBUTF8=0
7829
7830 NEED_WCHAR_H=0
7831 NCURSES_MBSTATE_T=0
7832 NCURSES_WCHAR_T=0
7833 NCURSES_WINT_T=0
7834
7835 # Check to define _XOPEN_SOURCE "automatically"
7836 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7837
7838 cf_XOPEN_SOURCE=500
7839 cf_POSIX_C_SOURCE=199506L
7840 cf_xopen_source=
7841
7842 case $host_os in
7843 (aix[4-7]*)
7844         cf_xopen_source="-D_ALL_SOURCE"
7845         ;;
7846 (cygwin|msys)
7847         cf_XOPEN_SOURCE=600
7848         ;;
7849 (darwin[0-8].*)
7850         cf_xopen_source="-D_APPLE_C_SOURCE"
7851         ;;
7852 (darwin*)
7853         cf_xopen_source="-D_DARWIN_C_SOURCE"
7854         cf_XOPEN_SOURCE=
7855         ;;
7856 (freebsd*|dragonfly*)
7857         # 5.x headers associate
7858         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7859         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7860         cf_POSIX_C_SOURCE=200112L
7861         cf_XOPEN_SOURCE=600
7862         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7863         ;;
7864 (hpux11*)
7865         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7866         ;;
7867 (hpux*)
7868         cf_xopen_source="-D_HPUX_SOURCE"
7869         ;;
7870 (irix[56].*)
7871         cf_xopen_source="-D_SGI_SOURCE"
7872         cf_XOPEN_SOURCE=
7873         ;;
7874 (linux*|gnu*|mint*|k*bsd*-gnu)
7875
7876 echo "$as_me:7876: checking if we must define _GNU_SOURCE" >&5
7877 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7878 if test "${cf_cv_gnu_source+set}" = set; then
7879   echo $ECHO_N "(cached) $ECHO_C" >&6
7880 else
7881
7882 cat >conftest.$ac_ext <<_ACEOF
7883 #line 7883 "configure"
7884 #include "confdefs.h"
7885 #include <sys/types.h>
7886 int
7887 main ()
7888 {
7889
7890 #ifndef _XOPEN_SOURCE
7891 make an error
7892 #endif
7893   ;
7894   return 0;
7895 }
7896 _ACEOF
7897 rm -f conftest.$ac_objext
7898 if { (eval echo "$as_me:7898: \"$ac_compile\"") >&5
7899   (eval $ac_compile) 2>&5
7900   ac_status=$?
7901   echo "$as_me:7901: \$? = $ac_status" >&5
7902   (exit $ac_status); } &&
7903          { ac_try='test -s conftest.$ac_objext'
7904   { (eval echo "$as_me:7904: \"$ac_try\"") >&5
7905   (eval $ac_try) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); }; }; then
7909   cf_cv_gnu_source=no
7910 else
7911   echo "$as_me: failed program was:" >&5
7912 cat conftest.$ac_ext >&5
7913 cf_save="$CPPFLAGS"
7914          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7915          cat >conftest.$ac_ext <<_ACEOF
7916 #line 7916 "configure"
7917 #include "confdefs.h"
7918 #include <sys/types.h>
7919 int
7920 main ()
7921 {
7922
7923 #ifdef _XOPEN_SOURCE
7924 make an error
7925 #endif
7926   ;
7927   return 0;
7928 }
7929 _ACEOF
7930 rm -f conftest.$ac_objext
7931 if { (eval echo "$as_me:7931: \"$ac_compile\"") >&5
7932   (eval $ac_compile) 2>&5
7933   ac_status=$?
7934   echo "$as_me:7934: \$? = $ac_status" >&5
7935   (exit $ac_status); } &&
7936          { ac_try='test -s conftest.$ac_objext'
7937   { (eval echo "$as_me:7937: \"$ac_try\"") >&5
7938   (eval $ac_try) 2>&5
7939   ac_status=$?
7940   echo "$as_me:7940: \$? = $ac_status" >&5
7941   (exit $ac_status); }; }; then
7942   cf_cv_gnu_source=no
7943 else
7944   echo "$as_me: failed program was:" >&5
7945 cat conftest.$ac_ext >&5
7946 cf_cv_gnu_source=yes
7947 fi
7948 rm -f conftest.$ac_objext conftest.$ac_ext
7949         CPPFLAGS="$cf_save"
7950
7951 fi
7952 rm -f conftest.$ac_objext conftest.$ac_ext
7953
7954 fi
7955 echo "$as_me:7955: result: $cf_cv_gnu_source" >&5
7956 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7957 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7958
7959         ;;
7960 (minix*)
7961         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7962         ;;
7963 (mirbsd*)
7964         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7965         cf_XOPEN_SOURCE=
7966
7967 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7968
7969 cf_save_CFLAGS="$CFLAGS"
7970 cf_save_CPPFLAGS="$CPPFLAGS"
7971
7972 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7973         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7974                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7975
7976 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7977         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7978                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7979
7980 echo "$as_me:7980: checking if we should define _POSIX_C_SOURCE" >&5
7981 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7982 if test "${cf_cv_posix_c_source+set}" = set; then
7983   echo $ECHO_N "(cached) $ECHO_C" >&6
7984 else
7985
7986 echo "${as_me:-configure}:7986: testing if the symbol is already defined go no further ..." 1>&5
7987
7988         cat >conftest.$ac_ext <<_ACEOF
7989 #line 7989 "configure"
7990 #include "confdefs.h"
7991 #include <sys/types.h>
7992 int
7993 main ()
7994 {
7995
7996 #ifndef _POSIX_C_SOURCE
7997 make an error
7998 #endif
7999   ;
8000   return 0;
8001 }
8002 _ACEOF
8003 rm -f conftest.$ac_objext
8004 if { (eval echo "$as_me:8004: \"$ac_compile\"") >&5
8005   (eval $ac_compile) 2>&5
8006   ac_status=$?
8007   echo "$as_me:8007: \$? = $ac_status" >&5
8008   (exit $ac_status); } &&
8009          { ac_try='test -s conftest.$ac_objext'
8010   { (eval echo "$as_me:8010: \"$ac_try\"") >&5
8011   (eval $ac_try) 2>&5
8012   ac_status=$?
8013   echo "$as_me:8013: \$? = $ac_status" >&5
8014   (exit $ac_status); }; }; then
8015   cf_cv_posix_c_source=no
8016 else
8017   echo "$as_me: failed program was:" >&5
8018 cat conftest.$ac_ext >&5
8019 cf_want_posix_source=no
8020          case .$cf_POSIX_C_SOURCE in
8021          (.[12]??*)
8022                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8023                 ;;
8024          (.2)
8025                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8026                 cf_want_posix_source=yes
8027                 ;;
8028          (.*)
8029                 cf_want_posix_source=yes
8030                 ;;
8031          esac
8032          if test "$cf_want_posix_source" = yes ; then
8033                 cat >conftest.$ac_ext <<_ACEOF
8034 #line 8034 "configure"
8035 #include "confdefs.h"
8036 #include <sys/types.h>
8037 int
8038 main ()
8039 {
8040
8041 #ifdef _POSIX_SOURCE
8042 make an error
8043 #endif
8044   ;
8045   return 0;
8046 }
8047 _ACEOF
8048 rm -f conftest.$ac_objext
8049 if { (eval echo "$as_me:8049: \"$ac_compile\"") >&5
8050   (eval $ac_compile) 2>&5
8051   ac_status=$?
8052   echo "$as_me:8052: \$? = $ac_status" >&5
8053   (exit $ac_status); } &&
8054          { ac_try='test -s conftest.$ac_objext'
8055   { (eval echo "$as_me:8055: \"$ac_try\"") >&5
8056   (eval $ac_try) 2>&5
8057   ac_status=$?
8058   echo "$as_me:8058: \$? = $ac_status" >&5
8059   (exit $ac_status); }; }; then
8060   :
8061 else
8062   echo "$as_me: failed program was:" >&5
8063 cat conftest.$ac_ext >&5
8064 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8065 fi
8066 rm -f conftest.$ac_objext conftest.$ac_ext
8067          fi
8068
8069 echo "${as_me:-configure}:8069: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8070
8071          CFLAGS="$cf_trim_CFLAGS"
8072          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8073
8074 echo "${as_me:-configure}:8074: testing if the second compile does not leave our definition intact error ..." 1>&5
8075
8076          cat >conftest.$ac_ext <<_ACEOF
8077 #line 8077 "configure"
8078 #include "confdefs.h"
8079 #include <sys/types.h>
8080 int
8081 main ()
8082 {
8083
8084 #ifndef _POSIX_C_SOURCE
8085 make an error
8086 #endif
8087   ;
8088   return 0;
8089 }
8090 _ACEOF
8091 rm -f conftest.$ac_objext
8092 if { (eval echo "$as_me:8092: \"$ac_compile\"") >&5
8093   (eval $ac_compile) 2>&5
8094   ac_status=$?
8095   echo "$as_me:8095: \$? = $ac_status" >&5
8096   (exit $ac_status); } &&
8097          { ac_try='test -s conftest.$ac_objext'
8098   { (eval echo "$as_me:8098: \"$ac_try\"") >&5
8099   (eval $ac_try) 2>&5
8100   ac_status=$?
8101   echo "$as_me:8101: \$? = $ac_status" >&5
8102   (exit $ac_status); }; }; then
8103   :
8104 else
8105   echo "$as_me: failed program was:" >&5
8106 cat conftest.$ac_ext >&5
8107 cf_cv_posix_c_source=no
8108 fi
8109 rm -f conftest.$ac_objext conftest.$ac_ext
8110          CFLAGS="$cf_save_CFLAGS"
8111          CPPFLAGS="$cf_save_CPPFLAGS"
8112
8113 fi
8114 rm -f conftest.$ac_objext conftest.$ac_ext
8115
8116 fi
8117 echo "$as_me:8117: result: $cf_cv_posix_c_source" >&5
8118 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8119
8120 if test "$cf_cv_posix_c_source" != no ; then
8121         CFLAGS="$cf_trim_CFLAGS"
8122         CPPFLAGS="$cf_trim_CPPFLAGS"
8123
8124 cf_fix_cppflags=no
8125 cf_new_cflags=
8126 cf_new_cppflags=
8127 cf_new_extra_cppflags=
8128
8129 for cf_add_cflags in $cf_cv_posix_c_source
8130 do
8131 case $cf_fix_cppflags in
8132 (no)
8133         case $cf_add_cflags in
8134         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8135                 case $cf_add_cflags in
8136                 (-D*)
8137                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8138
8139                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8140                                 && test -z "${cf_tst_cflags}" \
8141                                 && cf_fix_cppflags=yes
8142
8143                         if test $cf_fix_cppflags = yes ; then
8144                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8145                                 continue
8146                         elif test "${cf_tst_cflags}" = "\"'" ; then
8147                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8148                                 continue
8149                         fi
8150                         ;;
8151                 esac
8152                 case "$CPPFLAGS" in
8153                 (*$cf_add_cflags)
8154                         ;;
8155                 (*)
8156                         case $cf_add_cflags in
8157                         (-D*)
8158                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8159
8160 CPPFLAGS=`echo "$CPPFLAGS" | \
8161         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8162                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8163
8164                                 ;;
8165                         esac
8166                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8167                         ;;
8168                 esac
8169                 ;;
8170         (*)
8171                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8172                 ;;
8173         esac
8174         ;;
8175 (yes)
8176         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8177
8178         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8179
8180         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8181                 && test -z "${cf_tst_cflags}" \
8182                 && cf_fix_cppflags=no
8183         ;;
8184 esac
8185 done
8186
8187 if test -n "$cf_new_cflags" ; then
8188
8189         CFLAGS="$CFLAGS $cf_new_cflags"
8190 fi
8191
8192 if test -n "$cf_new_cppflags" ; then
8193
8194         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8195 fi
8196
8197 if test -n "$cf_new_extra_cppflags" ; then
8198
8199         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8200 fi
8201
8202 fi
8203
8204         ;;
8205 (netbsd*)
8206         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8207         ;;
8208 (openbsd[4-9]*)
8209         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8210         cf_xopen_source="-D_BSD_SOURCE"
8211         cf_XOPEN_SOURCE=600
8212         ;;
8213 (openbsd*)
8214         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8215         ;;
8216 (osf[45]*)
8217         cf_xopen_source="-D_OSF_SOURCE"
8218         ;;
8219 (nto-qnx*)
8220         cf_xopen_source="-D_QNX_SOURCE"
8221         ;;
8222 (sco*)
8223         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8224         ;;
8225 (solaris2.*)
8226         cf_xopen_source="-D__EXTENSIONS__"
8227         cf_cv_xopen_source=broken
8228         ;;
8229 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8230         cf_XOPEN_SOURCE=
8231         cf_POSIX_C_SOURCE=
8232         ;;
8233 (*)
8234
8235 echo "$as_me:8235: checking if we should define _XOPEN_SOURCE" >&5
8236 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8237 if test "${cf_cv_xopen_source+set}" = set; then
8238   echo $ECHO_N "(cached) $ECHO_C" >&6
8239 else
8240
8241         cat >conftest.$ac_ext <<_ACEOF
8242 #line 8242 "configure"
8243 #include "confdefs.h"
8244
8245 #include <stdlib.h>
8246 #include <string.h>
8247 #include <sys/types.h>
8248
8249 int
8250 main ()
8251 {
8252
8253 #ifndef _XOPEN_SOURCE
8254 make an error
8255 #endif
8256   ;
8257   return 0;
8258 }
8259 _ACEOF
8260 rm -f conftest.$ac_objext
8261 if { (eval echo "$as_me:8261: \"$ac_compile\"") >&5
8262   (eval $ac_compile) 2>&5
8263   ac_status=$?
8264   echo "$as_me:8264: \$? = $ac_status" >&5
8265   (exit $ac_status); } &&
8266          { ac_try='test -s conftest.$ac_objext'
8267   { (eval echo "$as_me:8267: \"$ac_try\"") >&5
8268   (eval $ac_try) 2>&5
8269   ac_status=$?
8270   echo "$as_me:8270: \$? = $ac_status" >&5
8271   (exit $ac_status); }; }; then
8272   cf_cv_xopen_source=no
8273 else
8274   echo "$as_me: failed program was:" >&5
8275 cat conftest.$ac_ext >&5
8276 cf_save="$CPPFLAGS"
8277          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8278          cat >conftest.$ac_ext <<_ACEOF
8279 #line 8279 "configure"
8280 #include "confdefs.h"
8281
8282 #include <stdlib.h>
8283 #include <string.h>
8284 #include <sys/types.h>
8285
8286 int
8287 main ()
8288 {
8289
8290 #ifdef _XOPEN_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   cf_cv_xopen_source=no
8310 else
8311   echo "$as_me: failed program was:" >&5
8312 cat conftest.$ac_ext >&5
8313 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8314 fi
8315 rm -f conftest.$ac_objext conftest.$ac_ext
8316         CPPFLAGS="$cf_save"
8317
8318 fi
8319 rm -f conftest.$ac_objext conftest.$ac_ext
8320
8321 fi
8322 echo "$as_me:8322: result: $cf_cv_xopen_source" >&5
8323 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8324
8325 if test "$cf_cv_xopen_source" != no ; then
8326
8327 CFLAGS=`echo "$CFLAGS" | \
8328         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8329                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8330
8331 CPPFLAGS=`echo "$CPPFLAGS" | \
8332         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8333                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8334
8335         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8336
8337 cf_fix_cppflags=no
8338 cf_new_cflags=
8339 cf_new_cppflags=
8340 cf_new_extra_cppflags=
8341
8342 for cf_add_cflags in $cf_temp_xopen_source
8343 do
8344 case $cf_fix_cppflags in
8345 (no)
8346         case $cf_add_cflags in
8347         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8348                 case $cf_add_cflags in
8349                 (-D*)
8350                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8351
8352                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8353                                 && test -z "${cf_tst_cflags}" \
8354                                 && cf_fix_cppflags=yes
8355
8356                         if test $cf_fix_cppflags = yes ; then
8357                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8358                                 continue
8359                         elif test "${cf_tst_cflags}" = "\"'" ; then
8360                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8361                                 continue
8362                         fi
8363                         ;;
8364                 esac
8365                 case "$CPPFLAGS" in
8366                 (*$cf_add_cflags)
8367                         ;;
8368                 (*)
8369                         case $cf_add_cflags in
8370                         (-D*)
8371                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8372
8373 CPPFLAGS=`echo "$CPPFLAGS" | \
8374         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8375                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8376
8377                                 ;;
8378                         esac
8379                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8380                         ;;
8381                 esac
8382                 ;;
8383         (*)
8384                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8385                 ;;
8386         esac
8387         ;;
8388 (yes)
8389         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8390
8391         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8392
8393         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8394                 && test -z "${cf_tst_cflags}" \
8395                 && cf_fix_cppflags=no
8396         ;;
8397 esac
8398 done
8399
8400 if test -n "$cf_new_cflags" ; then
8401
8402         CFLAGS="$CFLAGS $cf_new_cflags"
8403 fi
8404
8405 if test -n "$cf_new_cppflags" ; then
8406
8407         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8408 fi
8409
8410 if test -n "$cf_new_extra_cppflags" ; then
8411
8412         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8413 fi
8414
8415 fi
8416
8417 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8418
8419 cf_save_CFLAGS="$CFLAGS"
8420 cf_save_CPPFLAGS="$CPPFLAGS"
8421
8422 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8423         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8424                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8425
8426 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8427         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8428                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8429
8430 echo "$as_me:8430: checking if we should define _POSIX_C_SOURCE" >&5
8431 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8432 if test "${cf_cv_posix_c_source+set}" = set; then
8433   echo $ECHO_N "(cached) $ECHO_C" >&6
8434 else
8435
8436 echo "${as_me:-configure}:8436: testing if the symbol is already defined go no further ..." 1>&5
8437
8438         cat >conftest.$ac_ext <<_ACEOF
8439 #line 8439 "configure"
8440 #include "confdefs.h"
8441 #include <sys/types.h>
8442 int
8443 main ()
8444 {
8445
8446 #ifndef _POSIX_C_SOURCE
8447 make an error
8448 #endif
8449   ;
8450   return 0;
8451 }
8452 _ACEOF
8453 rm -f conftest.$ac_objext
8454 if { (eval echo "$as_me:8454: \"$ac_compile\"") >&5
8455   (eval $ac_compile) 2>&5
8456   ac_status=$?
8457   echo "$as_me:8457: \$? = $ac_status" >&5
8458   (exit $ac_status); } &&
8459          { ac_try='test -s conftest.$ac_objext'
8460   { (eval echo "$as_me:8460: \"$ac_try\"") >&5
8461   (eval $ac_try) 2>&5
8462   ac_status=$?
8463   echo "$as_me:8463: \$? = $ac_status" >&5
8464   (exit $ac_status); }; }; then
8465   cf_cv_posix_c_source=no
8466 else
8467   echo "$as_me: failed program was:" >&5
8468 cat conftest.$ac_ext >&5
8469 cf_want_posix_source=no
8470          case .$cf_POSIX_C_SOURCE in
8471          (.[12]??*)
8472                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8473                 ;;
8474          (.2)
8475                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8476                 cf_want_posix_source=yes
8477                 ;;
8478          (.*)
8479                 cf_want_posix_source=yes
8480                 ;;
8481          esac
8482          if test "$cf_want_posix_source" = yes ; then
8483                 cat >conftest.$ac_ext <<_ACEOF
8484 #line 8484 "configure"
8485 #include "confdefs.h"
8486 #include <sys/types.h>
8487 int
8488 main ()
8489 {
8490
8491 #ifdef _POSIX_SOURCE
8492 make an error
8493 #endif
8494   ;
8495   return 0;
8496 }
8497 _ACEOF
8498 rm -f conftest.$ac_objext
8499 if { (eval echo "$as_me:8499: \"$ac_compile\"") >&5
8500   (eval $ac_compile) 2>&5
8501   ac_status=$?
8502   echo "$as_me:8502: \$? = $ac_status" >&5
8503   (exit $ac_status); } &&
8504          { ac_try='test -s conftest.$ac_objext'
8505   { (eval echo "$as_me:8505: \"$ac_try\"") >&5
8506   (eval $ac_try) 2>&5
8507   ac_status=$?
8508   echo "$as_me:8508: \$? = $ac_status" >&5
8509   (exit $ac_status); }; }; then
8510   :
8511 else
8512   echo "$as_me: failed program was:" >&5
8513 cat conftest.$ac_ext >&5
8514 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8515 fi
8516 rm -f conftest.$ac_objext conftest.$ac_ext
8517          fi
8518
8519 echo "${as_me:-configure}:8519: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8520
8521          CFLAGS="$cf_trim_CFLAGS"
8522          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8523
8524 echo "${as_me:-configure}:8524: testing if the second compile does not leave our definition intact error ..." 1>&5
8525
8526          cat >conftest.$ac_ext <<_ACEOF
8527 #line 8527 "configure"
8528 #include "confdefs.h"
8529 #include <sys/types.h>
8530 int
8531 main ()
8532 {
8533
8534 #ifndef _POSIX_C_SOURCE
8535 make an error
8536 #endif
8537   ;
8538   return 0;
8539 }
8540 _ACEOF
8541 rm -f conftest.$ac_objext
8542 if { (eval echo "$as_me:8542: \"$ac_compile\"") >&5
8543   (eval $ac_compile) 2>&5
8544   ac_status=$?
8545   echo "$as_me:8545: \$? = $ac_status" >&5
8546   (exit $ac_status); } &&
8547          { ac_try='test -s conftest.$ac_objext'
8548   { (eval echo "$as_me:8548: \"$ac_try\"") >&5
8549   (eval $ac_try) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); }; }; then
8553   :
8554 else
8555   echo "$as_me: failed program was:" >&5
8556 cat conftest.$ac_ext >&5
8557 cf_cv_posix_c_source=no
8558 fi
8559 rm -f conftest.$ac_objext conftest.$ac_ext
8560          CFLAGS="$cf_save_CFLAGS"
8561          CPPFLAGS="$cf_save_CPPFLAGS"
8562
8563 fi
8564 rm -f conftest.$ac_objext conftest.$ac_ext
8565
8566 fi
8567 echo "$as_me:8567: result: $cf_cv_posix_c_source" >&5
8568 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8569
8570 if test "$cf_cv_posix_c_source" != no ; then
8571         CFLAGS="$cf_trim_CFLAGS"
8572         CPPFLAGS="$cf_trim_CPPFLAGS"
8573
8574 cf_fix_cppflags=no
8575 cf_new_cflags=
8576 cf_new_cppflags=
8577 cf_new_extra_cppflags=
8578
8579 for cf_add_cflags in $cf_cv_posix_c_source
8580 do
8581 case $cf_fix_cppflags in
8582 (no)
8583         case $cf_add_cflags in
8584         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8585                 case $cf_add_cflags in
8586                 (-D*)
8587                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8588
8589                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8590                                 && test -z "${cf_tst_cflags}" \
8591                                 && cf_fix_cppflags=yes
8592
8593                         if test $cf_fix_cppflags = yes ; then
8594                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8595                                 continue
8596                         elif test "${cf_tst_cflags}" = "\"'" ; then
8597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8598                                 continue
8599                         fi
8600                         ;;
8601                 esac
8602                 case "$CPPFLAGS" in
8603                 (*$cf_add_cflags)
8604                         ;;
8605                 (*)
8606                         case $cf_add_cflags in
8607                         (-D*)
8608                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8609
8610 CPPFLAGS=`echo "$CPPFLAGS" | \
8611         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8612                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8613
8614                                 ;;
8615                         esac
8616                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8617                         ;;
8618                 esac
8619                 ;;
8620         (*)
8621                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8622                 ;;
8623         esac
8624         ;;
8625 (yes)
8626         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8627
8628         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8629
8630         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8631                 && test -z "${cf_tst_cflags}" \
8632                 && cf_fix_cppflags=no
8633         ;;
8634 esac
8635 done
8636
8637 if test -n "$cf_new_cflags" ; then
8638
8639         CFLAGS="$CFLAGS $cf_new_cflags"
8640 fi
8641
8642 if test -n "$cf_new_cppflags" ; then
8643
8644         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8645 fi
8646
8647 if test -n "$cf_new_extra_cppflags" ; then
8648
8649         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8650 fi
8651
8652 fi
8653
8654         ;;
8655 esac
8656
8657 if test -n "$cf_xopen_source" ; then
8658
8659 cf_fix_cppflags=no
8660 cf_new_cflags=
8661 cf_new_cppflags=
8662 cf_new_extra_cppflags=
8663
8664 for cf_add_cflags in $cf_xopen_source
8665 do
8666 case $cf_fix_cppflags in
8667 (no)
8668         case $cf_add_cflags in
8669         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8670                 case $cf_add_cflags in
8671                 (-D*)
8672                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8673
8674                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8675                                 && test -z "${cf_tst_cflags}" \
8676                                 && cf_fix_cppflags=yes
8677
8678                         if test $cf_fix_cppflags = yes ; then
8679                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8680                                 continue
8681                         elif test "${cf_tst_cflags}" = "\"'" ; then
8682                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8683                                 continue
8684                         fi
8685                         ;;
8686                 esac
8687                 case "$CPPFLAGS" in
8688                 (*$cf_add_cflags)
8689                         ;;
8690                 (*)
8691                         case $cf_add_cflags in
8692                         (-D*)
8693                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8694
8695 CPPFLAGS=`echo "$CPPFLAGS" | \
8696         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8697                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8698
8699                                 ;;
8700                         esac
8701                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8702                         ;;
8703                 esac
8704                 ;;
8705         (*)
8706                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8707                 ;;
8708         esac
8709         ;;
8710 (yes)
8711         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8712
8713         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8714
8715         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8716                 && test -z "${cf_tst_cflags}" \
8717                 && cf_fix_cppflags=no
8718         ;;
8719 esac
8720 done
8721
8722 if test -n "$cf_new_cflags" ; then
8723         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8724
8725 echo "${as_me:-configure}:8725: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8726
8727         CFLAGS="$CFLAGS $cf_new_cflags"
8728 fi
8729
8730 if test -n "$cf_new_cppflags" ; then
8731         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8732
8733 echo "${as_me:-configure}:8733: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8734
8735         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8736 fi
8737
8738 if test -n "$cf_new_extra_cppflags" ; then
8739         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8740
8741 echo "${as_me:-configure}:8741: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8742
8743         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8744 fi
8745
8746 fi
8747
8748 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8749         echo "$as_me:8749: checking if _XOPEN_SOURCE really is set" >&5
8750 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8751         cat >conftest.$ac_ext <<_ACEOF
8752 #line 8752 "configure"
8753 #include "confdefs.h"
8754 #include <stdlib.h>
8755 int
8756 main ()
8757 {
8758
8759 #ifndef _XOPEN_SOURCE
8760 make an error
8761 #endif
8762   ;
8763   return 0;
8764 }
8765 _ACEOF
8766 rm -f conftest.$ac_objext
8767 if { (eval echo "$as_me:8767: \"$ac_compile\"") >&5
8768   (eval $ac_compile) 2>&5
8769   ac_status=$?
8770   echo "$as_me:8770: \$? = $ac_status" >&5
8771   (exit $ac_status); } &&
8772          { ac_try='test -s conftest.$ac_objext'
8773   { (eval echo "$as_me:8773: \"$ac_try\"") >&5
8774   (eval $ac_try) 2>&5
8775   ac_status=$?
8776   echo "$as_me:8776: \$? = $ac_status" >&5
8777   (exit $ac_status); }; }; then
8778   cf_XOPEN_SOURCE_set=yes
8779 else
8780   echo "$as_me: failed program was:" >&5
8781 cat conftest.$ac_ext >&5
8782 cf_XOPEN_SOURCE_set=no
8783 fi
8784 rm -f conftest.$ac_objext conftest.$ac_ext
8785         echo "$as_me:8785: result: $cf_XOPEN_SOURCE_set" >&5
8786 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8787         if test $cf_XOPEN_SOURCE_set = yes
8788         then
8789                 cat >conftest.$ac_ext <<_ACEOF
8790 #line 8790 "configure"
8791 #include "confdefs.h"
8792 #include <stdlib.h>
8793 int
8794 main ()
8795 {
8796
8797 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8798 make an error
8799 #endif
8800   ;
8801   return 0;
8802 }
8803 _ACEOF
8804 rm -f conftest.$ac_objext
8805 if { (eval echo "$as_me:8805: \"$ac_compile\"") >&5
8806   (eval $ac_compile) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit $ac_status); } &&
8810          { ac_try='test -s conftest.$ac_objext'
8811   { (eval echo "$as_me:8811: \"$ac_try\"") >&5
8812   (eval $ac_try) 2>&5
8813   ac_status=$?
8814   echo "$as_me:8814: \$? = $ac_status" >&5
8815   (exit $ac_status); }; }; then
8816   cf_XOPEN_SOURCE_set_ok=yes
8817 else
8818   echo "$as_me: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8820 cf_XOPEN_SOURCE_set_ok=no
8821 fi
8822 rm -f conftest.$ac_objext conftest.$ac_ext
8823                 if test $cf_XOPEN_SOURCE_set_ok = no
8824                 then
8825                         { echo "$as_me:8825: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8826 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8827                 fi
8828         else
8829
8830 echo "$as_me:8830: checking if we should define _XOPEN_SOURCE" >&5
8831 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8832 if test "${cf_cv_xopen_source+set}" = set; then
8833   echo $ECHO_N "(cached) $ECHO_C" >&6
8834 else
8835
8836         cat >conftest.$ac_ext <<_ACEOF
8837 #line 8837 "configure"
8838 #include "confdefs.h"
8839
8840 #include <stdlib.h>
8841 #include <string.h>
8842 #include <sys/types.h>
8843
8844 int
8845 main ()
8846 {
8847
8848 #ifndef _XOPEN_SOURCE
8849 make an error
8850 #endif
8851   ;
8852   return 0;
8853 }
8854 _ACEOF
8855 rm -f conftest.$ac_objext
8856 if { (eval echo "$as_me:8856: \"$ac_compile\"") >&5
8857   (eval $ac_compile) 2>&5
8858   ac_status=$?
8859   echo "$as_me:8859: \$? = $ac_status" >&5
8860   (exit $ac_status); } &&
8861          { ac_try='test -s conftest.$ac_objext'
8862   { (eval echo "$as_me:8862: \"$ac_try\"") >&5
8863   (eval $ac_try) 2>&5
8864   ac_status=$?
8865   echo "$as_me:8865: \$? = $ac_status" >&5
8866   (exit $ac_status); }; }; then
8867   cf_cv_xopen_source=no
8868 else
8869   echo "$as_me: failed program was:" >&5
8870 cat conftest.$ac_ext >&5
8871 cf_save="$CPPFLAGS"
8872          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8873          cat >conftest.$ac_ext <<_ACEOF
8874 #line 8874 "configure"
8875 #include "confdefs.h"
8876
8877 #include <stdlib.h>
8878 #include <string.h>
8879 #include <sys/types.h>
8880
8881 int
8882 main ()
8883 {
8884
8885 #ifdef _XOPEN_SOURCE
8886 make an error
8887 #endif
8888   ;
8889   return 0;
8890 }
8891 _ACEOF
8892 rm -f conftest.$ac_objext
8893 if { (eval echo "$as_me:8893: \"$ac_compile\"") >&5
8894   (eval $ac_compile) 2>&5
8895   ac_status=$?
8896   echo "$as_me:8896: \$? = $ac_status" >&5
8897   (exit $ac_status); } &&
8898          { ac_try='test -s conftest.$ac_objext'
8899   { (eval echo "$as_me:8899: \"$ac_try\"") >&5
8900   (eval $ac_try) 2>&5
8901   ac_status=$?
8902   echo "$as_me:8902: \$? = $ac_status" >&5
8903   (exit $ac_status); }; }; then
8904   cf_cv_xopen_source=no
8905 else
8906   echo "$as_me: failed program was:" >&5
8907 cat conftest.$ac_ext >&5
8908 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8909 fi
8910 rm -f conftest.$ac_objext conftest.$ac_ext
8911         CPPFLAGS="$cf_save"
8912
8913 fi
8914 rm -f conftest.$ac_objext conftest.$ac_ext
8915
8916 fi
8917 echo "$as_me:8917: result: $cf_cv_xopen_source" >&5
8918 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8919
8920 if test "$cf_cv_xopen_source" != no ; then
8921
8922 CFLAGS=`echo "$CFLAGS" | \
8923         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8924                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8925
8926 CPPFLAGS=`echo "$CPPFLAGS" | \
8927         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8928                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8929
8930         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8931
8932 cf_fix_cppflags=no
8933 cf_new_cflags=
8934 cf_new_cppflags=
8935 cf_new_extra_cppflags=
8936
8937 for cf_add_cflags in $cf_temp_xopen_source
8938 do
8939 case $cf_fix_cppflags in
8940 (no)
8941         case $cf_add_cflags in
8942         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8943                 case $cf_add_cflags in
8944                 (-D*)
8945                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8946
8947                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8948                                 && test -z "${cf_tst_cflags}" \
8949                                 && cf_fix_cppflags=yes
8950
8951                         if test $cf_fix_cppflags = yes ; then
8952                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8953                                 continue
8954                         elif test "${cf_tst_cflags}" = "\"'" ; then
8955                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8956                                 continue
8957                         fi
8958                         ;;
8959                 esac
8960                 case "$CPPFLAGS" in
8961                 (*$cf_add_cflags)
8962                         ;;
8963                 (*)
8964                         case $cf_add_cflags in
8965                         (-D*)
8966                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8967
8968 CPPFLAGS=`echo "$CPPFLAGS" | \
8969         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8970                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8971
8972                                 ;;
8973                         esac
8974                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8975                         ;;
8976                 esac
8977                 ;;
8978         (*)
8979                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8980                 ;;
8981         esac
8982         ;;
8983 (yes)
8984         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8985
8986         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8987
8988         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8989                 && test -z "${cf_tst_cflags}" \
8990                 && cf_fix_cppflags=no
8991         ;;
8992 esac
8993 done
8994
8995 if test -n "$cf_new_cflags" ; then
8996
8997         CFLAGS="$CFLAGS $cf_new_cflags"
8998 fi
8999
9000 if test -n "$cf_new_cppflags" ; then
9001
9002         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9003 fi
9004
9005 if test -n "$cf_new_extra_cppflags" ; then
9006
9007         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9008 fi
9009
9010 fi
9011
9012         fi
9013 fi
9014
9015 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9016
9017 # Work around breakage on OS X
9018
9019 echo "$as_me:9019: checking if SIGWINCH is defined" >&5
9020 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9021 if test "${cf_cv_define_sigwinch+set}" = set; then
9022   echo $ECHO_N "(cached) $ECHO_C" >&6
9023 else
9024
9025         cat >conftest.$ac_ext <<_ACEOF
9026 #line 9026 "configure"
9027 #include "confdefs.h"
9028
9029 #include <sys/types.h>
9030 #include <sys/signal.h>
9031
9032 int
9033 main ()
9034 {
9035 int x = SIGWINCH
9036   ;
9037   return 0;
9038 }
9039 _ACEOF
9040 rm -f conftest.$ac_objext
9041 if { (eval echo "$as_me:9041: \"$ac_compile\"") >&5
9042   (eval $ac_compile) 2>&5
9043   ac_status=$?
9044   echo "$as_me:9044: \$? = $ac_status" >&5
9045   (exit $ac_status); } &&
9046          { ac_try='test -s conftest.$ac_objext'
9047   { (eval echo "$as_me:9047: \"$ac_try\"") >&5
9048   (eval $ac_try) 2>&5
9049   ac_status=$?
9050   echo "$as_me:9050: \$? = $ac_status" >&5
9051   (exit $ac_status); }; }; then
9052   cf_cv_define_sigwinch=yes
9053 else
9054   echo "$as_me: failed program was:" >&5
9055 cat conftest.$ac_ext >&5
9056 cat >conftest.$ac_ext <<_ACEOF
9057 #line 9057 "configure"
9058 #include "confdefs.h"
9059
9060 #undef _XOPEN_SOURCE
9061 #undef _POSIX_SOURCE
9062 #undef _POSIX_C_SOURCE
9063 #include <sys/types.h>
9064 #include <sys/signal.h>
9065
9066 int
9067 main ()
9068 {
9069 int x = SIGWINCH
9070   ;
9071   return 0;
9072 }
9073 _ACEOF
9074 rm -f conftest.$ac_objext
9075 if { (eval echo "$as_me:9075: \"$ac_compile\"") >&5
9076   (eval $ac_compile) 2>&5
9077   ac_status=$?
9078   echo "$as_me:9078: \$? = $ac_status" >&5
9079   (exit $ac_status); } &&
9080          { ac_try='test -s conftest.$ac_objext'
9081   { (eval echo "$as_me:9081: \"$ac_try\"") >&5
9082   (eval $ac_try) 2>&5
9083   ac_status=$?
9084   echo "$as_me:9084: \$? = $ac_status" >&5
9085   (exit $ac_status); }; }; then
9086   cf_cv_define_sigwinch=maybe
9087 else
9088   echo "$as_me: failed program was:" >&5
9089 cat conftest.$ac_ext >&5
9090 cf_cv_define_sigwinch=no
9091 fi
9092 rm -f conftest.$ac_objext conftest.$ac_ext
9093
9094 fi
9095 rm -f conftest.$ac_objext conftest.$ac_ext
9096
9097 fi
9098 echo "$as_me:9098: result: $cf_cv_define_sigwinch" >&5
9099 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9100
9101 if test "$cf_cv_define_sigwinch" = maybe ; then
9102 echo "$as_me:9102: checking for actual SIGWINCH definition" >&5
9103 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9104 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9105   echo $ECHO_N "(cached) $ECHO_C" >&6
9106 else
9107
9108 cf_cv_fixup_sigwinch=unknown
9109 cf_sigwinch=32
9110 while test $cf_sigwinch != 1
9111 do
9112         cat >conftest.$ac_ext <<_ACEOF
9113 #line 9113 "configure"
9114 #include "confdefs.h"
9115
9116 #undef _XOPEN_SOURCE
9117 #undef _POSIX_SOURCE
9118 #undef _POSIX_C_SOURCE
9119 #include <sys/types.h>
9120 #include <sys/signal.h>
9121
9122 int
9123 main ()
9124 {
9125
9126 #if SIGWINCH != $cf_sigwinch
9127 make an error
9128 #endif
9129 int x = SIGWINCH
9130   ;
9131   return 0;
9132 }
9133 _ACEOF
9134 rm -f conftest.$ac_objext
9135 if { (eval echo "$as_me:9135: \"$ac_compile\"") >&5
9136   (eval $ac_compile) 2>&5
9137   ac_status=$?
9138   echo "$as_me:9138: \$? = $ac_status" >&5
9139   (exit $ac_status); } &&
9140          { ac_try='test -s conftest.$ac_objext'
9141   { (eval echo "$as_me:9141: \"$ac_try\"") >&5
9142   (eval $ac_try) 2>&5
9143   ac_status=$?
9144   echo "$as_me:9144: \$? = $ac_status" >&5
9145   (exit $ac_status); }; }; then
9146   cf_cv_fixup_sigwinch=$cf_sigwinch
9147          break
9148 else
9149   echo "$as_me: failed program was:" >&5
9150 cat conftest.$ac_ext >&5
9151 fi
9152 rm -f conftest.$ac_objext conftest.$ac_ext
9153
9154 cf_sigwinch=`expr $cf_sigwinch - 1`
9155 done
9156
9157 fi
9158 echo "$as_me:9158: result: $cf_cv_fixup_sigwinch" >&5
9159 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9160
9161         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9162                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9163         fi
9164 fi
9165
9166 # Checks for CODESET support.
9167
9168 echo "$as_me:9168: checking for nl_langinfo and CODESET" >&5
9169 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9170 if test "${am_cv_langinfo_codeset+set}" = set; then
9171   echo $ECHO_N "(cached) $ECHO_C" >&6
9172 else
9173   cat >conftest.$ac_ext <<_ACEOF
9174 #line 9174 "configure"
9175 #include "confdefs.h"
9176 #include <langinfo.h>
9177 int
9178 main ()
9179 {
9180 char* cs = nl_langinfo(CODESET);
9181   ;
9182   return 0;
9183 }
9184 _ACEOF
9185 rm -f conftest.$ac_objext conftest$ac_exeext
9186 if { (eval echo "$as_me:9186: \"$ac_link\"") >&5
9187   (eval $ac_link) 2>&5
9188   ac_status=$?
9189   echo "$as_me:9189: \$? = $ac_status" >&5
9190   (exit $ac_status); } &&
9191          { ac_try='test -s conftest$ac_exeext'
9192   { (eval echo "$as_me:9192: \"$ac_try\"") >&5
9193   (eval $ac_try) 2>&5
9194   ac_status=$?
9195   echo "$as_me:9195: \$? = $ac_status" >&5
9196   (exit $ac_status); }; }; then
9197   am_cv_langinfo_codeset=yes
9198 else
9199   echo "$as_me: failed program was:" >&5
9200 cat conftest.$ac_ext >&5
9201 am_cv_langinfo_codeset=no
9202 fi
9203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9204
9205 fi
9206 echo "$as_me:9206: result: $am_cv_langinfo_codeset" >&5
9207 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9208         if test $am_cv_langinfo_codeset = yes; then
9209
9210 cat >>confdefs.h <<\EOF
9211 #define HAVE_LANGINFO_CODESET 1
9212 EOF
9213
9214         fi
9215
9216 # use these variables to work around a defect in gcc's fixincludes.
9217 NCURSES_OK_WCHAR_T=
9218 NCURSES_OK_WINT_T=
9219
9220 echo "$as_me:9220: checking if you want wide-character code" >&5
9221 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9222
9223 # Check whether --enable-widec or --disable-widec was given.
9224 if test "${enable_widec+set}" = set; then
9225   enableval="$enable_widec"
9226   with_widec=$enableval
9227 else
9228   with_widec=no
9229 fi;
9230 echo "$as_me:9230: result: $with_widec" >&5
9231 echo "${ECHO_T}$with_widec" >&6
9232 if test "x$with_widec" = xyes ; then
9233         if test "x$disable_lib_suffixes" = xno ; then
9234                 LIB_SUFFIX="w${LIB_SUFFIX}"
9235         fi
9236
9237 cat >>confdefs.h <<\EOF
9238 #define USE_WIDEC_SUPPORT 1
9239 EOF
9240
9241 cat >>confdefs.h <<\EOF
9242 #define NCURSES_WIDECHAR 1
9243 EOF
9244
9245 echo "$as_me:9245: checking if wchar.h can be used as is" >&5
9246 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9247 if test "${cf_cv_wchar_h_okay+set}" = set; then
9248   echo $ECHO_N "(cached) $ECHO_C" >&6
9249 else
9250
9251 cat >conftest.$ac_ext <<_ACEOF
9252 #line 9252 "configure"
9253 #include "confdefs.h"
9254
9255 #include <stdlib.h>
9256 #include <wchar.h>
9257
9258 int
9259 main ()
9260 {
9261
9262         wint_t foo = 0;
9263         int bar = iswpunct(foo)
9264   ;
9265   return 0;
9266 }
9267 _ACEOF
9268 rm -f conftest.$ac_objext
9269 if { (eval echo "$as_me:9269: \"$ac_compile\"") >&5
9270   (eval $ac_compile) 2>&5
9271   ac_status=$?
9272   echo "$as_me:9272: \$? = $ac_status" >&5
9273   (exit $ac_status); } &&
9274          { ac_try='test -s conftest.$ac_objext'
9275   { (eval echo "$as_me:9275: \"$ac_try\"") >&5
9276   (eval $ac_try) 2>&5
9277   ac_status=$?
9278   echo "$as_me:9278: \$? = $ac_status" >&5
9279   (exit $ac_status); }; }; then
9280   cf_cv_wchar_h_okay=yes
9281 else
9282   echo "$as_me: failed program was:" >&5
9283 cat conftest.$ac_ext >&5
9284 cf_cv_wchar_h_okay=no
9285 fi
9286 rm -f conftest.$ac_objext conftest.$ac_ext
9287 fi
9288 echo "$as_me:9288: result: $cf_cv_wchar_h_okay" >&5
9289 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9290
9291 if test $cf_cv_wchar_h_okay = no
9292 then
9293
9294 echo "$as_me:9294: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9295 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9296 cat >conftest.$ac_ext <<_ACEOF
9297 #line 9297 "configure"
9298 #include "confdefs.h"
9299 #include <sys/types.h>
9300
9301 int
9302 main ()
9303 {
9304
9305 #ifndef _XOPEN_SOURCE_EXTENDED
9306 make an error
9307 #endif
9308   ;
9309   return 0;
9310 }
9311 _ACEOF
9312 rm -f conftest.$ac_objext
9313 if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); } &&
9318          { ac_try='test -s conftest.$ac_objext'
9319   { (eval echo "$as_me:9319: \"$ac_try\"") >&5
9320   (eval $ac_try) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); }; }; then
9324   cf_result=no
9325 else
9326   echo "$as_me: failed program was:" >&5
9327 cat conftest.$ac_ext >&5
9328 cf_result=yes
9329 fi
9330 rm -f conftest.$ac_objext conftest.$ac_ext
9331 echo "$as_me:9331: result: $cf_result" >&5
9332 echo "${ECHO_T}$cf_result" >&6
9333
9334 if test "$cf_result" = yes ; then
9335         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9336 elif test "x" != "x" ; then
9337         echo "$as_me:9337: checking checking for compatible value versus " >&5
9338 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9339         cat >conftest.$ac_ext <<_ACEOF
9340 #line 9340 "configure"
9341 #include "confdefs.h"
9342 #include <sys/types.h>
9343
9344 int
9345 main ()
9346 {
9347
9348 #if _XOPEN_SOURCE_EXTENDED- < 0
9349 make an error
9350 #endif
9351   ;
9352   return 0;
9353 }
9354 _ACEOF
9355 rm -f conftest.$ac_objext
9356 if { (eval echo "$as_me:9356: \"$ac_compile\"") >&5
9357   (eval $ac_compile) 2>&5
9358   ac_status=$?
9359   echo "$as_me:9359: \$? = $ac_status" >&5
9360   (exit $ac_status); } &&
9361          { ac_try='test -s conftest.$ac_objext'
9362   { (eval echo "$as_me:9362: \"$ac_try\"") >&5
9363   (eval $ac_try) 2>&5
9364   ac_status=$?
9365   echo "$as_me:9365: \$? = $ac_status" >&5
9366   (exit $ac_status); }; }; then
9367   cf_result=yes
9368 else
9369   echo "$as_me: failed program was:" >&5
9370 cat conftest.$ac_ext >&5
9371 cf_result=no
9372 fi
9373 rm -f conftest.$ac_objext conftest.$ac_ext
9374         echo "$as_me:9374: result: $cf_result" >&5
9375 echo "${ECHO_T}$cf_result" >&6
9376         if test "$cf_result" = no ; then
9377                 # perhaps we can override it - try...
9378                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9379         fi
9380 fi
9381
9382 fi
9383
9384         # with_overwrite=no
9385         NCURSES_CH_T=cchar_t
9386
9387 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9388 do
9389 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9390 echo "$as_me:9390: checking for $ac_func" >&5
9391 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9392 if eval "test \"\${$as_ac_var+set}\" = set"; then
9393   echo $ECHO_N "(cached) $ECHO_C" >&6
9394 else
9395   cat >conftest.$ac_ext <<_ACEOF
9396 #line 9396 "configure"
9397 #include "confdefs.h"
9398 /* System header to define __stub macros and hopefully few prototypes,
9399     which can conflict with char $ac_func (); below.  */
9400 #include <assert.h>
9401 /* Override any gcc2 internal prototype to avoid an error.  */
9402 #ifdef __cplusplus
9403 extern "C"
9404 #endif
9405 /* We use char because int might match the return type of a gcc2
9406    builtin and then its argument prototype would still apply.  */
9407 char $ac_func ();
9408 char (*f) ();
9409
9410 int
9411 main ()
9412 {
9413 /* The GNU C library defines this for functions which it implements
9414     to always fail with ENOSYS.  Some functions are actually named
9415     something starting with __ and the normal name is an alias.  */
9416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9417 choke me
9418 #else
9419 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9420 #endif
9421
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 rm -f conftest.$ac_objext conftest$ac_exeext
9427 if { (eval echo "$as_me:9427: \"$ac_link\"") >&5
9428   (eval $ac_link) 2>&5
9429   ac_status=$?
9430   echo "$as_me:9430: \$? = $ac_status" >&5
9431   (exit $ac_status); } &&
9432          { ac_try='test -s conftest$ac_exeext'
9433   { (eval echo "$as_me:9433: \"$ac_try\"") >&5
9434   (eval $ac_try) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); }; }; then
9438   eval "$as_ac_var=yes"
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442 eval "$as_ac_var=no"
9443 fi
9444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9445 fi
9446 echo "$as_me:9446: result: `eval echo '${'$as_ac_var'}'`" >&5
9447 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9448 if test `eval echo '${'$as_ac_var'}'` = yes; then
9449   cat >>confdefs.h <<EOF
9450 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9451 EOF
9452
9453 fi
9454 done
9455
9456         if test "x$ac_cv_func_putwc" != xyes ; then
9457
9458 echo "$as_me:9458: checking for multibyte character support" >&5
9459 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9460 if test "${cf_cv_utf8_lib+set}" = set; then
9461   echo $ECHO_N "(cached) $ECHO_C" >&6
9462 else
9463
9464         cf_save_LIBS="$LIBS"
9465         cat >conftest.$ac_ext <<_ACEOF
9466 #line 9466 "configure"
9467 #include "confdefs.h"
9468
9469 #include <stdlib.h>
9470 int
9471 main ()
9472 {
9473 putwc(0,0);
9474   ;
9475   return 0;
9476 }
9477 _ACEOF
9478 rm -f conftest.$ac_objext conftest$ac_exeext
9479 if { (eval echo "$as_me:9479: \"$ac_link\"") >&5
9480   (eval $ac_link) 2>&5
9481   ac_status=$?
9482   echo "$as_me:9482: \$? = $ac_status" >&5
9483   (exit $ac_status); } &&
9484          { ac_try='test -s conftest$ac_exeext'
9485   { (eval echo "$as_me:9485: \"$ac_try\"") >&5
9486   (eval $ac_try) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); }; }; then
9490   cf_cv_utf8_lib=yes
9491 else
9492   echo "$as_me: failed program was:" >&5
9493 cat conftest.$ac_ext >&5
9494
9495 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9496 # will be set on completion of the AC_TRY_LINK below.
9497 cf_cv_header_path_utf8=
9498 cf_cv_library_path_utf8=
9499
9500 echo "${as_me:-configure}:9500: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9501
9502 cf_save_LIBS="$LIBS"
9503
9504 cat >conftest.$ac_ext <<_ACEOF
9505 #line 9505 "configure"
9506 #include "confdefs.h"
9507
9508 #include <libutf8.h>
9509 int
9510 main ()
9511 {
9512 putwc(0,0);
9513   ;
9514   return 0;
9515 }
9516 _ACEOF
9517 rm -f conftest.$ac_objext conftest$ac_exeext
9518 if { (eval echo "$as_me:9518: \"$ac_link\"") >&5
9519   (eval $ac_link) 2>&5
9520   ac_status=$?
9521   echo "$as_me:9521: \$? = $ac_status" >&5
9522   (exit $ac_status); } &&
9523          { ac_try='test -s conftest$ac_exeext'
9524   { (eval echo "$as_me:9524: \"$ac_try\"") >&5
9525   (eval $ac_try) 2>&5
9526   ac_status=$?
9527   echo "$as_me:9527: \$? = $ac_status" >&5
9528   (exit $ac_status); }; }; then
9529
9530         cf_cv_find_linkage_utf8=yes
9531         cf_cv_header_path_utf8=/usr/include
9532         cf_cv_library_path_utf8=/usr/lib
9533
9534 else
9535   echo "$as_me: failed program was:" >&5
9536 cat conftest.$ac_ext >&5
9537
9538 LIBS="-lutf8  $cf_save_LIBS"
9539
9540 cat >conftest.$ac_ext <<_ACEOF
9541 #line 9541 "configure"
9542 #include "confdefs.h"
9543
9544 #include <libutf8.h>
9545 int
9546 main ()
9547 {
9548 putwc(0,0);
9549   ;
9550   return 0;
9551 }
9552 _ACEOF
9553 rm -f conftest.$ac_objext conftest$ac_exeext
9554 if { (eval echo "$as_me:9554: \"$ac_link\"") >&5
9555   (eval $ac_link) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); } &&
9559          { ac_try='test -s conftest$ac_exeext'
9560   { (eval echo "$as_me:9560: \"$ac_try\"") >&5
9561   (eval $ac_try) 2>&5
9562   ac_status=$?
9563   echo "$as_me:9563: \$? = $ac_status" >&5
9564   (exit $ac_status); }; }; then
9565
9566         cf_cv_find_linkage_utf8=yes
9567         cf_cv_header_path_utf8=/usr/include
9568         cf_cv_library_path_utf8=/usr/lib
9569         cf_cv_library_file_utf8="-lutf8"
9570
9571 else
9572   echo "$as_me: failed program was:" >&5
9573 cat conftest.$ac_ext >&5
9574
9575         cf_cv_find_linkage_utf8=no
9576         LIBS="$cf_save_LIBS"
9577
9578         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9579
9580 echo "${as_me:-configure}:9580: testing find linkage for utf8 library ..." 1>&5
9581
9582 echo "${as_me:-configure}:9582: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9583
9584         cf_save_CPPFLAGS="$CPPFLAGS"
9585         cf_test_CPPFLAGS="$CPPFLAGS"
9586
9587 cf_search=
9588
9589 # collect the current set of include-directories from compiler flags
9590 cf_header_path_list=""
9591 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9592         for cf_header_path in $CPPFLAGS $CFLAGS
9593         do
9594                 case $cf_header_path in
9595                 (-I*)
9596                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9597
9598 test "x$cf_header_path" != "xNONE" && \
9599 test -d "$cf_header_path" && \
9600  {
9601         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9602         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9603         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9604         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9605         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9606         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9607 }
9608
9609                         cf_header_path_list="$cf_header_path_list $cf_search"
9610                         ;;
9611                 esac
9612         done
9613 fi
9614
9615 # add the variations for the package we are looking for
9616
9617 cf_search=
9618
9619 test "x$prefix" != "xNONE" && \
9620 test -d "$prefix" && \
9621  {
9622         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9623         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9624         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9625         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9626         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9627         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9628 }
9629
9630 for cf_subdir_prefix in \
9631         /usr \
9632         /usr/local \
9633         /usr/pkg \
9634         /opt \
9635         /opt/local \
9636         $HOME
9637 do
9638
9639 test "x$cf_subdir_prefix" != "x$prefix" && \
9640 test -d "$cf_subdir_prefix" && \
9641 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9642         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9643         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9644         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9645         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9646         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9647         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9648 }
9649
9650 done
9651
9652 test "$includedir" != NONE && \
9653 test "$includedir" != "/usr/include" && \
9654 test -d "$includedir" && {
9655         test -d $includedir &&    cf_search="$cf_search $includedir"
9656         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9657 }
9658
9659 test "$oldincludedir" != NONE && \
9660 test "$oldincludedir" != "/usr/include" && \
9661 test -d "$oldincludedir" && {
9662         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9663         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9664 }
9665
9666 cf_search="$cf_search $cf_header_path_list"
9667
9668         for cf_cv_header_path_utf8 in $cf_search
9669         do
9670                 if test -d $cf_cv_header_path_utf8 ; then
9671                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9672
9673 echo "${as_me:-configure}:9673: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9674
9675                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9676                         cat >conftest.$ac_ext <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9679
9680 #include <libutf8.h>
9681 int
9682 main ()
9683 {
9684 putwc(0,0);
9685   ;
9686   return 0;
9687 }
9688 _ACEOF
9689 rm -f conftest.$ac_objext
9690 if { (eval echo "$as_me:9690: \"$ac_compile\"") >&5
9691   (eval $ac_compile) 2>&5
9692   ac_status=$?
9693   echo "$as_me:9693: \$? = $ac_status" >&5
9694   (exit $ac_status); } &&
9695          { ac_try='test -s conftest.$ac_objext'
9696   { (eval echo "$as_me:9696: \"$ac_try\"") >&5
9697   (eval $ac_try) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); }; }; then
9701
9702                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9703
9704 echo "${as_me:-configure}:9704: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9705
9706                                 cf_cv_find_linkage_utf8=maybe
9707                                 cf_test_CPPFLAGS="$CPPFLAGS"
9708                                 break
9709 else
9710   echo "$as_me: failed program was:" >&5
9711 cat conftest.$ac_ext >&5
9712
9713                                 CPPFLAGS="$cf_save_CPPFLAGS"
9714
9715 fi
9716 rm -f conftest.$ac_objext conftest.$ac_ext
9717                 fi
9718         done
9719
9720         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9721
9722 echo "${as_me:-configure}:9722: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9723
9724                 cf_save_LIBS="$LIBS"
9725                 cf_save_LDFLAGS="$LDFLAGS"
9726
9727                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9728
9729 cf_search=
9730 cf_library_path_list=""
9731 if test -n "${LDFLAGS}${LIBS}" ; then
9732         for cf_library_path in $LDFLAGS $LIBS
9733         do
9734                 case $cf_library_path in
9735                 (-L*)
9736                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9737
9738 test "x$cf_library_path" != "xNONE" && \
9739 test -d "$cf_library_path" && \
9740  {
9741         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9742         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9743         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9744         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9745         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9746         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9747 }
9748
9749                         cf_library_path_list="$cf_library_path_list $cf_search"
9750                         ;;
9751                 esac
9752         done
9753 fi
9754
9755 cf_search=
9756
9757 test "x$prefix" != "xNONE" && \
9758 test -d "$prefix" && \
9759  {
9760         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9761         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9762         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9763         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9764         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9765         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9766 }
9767
9768 for cf_subdir_prefix in \
9769         /usr \
9770         /usr/local \
9771         /usr/pkg \
9772         /opt \
9773         /opt/local \
9774         $HOME
9775 do
9776
9777 test "x$cf_subdir_prefix" != "x$prefix" && \
9778 test -d "$cf_subdir_prefix" && \
9779 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9780         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9781         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9782         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9783         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9784         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9785         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9786 }
9787
9788 done
9789
9790 cf_search="$cf_library_path_list $cf_search"
9791
9792                         for cf_cv_library_path_utf8 in $cf_search
9793                         do
9794                                 if test -d $cf_cv_library_path_utf8 ; then
9795                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9796
9797 echo "${as_me:-configure}:9797: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9798
9799                                         CPPFLAGS="$cf_test_CPPFLAGS"
9800                                         LIBS="-lutf8  $cf_save_LIBS"
9801                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9802                                         cat >conftest.$ac_ext <<_ACEOF
9803 #line 9803 "configure"
9804 #include "confdefs.h"
9805
9806 #include <libutf8.h>
9807 int
9808 main ()
9809 {
9810 putwc(0,0);
9811   ;
9812   return 0;
9813 }
9814 _ACEOF
9815 rm -f conftest.$ac_objext conftest$ac_exeext
9816 if { (eval echo "$as_me:9816: \"$ac_link\"") >&5
9817   (eval $ac_link) 2>&5
9818   ac_status=$?
9819   echo "$as_me:9819: \$? = $ac_status" >&5
9820   (exit $ac_status); } &&
9821          { ac_try='test -s conftest$ac_exeext'
9822   { (eval echo "$as_me:9822: \"$ac_try\"") >&5
9823   (eval $ac_try) 2>&5
9824   ac_status=$?
9825   echo "$as_me:9825: \$? = $ac_status" >&5
9826   (exit $ac_status); }; }; then
9827
9828                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9829
9830 echo "${as_me:-configure}:9830: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9831
9832                                         cf_cv_find_linkage_utf8=yes
9833                                         cf_cv_library_file_utf8="-lutf8"
9834                                         break
9835 else
9836   echo "$as_me: failed program was:" >&5
9837 cat conftest.$ac_ext >&5
9838
9839                                         CPPFLAGS="$cf_save_CPPFLAGS"
9840                                         LIBS="$cf_save_LIBS"
9841                                         LDFLAGS="$cf_save_LDFLAGS"
9842
9843 fi
9844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9845                                 fi
9846                         done
9847                         CPPFLAGS="$cf_save_CPPFLAGS"
9848                         LDFLAGS="$cf_save_LDFLAGS"
9849                 fi
9850
9851         else
9852                 cf_cv_find_linkage_utf8=no
9853         fi
9854
9855 fi
9856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9857
9858 fi
9859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9860
9861 LIBS="$cf_save_LIBS"
9862
9863 if test "$cf_cv_find_linkage_utf8" = yes ; then
9864 cf_cv_utf8_lib=add-on
9865 else
9866 cf_cv_utf8_lib=no
9867 fi
9868
9869 fi
9870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9871 fi
9872 echo "$as_me:9872: result: $cf_cv_utf8_lib" >&5
9873 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9874
9875 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9876 # ncurses/ncursesw:
9877 if test "$cf_cv_utf8_lib" = "add-on" ; then
9878
9879 cat >>confdefs.h <<\EOF
9880 #define HAVE_LIBUTF8_H 1
9881 EOF
9882
9883 if test -n "$cf_cv_header_path_utf8" ; then
9884   for cf_add_incdir in $cf_cv_header_path_utf8
9885   do
9886         while test $cf_add_incdir != /usr/include
9887         do
9888           if test -d $cf_add_incdir
9889           then
9890                 cf_have_incdir=no
9891                 if test -n "$CFLAGS$CPPFLAGS" ; then
9892                   # a loop is needed to ensure we can add subdirs of existing dirs
9893                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9894                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9895                           cf_have_incdir=yes; break
9896                         fi
9897                   done
9898                 fi
9899
9900                 if test "$cf_have_incdir" = no ; then
9901                   if test "$cf_add_incdir" = /usr/local/include ; then
9902                         if test "$GCC" = yes
9903                         then
9904                           cf_save_CPPFLAGS=$CPPFLAGS
9905                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9906                           cat >conftest.$ac_ext <<_ACEOF
9907 #line 9907 "configure"
9908 #include "confdefs.h"
9909 #include <stdio.h>
9910 int
9911 main ()
9912 {
9913 printf("Hello")
9914   ;
9915   return 0;
9916 }
9917 _ACEOF
9918 rm -f conftest.$ac_objext
9919 if { (eval echo "$as_me:9919: \"$ac_compile\"") >&5
9920   (eval $ac_compile) 2>&5
9921   ac_status=$?
9922   echo "$as_me:9922: \$? = $ac_status" >&5
9923   (exit $ac_status); } &&
9924          { ac_try='test -s conftest.$ac_objext'
9925   { (eval echo "$as_me:9925: \"$ac_try\"") >&5
9926   (eval $ac_try) 2>&5
9927   ac_status=$?
9928   echo "$as_me:9928: \$? = $ac_status" >&5
9929   (exit $ac_status); }; }; then
9930   :
9931 else
9932   echo "$as_me: failed program was:" >&5
9933 cat conftest.$ac_ext >&5
9934 cf_have_incdir=yes
9935 fi
9936 rm -f conftest.$ac_objext conftest.$ac_ext
9937                           CPPFLAGS=$cf_save_CPPFLAGS
9938                         fi
9939                   fi
9940                 fi
9941
9942                 if test "$cf_have_incdir" = no ; then
9943                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9944
9945 echo "${as_me:-configure}:9945: testing adding $cf_add_incdir to include-path ..." 1>&5
9946
9947                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9948
9949                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9950                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9951                   cf_add_incdir="$cf_top_incdir"
9952                 else
9953                   break
9954                 fi
9955           else
9956                 break
9957           fi
9958         done
9959   done
9960 fi
9961
9962 if test -n "$cf_cv_library_path_utf8" ; then
9963         for cf_add_libdir in $cf_cv_library_path_utf8
9964         do
9965                 if test $cf_add_libdir = /usr/lib ; then
9966                         :
9967                 elif test -d $cf_add_libdir
9968                 then
9969                         cf_have_libdir=no
9970                         if test -n "$LDFLAGS$LIBS" ; then
9971                                 # a loop is needed to ensure we can add subdirs of existing dirs
9972                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9973                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9974                                                 cf_have_libdir=yes; break
9975                                         fi
9976                                 done
9977                         fi
9978                         if test "$cf_have_libdir" = no ; then
9979                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9980
9981 echo "${as_me:-configure}:9981: testing adding $cf_add_libdir to library-path ..." 1>&5
9982
9983                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9984                         fi
9985                 fi
9986         done
9987 fi
9988
9989 cf_add_libs="$cf_cv_library_file_utf8"
9990 # Filter out duplicates - this happens with badly-designed ".pc" files...
9991 for cf_add_1lib in $LIBS
9992 do
9993         for cf_add_2lib in $cf_add_libs
9994         do
9995                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9996                 then
9997                         cf_add_1lib=
9998                         break
9999                 fi
10000         done
10001         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10002 done
10003 LIBS="$cf_add_libs"
10004
10005 fi
10006
10007                 if test "$cf_cv_utf8_lib" != no ; then
10008                         NCURSES_LIBUTF8=1
10009                 fi
10010         fi
10011
10012 # This is needed on Tru64 5.0 to declare mbstate_t
10013 echo "$as_me:10013: checking if we must include wchar.h to declare mbstate_t" >&5
10014 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10015 if test "${cf_cv_mbstate_t+set}" = set; then
10016   echo $ECHO_N "(cached) $ECHO_C" >&6
10017 else
10018
10019 cat >conftest.$ac_ext <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10022
10023 #include <stdlib.h>
10024 #include <stdarg.h>
10025 #include <stdio.h>
10026 #ifdef HAVE_LIBUTF8_H
10027 #include <libutf8.h>
10028 #endif
10029 int
10030 main ()
10031 {
10032 mbstate_t state
10033   ;
10034   return 0;
10035 }
10036 _ACEOF
10037 rm -f conftest.$ac_objext
10038 if { (eval echo "$as_me:10038: \"$ac_compile\"") >&5
10039   (eval $ac_compile) 2>&5
10040   ac_status=$?
10041   echo "$as_me:10041: \$? = $ac_status" >&5
10042   (exit $ac_status); } &&
10043          { ac_try='test -s conftest.$ac_objext'
10044   { (eval echo "$as_me:10044: \"$ac_try\"") >&5
10045   (eval $ac_try) 2>&5
10046   ac_status=$?
10047   echo "$as_me:10047: \$? = $ac_status" >&5
10048   (exit $ac_status); }; }; then
10049   cf_cv_mbstate_t=no
10050 else
10051   echo "$as_me: failed program was:" >&5
10052 cat conftest.$ac_ext >&5
10053 cat >conftest.$ac_ext <<_ACEOF
10054 #line 10054 "configure"
10055 #include "confdefs.h"
10056
10057 #include <stdlib.h>
10058 #include <stdarg.h>
10059 #include <stdio.h>
10060 #include <wchar.h>
10061 #ifdef HAVE_LIBUTF8_H
10062 #include <libutf8.h>
10063 #endif
10064 int
10065 main ()
10066 {
10067 mbstate_t value
10068   ;
10069   return 0;
10070 }
10071 _ACEOF
10072 rm -f conftest.$ac_objext
10073 if { (eval echo "$as_me:10073: \"$ac_compile\"") >&5
10074   (eval $ac_compile) 2>&5
10075   ac_status=$?
10076   echo "$as_me:10076: \$? = $ac_status" >&5
10077   (exit $ac_status); } &&
10078          { ac_try='test -s conftest.$ac_objext'
10079   { (eval echo "$as_me:10079: \"$ac_try\"") >&5
10080   (eval $ac_try) 2>&5
10081   ac_status=$?
10082   echo "$as_me:10082: \$? = $ac_status" >&5
10083   (exit $ac_status); }; }; then
10084   cf_cv_mbstate_t=yes
10085 else
10086   echo "$as_me: failed program was:" >&5
10087 cat conftest.$ac_ext >&5
10088 cf_cv_mbstate_t=unknown
10089 fi
10090 rm -f conftest.$ac_objext conftest.$ac_ext
10091 fi
10092 rm -f conftest.$ac_objext conftest.$ac_ext
10093 fi
10094 echo "$as_me:10094: result: $cf_cv_mbstate_t" >&5
10095 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10096
10097 if test "$cf_cv_mbstate_t" = yes ; then
10098
10099 cat >>confdefs.h <<\EOF
10100 #define NEED_WCHAR_H 1
10101 EOF
10102
10103         NEED_WCHAR_H=1
10104 fi
10105
10106 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10107 if test "$cf_cv_mbstate_t" = unknown ; then
10108         NCURSES_MBSTATE_T=1
10109 fi
10110
10111 # This is needed on Tru64 5.0 to declare wchar_t
10112 echo "$as_me:10112: checking if we must include wchar.h to declare wchar_t" >&5
10113 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10114 if test "${cf_cv_wchar_t+set}" = set; then
10115   echo $ECHO_N "(cached) $ECHO_C" >&6
10116 else
10117
10118 cat >conftest.$ac_ext <<_ACEOF
10119 #line 10119 "configure"
10120 #include "confdefs.h"
10121
10122 #include <stdlib.h>
10123 #include <stdarg.h>
10124 #include <stdio.h>
10125 #ifdef HAVE_LIBUTF8_H
10126 #include <libutf8.h>
10127 #endif
10128 int
10129 main ()
10130 {
10131 wchar_t state
10132   ;
10133   return 0;
10134 }
10135 _ACEOF
10136 rm -f conftest.$ac_objext
10137 if { (eval echo "$as_me:10137: \"$ac_compile\"") >&5
10138   (eval $ac_compile) 2>&5
10139   ac_status=$?
10140   echo "$as_me:10140: \$? = $ac_status" >&5
10141   (exit $ac_status); } &&
10142          { ac_try='test -s conftest.$ac_objext'
10143   { (eval echo "$as_me:10143: \"$ac_try\"") >&5
10144   (eval $ac_try) 2>&5
10145   ac_status=$?
10146   echo "$as_me:10146: \$? = $ac_status" >&5
10147   (exit $ac_status); }; }; then
10148   cf_cv_wchar_t=no
10149 else
10150   echo "$as_me: failed program was:" >&5
10151 cat conftest.$ac_ext >&5
10152 cat >conftest.$ac_ext <<_ACEOF
10153 #line 10153 "configure"
10154 #include "confdefs.h"
10155
10156 #include <stdlib.h>
10157 #include <stdarg.h>
10158 #include <stdio.h>
10159 #include <wchar.h>
10160 #ifdef HAVE_LIBUTF8_H
10161 #include <libutf8.h>
10162 #endif
10163 int
10164 main ()
10165 {
10166 wchar_t value
10167   ;
10168   return 0;
10169 }
10170 _ACEOF
10171 rm -f conftest.$ac_objext
10172 if { (eval echo "$as_me:10172: \"$ac_compile\"") >&5
10173   (eval $ac_compile) 2>&5
10174   ac_status=$?
10175   echo "$as_me:10175: \$? = $ac_status" >&5
10176   (exit $ac_status); } &&
10177          { ac_try='test -s conftest.$ac_objext'
10178   { (eval echo "$as_me:10178: \"$ac_try\"") >&5
10179   (eval $ac_try) 2>&5
10180   ac_status=$?
10181   echo "$as_me:10181: \$? = $ac_status" >&5
10182   (exit $ac_status); }; }; then
10183   cf_cv_wchar_t=yes
10184 else
10185   echo "$as_me: failed program was:" >&5
10186 cat conftest.$ac_ext >&5
10187 cf_cv_wchar_t=unknown
10188 fi
10189 rm -f conftest.$ac_objext conftest.$ac_ext
10190 fi
10191 rm -f conftest.$ac_objext conftest.$ac_ext
10192 fi
10193 echo "$as_me:10193: result: $cf_cv_wchar_t" >&5
10194 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10195
10196 if test "$cf_cv_wchar_t" = yes ; then
10197
10198 cat >>confdefs.h <<\EOF
10199 #define NEED_WCHAR_H 1
10200 EOF
10201
10202         NEED_WCHAR_H=1
10203 fi
10204
10205 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10206 if test "$cf_cv_wchar_t" = unknown ; then
10207         NCURSES_WCHAR_T=1
10208 fi
10209
10210 # if we find wchar_t in either place, use substitution to provide a fallback.
10211 if test "$cf_cv_wchar_t" != unknown ; then
10212         NCURSES_OK_WCHAR_T=1
10213 fi
10214
10215 # This is needed on Tru64 5.0 to declare wint_t
10216 echo "$as_me:10216: checking if we must include wchar.h to declare wint_t" >&5
10217 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10218 if test "${cf_cv_wint_t+set}" = set; then
10219   echo $ECHO_N "(cached) $ECHO_C" >&6
10220 else
10221
10222 cat >conftest.$ac_ext <<_ACEOF
10223 #line 10223 "configure"
10224 #include "confdefs.h"
10225
10226 #include <stdlib.h>
10227 #include <stdarg.h>
10228 #include <stdio.h>
10229 #ifdef HAVE_LIBUTF8_H
10230 #include <libutf8.h>
10231 #endif
10232 int
10233 main ()
10234 {
10235 wint_t state
10236   ;
10237   return 0;
10238 }
10239 _ACEOF
10240 rm -f conftest.$ac_objext
10241 if { (eval echo "$as_me:10241: \"$ac_compile\"") >&5
10242   (eval $ac_compile) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); } &&
10246          { ac_try='test -s conftest.$ac_objext'
10247   { (eval echo "$as_me:10247: \"$ac_try\"") >&5
10248   (eval $ac_try) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit $ac_status); }; }; then
10252   cf_cv_wint_t=no
10253 else
10254   echo "$as_me: failed program was:" >&5
10255 cat conftest.$ac_ext >&5
10256 cat >conftest.$ac_ext <<_ACEOF
10257 #line 10257 "configure"
10258 #include "confdefs.h"
10259
10260 #include <stdlib.h>
10261 #include <stdarg.h>
10262 #include <stdio.h>
10263 #include <wchar.h>
10264 #ifdef HAVE_LIBUTF8_H
10265 #include <libutf8.h>
10266 #endif
10267 int
10268 main ()
10269 {
10270 wint_t value
10271   ;
10272   return 0;
10273 }
10274 _ACEOF
10275 rm -f conftest.$ac_objext
10276 if { (eval echo "$as_me:10276: \"$ac_compile\"") >&5
10277   (eval $ac_compile) 2>&5
10278   ac_status=$?
10279   echo "$as_me:10279: \$? = $ac_status" >&5
10280   (exit $ac_status); } &&
10281          { ac_try='test -s conftest.$ac_objext'
10282   { (eval echo "$as_me:10282: \"$ac_try\"") >&5
10283   (eval $ac_try) 2>&5
10284   ac_status=$?
10285   echo "$as_me:10285: \$? = $ac_status" >&5
10286   (exit $ac_status); }; }; then
10287   cf_cv_wint_t=yes
10288 else
10289   echo "$as_me: failed program was:" >&5
10290 cat conftest.$ac_ext >&5
10291 cf_cv_wint_t=unknown
10292 fi
10293 rm -f conftest.$ac_objext conftest.$ac_ext
10294 fi
10295 rm -f conftest.$ac_objext conftest.$ac_ext
10296 fi
10297 echo "$as_me:10297: result: $cf_cv_wint_t" >&5
10298 echo "${ECHO_T}$cf_cv_wint_t" >&6
10299
10300 if test "$cf_cv_wint_t" = yes ; then
10301
10302 cat >>confdefs.h <<\EOF
10303 #define NEED_WCHAR_H 1
10304 EOF
10305
10306         NEED_WCHAR_H=1
10307 fi
10308
10309 # if we do not find wint_t in either place, use substitution to provide a fallback.
10310 if test "$cf_cv_wint_t" = unknown ; then
10311         NCURSES_WINT_T=1
10312 fi
10313
10314 # if we find wint_t in either place, use substitution to provide a fallback.
10315 if test "$cf_cv_wint_t" != unknown ; then
10316         NCURSES_OK_WINT_T=1
10317 fi
10318
10319         if test "$NCURSES_MBSTATE_T" != 0; then
10320
10321 cat >>confdefs.h <<\EOF
10322 #define NEED_MBSTATE_T_DEF 1
10323 EOF
10324
10325         fi
10326 fi
10327
10328 ###   use option --disable-lp64 to allow long chtype
10329 echo "$as_me:10329: checking whether to enable _LP64 definition in curses.h" >&5
10330 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10331
10332 # Check whether --enable-lp64 or --disable-lp64 was given.
10333 if test "${enable_lp64+set}" = set; then
10334   enableval="$enable_lp64"
10335   with_lp64=$enableval
10336 else
10337   with_lp64=$cf_dft_with_lp64
10338 fi;
10339 echo "$as_me:10339: result: $with_lp64" >&5
10340 echo "${ECHO_T}$with_lp64" >&6
10341
10342 if test "x$with_lp64" = xyes ; then
10343         cf_cv_enable_lp64=1
10344 else
10345         cf_cv_enable_lp64=0
10346 fi
10347
10348 # Check whether --enable-largefile or --disable-largefile was given.
10349 if test "${enable_largefile+set}" = set; then
10350   enableval="$enable_largefile"
10351
10352 fi;
10353 if test "$enable_largefile" != no; then
10354
10355   echo "$as_me:10355: checking for special C compiler options needed for large files" >&5
10356 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10357 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10358   echo $ECHO_N "(cached) $ECHO_C" >&6
10359 else
10360   ac_cv_sys_largefile_CC=no
10361      if test "$GCC" != yes; then
10362        ac_save_CC=$CC
10363        while :; do
10364          # IRIX 6.2 and later do not support large files by default,
10365          # so use the C compiler's -n32 option if that helps.
10366          cat >conftest.$ac_ext <<_ACEOF
10367 #line 10367 "configure"
10368 #include "confdefs.h"
10369 #include <sys/types.h>
10370  /* Check that off_t can represent 2**63 - 1 correctly.
10371     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10372     since some C++ compilers masquerading as C compilers
10373     incorrectly reject 9223372036854775807.  */
10374 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10375   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10376                        && LARGE_OFF_T % 2147483647 == 1)
10377                       ? 1 : -1];
10378 int
10379 main ()
10380 {
10381
10382   ;
10383   return 0;
10384 }
10385 _ACEOF
10386          rm -f conftest.$ac_objext
10387 if { (eval echo "$as_me:10387: \"$ac_compile\"") >&5
10388   (eval $ac_compile) 2>&5
10389   ac_status=$?
10390   echo "$as_me:10390: \$? = $ac_status" >&5
10391   (exit $ac_status); } &&
10392          { ac_try='test -s conftest.$ac_objext'
10393   { (eval echo "$as_me:10393: \"$ac_try\"") >&5
10394   (eval $ac_try) 2>&5
10395   ac_status=$?
10396   echo "$as_me:10396: \$? = $ac_status" >&5
10397   (exit $ac_status); }; }; then
10398   break
10399 else
10400   echo "$as_me: failed program was:" >&5
10401 cat conftest.$ac_ext >&5
10402 fi
10403 rm -f conftest.$ac_objext
10404          CC="$CC -n32"
10405          rm -f conftest.$ac_objext
10406 if { (eval echo "$as_me:10406: \"$ac_compile\"") >&5
10407   (eval $ac_compile) 2>&5
10408   ac_status=$?
10409   echo "$as_me:10409: \$? = $ac_status" >&5
10410   (exit $ac_status); } &&
10411          { ac_try='test -s conftest.$ac_objext'
10412   { (eval echo "$as_me:10412: \"$ac_try\"") >&5
10413   (eval $ac_try) 2>&5
10414   ac_status=$?
10415   echo "$as_me:10415: \$? = $ac_status" >&5
10416   (exit $ac_status); }; }; then
10417   ac_cv_sys_largefile_CC=' -n32'; break
10418 else
10419   echo "$as_me: failed program was:" >&5
10420 cat conftest.$ac_ext >&5
10421 fi
10422 rm -f conftest.$ac_objext
10423          break
10424        done
10425        CC=$ac_save_CC
10426        rm -f conftest.$ac_ext
10427     fi
10428 fi
10429 echo "$as_me:10429: result: $ac_cv_sys_largefile_CC" >&5
10430 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10431   if test "$ac_cv_sys_largefile_CC" != no; then
10432     CC=$CC$ac_cv_sys_largefile_CC
10433   fi
10434
10435   echo "$as_me:10435: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10436 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10437 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10438   echo $ECHO_N "(cached) $ECHO_C" >&6
10439 else
10440   while :; do
10441   ac_cv_sys_file_offset_bits=no
10442   cat >conftest.$ac_ext <<_ACEOF
10443 #line 10443 "configure"
10444 #include "confdefs.h"
10445 #include <sys/types.h>
10446  /* Check that off_t can represent 2**63 - 1 correctly.
10447     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10448     since some C++ compilers masquerading as C compilers
10449     incorrectly reject 9223372036854775807.  */
10450 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10451   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10452                        && LARGE_OFF_T % 2147483647 == 1)
10453                       ? 1 : -1];
10454 int
10455 main ()
10456 {
10457
10458   ;
10459   return 0;
10460 }
10461 _ACEOF
10462 rm -f conftest.$ac_objext
10463 if { (eval echo "$as_me:10463: \"$ac_compile\"") >&5
10464   (eval $ac_compile) 2>&5
10465   ac_status=$?
10466   echo "$as_me:10466: \$? = $ac_status" >&5
10467   (exit $ac_status); } &&
10468          { ac_try='test -s conftest.$ac_objext'
10469   { (eval echo "$as_me:10469: \"$ac_try\"") >&5
10470   (eval $ac_try) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); }; }; then
10474   break
10475 else
10476   echo "$as_me: failed program was:" >&5
10477 cat conftest.$ac_ext >&5
10478 fi
10479 rm -f conftest.$ac_objext conftest.$ac_ext
10480   cat >conftest.$ac_ext <<_ACEOF
10481 #line 10481 "configure"
10482 #include "confdefs.h"
10483 #define _FILE_OFFSET_BITS 64
10484 #include <sys/types.h>
10485  /* Check that off_t can represent 2**63 - 1 correctly.
10486     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10487     since some C++ compilers masquerading as C compilers
10488     incorrectly reject 9223372036854775807.  */
10489 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10490   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10491                        && LARGE_OFF_T % 2147483647 == 1)
10492                       ? 1 : -1];
10493 int
10494 main ()
10495 {
10496
10497   ;
10498   return 0;
10499 }
10500 _ACEOF
10501 rm -f conftest.$ac_objext
10502 if { (eval echo "$as_me:10502: \"$ac_compile\"") >&5
10503   (eval $ac_compile) 2>&5
10504   ac_status=$?
10505   echo "$as_me:10505: \$? = $ac_status" >&5
10506   (exit $ac_status); } &&
10507          { ac_try='test -s conftest.$ac_objext'
10508   { (eval echo "$as_me:10508: \"$ac_try\"") >&5
10509   (eval $ac_try) 2>&5
10510   ac_status=$?
10511   echo "$as_me:10511: \$? = $ac_status" >&5
10512   (exit $ac_status); }; }; then
10513   ac_cv_sys_file_offset_bits=64; break
10514 else
10515   echo "$as_me: failed program was:" >&5
10516 cat conftest.$ac_ext >&5
10517 fi
10518 rm -f conftest.$ac_objext conftest.$ac_ext
10519   break
10520 done
10521 fi
10522 echo "$as_me:10522: result: $ac_cv_sys_file_offset_bits" >&5
10523 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10524 if test "$ac_cv_sys_file_offset_bits" != no; then
10525
10526 cat >>confdefs.h <<EOF
10527 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10528 EOF
10529
10530 fi
10531 rm -rf conftest*
10532   echo "$as_me:10532: checking for _LARGE_FILES value needed for large files" >&5
10533 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10534 if test "${ac_cv_sys_large_files+set}" = set; then
10535   echo $ECHO_N "(cached) $ECHO_C" >&6
10536 else
10537   while :; do
10538   ac_cv_sys_large_files=no
10539   cat >conftest.$ac_ext <<_ACEOF
10540 #line 10540 "configure"
10541 #include "confdefs.h"
10542 #include <sys/types.h>
10543  /* Check that off_t can represent 2**63 - 1 correctly.
10544     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10545     since some C++ compilers masquerading as C compilers
10546     incorrectly reject 9223372036854775807.  */
10547 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10548   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10549                        && LARGE_OFF_T % 2147483647 == 1)
10550                       ? 1 : -1];
10551 int
10552 main ()
10553 {
10554
10555   ;
10556   return 0;
10557 }
10558 _ACEOF
10559 rm -f conftest.$ac_objext
10560 if { (eval echo "$as_me:10560: \"$ac_compile\"") >&5
10561   (eval $ac_compile) 2>&5
10562   ac_status=$?
10563   echo "$as_me:10563: \$? = $ac_status" >&5
10564   (exit $ac_status); } &&
10565          { ac_try='test -s conftest.$ac_objext'
10566   { (eval echo "$as_me:10566: \"$ac_try\"") >&5
10567   (eval $ac_try) 2>&5
10568   ac_status=$?
10569   echo "$as_me:10569: \$? = $ac_status" >&5
10570   (exit $ac_status); }; }; then
10571   break
10572 else
10573   echo "$as_me: failed program was:" >&5
10574 cat conftest.$ac_ext >&5
10575 fi
10576 rm -f conftest.$ac_objext conftest.$ac_ext
10577   cat >conftest.$ac_ext <<_ACEOF
10578 #line 10578 "configure"
10579 #include "confdefs.h"
10580 #define _LARGE_FILES 1
10581 #include <sys/types.h>
10582  /* Check that off_t can represent 2**63 - 1 correctly.
10583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10584     since some C++ compilers masquerading as C compilers
10585     incorrectly reject 9223372036854775807.  */
10586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10588                        && LARGE_OFF_T % 2147483647 == 1)
10589                       ? 1 : -1];
10590 int
10591 main ()
10592 {
10593
10594   ;
10595   return 0;
10596 }
10597 _ACEOF
10598 rm -f conftest.$ac_objext
10599 if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
10600   (eval $ac_compile) 2>&5
10601   ac_status=$?
10602   echo "$as_me:10602: \$? = $ac_status" >&5
10603   (exit $ac_status); } &&
10604          { ac_try='test -s conftest.$ac_objext'
10605   { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606   (eval $ac_try) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); }; }; then
10610   ac_cv_sys_large_files=1; break
10611 else
10612   echo "$as_me: failed program was:" >&5
10613 cat conftest.$ac_ext >&5
10614 fi
10615 rm -f conftest.$ac_objext conftest.$ac_ext
10616   break
10617 done
10618 fi
10619 echo "$as_me:10619: result: $ac_cv_sys_large_files" >&5
10620 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10621 if test "$ac_cv_sys_large_files" != no; then
10622
10623 cat >>confdefs.h <<EOF
10624 #define _LARGE_FILES $ac_cv_sys_large_files
10625 EOF
10626
10627 fi
10628 rm -rf conftest*
10629 fi
10630
10631         if test "$enable_largefile" != no ; then
10632         echo "$as_me:10632: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10633 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10634 if test "${ac_cv_sys_largefile_source+set}" = set; then
10635   echo $ECHO_N "(cached) $ECHO_C" >&6
10636 else
10637   while :; do
10638   ac_cv_sys_largefile_source=no
10639   cat >conftest.$ac_ext <<_ACEOF
10640 #line 10640 "configure"
10641 #include "confdefs.h"
10642 #include <stdio.h>
10643 int
10644 main ()
10645 {
10646 return !fseeko;
10647   ;
10648   return 0;
10649 }
10650 _ACEOF
10651 rm -f conftest.$ac_objext
10652 if { (eval echo "$as_me:10652: \"$ac_compile\"") >&5
10653   (eval $ac_compile) 2>&5
10654   ac_status=$?
10655   echo "$as_me:10655: \$? = $ac_status" >&5
10656   (exit $ac_status); } &&
10657          { ac_try='test -s conftest.$ac_objext'
10658   { (eval echo "$as_me:10658: \"$ac_try\"") >&5
10659   (eval $ac_try) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit $ac_status); }; }; then
10663   break
10664 else
10665   echo "$as_me: failed program was:" >&5
10666 cat conftest.$ac_ext >&5
10667 fi
10668 rm -f conftest.$ac_objext conftest.$ac_ext
10669   cat >conftest.$ac_ext <<_ACEOF
10670 #line 10670 "configure"
10671 #include "confdefs.h"
10672 #define _LARGEFILE_SOURCE 1
10673 #include <stdio.h>
10674 int
10675 main ()
10676 {
10677 return !fseeko;
10678   ;
10679   return 0;
10680 }
10681 _ACEOF
10682 rm -f conftest.$ac_objext
10683 if { (eval echo "$as_me:10683: \"$ac_compile\"") >&5
10684   (eval $ac_compile) 2>&5
10685   ac_status=$?
10686   echo "$as_me:10686: \$? = $ac_status" >&5
10687   (exit $ac_status); } &&
10688          { ac_try='test -s conftest.$ac_objext'
10689   { (eval echo "$as_me:10689: \"$ac_try\"") >&5
10690   (eval $ac_try) 2>&5
10691   ac_status=$?
10692   echo "$as_me:10692: \$? = $ac_status" >&5
10693   (exit $ac_status); }; }; then
10694   ac_cv_sys_largefile_source=1; break
10695 else
10696   echo "$as_me: failed program was:" >&5
10697 cat conftest.$ac_ext >&5
10698 fi
10699 rm -f conftest.$ac_objext conftest.$ac_ext
10700   break
10701 done
10702 fi
10703 echo "$as_me:10703: result: $ac_cv_sys_largefile_source" >&5
10704 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10705 if test "$ac_cv_sys_largefile_source" != no; then
10706
10707 cat >>confdefs.h <<EOF
10708 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10709 EOF
10710
10711 fi
10712 rm -rf conftest*
10713
10714 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10715 # in glibc 2.1.3, but that breaks too many other things.
10716 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10717 echo "$as_me:10717: checking for fseeko" >&5
10718 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10719 if test "${ac_cv_func_fseeko+set}" = set; then
10720   echo $ECHO_N "(cached) $ECHO_C" >&6
10721 else
10722   cat >conftest.$ac_ext <<_ACEOF
10723 #line 10723 "configure"
10724 #include "confdefs.h"
10725 #include <stdio.h>
10726 int
10727 main ()
10728 {
10729 return fseeko && fseeko (stdin, 0, 0);
10730   ;
10731   return 0;
10732 }
10733 _ACEOF
10734 rm -f conftest.$ac_objext conftest$ac_exeext
10735 if { (eval echo "$as_me:10735: \"$ac_link\"") >&5
10736   (eval $ac_link) 2>&5
10737   ac_status=$?
10738   echo "$as_me:10738: \$? = $ac_status" >&5
10739   (exit $ac_status); } &&
10740          { ac_try='test -s conftest$ac_exeext'
10741   { (eval echo "$as_me:10741: \"$ac_try\"") >&5
10742   (eval $ac_try) 2>&5
10743   ac_status=$?
10744   echo "$as_me:10744: \$? = $ac_status" >&5
10745   (exit $ac_status); }; }; then
10746   ac_cv_func_fseeko=yes
10747 else
10748   echo "$as_me: failed program was:" >&5
10749 cat conftest.$ac_ext >&5
10750 ac_cv_func_fseeko=no
10751 fi
10752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10753 fi
10754 echo "$as_me:10754: result: $ac_cv_func_fseeko" >&5
10755 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10756 if test $ac_cv_func_fseeko = yes; then
10757
10758 cat >>confdefs.h <<\EOF
10759 #define HAVE_FSEEKO 1
10760 EOF
10761
10762 fi
10763
10764         # Normally we would collect these definitions in the config.h,
10765         # but (like _XOPEN_SOURCE), some environments rely on having these
10766         # defined before any of the system headers are included.  Another
10767         # case comes up with C++, e.g., on AIX the compiler compiles the
10768         # header files by themselves before looking at the body files it is
10769         # told to compile.  For ncurses, those header files do not include
10770         # the config.h
10771         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10772         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10773         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10774
10775         echo "$as_me:10775: checking whether to use struct dirent64" >&5
10776 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10777 if test "${cf_cv_struct_dirent64+set}" = set; then
10778   echo $ECHO_N "(cached) $ECHO_C" >&6
10779 else
10780
10781                 cat >conftest.$ac_ext <<_ACEOF
10782 #line 10782 "configure"
10783 #include "confdefs.h"
10784
10785 #include <sys/types.h>
10786 #include <dirent.h>
10787
10788 int
10789 main ()
10790 {
10791
10792                 /* if transitional largefile support is setup, this is true */
10793                 extern struct dirent64 * readdir(DIR *);
10794                 struct dirent64 *x = readdir((DIR *)0);
10795                 struct dirent *y = readdir((DIR *)0);
10796                 int z = x - y;
10797
10798   ;
10799   return 0;
10800 }
10801 _ACEOF
10802 rm -f conftest.$ac_objext
10803 if { (eval echo "$as_me:10803: \"$ac_compile\"") >&5
10804   (eval $ac_compile) 2>&5
10805   ac_status=$?
10806   echo "$as_me:10806: \$? = $ac_status" >&5
10807   (exit $ac_status); } &&
10808          { ac_try='test -s conftest.$ac_objext'
10809   { (eval echo "$as_me:10809: \"$ac_try\"") >&5
10810   (eval $ac_try) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); }; }; then
10814   cf_cv_struct_dirent64=yes
10815 else
10816   echo "$as_me: failed program was:" >&5
10817 cat conftest.$ac_ext >&5
10818 cf_cv_struct_dirent64=no
10819 fi
10820 rm -f conftest.$ac_objext conftest.$ac_ext
10821
10822 fi
10823 echo "$as_me:10823: result: $cf_cv_struct_dirent64" >&5
10824 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10825         test "$cf_cv_struct_dirent64" = yes &&
10826 cat >>confdefs.h <<\EOF
10827 #define HAVE_STRUCT_DIRENT64 1
10828 EOF
10829
10830         fi
10831
10832 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10833 echo "$as_me:10833: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10834 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10835
10836 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10837 if test "${enable_tparm_varargs+set}" = set; then
10838   enableval="$enable_tparm_varargs"
10839   with_tparm_varargs=$enableval
10840 else
10841   with_tparm_varargs=yes
10842 fi;
10843 echo "$as_me:10843: result: $with_tparm_varargs" >&5
10844 echo "${ECHO_T}$with_tparm_varargs" >&6
10845 NCURSES_TPARM_VARARGS=0
10846 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10847
10848 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10849 if test "$with_ticlib" != no ; then
10850 echo "$as_me:10850: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10851 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10852
10853 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10854 if test "${enable_tic_depends+set}" = set; then
10855   enableval="$enable_tic_depends"
10856   with_tic_depends=$enableval
10857 else
10858   with_tic_depends=yes
10859 fi;
10860 echo "$as_me:10860: result: $with_tic_depends" >&5
10861 echo "${ECHO_T}$with_tic_depends" >&6
10862 else
10863         with_tic_depends=no
10864 fi
10865
10866 ###   use option --with-bool to override bool's type
10867 echo "$as_me:10867: checking for type of bool" >&5
10868 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10869
10870 # Check whether --with-bool or --without-bool was given.
10871 if test "${with_bool+set}" = set; then
10872   withval="$with_bool"
10873   NCURSES_BOOL="$withval"
10874 else
10875   NCURSES_BOOL=auto
10876 fi;
10877 echo "$as_me:10877: result: $NCURSES_BOOL" >&5
10878 echo "${ECHO_T}$NCURSES_BOOL" >&6
10879
10880 echo "$as_me:10880: checking for alternate terminal capabilities file" >&5
10881 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10882
10883 # Check whether --with-caps or --without-caps was given.
10884 if test "${with_caps+set}" = set; then
10885   withval="$with_caps"
10886   TERMINFO_CAPS=Caps.$withval
10887 else
10888   TERMINFO_CAPS=Caps
10889 fi;
10890 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10891 echo "$as_me:10891: result: $TERMINFO_CAPS" >&5
10892 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10893
10894 ###   use option --with-chtype to override chtype's type
10895 echo "$as_me:10895: checking for type of chtype" >&5
10896 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10897
10898 # Check whether --with-chtype or --without-chtype was given.
10899 if test "${with_chtype+set}" = set; then
10900   withval="$with_chtype"
10901   NCURSES_CHTYPE="$withval"
10902 else
10903   NCURSES_CHTYPE=$cf_dft_chtype
10904 fi;
10905 echo "$as_me:10905: result: $NCURSES_CHTYPE" >&5
10906 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10907
10908 ###   use option --with-ospeed to override ospeed's type
10909 echo "$as_me:10909: checking for type of ospeed" >&5
10910 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10911
10912 # Check whether --with-ospeed or --without-ospeed was given.
10913 if test "${with_ospeed+set}" = set; then
10914   withval="$with_ospeed"
10915   NCURSES_OSPEED="$withval"
10916 else
10917   NCURSES_OSPEED=short
10918 fi;
10919 echo "$as_me:10919: result: $NCURSES_OSPEED" >&5
10920 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10921
10922 ###   use option --with-mmask-t to override mmask_t's type
10923 echo "$as_me:10923: checking for type of mmask_t" >&5
10924 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10925
10926 # Check whether --with-mmask-t or --without-mmask-t was given.
10927 if test "${with_mmask_t+set}" = set; then
10928   withval="$with_mmask_t"
10929   NCURSES_MMASK_T="$withval"
10930 else
10931   NCURSES_MMASK_T=$cf_dft_mmask_t
10932 fi;
10933 echo "$as_me:10933: result: $NCURSES_MMASK_T" >&5
10934 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10935
10936 ###   use option --with-ccharw-max to override CCHARW_MAX size
10937 echo "$as_me:10937: checking for size CCHARW_MAX" >&5
10938 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10939
10940 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10941 if test "${with_ccharw_max+set}" = set; then
10942   withval="$with_ccharw_max"
10943   NCURSES_CCHARW_MAX="$withval"
10944 else
10945   NCURSES_CCHARW_MAX=5
10946 fi;
10947 echo "$as_me:10947: result: $NCURSES_CCHARW_MAX" >&5
10948 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10949
10950 ###   use option --with-tparm-arg to override tparm's argument type
10951 echo "$as_me:10951: checking for type of tparm args" >&5
10952 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10953
10954 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10955 if test "${with_tparm_arg+set}" = set; then
10956   withval="$with_tparm_arg"
10957   NCURSES_TPARM_ARG="$withval"
10958 else
10959   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10960 fi;
10961 echo "$as_me:10961: result: $NCURSES_TPARM_ARG" >&5
10962 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10963
10964 ### Enable compiling-in rcs id's
10965 echo "$as_me:10965: checking if RCS identifiers should be compiled-in" >&5
10966 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10967
10968 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10969 if test "${with_rcs_ids+set}" = set; then
10970   withval="$with_rcs_ids"
10971   with_rcs_ids=$withval
10972 else
10973   with_rcs_ids=no
10974 fi;
10975 echo "$as_me:10975: result: $with_rcs_ids" >&5
10976 echo "${ECHO_T}$with_rcs_ids" >&6
10977 test "x$with_rcs_ids" = xyes &&
10978 cat >>confdefs.h <<\EOF
10979 #define USE_RCS_IDS 1
10980 EOF
10981
10982 ###############################################################################
10983
10984 echo "$as_me:10984: checking format of man-pages" >&5
10985 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10986
10987 # Check whether --with-manpage-format or --without-manpage-format was given.
10988 if test "${with_manpage_format+set}" = set; then
10989   withval="$with_manpage_format"
10990   MANPAGE_FORMAT=$withval
10991 else
10992   MANPAGE_FORMAT=unknown
10993 fi;
10994
10995 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10996 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10997
10998 cf_unknown=
10999
11000 case $MANPAGE_FORMAT in
11001 (unknown)
11002         if test -z "$MANPATH" ; then
11003                 MANPATH="/usr/man:/usr/share/man"
11004         fi
11005
11006         # look for the 'date' man-page (it's most likely to be installed!)
11007         MANPAGE_FORMAT=
11008         cf_preform=no
11009         cf_catonly=yes
11010         cf_example=date
11011
11012         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11013         for cf_dir in $MANPATH; do
11014                 test -z "$cf_dir" && cf_dir=/usr/man
11015                 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
11016                 do
11017                         cf_test=`echo $cf_name | sed -e 's/*//'`
11018                         if test "x$cf_test" = "x$cf_name" ; then
11019
11020                                 case "$cf_name" in
11021                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11022                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11023                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11024                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11025                                 esac
11026
11027                                 case "$cf_name" in
11028                                 ($cf_dir/man*)
11029                                         cf_catonly=no
11030                                         ;;
11031                                 ($cf_dir/cat*)
11032                                         cf_preform=yes
11033                                         ;;
11034                                 esac
11035                                 break
11036                         fi
11037
11038                         # if we found a match in either man* or cat*, stop looking
11039                         if test -n "$MANPAGE_FORMAT" ; then
11040                                 cf_found=no
11041                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11042                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11043                                 case "$cf_name" in
11044                                 ($cf_dir/cat*)
11045                                         cf_found=yes
11046                                         ;;
11047                                 esac
11048                                 test $cf_found=yes && break
11049                         fi
11050                 done
11051                 # only check the first directory in $MANPATH where we find manpages
11052                 if test -n "$MANPAGE_FORMAT" ; then
11053                         break
11054                 fi
11055         done
11056         # if we did not find the example, just assume it is normal
11057         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11058         IFS="$ac_save_ifs"
11059         ;;
11060 (*)
11061         for cf_option in $MANPAGE_FORMAT; do
11062         case $cf_option in
11063         (gzip|compress|BSDI|normal|formatted|catonly)
11064                 ;;
11065         (*)
11066                 cf_unknown="$cf_unknown $cf_option"
11067                 ;;
11068         esac
11069         done
11070         ;;
11071 esac
11072
11073 echo "$as_me:11073: result: $MANPAGE_FORMAT" >&5
11074 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11075 if test -n "$cf_unknown" ; then
11076         { echo "$as_me:11076: WARNING: Unexpected manpage-format $cf_unknown" >&5
11077 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11078 fi
11079
11080 echo "$as_me:11080: checking for manpage renaming" >&5
11081 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11082
11083 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11084 if test "${with_manpage_renames+set}" = set; then
11085   withval="$with_manpage_renames"
11086   MANPAGE_RENAMES=$withval
11087 else
11088   MANPAGE_RENAMES=yes
11089 fi;
11090
11091 case ".$MANPAGE_RENAMES" in
11092 (.no)
11093         ;;
11094 (.|.yes)
11095         # Debian 'man' program?
11096         if test -f /etc/debian_version ; then
11097                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11098         else
11099                 MANPAGE_RENAMES=no
11100         fi
11101         ;;
11102 esac
11103
11104 if test "$MANPAGE_RENAMES" != no ; then
11105         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11106                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11107         elif test ! -f $MANPAGE_RENAMES ; then
11108                 { { echo "$as_me:11108: error: not a filename: $MANPAGE_RENAMES" >&5
11109 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11110    { (exit 1); exit 1; }; }
11111         fi
11112
11113         test ! -d man && mkdir man
11114
11115         # Construct a sed-script to perform renaming within man-pages
11116         if test -n "$MANPAGE_RENAMES" ; then
11117                 test ! -d man && mkdir man
11118                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11119         fi
11120 fi
11121
11122 echo "$as_me:11122: result: $MANPAGE_RENAMES" >&5
11123 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11124
11125 echo "$as_me:11125: checking if manpage aliases will be installed" >&5
11126 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11127
11128 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11129 if test "${with_manpage_aliases+set}" = set; then
11130   withval="$with_manpage_aliases"
11131   MANPAGE_ALIASES=$withval
11132 else
11133   MANPAGE_ALIASES=yes
11134 fi;
11135
11136 echo "$as_me:11136: result: $MANPAGE_ALIASES" >&5
11137 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11138
11139 case "x$LN_S" in
11140 (xln*)
11141         cf_use_symlinks=yes
11142         ;;
11143 (*)
11144         cf_use_symlinks=no
11145         ;;
11146 esac
11147
11148 MANPAGE_SYMLINKS=no
11149 if test "$MANPAGE_ALIASES" = yes ; then
11150 echo "$as_me:11150: checking if manpage symlinks should be used" >&5
11151 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11152
11153 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11154 if test "${with_manpage_symlinks+set}" = set; then
11155   withval="$with_manpage_symlinks"
11156   MANPAGE_SYMLINKS=$withval
11157 else
11158   MANPAGE_SYMLINKS=$cf_use_symlinks
11159 fi;
11160
11161 if test "$$cf_use_symlinks" = no; then
11162 if test "$MANPAGE_SYMLINKS" = yes ; then
11163         { echo "$as_me:11163: WARNING: cannot make symlinks" >&5
11164 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11165         MANPAGE_SYMLINKS=no
11166 fi
11167 fi
11168
11169 echo "$as_me:11169: result: $MANPAGE_SYMLINKS" >&5
11170 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11171 fi
11172
11173 echo "$as_me:11173: checking for manpage tbl" >&5
11174 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11175
11176 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11177 if test "${with_manpage_tbl+set}" = set; then
11178   withval="$with_manpage_tbl"
11179   MANPAGE_TBL=$withval
11180 else
11181   MANPAGE_TBL=no
11182 fi;
11183
11184 echo "$as_me:11184: result: $MANPAGE_TBL" >&5
11185 echo "${ECHO_T}$MANPAGE_TBL" >&6
11186
11187 if test "$prefix" = "NONE" ; then
11188         cf_prefix="$ac_default_prefix"
11189 else
11190         cf_prefix="$prefix"
11191 fi
11192
11193 case "$MANPAGE_FORMAT" in
11194 (*catonly*)
11195         cf_format=yes
11196         cf_inboth=no
11197         ;;
11198 (*formatted*)
11199         cf_format=yes
11200         cf_inboth=yes
11201         ;;
11202 (*)
11203         cf_format=no
11204         cf_inboth=no
11205         ;;
11206 esac
11207
11208 test ! -d man && mkdir man
11209
11210 cf_so_strip=
11211 cf_compress=
11212 case "$MANPAGE_FORMAT" in
11213 (*compress*)
11214         cf_so_strip="Z"
11215         cf_compress=compress
11216         ;;
11217 (*gzip*)
11218         cf_so_strip="gz"
11219         cf_compress=gzip
11220         ;;
11221 esac
11222
11223 cf_edit_man=./edit_man.sh
11224 cf_man_alias=`pwd`/man_alias.sed
11225
11226 cat >$cf_edit_man <<CF_EOF
11227 #! $SHELL
11228 # this script is generated by the configure-script CF_MAN_PAGES macro.
11229
11230 prefix="$cf_prefix"
11231 datarootdir="$datarootdir"
11232 datadir="$datadir"
11233
11234 NCURSES_MAJOR="$NCURSES_MAJOR"
11235 NCURSES_MINOR="$NCURSES_MINOR"
11236 NCURSES_PATCH="$NCURSES_PATCH"
11237
11238 NCURSES_OSPEED="$NCURSES_OSPEED"
11239 TERMINFO="$TERMINFO"
11240
11241 INSTALL="$INSTALL"
11242 INSTALL_DATA="$INSTALL_DATA"
11243
11244 transform="$program_transform_name"
11245
11246 TMP=\${TMPDIR:=/tmp}/man\$\$
11247 trap "rm -f \$TMP" 0 1 2 5 15
11248
11249 form=\$1
11250 shift || exit 1
11251
11252 verb=\$1
11253 shift || exit 1
11254
11255 mandir=\$1
11256 shift || exit 1
11257
11258 srcdir=\$1
11259 top_srcdir=\$srcdir/..
11260 shift || exit 1
11261
11262 if test "\$form" = normal ; then
11263         if test "$cf_format" = yes ; then
11264         if test "$cf_inboth" = no ; then
11265                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11266                 exit $?
11267         fi
11268         fi
11269         cf_subdir=\$mandir/man
11270         cf_tables=$MANPAGE_TBL
11271 else
11272         cf_subdir=\$mandir/cat
11273         cf_tables=yes
11274 fi
11275
11276 # process the list of source-files
11277 for i in \$* ; do
11278 case \$i in
11279 (*.orig|*.rej) ;;
11280 (*.[0-9]*)
11281         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11282         if test \$verb = installing ; then
11283         if test ! -d \$cf_subdir\${section} ; then
11284                 mkdir -p \$cf_subdir\$section
11285         fi
11286         fi
11287
11288         # replace variables in man page
11289         if test ! -f $cf_man_alias ; then
11290 cat >>$cf_man_alias <<-CF_EOF2
11291                 s,@DATADIR@,\$datadir,g
11292                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11293                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11294                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11295                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11296                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11297                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11298 CF_EOF
11299
11300         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11301         do
11302                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11303                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11304 cat >>$cf_edit_man <<-CF_EOF
11305                 s,@$cf_NAME@,$cf_name,g
11306 CF_EOF
11307         done
11308
11309 cat >>$cf_edit_man <<CF_EOF
11310 CF_EOF2
11311                 echo "...made $cf_man_alias"
11312         fi
11313
11314         aliases=
11315         cf_source=\`basename \$i\`
11316         inalias=\$cf_source
11317         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11318         if test ! -f \$inalias ; then
11319                 echo .. skipped \$cf_source
11320                 continue
11321         fi
11322 CF_EOF
11323
11324 if test "$MANPAGE_ALIASES" != no ; then
11325 cat >>$cf_edit_man <<CF_EOF
11326         nCurses=ignore.3x
11327         test $with_curses_h = yes && nCurses=ncurses.3x
11328         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11329 CF_EOF
11330 fi
11331
11332 if test "$MANPAGE_RENAMES" = no ; then
11333 cat >>$cf_edit_man <<CF_EOF
11334         # perform program transformations for section 1 man pages
11335         if test \$section = 1 ; then
11336                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11337         else
11338                 cf_target=\$cf_subdir\${section}/\$cf_source
11339         fi
11340 CF_EOF
11341 else
11342 cat >>$cf_edit_man <<CF_EOF
11343         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11344         if test -z "\$cf_target" ; then
11345                 echo '? missing rename for '\$cf_source
11346                 cf_target="\$cf_source"
11347         fi
11348         cf_target="\$cf_subdir\${section}/\${cf_target}"
11349
11350 CF_EOF
11351 fi
11352
11353 cat >>$cf_edit_man <<CF_EOF
11354         sed     -f $cf_man_alias \\
11355 CF_EOF
11356
11357 if test -f $MANPAGE_RENAMES ; then
11358 cat >>$cf_edit_man <<CF_EOF
11359                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11360 CF_EOF
11361 else
11362 cat >>$cf_edit_man <<CF_EOF
11363                 < \$i >\$TMP
11364 CF_EOF
11365 fi
11366
11367 cat >>$cf_edit_man <<CF_EOF
11368 if test \$cf_tables = yes ; then
11369         tbl \$TMP >\$TMP.out
11370         mv \$TMP.out \$TMP
11371 fi
11372 CF_EOF
11373
11374 if test $with_overwrite != yes ; then
11375 cat >>$cf_edit_man <<CF_EOF
11376         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11377         mv \$TMP.out \$TMP
11378 CF_EOF
11379 fi
11380
11381 if test $with_curses_h != yes ; then
11382 cat >>$cf_edit_man <<CF_EOF
11383         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11384         mv \$TMP.out \$TMP
11385 CF_EOF
11386 fi
11387
11388 cat >>$cf_edit_man <<CF_EOF
11389         if test \$form = format ; then
11390                 nroff -man \$TMP >\$TMP.out
11391                 mv \$TMP.out \$TMP
11392         fi
11393 CF_EOF
11394
11395 if test -n "$cf_compress" ; then
11396 cat >>$cf_edit_man <<CF_EOF
11397         if test \$verb = installing ; then
11398         if ( $cf_compress -f \$TMP )
11399         then
11400                 mv \$TMP.$cf_so_strip \$TMP
11401         fi
11402         fi
11403         cf_target="\$cf_target.$cf_so_strip"
11404 CF_EOF
11405 fi
11406
11407 case "$MANPAGE_FORMAT" in
11408 (*BSDI*)
11409 cat >>$cf_edit_man <<CF_EOF
11410         if test \$form = format ; then
11411                 # BSDI installs only .0 suffixes in the cat directories
11412                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11413         fi
11414 CF_EOF
11415   ;;
11416 esac
11417
11418 cat >>$cf_edit_man <<CF_EOF
11419         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11420         if test \$verb = installing ; then
11421                 echo \$verb \$cf_target
11422                 \$INSTALL_DATA \$TMP \$cf_target
11423                 test -d \$cf_subdir\${section} &&
11424                 test -n "\$aliases" && (
11425                         cd \$cf_subdir\${section} && (
11426                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11427                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11428                                 cf_target=\`basename \$cf_target\`
11429                                 for cf_alias in \$aliases
11430                                 do
11431                                         if test \$section = 1 ; then
11432                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11433                                         fi
11434
11435                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11436                                                 if test -f \$cf_alias\${suffix} ; then
11437                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11438                                                         then
11439                                                                 continue
11440                                                         fi
11441                                                 fi
11442                                                 echo .. \$verb alias \$cf_alias\${suffix}
11443 CF_EOF
11444 case "x$LN_S" in
11445 (*-f)
11446 cat >>$cf_edit_man <<CF_EOF
11447                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11448 CF_EOF
11449         ;;
11450 (*)
11451 cat >>$cf_edit_man <<CF_EOF
11452                                                 rm -f \$cf_alias\${suffix}
11453                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11454 CF_EOF
11455         ;;
11456 esac
11457 cat >>$cf_edit_man <<CF_EOF
11458                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11459                                                 echo ".so \$cf_source" >\$TMP
11460 CF_EOF
11461 if test -n "$cf_compress" ; then
11462 cat >>$cf_edit_man <<CF_EOF
11463                                                 if test -n "$cf_so_strip" ; then
11464                                                         $cf_compress -f \$TMP
11465                                                         mv \$TMP.$cf_so_strip \$TMP
11466                                                 fi
11467 CF_EOF
11468 fi
11469 cat >>$cf_edit_man <<CF_EOF
11470                                                 echo .. \$verb alias \$cf_alias\${suffix}
11471                                                 rm -f \$cf_alias\${suffix}
11472                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11473                                         fi
11474                                 done
11475                         )
11476                 )
11477         elif test \$verb = removing ; then
11478                 test -f \$cf_target && (
11479                         echo \$verb \$cf_target
11480                         rm -f \$cf_target
11481                 )
11482                 test -d \$cf_subdir\${section} &&
11483                 test -n "\$aliases" && (
11484                         cd \$cf_subdir\${section} && (
11485                                 for cf_alias in \$aliases
11486                                 do
11487                                         if test \$section = 1 ; then
11488                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11489                                         fi
11490
11491                                         echo .. \$verb alias \$cf_alias\${suffix}
11492                                         rm -f \$cf_alias\${suffix}
11493                                 done
11494                         )
11495                 )
11496         else
11497 #               echo ".hy 0"
11498                 cat \$TMP
11499         fi
11500         ;;
11501 esac
11502 done
11503
11504 if test $cf_inboth = yes ; then
11505 if test \$form != format ; then
11506         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11507 fi
11508 fi
11509
11510 exit 0
11511 CF_EOF
11512 chmod 755 $cf_edit_man
11513
11514 ###############################################################################
11515
11516 ### Note that some functions (such as const) are normally disabled anyway.
11517 echo "$as_me:11517: checking if you want to build with function extensions" >&5
11518 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11519
11520 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11521 if test "${enable_ext_funcs+set}" = set; then
11522   enableval="$enable_ext_funcs"
11523   with_ext_funcs=$enableval
11524 else
11525   with_ext_funcs=yes
11526 fi;
11527 echo "$as_me:11527: result: $with_ext_funcs" >&5
11528 echo "${ECHO_T}$with_ext_funcs" >&6
11529 if test "x$with_ext_funcs" = xyes ; then
11530         NCURSES_EXT_FUNCS=1
11531
11532 cat >>confdefs.h <<\EOF
11533 #define HAVE_ASSUME_DEFAULT_COLORS 1
11534 EOF
11535
11536 cat >>confdefs.h <<\EOF
11537 #define HAVE_CURSES_VERSION 1
11538 EOF
11539
11540 cat >>confdefs.h <<\EOF
11541 #define HAVE_HAS_KEY 1
11542 EOF
11543
11544 cat >>confdefs.h <<\EOF
11545 #define HAVE_RESIZETERM 1
11546 EOF
11547
11548 cat >>confdefs.h <<\EOF
11549 #define HAVE_RESIZE_TERM 1
11550 EOF
11551
11552 cat >>confdefs.h <<\EOF
11553 #define HAVE_TERM_ENTRY_H 1
11554 EOF
11555
11556 cat >>confdefs.h <<\EOF
11557 #define HAVE_USE_DEFAULT_COLORS 1
11558 EOF
11559
11560 cat >>confdefs.h <<\EOF
11561 #define HAVE_USE_SCREEN 1
11562 EOF
11563
11564 cat >>confdefs.h <<\EOF
11565 #define HAVE_USE_WINDOW 1
11566 EOF
11567
11568 cat >>confdefs.h <<\EOF
11569 #define HAVE_WRESIZE 1
11570 EOF
11571
11572 cat >>confdefs.h <<\EOF
11573 #define NCURSES_EXT_FUNCS 1
11574 EOF
11575
11576         GENERATED_EXT_FUNCS=generated
11577 else
11578         NCURSES_EXT_FUNCS=0
11579         GENERATED_EXT_FUNCS=
11580 fi
11581
11582 echo "$as_me:11582: checking if you want to build with SCREEN extensions" >&5
11583 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11584
11585 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11586 if test "${enable_sp_funcs+set}" = set; then
11587   enableval="$enable_sp_funcs"
11588   with_sp_funcs=$enableval
11589 else
11590   with_sp_funcs=$cf_dft_ext_spfuncs
11591 fi;
11592 echo "$as_me:11592: result: $with_sp_funcs" >&5
11593 echo "${ECHO_T}$with_sp_funcs" >&6
11594 if test "x$with_sp_funcs" = xyes ; then
11595         NCURSES_SP_FUNCS=1
11596
11597 cat >>confdefs.h <<\EOF
11598 #define NCURSES_SP_FUNCS 1
11599 EOF
11600
11601         GENERATED_SP_FUNCS=generated
11602 else
11603         NCURSES_SP_FUNCS=0
11604         GENERATED_SP_FUNCS=
11605 fi
11606
11607 echo "$as_me:11607: checking if you want to build with terminal-driver" >&5
11608 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11609
11610 # Check whether --enable-term-driver or --disable-term-driver was given.
11611 if test "${enable_term_driver+set}" = set; then
11612   enableval="$enable_term_driver"
11613   with_term_driver=$enableval
11614 else
11615   with_term_driver=no
11616 fi;
11617 echo "$as_me:11617: result: $with_term_driver" >&5
11618 echo "${ECHO_T}$with_term_driver" >&6
11619 if test "x$with_term_driver" = xyes ; then
11620
11621 cat >>confdefs.h <<\EOF
11622 #define USE_TERM_DRIVER 1
11623 EOF
11624
11625         if test "x$with_termlib" != xno ; then
11626                 { { echo "$as_me:11626: error: The term-driver option conflicts with the termlib option" >&5
11627 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11628    { (exit 1); exit 1; }; }
11629         fi
11630         if test "x$with_sp_funcs" != xyes ; then
11631                 { { echo "$as_me:11631: error: The term-driver option relies upon sp-funcs" >&5
11632 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11633    { (exit 1); exit 1; }; }
11634         fi
11635 fi
11636
11637 ###   use option --enable-const to turn on use of const beyond that in XSI.
11638 echo "$as_me:11638: checking for extended use of const keyword" >&5
11639 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11640
11641 # Check whether --enable-const or --disable-const was given.
11642 if test "${enable_const+set}" = set; then
11643   enableval="$enable_const"
11644   with_ext_const=$enableval
11645 else
11646   with_ext_const=$cf_dft_ext_const
11647 fi;
11648 echo "$as_me:11648: result: $with_ext_const" >&5
11649 echo "${ECHO_T}$with_ext_const" >&6
11650 NCURSES_CONST='/*nothing*/'
11651 if test "x$with_ext_const" = xyes ; then
11652         NCURSES_CONST=const
11653 fi
11654
11655 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11656 echo "$as_me:11656: checking if you want to use extended colors" >&5
11657 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11658
11659 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11660 if test "${enable_ext_colors+set}" = set; then
11661   enableval="$enable_ext_colors"
11662   with_ext_colors=$enableval
11663 else
11664   with_ext_colors=$cf_dft_ext_colors
11665 fi;
11666 echo "$as_me:11666: result: $with_ext_colors" >&5
11667 echo "${ECHO_T}$with_ext_colors" >&6
11668 NCURSES_EXT_COLORS=0
11669 if test "x$with_ext_colors" = xyes ; then
11670         if test "x$with_widec" != xyes ; then
11671                 { echo "$as_me:11671: WARNING: This option applies only to wide-character library" >&5
11672 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11673         else
11674                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11675
11676 if test "${with_abi_version+set}" != set; then
11677         case $cf_cv_rel_version in
11678         (5.*)
11679                 cf_cv_rel_version=6.0
11680                 cf_cv_abi_version=6
11681                 { echo "$as_me:11681: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11682 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11683                 ;;
11684         esac
11685 fi
11686
11687                 NCURSES_EXT_COLORS=1
11688
11689 cat >>confdefs.h <<\EOF
11690 #define NCURSES_EXT_COLORS 1
11691 EOF
11692
11693         fi
11694 fi
11695
11696 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11697 echo "$as_me:11697: checking if you want to use extended mouse encoding" >&5
11698 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11699
11700 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11701 if test "${enable_ext_mouse+set}" = set; then
11702   enableval="$enable_ext_mouse"
11703   with_ext_mouse=$enableval
11704 else
11705   with_ext_mouse=$cf_dft_ext_mouse
11706 fi;
11707 echo "$as_me:11707: result: $with_ext_mouse" >&5
11708 echo "${ECHO_T}$with_ext_mouse" >&6
11709 NCURSES_MOUSE_VERSION=1
11710 if test "x$with_ext_mouse" = xyes ; then
11711         NCURSES_MOUSE_VERSION=2
11712
11713 if test "${with_abi_version+set}" != set; then
11714         case $cf_cv_rel_version in
11715         (5.*)
11716                 cf_cv_rel_version=6.0
11717                 cf_cv_abi_version=6
11718                 { echo "$as_me:11718: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11719 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11720                 ;;
11721         esac
11722 fi
11723
11724 fi
11725
11726 ###   use option --enable-ext-putwin to turn on extended screendumps
11727 echo "$as_me:11727: checking if you want to use extended putwin/screendump" >&5
11728 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11729
11730 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11731 if test "${enable_ext_putwin+set}" = set; then
11732   enableval="$enable_ext_putwin"
11733   with_ext_putwin=$enableval
11734 else
11735   with_ext_putwin=$cf_dft_ext_putwin
11736 fi;
11737 echo "$as_me:11737: result: $with_ext_putwin" >&5
11738 echo "${ECHO_T}$with_ext_putwin" >&6
11739 if test "x$with_ext_putwin" = xyes ; then
11740
11741 cat >>confdefs.h <<\EOF
11742 #define NCURSES_EXT_PUTWIN 1
11743 EOF
11744
11745 fi
11746
11747 echo "$as_me:11747: checking if you want \$NCURSES_NO_PADDING code" >&5
11748 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11749
11750 # Check whether --enable-no-padding or --disable-no-padding was given.
11751 if test "${enable_no_padding+set}" = set; then
11752   enableval="$enable_no_padding"
11753   with_no_padding=$enableval
11754 else
11755   with_no_padding=$with_ext_funcs
11756 fi;
11757 echo "$as_me:11757: result: $with_no_padding" >&5
11758 echo "${ECHO_T}$with_no_padding" >&6
11759 test "x$with_no_padding" = xyes &&
11760 cat >>confdefs.h <<\EOF
11761 #define NCURSES_NO_PADDING 1
11762 EOF
11763
11764 echo "$as_me:11764: checking for ANSI C header files" >&5
11765 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11766 if test "${ac_cv_header_stdc+set}" = set; then
11767   echo $ECHO_N "(cached) $ECHO_C" >&6
11768 else
11769   cat >conftest.$ac_ext <<_ACEOF
11770 #line 11770 "configure"
11771 #include "confdefs.h"
11772 #include <stdlib.h>
11773 #include <stdarg.h>
11774 #include <string.h>
11775 #include <float.h>
11776
11777 _ACEOF
11778 if { (eval echo "$as_me:11778: \"$ac_cpp conftest.$ac_ext\"") >&5
11779   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11780   ac_status=$?
11781   egrep -v '^ *\+' conftest.er1 >conftest.err
11782   rm -f conftest.er1
11783   cat conftest.err >&5
11784   echo "$as_me:11784: \$? = $ac_status" >&5
11785   (exit $ac_status); } >/dev/null; then
11786   if test -s conftest.err; then
11787     ac_cpp_err=$ac_c_preproc_warn_flag
11788   else
11789     ac_cpp_err=
11790   fi
11791 else
11792   ac_cpp_err=yes
11793 fi
11794 if test -z "$ac_cpp_err"; then
11795   ac_cv_header_stdc=yes
11796 else
11797   echo "$as_me: failed program was:" >&5
11798   cat conftest.$ac_ext >&5
11799   ac_cv_header_stdc=no
11800 fi
11801 rm -f conftest.err conftest.$ac_ext
11802
11803 if test $ac_cv_header_stdc = yes; then
11804   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11805   cat >conftest.$ac_ext <<_ACEOF
11806 #line 11806 "configure"
11807 #include "confdefs.h"
11808 #include <string.h>
11809
11810 _ACEOF
11811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11812   egrep "memchr" >/dev/null 2>&1; then
11813   :
11814 else
11815   ac_cv_header_stdc=no
11816 fi
11817 rm -rf conftest*
11818
11819 fi
11820
11821 if test $ac_cv_header_stdc = yes; then
11822   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11823   cat >conftest.$ac_ext <<_ACEOF
11824 #line 11824 "configure"
11825 #include "confdefs.h"
11826 #include <stdlib.h>
11827
11828 _ACEOF
11829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11830   egrep "free" >/dev/null 2>&1; then
11831   :
11832 else
11833   ac_cv_header_stdc=no
11834 fi
11835 rm -rf conftest*
11836
11837 fi
11838
11839 if test $ac_cv_header_stdc = yes; then
11840   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11841   if test "$cross_compiling" = yes; then
11842   :
11843 else
11844   cat >conftest.$ac_ext <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11847 #include <ctype.h>
11848 #if ((' ' & 0x0FF) == 0x020)
11849 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11850 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11851 #else
11852 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11853                      || ('j' <= (c) && (c) <= 'r') \
11854                      || ('s' <= (c) && (c) <= 'z'))
11855 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11856 #endif
11857
11858 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11859 int
11860 main ()
11861 {
11862   int i;
11863   for (i = 0; i < 256; i++)
11864     if (XOR (islower (i), ISLOWER (i))
11865         || toupper (i) != TOUPPER (i))
11866       $ac_main_return(2);
11867   $ac_main_return (0);
11868 }
11869 _ACEOF
11870 rm -f conftest$ac_exeext
11871 if { (eval echo "$as_me:11871: \"$ac_link\"") >&5
11872   (eval $ac_link) 2>&5
11873   ac_status=$?
11874   echo "$as_me:11874: \$? = $ac_status" >&5
11875   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11876   { (eval echo "$as_me:11876: \"$ac_try\"") >&5
11877   (eval $ac_try) 2>&5
11878   ac_status=$?
11879   echo "$as_me:11879: \$? = $ac_status" >&5
11880   (exit $ac_status); }; }; then
11881   :
11882 else
11883   echo "$as_me: program exited with status $ac_status" >&5
11884 echo "$as_me: failed program was:" >&5
11885 cat conftest.$ac_ext >&5
11886 ac_cv_header_stdc=no
11887 fi
11888 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11889 fi
11890 fi
11891 fi
11892 echo "$as_me:11892: result: $ac_cv_header_stdc" >&5
11893 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11894 if test $ac_cv_header_stdc = yes; then
11895
11896 cat >>confdefs.h <<\EOF
11897 #define STDC_HEADERS 1
11898 EOF
11899
11900 fi
11901
11902 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11903
11904 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11905                   inttypes.h stdint.h unistd.h
11906 do
11907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11908 echo "$as_me:11908: checking for $ac_header" >&5
11909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11911   echo $ECHO_N "(cached) $ECHO_C" >&6
11912 else
11913   cat >conftest.$ac_ext <<_ACEOF
11914 #line 11914 "configure"
11915 #include "confdefs.h"
11916 $ac_includes_default
11917 #include <$ac_header>
11918 _ACEOF
11919 rm -f conftest.$ac_objext
11920 if { (eval echo "$as_me:11920: \"$ac_compile\"") >&5
11921   (eval $ac_compile) 2>&5
11922   ac_status=$?
11923   echo "$as_me:11923: \$? = $ac_status" >&5
11924   (exit $ac_status); } &&
11925          { ac_try='test -s conftest.$ac_objext'
11926   { (eval echo "$as_me:11926: \"$ac_try\"") >&5
11927   (eval $ac_try) 2>&5
11928   ac_status=$?
11929   echo "$as_me:11929: \$? = $ac_status" >&5
11930   (exit $ac_status); }; }; then
11931   eval "$as_ac_Header=yes"
11932 else
11933   echo "$as_me: failed program was:" >&5
11934 cat conftest.$ac_ext >&5
11935 eval "$as_ac_Header=no"
11936 fi
11937 rm -f conftest.$ac_objext conftest.$ac_ext
11938 fi
11939 echo "$as_me:11939: result: `eval echo '${'$as_ac_Header'}'`" >&5
11940 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11941 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11942   cat >>confdefs.h <<EOF
11943 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11944 EOF
11945
11946 fi
11947 done
11948
11949 echo "$as_me:11949: checking for signed char" >&5
11950 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11951 if test "${ac_cv_type_signed_char+set}" = set; then
11952   echo $ECHO_N "(cached) $ECHO_C" >&6
11953 else
11954   cat >conftest.$ac_ext <<_ACEOF
11955 #line 11955 "configure"
11956 #include "confdefs.h"
11957 $ac_includes_default
11958 int
11959 main ()
11960 {
11961 if ((signed char *) 0)
11962   return 0;
11963 if (sizeof (signed char))
11964   return 0;
11965   ;
11966   return 0;
11967 }
11968 _ACEOF
11969 rm -f conftest.$ac_objext
11970 if { (eval echo "$as_me:11970: \"$ac_compile\"") >&5
11971   (eval $ac_compile) 2>&5
11972   ac_status=$?
11973   echo "$as_me:11973: \$? = $ac_status" >&5
11974   (exit $ac_status); } &&
11975          { ac_try='test -s conftest.$ac_objext'
11976   { (eval echo "$as_me:11976: \"$ac_try\"") >&5
11977   (eval $ac_try) 2>&5
11978   ac_status=$?
11979   echo "$as_me:11979: \$? = $ac_status" >&5
11980   (exit $ac_status); }; }; then
11981   ac_cv_type_signed_char=yes
11982 else
11983   echo "$as_me: failed program was:" >&5
11984 cat conftest.$ac_ext >&5
11985 ac_cv_type_signed_char=no
11986 fi
11987 rm -f conftest.$ac_objext conftest.$ac_ext
11988 fi
11989 echo "$as_me:11989: result: $ac_cv_type_signed_char" >&5
11990 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11991
11992 echo "$as_me:11992: checking size of signed char" >&5
11993 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11994 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11995   echo $ECHO_N "(cached) $ECHO_C" >&6
11996 else
11997   if test "$ac_cv_type_signed_char" = yes; then
11998   if test "$cross_compiling" = yes; then
11999   # Depending upon the size, compute the lo and hi bounds.
12000 cat >conftest.$ac_ext <<_ACEOF
12001 #line 12001 "configure"
12002 #include "confdefs.h"
12003 $ac_includes_default
12004 int
12005 main ()
12006 {
12007 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12008   ;
12009   return 0;
12010 }
12011 _ACEOF
12012 rm -f conftest.$ac_objext
12013 if { (eval echo "$as_me:12013: \"$ac_compile\"") >&5
12014   (eval $ac_compile) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit $ac_status); } &&
12018          { ac_try='test -s conftest.$ac_objext'
12019   { (eval echo "$as_me:12019: \"$ac_try\"") >&5
12020   (eval $ac_try) 2>&5
12021   ac_status=$?
12022   echo "$as_me:12022: \$? = $ac_status" >&5
12023   (exit $ac_status); }; }; then
12024   ac_lo=0 ac_mid=0
12025   while :; do
12026     cat >conftest.$ac_ext <<_ACEOF
12027 #line 12027 "configure"
12028 #include "confdefs.h"
12029 $ac_includes_default
12030 int
12031 main ()
12032 {
12033 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12034   ;
12035   return 0;
12036 }
12037 _ACEOF
12038 rm -f conftest.$ac_objext
12039 if { (eval echo "$as_me:12039: \"$ac_compile\"") >&5
12040   (eval $ac_compile) 2>&5
12041   ac_status=$?
12042   echo "$as_me:12042: \$? = $ac_status" >&5
12043   (exit $ac_status); } &&
12044          { ac_try='test -s conftest.$ac_objext'
12045   { (eval echo "$as_me:12045: \"$ac_try\"") >&5
12046   (eval $ac_try) 2>&5
12047   ac_status=$?
12048   echo "$as_me:12048: \$? = $ac_status" >&5
12049   (exit $ac_status); }; }; then
12050   ac_hi=$ac_mid; break
12051 else
12052   echo "$as_me: failed program was:" >&5
12053 cat conftest.$ac_ext >&5
12054 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12055 fi
12056 rm -f conftest.$ac_objext conftest.$ac_ext
12057   done
12058 else
12059   echo "$as_me: failed program was:" >&5
12060 cat conftest.$ac_ext >&5
12061 ac_hi=-1 ac_mid=-1
12062   while :; do
12063     cat >conftest.$ac_ext <<_ACEOF
12064 #line 12064 "configure"
12065 #include "confdefs.h"
12066 $ac_includes_default
12067 int
12068 main ()
12069 {
12070 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12071   ;
12072   return 0;
12073 }
12074 _ACEOF
12075 rm -f conftest.$ac_objext
12076 if { (eval echo "$as_me:12076: \"$ac_compile\"") >&5
12077   (eval $ac_compile) 2>&5
12078   ac_status=$?
12079   echo "$as_me:12079: \$? = $ac_status" >&5
12080   (exit $ac_status); } &&
12081          { ac_try='test -s conftest.$ac_objext'
12082   { (eval echo "$as_me:12082: \"$ac_try\"") >&5
12083   (eval $ac_try) 2>&5
12084   ac_status=$?
12085   echo "$as_me:12085: \$? = $ac_status" >&5
12086   (exit $ac_status); }; }; then
12087   ac_lo=$ac_mid; break
12088 else
12089   echo "$as_me: failed program was:" >&5
12090 cat conftest.$ac_ext >&5
12091 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12092 fi
12093 rm -f conftest.$ac_objext conftest.$ac_ext
12094   done
12095 fi
12096 rm -f conftest.$ac_objext conftest.$ac_ext
12097 # Binary search between lo and hi bounds.
12098 while test "x$ac_lo" != "x$ac_hi"; do
12099   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12100   cat >conftest.$ac_ext <<_ACEOF
12101 #line 12101 "configure"
12102 #include "confdefs.h"
12103 $ac_includes_default
12104 int
12105 main ()
12106 {
12107 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12108   ;
12109   return 0;
12110 }
12111 _ACEOF
12112 rm -f conftest.$ac_objext
12113 if { (eval echo "$as_me:12113: \"$ac_compile\"") >&5
12114   (eval $ac_compile) 2>&5
12115   ac_status=$?
12116   echo "$as_me:12116: \$? = $ac_status" >&5
12117   (exit $ac_status); } &&
12118          { ac_try='test -s conftest.$ac_objext'
12119   { (eval echo "$as_me:12119: \"$ac_try\"") >&5
12120   (eval $ac_try) 2>&5
12121   ac_status=$?
12122   echo "$as_me:12122: \$? = $ac_status" >&5
12123   (exit $ac_status); }; }; then
12124   ac_hi=$ac_mid
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 cat conftest.$ac_ext >&5
12128 ac_lo=`expr $ac_mid + 1`
12129 fi
12130 rm -f conftest.$ac_objext conftest.$ac_ext
12131 done
12132 ac_cv_sizeof_signed_char=$ac_lo
12133 else
12134   if test "$cross_compiling" = yes; then
12135   { { echo "$as_me:12135: error: cannot run test program while cross compiling" >&5
12136 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12137    { (exit 1); exit 1; }; }
12138 else
12139   cat >conftest.$ac_ext <<_ACEOF
12140 #line 12140 "configure"
12141 #include "confdefs.h"
12142 $ac_includes_default
12143 int
12144 main ()
12145 {
12146 FILE *f = fopen ("conftest.val", "w");
12147 if (!f)
12148   $ac_main_return (1);
12149 fprintf (f, "%d", (sizeof (signed char)));
12150 fclose (f);
12151   ;
12152   return 0;
12153 }
12154 _ACEOF
12155 rm -f conftest$ac_exeext
12156 if { (eval echo "$as_me:12156: \"$ac_link\"") >&5
12157   (eval $ac_link) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12161   { (eval echo "$as_me:12161: \"$ac_try\"") >&5
12162   (eval $ac_try) 2>&5
12163   ac_status=$?
12164   echo "$as_me:12164: \$? = $ac_status" >&5
12165   (exit $ac_status); }; }; then
12166   ac_cv_sizeof_signed_char=`cat conftest.val`
12167 else
12168   echo "$as_me: program exited with status $ac_status" >&5
12169 echo "$as_me: failed program was:" >&5
12170 cat conftest.$ac_ext >&5
12171 fi
12172 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12173 fi
12174 fi
12175 rm -f conftest.val
12176 else
12177   ac_cv_sizeof_signed_char=0
12178 fi
12179 fi
12180 echo "$as_me:12180: result: $ac_cv_sizeof_signed_char" >&5
12181 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12182 cat >>confdefs.h <<EOF
12183 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12184 EOF
12185
12186 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12187         NCURSES_SBOOL="signed char"
12188 else
12189         NCURSES_SBOOL="char"
12190 fi
12191 echo "$as_me:12191: checking if you want to use signed Boolean array in term.h" >&5
12192 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12193
12194 # Check whether --enable-signed-char or --disable-signed-char was given.
12195 if test "${enable_signed_char+set}" = set; then
12196   enableval="$enable_signed_char"
12197   with_signed_char=$enableval
12198 else
12199   with_signed_char=no
12200 fi;
12201 echo "$as_me:12201: result: $with_signed_char" >&5
12202 echo "${ECHO_T}$with_signed_char" >&6
12203 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12204
12205 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12206 echo "$as_me:12206: checking if you want SIGWINCH handler" >&5
12207 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12208
12209 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12210 if test "${enable_sigwinch+set}" = set; then
12211   enableval="$enable_sigwinch"
12212   with_sigwinch=$enableval
12213 else
12214   with_sigwinch=$with_ext_funcs
12215 fi;
12216 echo "$as_me:12216: result: $with_sigwinch" >&5
12217 echo "${ECHO_T}$with_sigwinch" >&6
12218 test "x$with_sigwinch" = xyes &&
12219 cat >>confdefs.h <<\EOF
12220 #define USE_SIGWINCH 1
12221 EOF
12222
12223 ###   use option --enable-tcap-names to allow user to define new capabilities
12224 echo "$as_me:12224: checking if you want user-definable terminal capabilities like termcap" >&5
12225 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12226
12227 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12228 if test "${enable_tcap_names+set}" = set; then
12229   enableval="$enable_tcap_names"
12230   with_tcap_names=$enableval
12231 else
12232   with_tcap_names=$with_ext_funcs
12233 fi;
12234 echo "$as_me:12234: result: $with_tcap_names" >&5
12235 echo "${ECHO_T}$with_tcap_names" >&6
12236 NCURSES_XNAMES=0
12237 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12238
12239 ###############################################################################
12240 # These options are relatively safe to experiment with.
12241
12242 echo "$as_me:12242: checking if you want all development code" >&5
12243 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12244
12245 # Check whether --with-develop or --without-develop was given.
12246 if test "${with_develop+set}" = set; then
12247   withval="$with_develop"
12248   with_develop=$withval
12249 else
12250   with_develop=no
12251 fi;
12252 echo "$as_me:12252: result: $with_develop" >&5
12253 echo "${ECHO_T}$with_develop" >&6
12254
12255 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12256 echo "$as_me:12256: checking if you want hard-tabs code" >&5
12257 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12258
12259 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12260 if test "${enable_hard_tabs+set}" = set; then
12261   enableval="$enable_hard_tabs"
12262
12263 else
12264   enable_hard_tabs=$with_develop
12265 fi;
12266 echo "$as_me:12266: result: $enable_hard_tabs" >&5
12267 echo "${ECHO_T}$enable_hard_tabs" >&6
12268 test "x$enable_hard_tabs" = xyes &&
12269 cat >>confdefs.h <<\EOF
12270 #define USE_HARD_TABS 1
12271 EOF
12272
12273 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12274 echo "$as_me:12274: checking if you want limited support for xmc" >&5
12275 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12276
12277 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12278 if test "${enable_xmc_glitch+set}" = set; then
12279   enableval="$enable_xmc_glitch"
12280
12281 else
12282   enable_xmc_glitch=$with_develop
12283 fi;
12284 echo "$as_me:12284: result: $enable_xmc_glitch" >&5
12285 echo "${ECHO_T}$enable_xmc_glitch" >&6
12286 test "x$enable_xmc_glitch" = xyes &&
12287 cat >>confdefs.h <<\EOF
12288 #define USE_XMC_SUPPORT 1
12289 EOF
12290
12291 ###############################################################################
12292 # These are just experimental, probably should not be in a package:
12293
12294 echo "$as_me:12294: checking if you do not want to assume colors are white-on-black" >&5
12295 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12296
12297 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12298 if test "${enable_assumed_color+set}" = set; then
12299   enableval="$enable_assumed_color"
12300   with_assumed_color=$enableval
12301 else
12302   with_assumed_color=yes
12303 fi;
12304 echo "$as_me:12304: result: $with_assumed_color" >&5
12305 echo "${ECHO_T}$with_assumed_color" >&6
12306 test "x$with_assumed_color" = xyes &&
12307 cat >>confdefs.h <<\EOF
12308 #define USE_ASSUMED_COLOR 1
12309 EOF
12310
12311 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12312 echo "$as_me:12312: checking if you want hashmap scrolling-optimization code" >&5
12313 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12314
12315 # Check whether --enable-hashmap or --disable-hashmap was given.
12316 if test "${enable_hashmap+set}" = set; then
12317   enableval="$enable_hashmap"
12318   with_hashmap=$enableval
12319 else
12320   with_hashmap=yes
12321 fi;
12322 echo "$as_me:12322: result: $with_hashmap" >&5
12323 echo "${ECHO_T}$with_hashmap" >&6
12324 test "x$with_hashmap" = xyes &&
12325 cat >>confdefs.h <<\EOF
12326 #define USE_HASHMAP 1
12327 EOF
12328
12329 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12330 echo "$as_me:12330: checking if you want colorfgbg code" >&5
12331 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12332
12333 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12334 if test "${enable_colorfgbg+set}" = set; then
12335   enableval="$enable_colorfgbg"
12336   with_colorfgbg=$enableval
12337 else
12338   with_colorfgbg=no
12339 fi;
12340 echo "$as_me:12340: result: $with_colorfgbg" >&5
12341 echo "${ECHO_T}$with_colorfgbg" >&6
12342 test "x$with_colorfgbg" = xyes &&
12343 cat >>confdefs.h <<\EOF
12344 #define USE_COLORFGBG 1
12345 EOF
12346
12347 ###   use option --enable-interop to turn on use of bindings used for interop
12348 echo "$as_me:12348: checking if you want interop bindings" >&5
12349 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12350
12351 # Check whether --enable-interop or --disable-interop was given.
12352 if test "${enable_interop+set}" = set; then
12353   enableval="$enable_interop"
12354   with_exp_interop=$enableval
12355 else
12356   with_exp_interop=$cf_dft_interop
12357 fi;
12358 echo "$as_me:12358: result: $with_exp_interop" >&5
12359 echo "${ECHO_T}$with_exp_interop" >&6
12360
12361 NCURSES_INTEROP_FUNCS=0
12362 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12363
12364 # This is still experimental (20080329), but should ultimately be moved to
12365 # the script-block --with-normal, etc.
12366
12367 echo "$as_me:12367: checking if you want to link with the pthread library" >&5
12368 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12369
12370 # Check whether --with-pthread or --without-pthread was given.
12371 if test "${with_pthread+set}" = set; then
12372   withval="$with_pthread"
12373   with_pthread=$withval
12374 else
12375   with_pthread=no
12376 fi;
12377 echo "$as_me:12377: result: $with_pthread" >&5
12378 echo "${ECHO_T}$with_pthread" >&6
12379
12380 if test "$with_pthread" != no ; then
12381         echo "$as_me:12381: checking for pthread.h" >&5
12382 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12383 if test "${ac_cv_header_pthread_h+set}" = set; then
12384   echo $ECHO_N "(cached) $ECHO_C" >&6
12385 else
12386   cat >conftest.$ac_ext <<_ACEOF
12387 #line 12387 "configure"
12388 #include "confdefs.h"
12389 #include <pthread.h>
12390 _ACEOF
12391 if { (eval echo "$as_me:12391: \"$ac_cpp conftest.$ac_ext\"") >&5
12392   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12393   ac_status=$?
12394   egrep -v '^ *\+' conftest.er1 >conftest.err
12395   rm -f conftest.er1
12396   cat conftest.err >&5
12397   echo "$as_me:12397: \$? = $ac_status" >&5
12398   (exit $ac_status); } >/dev/null; then
12399   if test -s conftest.err; then
12400     ac_cpp_err=$ac_c_preproc_warn_flag
12401   else
12402     ac_cpp_err=
12403   fi
12404 else
12405   ac_cpp_err=yes
12406 fi
12407 if test -z "$ac_cpp_err"; then
12408   ac_cv_header_pthread_h=yes
12409 else
12410   echo "$as_me: failed program was:" >&5
12411   cat conftest.$ac_ext >&5
12412   ac_cv_header_pthread_h=no
12413 fi
12414 rm -f conftest.err conftest.$ac_ext
12415 fi
12416 echo "$as_me:12416: result: $ac_cv_header_pthread_h" >&5
12417 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12418 if test $ac_cv_header_pthread_h = yes; then
12419
12420 cat >>confdefs.h <<\EOF
12421 #define HAVE_PTHREADS_H 1
12422 EOF
12423
12424         for cf_lib_pthread in pthread c_r
12425         do
12426             echo "$as_me:12426: checking if we can link with the $cf_lib_pthread library" >&5
12427 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12428             cf_save_LIBS="$LIBS"
12429
12430 cf_add_libs="-l$cf_lib_pthread"
12431 # Filter out duplicates - this happens with badly-designed ".pc" files...
12432 for cf_add_1lib in $LIBS
12433 do
12434         for cf_add_2lib in $cf_add_libs
12435         do
12436                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12437                 then
12438                         cf_add_1lib=
12439                         break
12440                 fi
12441         done
12442         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12443 done
12444 LIBS="$cf_add_libs"
12445
12446             cat >conftest.$ac_ext <<_ACEOF
12447 #line 12447 "configure"
12448 #include "confdefs.h"
12449
12450 #include <pthread.h>
12451
12452 int
12453 main ()
12454 {
12455
12456                 int rc = pthread_create(0,0,0,0);
12457                 int r2 = pthread_mutexattr_settype(0, 0);
12458
12459   ;
12460   return 0;
12461 }
12462 _ACEOF
12463 rm -f conftest.$ac_objext conftest$ac_exeext
12464 if { (eval echo "$as_me:12464: \"$ac_link\"") >&5
12465   (eval $ac_link) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); } &&
12469          { ac_try='test -s conftest$ac_exeext'
12470   { (eval echo "$as_me:12470: \"$ac_try\"") >&5
12471   (eval $ac_try) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit $ac_status); }; }; then
12475   with_pthread=yes
12476 else
12477   echo "$as_me: failed program was:" >&5
12478 cat conftest.$ac_ext >&5
12479 with_pthread=no
12480 fi
12481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12482             LIBS="$cf_save_LIBS"
12483             echo "$as_me:12483: result: $with_pthread" >&5
12484 echo "${ECHO_T}$with_pthread" >&6
12485             test "$with_pthread" = yes && break
12486         done
12487
12488         if test "$with_pthread" = yes ; then
12489
12490 cf_add_libs="-l$cf_lib_pthread"
12491 # Filter out duplicates - this happens with badly-designed ".pc" files...
12492 for cf_add_1lib in $LIBS
12493 do
12494         for cf_add_2lib in $cf_add_libs
12495         do
12496                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12497                 then
12498                         cf_add_1lib=
12499                         break
12500                 fi
12501         done
12502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12503 done
12504 LIBS="$cf_add_libs"
12505
12506 cat >>confdefs.h <<\EOF
12507 #define HAVE_LIBPTHREADS 1
12508 EOF
12509
12510         else
12511             { { echo "$as_me:12511: error: Cannot link with pthread library" >&5
12512 echo "$as_me: error: Cannot link with pthread library" >&2;}
12513    { (exit 1); exit 1; }; }
12514         fi
12515
12516 fi
12517
12518 fi
12519
12520 if test "x$with_pthread" != xno; then
12521         echo "$as_me:12521: checking for pthread_kill" >&5
12522 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12523 if test "${ac_cv_func_pthread_kill+set}" = set; then
12524   echo $ECHO_N "(cached) $ECHO_C" >&6
12525 else
12526   cat >conftest.$ac_ext <<_ACEOF
12527 #line 12527 "configure"
12528 #include "confdefs.h"
12529 /* System header to define __stub macros and hopefully few prototypes,
12530     which can conflict with char pthread_kill (); below.  */
12531 #include <assert.h>
12532 /* Override any gcc2 internal prototype to avoid an error.  */
12533 #ifdef __cplusplus
12534 extern "C"
12535 #endif
12536 /* We use char because int might match the return type of a gcc2
12537    builtin and then its argument prototype would still apply.  */
12538 char pthread_kill ();
12539 char (*f) ();
12540
12541 int
12542 main ()
12543 {
12544 /* The GNU C library defines this for functions which it implements
12545     to always fail with ENOSYS.  Some functions are actually named
12546     something starting with __ and the normal name is an alias.  */
12547 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12548 choke me
12549 #else
12550 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12551 #endif
12552
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557 rm -f conftest.$ac_objext conftest$ac_exeext
12558 if { (eval echo "$as_me:12558: \"$ac_link\"") >&5
12559   (eval $ac_link) 2>&5
12560   ac_status=$?
12561   echo "$as_me:12561: \$? = $ac_status" >&5
12562   (exit $ac_status); } &&
12563          { ac_try='test -s conftest$ac_exeext'
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_func_pthread_kill=yes
12570 else
12571   echo "$as_me: failed program was:" >&5
12572 cat conftest.$ac_ext >&5
12573 ac_cv_func_pthread_kill=no
12574 fi
12575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12576 fi
12577 echo "$as_me:12577: result: $ac_cv_func_pthread_kill" >&5
12578 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12579 if test $ac_cv_func_pthread_kill = yes; then
12580
12581                 echo "$as_me:12581: checking if you want to allow EINTR in wgetch with pthreads" >&5
12582 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12583
12584 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12585 if test "${enable_pthreads_eintr+set}" = set; then
12586   enableval="$enable_pthreads_eintr"
12587   use_pthreads_eintr=$enableval
12588 else
12589   use_pthreads_eintr=no
12590 fi;
12591                 echo "$as_me:12591: result: $use_pthreads_eintr" >&5
12592 echo "${ECHO_T}$use_pthreads_eintr" >&6
12593                 if test "x$use_pthreads_eintr" = xyes ; then
12594
12595 cat >>confdefs.h <<\EOF
12596 #define USE_PTHREADS_EINTR 1
12597 EOF
12598
12599                 fi
12600 fi
12601
12602         echo "$as_me:12602: checking if you want to use weak-symbols for pthreads" >&5
12603 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12604
12605 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12606 if test "${enable_weak_symbols+set}" = set; then
12607   enableval="$enable_weak_symbols"
12608   use_weak_symbols=$enableval
12609 else
12610   use_weak_symbols=no
12611 fi;
12612         echo "$as_me:12612: result: $use_weak_symbols" >&5
12613 echo "${ECHO_T}$use_weak_symbols" >&6
12614         if test "x$use_weak_symbols" = xyes ; then
12615
12616 echo "$as_me:12616: checking if $CC supports weak symbols" >&5
12617 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12618 if test "${cf_cv_weak_symbols+set}" = set; then
12619   echo $ECHO_N "(cached) $ECHO_C" >&6
12620 else
12621
12622 cat >conftest.$ac_ext <<_ACEOF
12623 #line 12623 "configure"
12624 #include "confdefs.h"
12625
12626 #include <stdio.h>
12627 int
12628 main ()
12629 {
12630
12631 #if defined(__GNUC__)
12632 #  if defined __USE_ISOC99
12633 #    define _cat_pragma(exp)    _Pragma(#exp)
12634 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12635 #  else
12636 #    define _weak_pragma(exp)
12637 #  endif
12638 #  define _declare(name)        __extension__ extern __typeof__(name) name
12639 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12640 #endif
12641
12642 weak_symbol(fopen);
12643
12644   ;
12645   return 0;
12646 }
12647 _ACEOF
12648 rm -f conftest.$ac_objext
12649 if { (eval echo "$as_me:12649: \"$ac_compile\"") >&5
12650   (eval $ac_compile) 2>&5
12651   ac_status=$?
12652   echo "$as_me:12652: \$? = $ac_status" >&5
12653   (exit $ac_status); } &&
12654          { ac_try='test -s conftest.$ac_objext'
12655   { (eval echo "$as_me:12655: \"$ac_try\"") >&5
12656   (eval $ac_try) 2>&5
12657   ac_status=$?
12658   echo "$as_me:12658: \$? = $ac_status" >&5
12659   (exit $ac_status); }; }; then
12660   cf_cv_weak_symbols=yes
12661 else
12662   echo "$as_me: failed program was:" >&5
12663 cat conftest.$ac_ext >&5
12664 cf_cv_weak_symbols=no
12665 fi
12666 rm -f conftest.$ac_objext conftest.$ac_ext
12667
12668 fi
12669 echo "$as_me:12669: result: $cf_cv_weak_symbols" >&5
12670 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12671
12672         else
12673                 cf_cv_weak_symbols=no
12674         fi
12675
12676         if test "x$cf_cv_weak_symbols" = xyes ; then
12677
12678 cat >>confdefs.h <<\EOF
12679 #define USE_WEAK_SYMBOLS 1
12680 EOF
12681
12682         fi
12683 fi
12684
12685 PTHREAD=
12686 if test "x$with_pthread" = "xyes" ; then
12687
12688 cat >>confdefs.h <<\EOF
12689 #define USE_PTHREADS 1
12690 EOF
12691
12692         enable_reentrant=yes
12693         if test "x$cf_cv_weak_symbols" = xyes ; then
12694                 PTHREAD=-lpthread
12695         fi
12696 fi
12697
12698 # Reentrant code has to be opaque; there's little advantage to making ncurses
12699 # opaque outside of that, so there is no --enable-opaque option.  We can use
12700 # this option without --with-pthreads, but this will be always set for
12701 # pthreads.
12702 echo "$as_me:12702: checking if you want reentrant code" >&5
12703 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12704
12705 # Check whether --enable-reentrant or --disable-reentrant was given.
12706 if test "${enable_reentrant+set}" = set; then
12707   enableval="$enable_reentrant"
12708   with_reentrant=$enableval
12709 else
12710   with_reentrant=no
12711 fi;
12712 echo "$as_me:12712: result: $with_reentrant" >&5
12713 echo "${ECHO_T}$with_reentrant" >&6
12714 if test "x$with_reentrant" = xyes ; then
12715         cf_cv_enable_reentrant=1
12716         cf_cv_enable_opaque="NCURSES_INTERNALS"
12717         NCURSES_OPAQUE=1
12718         NCURSES_SIZE_T=int
12719         if test "x$cf_cv_weak_symbols" = xyes ; then
12720
12721 # remove pthread library from $LIBS
12722 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12723
12724 cf_add_libs="-lpthread"
12725 # Filter out duplicates - this happens with badly-designed ".pc" files...
12726 for cf_add_1lib in $TEST_LIBS
12727 do
12728         for cf_add_2lib in $cf_add_libs
12729         do
12730                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12731                 then
12732                         cf_add_1lib=
12733                         break
12734                 fi
12735         done
12736         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12737 done
12738 TEST_LIBS="$cf_add_libs"
12739
12740 cf_add_libs="-lpthread"
12741 # Filter out duplicates - this happens with badly-designed ".pc" files...
12742 for cf_add_1lib in $TEST_LIBS2
12743 do
12744         for cf_add_2lib in $cf_add_libs
12745         do
12746                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12747                 then
12748                         cf_add_1lib=
12749                         break
12750                 fi
12751         done
12752         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12753 done
12754 TEST_LIBS2="$cf_add_libs"
12755
12756         else
12757                 # when not using weak symbols but with_reentrant,
12758                 # add 't' to the library suffix on all platforms
12759                 # except cygwin, where we only do that if ALSO
12760                 # compiling with full thread support.
12761                 case "$host" in
12762                 (*cygwin* | *msys*)
12763                         if test "$with_pthread" = "yes" ; then
12764                                 if test "x$disable_lib_suffixes" = "xno" ; then
12765                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12766                                 fi
12767                         fi ;;
12768                 (*)
12769                         if test "x$disable_lib_suffixes" = "xno" ; then
12770                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12771                         fi
12772                         ;;
12773                 esac
12774         fi
12775
12776 cat >>confdefs.h <<\EOF
12777 #define USE_REENTRANT 1
12778 EOF
12779
12780 if test "${with_abi_version+set}" != set; then
12781         case $cf_cv_rel_version in
12782         (5.*)
12783                 cf_cv_rel_version=6.0
12784                 cf_cv_abi_version=6
12785                 { echo "$as_me:12785: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12786 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12787                 ;;
12788         esac
12789 fi
12790
12791 else
12792         cf_cv_enable_reentrant=0
12793         cf_cv_enable_opaque="NCURSES_OPAQUE"
12794         NCURSES_OPAQUE=0
12795         NCURSES_SIZE_T=short
12796 fi
12797
12798 ### Allow using a different wrap-prefix
12799 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12800         echo "$as_me:12800: checking for prefix used to wrap public variables" >&5
12801 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12802
12803 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12804 if test "${with_wrap_prefix+set}" = set; then
12805   withval="$with_wrap_prefix"
12806   NCURSES_WRAP_PREFIX=$withval
12807 else
12808   NCURSES_WRAP_PREFIX=_nc_
12809 fi;
12810         echo "$as_me:12810: result: $NCURSES_WRAP_PREFIX" >&5
12811 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12812 else
12813         NCURSES_WRAP_PREFIX=_nc_
12814 fi
12815
12816 cat >>confdefs.h <<EOF
12817 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12818 EOF
12819
12820 echo "$as_me:12820: checking if you want experimental safe-sprintf code" >&5
12821 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12822
12823 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12824 if test "${enable_safe_sprintf+set}" = set; then
12825   enableval="$enable_safe_sprintf"
12826   with_safe_sprintf=$enableval
12827 else
12828   with_safe_sprintf=no
12829 fi;
12830 echo "$as_me:12830: result: $with_safe_sprintf" >&5
12831 echo "${ECHO_T}$with_safe_sprintf" >&6
12832 test "x$with_safe_sprintf" = xyes &&
12833 cat >>confdefs.h <<\EOF
12834 #define USE_SAFE_SPRINTF 1
12835 EOF
12836
12837 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12838 # when hashmap is used scroll hints are useless
12839 if test "$with_hashmap" = no ; then
12840 echo "$as_me:12840: checking if you want to experiment without scrolling-hints code" >&5
12841 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12842
12843 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12844 if test "${enable_scroll_hints+set}" = set; then
12845   enableval="$enable_scroll_hints"
12846   with_scroll_hints=$enableval
12847 else
12848   with_scroll_hints=yes
12849 fi;
12850 echo "$as_me:12850: result: $with_scroll_hints" >&5
12851 echo "${ECHO_T}$with_scroll_hints" >&6
12852 test "x$with_scroll_hints" = xyes &&
12853 cat >>confdefs.h <<\EOF
12854 #define USE_SCROLL_HINTS 1
12855 EOF
12856
12857 fi
12858
12859 echo "$as_me:12859: checking if you want wgetch-events code" >&5
12860 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12861
12862 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12863 if test "${enable_wgetch_events+set}" = set; then
12864   enableval="$enable_wgetch_events"
12865   with_wgetch_events=$enableval
12866 else
12867   with_wgetch_events=no
12868 fi;
12869 echo "$as_me:12869: result: $with_wgetch_events" >&5
12870 echo "${ECHO_T}$with_wgetch_events" >&6
12871 test "x$with_wgetch_events" = xyes &&
12872 cat >>confdefs.h <<\EOF
12873 #define NCURSES_WGETCH_EVENTS 1
12874 EOF
12875
12876 ###############################################################################
12877
12878 ###     use option --disable-echo to suppress full display compiling commands
12879
12880 echo "$as_me:12880: checking if you want to see long compiling messages" >&5
12881 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12882
12883 # Check whether --enable-echo or --disable-echo was given.
12884 if test "${enable_echo+set}" = set; then
12885   enableval="$enable_echo"
12886   test "$enableval" != no && enableval=yes
12887         if test "$enableval" != "yes" ; then
12888
12889         ECHO_LT='--silent'
12890         ECHO_LD='@echo linking $@;'
12891         RULE_CC='@echo compiling $<'
12892         SHOW_CC='@echo compiling $@'
12893         ECHO_CC='@'
12894
12895         else
12896
12897         ECHO_LT=''
12898         ECHO_LD=''
12899         RULE_CC=''
12900         SHOW_CC=''
12901         ECHO_CC=''
12902
12903         fi
12904 else
12905   enableval=yes
12906
12907         ECHO_LT=''
12908         ECHO_LD=''
12909         RULE_CC=''
12910         SHOW_CC=''
12911         ECHO_CC=''
12912
12913 fi;
12914 echo "$as_me:12914: result: $enableval" >&5
12915 echo "${ECHO_T}$enableval" >&6
12916
12917 if test "x$enable_echo" = xyes; then
12918         ECHO_LINK=
12919 else
12920         ECHO_LINK='@ echo linking $@ ... ;'
12921         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12922         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12923 fi
12924
12925 ###     use option --enable-warnings to turn on all gcc warnings
12926 echo "$as_me:12926: checking if you want to see compiler warnings" >&5
12927 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12928
12929 # Check whether --enable-warnings or --disable-warnings was given.
12930 if test "${enable_warnings+set}" = set; then
12931   enableval="$enable_warnings"
12932   with_warnings=$enableval
12933 fi;
12934 echo "$as_me:12934: result: $with_warnings" >&5
12935 echo "${ECHO_T}$with_warnings" >&6
12936
12937 if test "x$with_warnings" = "xyes"; then
12938
12939         ADAFLAGS="$ADAFLAGS -gnatg"
12940
12941 INTEL_COMPILER=no
12942
12943 if test "$GCC" = yes ; then
12944         case $host_os in
12945         (linux*|gnu*)
12946                 echo "$as_me:12946: checking if this is really Intel C compiler" >&5
12947 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12948                 cf_save_CFLAGS="$CFLAGS"
12949                 CFLAGS="$CFLAGS -no-gcc"
12950                 cat >conftest.$ac_ext <<_ACEOF
12951 #line 12951 "configure"
12952 #include "confdefs.h"
12953
12954 int
12955 main ()
12956 {
12957
12958 #ifdef __INTEL_COMPILER
12959 #else
12960 make an error
12961 #endif
12962
12963   ;
12964   return 0;
12965 }
12966 _ACEOF
12967 rm -f conftest.$ac_objext
12968 if { (eval echo "$as_me:12968: \"$ac_compile\"") >&5
12969   (eval $ac_compile) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); } &&
12973          { ac_try='test -s conftest.$ac_objext'
12974   { (eval echo "$as_me:12974: \"$ac_try\"") >&5
12975   (eval $ac_try) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); }; }; then
12979   INTEL_COMPILER=yes
12980 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12981
12982 else
12983   echo "$as_me: failed program was:" >&5
12984 cat conftest.$ac_ext >&5
12985 fi
12986 rm -f conftest.$ac_objext conftest.$ac_ext
12987                 CFLAGS="$cf_save_CFLAGS"
12988                 echo "$as_me:12988: result: $INTEL_COMPILER" >&5
12989 echo "${ECHO_T}$INTEL_COMPILER" >&6
12990                 ;;
12991         esac
12992 fi
12993
12994 CLANG_COMPILER=no
12995
12996 if test "$GCC" = yes ; then
12997         echo "$as_me:12997: checking if this is really Clang C compiler" >&5
12998 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12999         cf_save_CFLAGS="$CFLAGS"
13000         CFLAGS="$CFLAGS -Qunused-arguments"
13001         cat >conftest.$ac_ext <<_ACEOF
13002 #line 13002 "configure"
13003 #include "confdefs.h"
13004
13005 int
13006 main ()
13007 {
13008
13009 #ifdef __clang__
13010 #else
13011 make an error
13012 #endif
13013
13014   ;
13015   return 0;
13016 }
13017 _ACEOF
13018 rm -f conftest.$ac_objext
13019 if { (eval echo "$as_me:13019: \"$ac_compile\"") >&5
13020   (eval $ac_compile) 2>&5
13021   ac_status=$?
13022   echo "$as_me:13022: \$? = $ac_status" >&5
13023   (exit $ac_status); } &&
13024          { ac_try='test -s conftest.$ac_objext'
13025   { (eval echo "$as_me:13025: \"$ac_try\"") >&5
13026   (eval $ac_try) 2>&5
13027   ac_status=$?
13028   echo "$as_me:13028: \$? = $ac_status" >&5
13029   (exit $ac_status); }; }; then
13030   CLANG_COMPILER=yes
13031 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13032
13033 else
13034   echo "$as_me: failed program was:" >&5
13035 cat conftest.$ac_ext >&5
13036 fi
13037 rm -f conftest.$ac_objext conftest.$ac_ext
13038         CFLAGS="$cf_save_CFLAGS"
13039         echo "$as_me:13039: result: $CLANG_COMPILER" >&5
13040 echo "${ECHO_T}$CLANG_COMPILER" >&6
13041 fi
13042
13043 cat > conftest.$ac_ext <<EOF
13044 #line 13044 "${as_me:-configure}"
13045 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13046 EOF
13047
13048 if test "$INTEL_COMPILER" = yes
13049 then
13050 # The "-wdXXX" options suppress warnings:
13051 # remark #1419: external declaration in primary source file
13052 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13053 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13054 # remark #193: zero used for undefined preprocessing identifier
13055 # remark #593: variable "curs_sb_left_arrow" was set but never used
13056 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13057 # remark #869: parameter "tw" was never referenced
13058 # remark #981: operands are evaluated in unspecified order
13059 # warning #279: controlling expression is constant
13060
13061         { echo "$as_me:13061: checking for $CC warning options..." >&5
13062 echo "$as_me: checking for $CC warning options..." >&6;}
13063         cf_save_CFLAGS="$CFLAGS"
13064         EXTRA_CFLAGS="-Wall"
13065         for cf_opt in \
13066                 wd1419 \
13067                 wd1683 \
13068                 wd1684 \
13069                 wd193 \
13070                 wd593 \
13071                 wd279 \
13072                 wd810 \
13073                 wd869 \
13074                 wd981
13075         do
13076                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13077                 if { (eval echo "$as_me:13077: \"$ac_compile\"") >&5
13078   (eval $ac_compile) 2>&5
13079   ac_status=$?
13080   echo "$as_me:13080: \$? = $ac_status" >&5
13081   (exit $ac_status); }; then
13082                         test -n "$verbose" && echo "$as_me:13082: result: ... -$cf_opt" >&5
13083 echo "${ECHO_T}... -$cf_opt" >&6
13084                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13085                 fi
13086         done
13087         CFLAGS="$cf_save_CFLAGS"
13088
13089 elif test "$GCC" = yes
13090 then
13091         { echo "$as_me:13091: checking for $CC warning options..." >&5
13092 echo "$as_me: checking for $CC warning options..." >&6;}
13093         cf_save_CFLAGS="$CFLAGS"
13094         EXTRA_CFLAGS=
13095         cf_warn_CONST=""
13096         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13097         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13098         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13099         for cf_opt in W Wall \
13100                 Wbad-function-cast \
13101                 Wcast-align \
13102                 Wcast-qual \
13103                 Wdeclaration-after-statement \
13104                 Wextra \
13105                 Winline \
13106                 Wmissing-declarations \
13107                 Wmissing-prototypes \
13108                 Wnested-externs \
13109                 Wpointer-arith \
13110                 Wshadow \
13111                 Wstrict-prototypes \
13112                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13113         do
13114                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13115                 if { (eval echo "$as_me:13115: \"$ac_compile\"") >&5
13116   (eval $ac_compile) 2>&5
13117   ac_status=$?
13118   echo "$as_me:13118: \$? = $ac_status" >&5
13119   (exit $ac_status); }; then
13120                         test -n "$verbose" && echo "$as_me:13120: result: ... -$cf_opt" >&5
13121 echo "${ECHO_T}... -$cf_opt" >&6
13122                         case $cf_opt in
13123                         (Wcast-qual)
13124                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13125                                 ;;
13126                         (Winline)
13127                                 case $GCC_VERSION in
13128                                 ([34].*)
13129                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13130
13131 echo "${as_me:-configure}:13131: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13132
13133                                         continue;;
13134                                 esac
13135                                 ;;
13136                         (Wpointer-arith)
13137                                 case $GCC_VERSION in
13138                                 ([12].*)
13139                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13140
13141 echo "${as_me:-configure}:13141: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13142
13143                                         continue;;
13144                                 esac
13145                                 ;;
13146                         esac
13147                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13148                 fi
13149         done
13150         CFLAGS="$cf_save_CFLAGS"
13151 fi
13152 rm -rf conftest*
13153
13154         if test "x$cf_with_cxx" = xyes ; then
13155
13156 INTEL_CPLUSPLUS=no
13157
13158 if test "$GCC" = yes ; then
13159         case $host_os in
13160         (linux*|gnu*)
13161                 echo "$as_me:13161: checking if this is really Intel C++ compiler" >&5
13162 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13163                 cf_save_CFLAGS="$CXXFLAGS"
13164                 CXXFLAGS="$CXXFLAGS -no-gcc"
13165                 cat >conftest.$ac_ext <<_ACEOF
13166 #line 13166 "configure"
13167 #include "confdefs.h"
13168
13169 int
13170 main ()
13171 {
13172
13173 #ifdef __INTEL_COMPILER
13174 #else
13175 make an error
13176 #endif
13177
13178   ;
13179   return 0;
13180 }
13181 _ACEOF
13182 rm -f conftest.$ac_objext
13183 if { (eval echo "$as_me:13183: \"$ac_compile\"") >&5
13184   (eval $ac_compile) 2>&5
13185   ac_status=$?
13186   echo "$as_me:13186: \$? = $ac_status" >&5
13187   (exit $ac_status); } &&
13188          { ac_try='test -s conftest.$ac_objext'
13189   { (eval echo "$as_me:13189: \"$ac_try\"") >&5
13190   (eval $ac_try) 2>&5
13191   ac_status=$?
13192   echo "$as_me:13192: \$? = $ac_status" >&5
13193   (exit $ac_status); }; }; then
13194   INTEL_CPLUSPLUS=yes
13195 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13196
13197 else
13198   echo "$as_me: failed program was:" >&5
13199 cat conftest.$ac_ext >&5
13200 fi
13201 rm -f conftest.$ac_objext conftest.$ac_ext
13202                 CXXFLAGS="$cf_save_CFLAGS"
13203                 echo "$as_me:13203: result: $INTEL_CPLUSPLUS" >&5
13204 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13205                 ;;
13206         esac
13207 fi
13208
13209 CLANG_CPLUSPLUS=no
13210
13211 if test "$GCC" = yes ; then
13212         echo "$as_me:13212: checking if this is really Clang C++ compiler" >&5
13213 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13214         cf_save_CFLAGS="$CXXFLAGS"
13215         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13216         cat >conftest.$ac_ext <<_ACEOF
13217 #line 13217 "configure"
13218 #include "confdefs.h"
13219
13220 int
13221 main ()
13222 {
13223
13224 #ifdef __clang__
13225 #else
13226 make an error
13227 #endif
13228
13229   ;
13230   return 0;
13231 }
13232 _ACEOF
13233 rm -f conftest.$ac_objext
13234 if { (eval echo "$as_me:13234: \"$ac_compile\"") >&5
13235   (eval $ac_compile) 2>&5
13236   ac_status=$?
13237   echo "$as_me:13237: \$? = $ac_status" >&5
13238   (exit $ac_status); } &&
13239          { ac_try='test -s conftest.$ac_objext'
13240   { (eval echo "$as_me:13240: \"$ac_try\"") >&5
13241   (eval $ac_try) 2>&5
13242   ac_status=$?
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); }; }; then
13245   CLANG_CPLUSPLUS=yes
13246 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13247
13248 else
13249   echo "$as_me: failed program was:" >&5
13250 cat conftest.$ac_ext >&5
13251 fi
13252 rm -f conftest.$ac_objext conftest.$ac_ext
13253         CXXFLAGS="$cf_save_CFLAGS"
13254         echo "$as_me:13254: result: $CLANG_CPLUSPLUS" >&5
13255 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13256 fi
13257
13258 ac_ext=cc
13259 ac_cpp='$CXXCPP $CPPFLAGS'
13260 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13261 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13262 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13263 ac_main_return=return
13264
13265 cat > conftest.$ac_ext <<EOF
13266 #line 13266 "configure"
13267 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13268 EOF
13269
13270 if test "$INTEL_CPLUSPLUS" = yes
13271 then
13272 # The "-wdXXX" options suppress warnings:
13273 # remark #1419: external declaration in primary source file
13274 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13275 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13276 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13277 # remark #193: zero used for undefined preprocessing identifier
13278 # remark #593: variable "curs_sb_left_arrow" was set but never used
13279 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13280 # remark #869: parameter "tw" was never referenced
13281 # remark #981: operands are evaluated in unspecified order
13282 # warning #269: invalid format string conversion
13283
13284         { echo "$as_me:13284: checking for $CC warning options..." >&5
13285 echo "$as_me: checking for $CC warning options..." >&6;}
13286         cf_save_CXXFLAGS="$CXXFLAGS"
13287         EXTRA_CXXFLAGS="-Wall"
13288         for cf_opt in \
13289                 wd1419 \
13290                 wd1682 \
13291                 wd1683 \
13292                 wd1684 \
13293                 wd193 \
13294                 wd279 \
13295                 wd593 \
13296                 wd810 \
13297                 wd869 \
13298                 wd981
13299         do
13300                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13301                 if { (eval echo "$as_me:13301: \"$ac_compile\"") >&5
13302   (eval $ac_compile) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); }; then
13306                         test -n "$verbose" && echo "$as_me:13306: result: ... -$cf_opt" >&5
13307 echo "${ECHO_T}... -$cf_opt" >&6
13308                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13309                 fi
13310         done
13311         CXXFLAGS="$cf_save_CXXFLAGS"
13312
13313 elif test "$GXX" = yes
13314 then
13315         { echo "$as_me:13315: checking for $CXX warning options..." >&5
13316 echo "$as_me: checking for $CXX warning options..." >&6;}
13317         cf_save_CXXFLAGS="$CXXFLAGS"
13318         EXTRA_CXXFLAGS="-W -Wall"
13319         cf_gxx_extra_warnings=""
13320         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13321         case "$GCC_VERSION" in
13322         ([1-2].*)
13323                 ;;
13324         (*)
13325                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13326                 ;;
13327         esac
13328         for cf_opt in \
13329                 Wabi \
13330                 fabi-version=0 \
13331                 Wextra \
13332                 Wignored-qualifiers \
13333                 Wlogical-op \
13334                 Woverloaded-virtual \
13335                 Wsign-promo \
13336                 Wsynth \
13337                 Wold-style-cast \
13338                 Wcast-align \
13339                 Wcast-qual \
13340                 Wpointer-arith \
13341                 Wshadow \
13342                 Wundef $cf_gxx_extra_warnings Wno-unused
13343         do
13344                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13345                 if { (eval echo "$as_me:13345: \"$ac_compile\"") >&5
13346   (eval $ac_compile) 2>&5
13347   ac_status=$?
13348   echo "$as_me:13348: \$? = $ac_status" >&5
13349   (exit $ac_status); }; then
13350                         test -n "$verbose" && echo "$as_me:13350: result: ... -$cf_opt" >&5
13351 echo "${ECHO_T}... -$cf_opt" >&6
13352                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13353                 else
13354                         test -n "$verbose" && echo "$as_me:13354: result: ... no -$cf_opt" >&5
13355 echo "${ECHO_T}... no -$cf_opt" >&6
13356                 fi
13357         done
13358         CXXFLAGS="$cf_save_CXXFLAGS"
13359 fi
13360
13361 rm -rf conftest*
13362 ac_ext=c
13363 ac_cpp='$CPP $CPPFLAGS'
13364 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13365 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13366 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13367 ac_main_return=return
13368
13369         fi
13370 fi
13371
13372 if test "$GCC" = yes
13373 then
13374 cat > conftest.i <<EOF
13375 #ifndef GCC_PRINTF
13376 #define GCC_PRINTF 0
13377 #endif
13378 #ifndef GCC_SCANF
13379 #define GCC_SCANF 0
13380 #endif
13381 #ifndef GCC_NORETURN
13382 #define GCC_NORETURN /* nothing */
13383 #endif
13384 #ifndef GCC_UNUSED
13385 #define GCC_UNUSED /* nothing */
13386 #endif
13387 EOF
13388 if test "$GCC" = yes
13389 then
13390         { echo "$as_me:13390: checking for $CC __attribute__ directives..." >&5
13391 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13392 cat > conftest.$ac_ext <<EOF
13393 #line 13393 "${as_me:-configure}"
13394 #include "confdefs.h"
13395 #include "conftest.h"
13396 #include "conftest.i"
13397 #if     GCC_PRINTF
13398 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13399 #else
13400 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13401 #endif
13402 #if     GCC_SCANF
13403 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13404 #else
13405 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13406 #endif
13407 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13408 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13409 extern void foo(void) GCC_NORETURN;
13410 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13411 EOF
13412         cf_printf_attribute=no
13413         cf_scanf_attribute=no
13414         for cf_attribute in scanf printf unused noreturn
13415         do
13416
13417 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13418
13419                 cf_directive="__attribute__(($cf_attribute))"
13420                 echo "checking for $CC $cf_directive" 1>&5
13421
13422                 case $cf_attribute in
13423                 (printf)
13424                         cf_printf_attribute=yes
13425                         cat >conftest.h <<EOF
13426 #define GCC_$cf_ATTRIBUTE 1
13427 EOF
13428                         ;;
13429                 (scanf)
13430                         cf_scanf_attribute=yes
13431                         cat >conftest.h <<EOF
13432 #define GCC_$cf_ATTRIBUTE 1
13433 EOF
13434                         ;;
13435                 (*)
13436                         cat >conftest.h <<EOF
13437 #define GCC_$cf_ATTRIBUTE $cf_directive
13438 EOF
13439                         ;;
13440                 esac
13441
13442                 if { (eval echo "$as_me:13442: \"$ac_compile\"") >&5
13443   (eval $ac_compile) 2>&5
13444   ac_status=$?
13445   echo "$as_me:13445: \$? = $ac_status" >&5
13446   (exit $ac_status); }; then
13447                         test -n "$verbose" && echo "$as_me:13447: result: ... $cf_attribute" >&5
13448 echo "${ECHO_T}... $cf_attribute" >&6
13449                         cat conftest.h >>confdefs.h
13450                         case $cf_attribute in
13451                         (noreturn)
13452
13453 cat >>confdefs.h <<EOF
13454 #define GCC_NORETURN $cf_directive
13455 EOF
13456
13457                                 ;;
13458                         (printf)
13459                                 cf_value='/* nothing */'
13460                                 if test "$cf_printf_attribute" != no ; then
13461                                         cf_value='__attribute__((format(printf,fmt,var)))'
13462
13463 cat >>confdefs.h <<\EOF
13464 #define GCC_PRINTF 1
13465 EOF
13466
13467                                 fi
13468
13469 cat >>confdefs.h <<EOF
13470 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13471 EOF
13472
13473                                 ;;
13474                         (scanf)
13475                                 cf_value='/* nothing */'
13476                                 if test "$cf_scanf_attribute" != no ; then
13477                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13478
13479 cat >>confdefs.h <<\EOF
13480 #define GCC_SCANF 1
13481 EOF
13482
13483                                 fi
13484
13485 cat >>confdefs.h <<EOF
13486 #define GCC_SCANFLIKE(fmt,var) $cf_value
13487 EOF
13488
13489                                 ;;
13490                         (unused)
13491
13492 cat >>confdefs.h <<EOF
13493 #define GCC_UNUSED $cf_directive
13494 EOF
13495
13496                                 ;;
13497                         esac
13498                 fi
13499         done
13500 else
13501         fgrep define conftest.i >>confdefs.h
13502 fi
13503 rm -rf conftest*
13504 fi
13505
13506 echo "$as_me:13506: checking if you want to work around bogus compiler/loader warnings" >&5
13507 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13508
13509 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13510 if test "${enable_string_hacks+set}" = set; then
13511   enableval="$enable_string_hacks"
13512   with_string_hacks=$enableval
13513 else
13514   with_string_hacks=no
13515 fi;
13516 echo "$as_me:13516: result: $with_string_hacks" >&5
13517 echo "${ECHO_T}$with_string_hacks" >&6
13518
13519 if test "x$with_string_hacks" = "xyes"; then
13520
13521 cat >>confdefs.h <<\EOF
13522 #define USE_STRING_HACKS 1
13523 EOF
13524
13525         { echo "$as_me:13525: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13526 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13527
13528 for ac_func in strlcat strlcpy snprintf
13529 do
13530 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13531 echo "$as_me:13531: checking for $ac_func" >&5
13532 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13533 if eval "test \"\${$as_ac_var+set}\" = set"; then
13534   echo $ECHO_N "(cached) $ECHO_C" >&6
13535 else
13536   cat >conftest.$ac_ext <<_ACEOF
13537 #line 13537 "configure"
13538 #include "confdefs.h"
13539 /* System header to define __stub macros and hopefully few prototypes,
13540     which can conflict with char $ac_func (); below.  */
13541 #include <assert.h>
13542 /* Override any gcc2 internal prototype to avoid an error.  */
13543 #ifdef __cplusplus
13544 extern "C"
13545 #endif
13546 /* We use char because int might match the return type of a gcc2
13547    builtin and then its argument prototype would still apply.  */
13548 char $ac_func ();
13549 char (*f) ();
13550
13551 int
13552 main ()
13553 {
13554 /* The GNU C library defines this for functions which it implements
13555     to always fail with ENOSYS.  Some functions are actually named
13556     something starting with __ and the normal name is an alias.  */
13557 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13558 choke me
13559 #else
13560 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13561 #endif
13562
13563   ;
13564   return 0;
13565 }
13566 _ACEOF
13567 rm -f conftest.$ac_objext conftest$ac_exeext
13568 if { (eval echo "$as_me:13568: \"$ac_link\"") >&5
13569   (eval $ac_link) 2>&5
13570   ac_status=$?
13571   echo "$as_me:13571: \$? = $ac_status" >&5
13572   (exit $ac_status); } &&
13573          { ac_try='test -s conftest$ac_exeext'
13574   { (eval echo "$as_me:13574: \"$ac_try\"") >&5
13575   (eval $ac_try) 2>&5
13576   ac_status=$?
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit $ac_status); }; }; then
13579   eval "$as_ac_var=yes"
13580 else
13581   echo "$as_me: failed program was:" >&5
13582 cat conftest.$ac_ext >&5
13583 eval "$as_ac_var=no"
13584 fi
13585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13586 fi
13587 echo "$as_me:13587: result: `eval echo '${'$as_ac_var'}'`" >&5
13588 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13589 if test `eval echo '${'$as_ac_var'}'` = yes; then
13590   cat >>confdefs.h <<EOF
13591 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13592 EOF
13593
13594 fi
13595 done
13596
13597 fi
13598
13599 ###     use option --enable-assertions to turn on generation of assertion code
13600 echo "$as_me:13600: checking if you want to enable runtime assertions" >&5
13601 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13602
13603 # Check whether --enable-assertions or --disable-assertions was given.
13604 if test "${enable_assertions+set}" = set; then
13605   enableval="$enable_assertions"
13606   with_assertions=$enableval
13607 else
13608   with_assertions=no
13609 fi;
13610 echo "$as_me:13610: result: $with_assertions" >&5
13611 echo "${ECHO_T}$with_assertions" >&6
13612 if test -n "$GCC"
13613 then
13614         if test "$with_assertions" = no
13615         then
13616                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13617         else
13618
13619         ADAFLAGS="$ADAFLAGS -gnata"
13620
13621         fi
13622 fi
13623
13624 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13625
13626 echo "$as_me:13626: checking if you want to use dmalloc for testing" >&5
13627 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13628
13629 # Check whether --with-dmalloc or --without-dmalloc was given.
13630 if test "${with_dmalloc+set}" = set; then
13631   withval="$with_dmalloc"
13632
13633 cat >>confdefs.h <<EOF
13634 #define USE_DMALLOC 1
13635 EOF
13636
13637         : ${with_cflags:=-g}
13638         : ${with_no_leaks:=yes}
13639          with_dmalloc=yes
13640 else
13641   with_dmalloc=
13642 fi;
13643 echo "$as_me:13643: result: ${with_dmalloc:-no}" >&5
13644 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13645
13646 case .$with_cflags in
13647 (.*-g*)
13648         case .$CFLAGS in
13649         (.*-g*)
13650                 ;;
13651         (*)
13652
13653 cf_fix_cppflags=no
13654 cf_new_cflags=
13655 cf_new_cppflags=
13656 cf_new_extra_cppflags=
13657
13658 for cf_add_cflags in -g
13659 do
13660 case $cf_fix_cppflags in
13661 (no)
13662         case $cf_add_cflags in
13663         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13664                 case $cf_add_cflags in
13665                 (-D*)
13666                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13667
13668                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13669                                 && test -z "${cf_tst_cflags}" \
13670                                 && cf_fix_cppflags=yes
13671
13672                         if test $cf_fix_cppflags = yes ; then
13673                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13674                                 continue
13675                         elif test "${cf_tst_cflags}" = "\"'" ; then
13676                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13677                                 continue
13678                         fi
13679                         ;;
13680                 esac
13681                 case "$CPPFLAGS" in
13682                 (*$cf_add_cflags)
13683                         ;;
13684                 (*)
13685                         case $cf_add_cflags in
13686                         (-D*)
13687                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13688
13689 CPPFLAGS=`echo "$CPPFLAGS" | \
13690         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13691                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13692
13693                                 ;;
13694                         esac
13695                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13696                         ;;
13697                 esac
13698                 ;;
13699         (*)
13700                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13701                 ;;
13702         esac
13703         ;;
13704 (yes)
13705         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13706
13707         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13708
13709         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13710                 && test -z "${cf_tst_cflags}" \
13711                 && cf_fix_cppflags=no
13712         ;;
13713 esac
13714 done
13715
13716 if test -n "$cf_new_cflags" ; then
13717
13718         CFLAGS="$CFLAGS $cf_new_cflags"
13719 fi
13720
13721 if test -n "$cf_new_cppflags" ; then
13722
13723         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13724 fi
13725
13726 if test -n "$cf_new_extra_cppflags" ; then
13727
13728         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13729 fi
13730
13731                 ;;
13732         esac
13733         ;;
13734 esac
13735
13736 if test "$with_dmalloc" = yes ; then
13737         echo "$as_me:13737: checking for dmalloc.h" >&5
13738 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13739 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13740   echo $ECHO_N "(cached) $ECHO_C" >&6
13741 else
13742   cat >conftest.$ac_ext <<_ACEOF
13743 #line 13743 "configure"
13744 #include "confdefs.h"
13745 #include <dmalloc.h>
13746 _ACEOF
13747 if { (eval echo "$as_me:13747: \"$ac_cpp conftest.$ac_ext\"") >&5
13748   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13749   ac_status=$?
13750   egrep -v '^ *\+' conftest.er1 >conftest.err
13751   rm -f conftest.er1
13752   cat conftest.err >&5
13753   echo "$as_me:13753: \$? = $ac_status" >&5
13754   (exit $ac_status); } >/dev/null; then
13755   if test -s conftest.err; then
13756     ac_cpp_err=$ac_c_preproc_warn_flag
13757   else
13758     ac_cpp_err=
13759   fi
13760 else
13761   ac_cpp_err=yes
13762 fi
13763 if test -z "$ac_cpp_err"; then
13764   ac_cv_header_dmalloc_h=yes
13765 else
13766   echo "$as_me: failed program was:" >&5
13767   cat conftest.$ac_ext >&5
13768   ac_cv_header_dmalloc_h=no
13769 fi
13770 rm -f conftest.err conftest.$ac_ext
13771 fi
13772 echo "$as_me:13772: result: $ac_cv_header_dmalloc_h" >&5
13773 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13774 if test $ac_cv_header_dmalloc_h = yes; then
13775
13776 echo "$as_me:13776: checking for dmalloc_debug in -ldmalloc" >&5
13777 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13778 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13779   echo $ECHO_N "(cached) $ECHO_C" >&6
13780 else
13781   ac_check_lib_save_LIBS=$LIBS
13782 LIBS="-ldmalloc  $LIBS"
13783 cat >conftest.$ac_ext <<_ACEOF
13784 #line 13784 "configure"
13785 #include "confdefs.h"
13786
13787 /* Override any gcc2 internal prototype to avoid an error.  */
13788 #ifdef __cplusplus
13789 extern "C"
13790 #endif
13791 /* We use char because int might match the return type of a gcc2
13792    builtin and then its argument prototype would still apply.  */
13793 char dmalloc_debug ();
13794 int
13795 main ()
13796 {
13797 dmalloc_debug ();
13798   ;
13799   return 0;
13800 }
13801 _ACEOF
13802 rm -f conftest.$ac_objext conftest$ac_exeext
13803 if { (eval echo "$as_me:13803: \"$ac_link\"") >&5
13804   (eval $ac_link) 2>&5
13805   ac_status=$?
13806   echo "$as_me:13806: \$? = $ac_status" >&5
13807   (exit $ac_status); } &&
13808          { ac_try='test -s conftest$ac_exeext'
13809   { (eval echo "$as_me:13809: \"$ac_try\"") >&5
13810   (eval $ac_try) 2>&5
13811   ac_status=$?
13812   echo "$as_me:13812: \$? = $ac_status" >&5
13813   (exit $ac_status); }; }; then
13814   ac_cv_lib_dmalloc_dmalloc_debug=yes
13815 else
13816   echo "$as_me: failed program was:" >&5
13817 cat conftest.$ac_ext >&5
13818 ac_cv_lib_dmalloc_dmalloc_debug=no
13819 fi
13820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13821 LIBS=$ac_check_lib_save_LIBS
13822 fi
13823 echo "$as_me:13823: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13824 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13825 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13826   cat >>confdefs.h <<EOF
13827 #define HAVE_LIBDMALLOC 1
13828 EOF
13829
13830   LIBS="-ldmalloc $LIBS"
13831
13832 fi
13833
13834 fi
13835
13836 fi
13837
13838 echo "$as_me:13838: checking if you want to use dbmalloc for testing" >&5
13839 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13840
13841 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13842 if test "${with_dbmalloc+set}" = set; then
13843   withval="$with_dbmalloc"
13844
13845 cat >>confdefs.h <<EOF
13846 #define USE_DBMALLOC 1
13847 EOF
13848
13849         : ${with_cflags:=-g}
13850         : ${with_no_leaks:=yes}
13851          with_dbmalloc=yes
13852 else
13853   with_dbmalloc=
13854 fi;
13855 echo "$as_me:13855: result: ${with_dbmalloc:-no}" >&5
13856 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13857
13858 case .$with_cflags in
13859 (.*-g*)
13860         case .$CFLAGS in
13861         (.*-g*)
13862                 ;;
13863         (*)
13864
13865 cf_fix_cppflags=no
13866 cf_new_cflags=
13867 cf_new_cppflags=
13868 cf_new_extra_cppflags=
13869
13870 for cf_add_cflags in -g
13871 do
13872 case $cf_fix_cppflags in
13873 (no)
13874         case $cf_add_cflags in
13875         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13876                 case $cf_add_cflags in
13877                 (-D*)
13878                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13879
13880                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13881                                 && test -z "${cf_tst_cflags}" \
13882                                 && cf_fix_cppflags=yes
13883
13884                         if test $cf_fix_cppflags = yes ; then
13885                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13886                                 continue
13887                         elif test "${cf_tst_cflags}" = "\"'" ; then
13888                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13889                                 continue
13890                         fi
13891                         ;;
13892                 esac
13893                 case "$CPPFLAGS" in
13894                 (*$cf_add_cflags)
13895                         ;;
13896                 (*)
13897                         case $cf_add_cflags in
13898                         (-D*)
13899                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13900
13901 CPPFLAGS=`echo "$CPPFLAGS" | \
13902         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13903                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13904
13905                                 ;;
13906                         esac
13907                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13908                         ;;
13909                 esac
13910                 ;;
13911         (*)
13912                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13913                 ;;
13914         esac
13915         ;;
13916 (yes)
13917         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13918
13919         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13920
13921         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13922                 && test -z "${cf_tst_cflags}" \
13923                 && cf_fix_cppflags=no
13924         ;;
13925 esac
13926 done
13927
13928 if test -n "$cf_new_cflags" ; then
13929
13930         CFLAGS="$CFLAGS $cf_new_cflags"
13931 fi
13932
13933 if test -n "$cf_new_cppflags" ; then
13934
13935         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13936 fi
13937
13938 if test -n "$cf_new_extra_cppflags" ; then
13939
13940         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13941 fi
13942
13943                 ;;
13944         esac
13945         ;;
13946 esac
13947
13948 if test "$with_dbmalloc" = yes ; then
13949         echo "$as_me:13949: checking for dbmalloc.h" >&5
13950 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13951 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13952   echo $ECHO_N "(cached) $ECHO_C" >&6
13953 else
13954   cat >conftest.$ac_ext <<_ACEOF
13955 #line 13955 "configure"
13956 #include "confdefs.h"
13957 #include <dbmalloc.h>
13958 _ACEOF
13959 if { (eval echo "$as_me:13959: \"$ac_cpp conftest.$ac_ext\"") >&5
13960   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13961   ac_status=$?
13962   egrep -v '^ *\+' conftest.er1 >conftest.err
13963   rm -f conftest.er1
13964   cat conftest.err >&5
13965   echo "$as_me:13965: \$? = $ac_status" >&5
13966   (exit $ac_status); } >/dev/null; then
13967   if test -s conftest.err; then
13968     ac_cpp_err=$ac_c_preproc_warn_flag
13969   else
13970     ac_cpp_err=
13971   fi
13972 else
13973   ac_cpp_err=yes
13974 fi
13975 if test -z "$ac_cpp_err"; then
13976   ac_cv_header_dbmalloc_h=yes
13977 else
13978   echo "$as_me: failed program was:" >&5
13979   cat conftest.$ac_ext >&5
13980   ac_cv_header_dbmalloc_h=no
13981 fi
13982 rm -f conftest.err conftest.$ac_ext
13983 fi
13984 echo "$as_me:13984: result: $ac_cv_header_dbmalloc_h" >&5
13985 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13986 if test $ac_cv_header_dbmalloc_h = yes; then
13987
13988 echo "$as_me:13988: checking for debug_malloc in -ldbmalloc" >&5
13989 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13990 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13991   echo $ECHO_N "(cached) $ECHO_C" >&6
13992 else
13993   ac_check_lib_save_LIBS=$LIBS
13994 LIBS="-ldbmalloc  $LIBS"
13995 cat >conftest.$ac_ext <<_ACEOF
13996 #line 13996 "configure"
13997 #include "confdefs.h"
13998
13999 /* Override any gcc2 internal prototype to avoid an error.  */
14000 #ifdef __cplusplus
14001 extern "C"
14002 #endif
14003 /* We use char because int might match the return type of a gcc2
14004    builtin and then its argument prototype would still apply.  */
14005 char debug_malloc ();
14006 int
14007 main ()
14008 {
14009 debug_malloc ();
14010   ;
14011   return 0;
14012 }
14013 _ACEOF
14014 rm -f conftest.$ac_objext conftest$ac_exeext
14015 if { (eval echo "$as_me:14015: \"$ac_link\"") >&5
14016   (eval $ac_link) 2>&5
14017   ac_status=$?
14018   echo "$as_me:14018: \$? = $ac_status" >&5
14019   (exit $ac_status); } &&
14020          { ac_try='test -s conftest$ac_exeext'
14021   { (eval echo "$as_me:14021: \"$ac_try\"") >&5
14022   (eval $ac_try) 2>&5
14023   ac_status=$?
14024   echo "$as_me:14024: \$? = $ac_status" >&5
14025   (exit $ac_status); }; }; then
14026   ac_cv_lib_dbmalloc_debug_malloc=yes
14027 else
14028   echo "$as_me: failed program was:" >&5
14029 cat conftest.$ac_ext >&5
14030 ac_cv_lib_dbmalloc_debug_malloc=no
14031 fi
14032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14033 LIBS=$ac_check_lib_save_LIBS
14034 fi
14035 echo "$as_me:14035: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14036 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14037 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14038   cat >>confdefs.h <<EOF
14039 #define HAVE_LIBDBMALLOC 1
14040 EOF
14041
14042   LIBS="-ldbmalloc $LIBS"
14043
14044 fi
14045
14046 fi
14047
14048 fi
14049
14050 echo "$as_me:14050: checking if you want to use valgrind for testing" >&5
14051 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14052
14053 # Check whether --with-valgrind or --without-valgrind was given.
14054 if test "${with_valgrind+set}" = set; then
14055   withval="$with_valgrind"
14056
14057 cat >>confdefs.h <<EOF
14058 #define USE_VALGRIND 1
14059 EOF
14060
14061         : ${with_cflags:=-g}
14062         : ${with_no_leaks:=yes}
14063          with_valgrind=yes
14064 else
14065   with_valgrind=
14066 fi;
14067 echo "$as_me:14067: result: ${with_valgrind:-no}" >&5
14068 echo "${ECHO_T}${with_valgrind:-no}" >&6
14069
14070 case .$with_cflags in
14071 (.*-g*)
14072         case .$CFLAGS in
14073         (.*-g*)
14074                 ;;
14075         (*)
14076
14077 cf_fix_cppflags=no
14078 cf_new_cflags=
14079 cf_new_cppflags=
14080 cf_new_extra_cppflags=
14081
14082 for cf_add_cflags in -g
14083 do
14084 case $cf_fix_cppflags in
14085 (no)
14086         case $cf_add_cflags in
14087         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14088                 case $cf_add_cflags in
14089                 (-D*)
14090                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14091
14092                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14093                                 && test -z "${cf_tst_cflags}" \
14094                                 && cf_fix_cppflags=yes
14095
14096                         if test $cf_fix_cppflags = yes ; then
14097                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14098                                 continue
14099                         elif test "${cf_tst_cflags}" = "\"'" ; then
14100                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14101                                 continue
14102                         fi
14103                         ;;
14104                 esac
14105                 case "$CPPFLAGS" in
14106                 (*$cf_add_cflags)
14107                         ;;
14108                 (*)
14109                         case $cf_add_cflags in
14110                         (-D*)
14111                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14112
14113 CPPFLAGS=`echo "$CPPFLAGS" | \
14114         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14115                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14116
14117                                 ;;
14118                         esac
14119                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14120                         ;;
14121                 esac
14122                 ;;
14123         (*)
14124                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14125                 ;;
14126         esac
14127         ;;
14128 (yes)
14129         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14130
14131         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14132
14133         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14134                 && test -z "${cf_tst_cflags}" \
14135                 && cf_fix_cppflags=no
14136         ;;
14137 esac
14138 done
14139
14140 if test -n "$cf_new_cflags" ; then
14141
14142         CFLAGS="$CFLAGS $cf_new_cflags"
14143 fi
14144
14145 if test -n "$cf_new_cppflags" ; then
14146
14147         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14148 fi
14149
14150 if test -n "$cf_new_extra_cppflags" ; then
14151
14152         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14153 fi
14154
14155                 ;;
14156         esac
14157         ;;
14158 esac
14159
14160 echo "$as_me:14160: checking if you want to perform memory-leak testing" >&5
14161 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14162
14163 # Check whether --enable-leaks or --disable-leaks was given.
14164 if test "${enable_leaks+set}" = set; then
14165   enableval="$enable_leaks"
14166   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14167 else
14168   : ${with_no_leaks:=no}
14169 fi;
14170 echo "$as_me:14170: result: $with_no_leaks" >&5
14171 echo "${ECHO_T}$with_no_leaks" >&6
14172
14173 if test "$with_no_leaks" = yes ; then
14174
14175 cat >>confdefs.h <<\EOF
14176 #define NO_LEAKS 1
14177 EOF
14178
14179 cat >>confdefs.h <<\EOF
14180 #define YY_NO_LEAKS 1
14181 EOF
14182
14183 fi
14184
14185 cat >>confdefs.h <<\EOF
14186 #define HAVE_NC_ALLOC_H 1
14187 EOF
14188
14189 ###     use option --enable-expanded to generate certain macros as functions
14190
14191 # Check whether --enable-expanded or --disable-expanded was given.
14192 if test "${enable_expanded+set}" = set; then
14193   enableval="$enable_expanded"
14194   test "x$enableval" = xyes &&
14195 cat >>confdefs.h <<\EOF
14196 #define NCURSES_EXPANDED 1
14197 EOF
14198
14199 fi;
14200
14201 ###     use option --disable-macros to suppress macros in favor of functions
14202
14203 # Check whether --enable-macros or --disable-macros was given.
14204 if test "${enable_macros+set}" = set; then
14205   enableval="$enable_macros"
14206   test "$enableval" = no &&
14207 cat >>confdefs.h <<\EOF
14208 #define NCURSES_NOMACROS 1
14209 EOF
14210
14211 fi;
14212
14213 # Normally we only add trace() to the debug-library.  Allow this to be
14214 # extended to all models of the ncurses library:
14215 cf_all_traces=no
14216 case "$CFLAGS $CPPFLAGS" in
14217 (*-DTRACE*)
14218         cf_all_traces=yes
14219         ;;
14220 esac
14221
14222 echo "$as_me:14222: checking whether to add trace feature to all models" >&5
14223 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14224
14225 # Check whether --with-trace or --without-trace was given.
14226 if test "${with_trace+set}" = set; then
14227   withval="$with_trace"
14228   cf_with_trace=$withval
14229 else
14230   cf_with_trace=$cf_all_traces
14231 fi;
14232 echo "$as_me:14232: result: $cf_with_trace" >&5
14233 echo "${ECHO_T}$cf_with_trace" >&6
14234
14235 if test "x$cf_with_trace" = xyes ; then
14236         LIB_TRACING=all
14237         ADA_TRACE=TRUE
14238
14239 cf_fix_cppflags=no
14240 cf_new_cflags=
14241 cf_new_cppflags=
14242 cf_new_extra_cppflags=
14243
14244 for cf_add_cflags in -DTRACE
14245 do
14246 case $cf_fix_cppflags in
14247 (no)
14248         case $cf_add_cflags in
14249         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14250                 case $cf_add_cflags in
14251                 (-D*)
14252                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14253
14254                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14255                                 && test -z "${cf_tst_cflags}" \
14256                                 && cf_fix_cppflags=yes
14257
14258                         if test $cf_fix_cppflags = yes ; then
14259                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14260                                 continue
14261                         elif test "${cf_tst_cflags}" = "\"'" ; then
14262                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14263                                 continue
14264                         fi
14265                         ;;
14266                 esac
14267                 case "$CPPFLAGS" in
14268                 (*$cf_add_cflags)
14269                         ;;
14270                 (*)
14271                         case $cf_add_cflags in
14272                         (-D*)
14273                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14274
14275 CPPFLAGS=`echo "$CPPFLAGS" | \
14276         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14277                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14278
14279                                 ;;
14280                         esac
14281                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14282                         ;;
14283                 esac
14284                 ;;
14285         (*)
14286                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14287                 ;;
14288         esac
14289         ;;
14290 (yes)
14291         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14292
14293         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14294
14295         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14296                 && test -z "${cf_tst_cflags}" \
14297                 && cf_fix_cppflags=no
14298         ;;
14299 esac
14300 done
14301
14302 if test -n "$cf_new_cflags" ; then
14303
14304         CFLAGS="$CFLAGS $cf_new_cflags"
14305 fi
14306
14307 if test -n "$cf_new_cppflags" ; then
14308
14309         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14310 fi
14311
14312 if test -n "$cf_new_extra_cppflags" ; then
14313
14314         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14315 fi
14316
14317 else
14318         LIB_TRACING=DEBUG
14319         ADA_TRACE=FALSE
14320 fi
14321
14322 echo "$as_me:14322: checking if we want to use GNAT projects" >&5
14323 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14324
14325 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14326 if test "${enable_gnat_projects+set}" = set; then
14327   enableval="$enable_gnat_projects"
14328   test "$enableval" != no && enableval=yes
14329         if test "$enableval" != "yes" ; then
14330     enable_gnat_projects=no
14331         else
14332                 enable_gnat_projects=yes
14333         fi
14334 else
14335   enableval=yes
14336         enable_gnat_projects=yes
14337
14338 fi;
14339 echo "$as_me:14339: result: $enable_gnat_projects" >&5
14340 echo "${ECHO_T}$enable_gnat_projects" >&6
14341
14342 ###     Checks for libraries.
14343 case $cf_cv_system_name in
14344 (*mingw32*|*mingw64*)
14345         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14346         LIBS=" -lpsapi $LIBS"
14347         ;;
14348 (*)
14349 echo "$as_me:14349: checking for gettimeofday" >&5
14350 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14351 if test "${ac_cv_func_gettimeofday+set}" = set; then
14352   echo $ECHO_N "(cached) $ECHO_C" >&6
14353 else
14354   cat >conftest.$ac_ext <<_ACEOF
14355 #line 14355 "configure"
14356 #include "confdefs.h"
14357 /* System header to define __stub macros and hopefully few prototypes,
14358     which can conflict with char gettimeofday (); below.  */
14359 #include <assert.h>
14360 /* Override any gcc2 internal prototype to avoid an error.  */
14361 #ifdef __cplusplus
14362 extern "C"
14363 #endif
14364 /* We use char because int might match the return type of a gcc2
14365    builtin and then its argument prototype would still apply.  */
14366 char gettimeofday ();
14367 char (*f) ();
14368
14369 int
14370 main ()
14371 {
14372 /* The GNU C library defines this for functions which it implements
14373     to always fail with ENOSYS.  Some functions are actually named
14374     something starting with __ and the normal name is an alias.  */
14375 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14376 choke me
14377 #else
14378 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14379 #endif
14380
14381   ;
14382   return 0;
14383 }
14384 _ACEOF
14385 rm -f conftest.$ac_objext conftest$ac_exeext
14386 if { (eval echo "$as_me:14386: \"$ac_link\"") >&5
14387   (eval $ac_link) 2>&5
14388   ac_status=$?
14389   echo "$as_me:14389: \$? = $ac_status" >&5
14390   (exit $ac_status); } &&
14391          { ac_try='test -s conftest$ac_exeext'
14392   { (eval echo "$as_me:14392: \"$ac_try\"") >&5
14393   (eval $ac_try) 2>&5
14394   ac_status=$?
14395   echo "$as_me:14395: \$? = $ac_status" >&5
14396   (exit $ac_status); }; }; then
14397   ac_cv_func_gettimeofday=yes
14398 else
14399   echo "$as_me: failed program was:" >&5
14400 cat conftest.$ac_ext >&5
14401 ac_cv_func_gettimeofday=no
14402 fi
14403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14404 fi
14405 echo "$as_me:14405: result: $ac_cv_func_gettimeofday" >&5
14406 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14407 if test $ac_cv_func_gettimeofday = yes; then
14408
14409 cat >>confdefs.h <<\EOF
14410 #define HAVE_GETTIMEOFDAY 1
14411 EOF
14412
14413 else
14414
14415 echo "$as_me:14415: checking for gettimeofday in -lbsd" >&5
14416 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14417 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14418   echo $ECHO_N "(cached) $ECHO_C" >&6
14419 else
14420   ac_check_lib_save_LIBS=$LIBS
14421 LIBS="-lbsd  $LIBS"
14422 cat >conftest.$ac_ext <<_ACEOF
14423 #line 14423 "configure"
14424 #include "confdefs.h"
14425
14426 /* Override any gcc2 internal prototype to avoid an error.  */
14427 #ifdef __cplusplus
14428 extern "C"
14429 #endif
14430 /* We use char because int might match the return type of a gcc2
14431    builtin and then its argument prototype would still apply.  */
14432 char gettimeofday ();
14433 int
14434 main ()
14435 {
14436 gettimeofday ();
14437   ;
14438   return 0;
14439 }
14440 _ACEOF
14441 rm -f conftest.$ac_objext conftest$ac_exeext
14442 if { (eval echo "$as_me:14442: \"$ac_link\"") >&5
14443   (eval $ac_link) 2>&5
14444   ac_status=$?
14445   echo "$as_me:14445: \$? = $ac_status" >&5
14446   (exit $ac_status); } &&
14447          { ac_try='test -s conftest$ac_exeext'
14448   { (eval echo "$as_me:14448: \"$ac_try\"") >&5
14449   (eval $ac_try) 2>&5
14450   ac_status=$?
14451   echo "$as_me:14451: \$? = $ac_status" >&5
14452   (exit $ac_status); }; }; then
14453   ac_cv_lib_bsd_gettimeofday=yes
14454 else
14455   echo "$as_me: failed program was:" >&5
14456 cat conftest.$ac_ext >&5
14457 ac_cv_lib_bsd_gettimeofday=no
14458 fi
14459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14460 LIBS=$ac_check_lib_save_LIBS
14461 fi
14462 echo "$as_me:14462: result: $ac_cv_lib_bsd_gettimeofday" >&5
14463 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14464 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14465
14466 cat >>confdefs.h <<\EOF
14467 #define HAVE_GETTIMEOFDAY 1
14468 EOF
14469
14470 cf_add_libs="-lbsd"
14471 # Filter out duplicates - this happens with badly-designed ".pc" files...
14472 for cf_add_1lib in $LIBS
14473 do
14474         for cf_add_2lib in $cf_add_libs
14475         do
14476                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14477                 then
14478                         cf_add_1lib=
14479                         break
14480                 fi
14481         done
14482         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14483 done
14484 LIBS="$cf_add_libs"
14485
14486 fi
14487
14488 fi
14489         ;;
14490 esac
14491
14492 echo "$as_me:14492: checking if -lm needed for math functions" >&5
14493 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14494 if test "${cf_cv_need_libm+set}" = set; then
14495   echo $ECHO_N "(cached) $ECHO_C" >&6
14496 else
14497
14498         cat >conftest.$ac_ext <<_ACEOF
14499 #line 14499 "configure"
14500 #include "confdefs.h"
14501
14502         #include <stdio.h>
14503         #include <math.h>
14504
14505 int
14506 main ()
14507 {
14508 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14509   ;
14510   return 0;
14511 }
14512 _ACEOF
14513 rm -f conftest.$ac_objext conftest$ac_exeext
14514 if { (eval echo "$as_me:14514: \"$ac_link\"") >&5
14515   (eval $ac_link) 2>&5
14516   ac_status=$?
14517   echo "$as_me:14517: \$? = $ac_status" >&5
14518   (exit $ac_status); } &&
14519          { ac_try='test -s conftest$ac_exeext'
14520   { (eval echo "$as_me:14520: \"$ac_try\"") >&5
14521   (eval $ac_try) 2>&5
14522   ac_status=$?
14523   echo "$as_me:14523: \$? = $ac_status" >&5
14524   (exit $ac_status); }; }; then
14525   cf_cv_need_libm=no
14526 else
14527   echo "$as_me: failed program was:" >&5
14528 cat conftest.$ac_ext >&5
14529 cf_cv_need_libm=yes
14530 fi
14531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14532 fi
14533 echo "$as_me:14533: result: $cf_cv_need_libm" >&5
14534 echo "${ECHO_T}$cf_cv_need_libm" >&6
14535 if test "$cf_cv_need_libm" = yes
14536 then
14537 MATH_LIB=-lm
14538 fi
14539
14540 ###     Checks for header files.
14541 echo "$as_me:14541: checking for ANSI C header files" >&5
14542 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14543 if test "${ac_cv_header_stdc+set}" = set; then
14544   echo $ECHO_N "(cached) $ECHO_C" >&6
14545 else
14546   cat >conftest.$ac_ext <<_ACEOF
14547 #line 14547 "configure"
14548 #include "confdefs.h"
14549 #include <stdlib.h>
14550 #include <stdarg.h>
14551 #include <string.h>
14552 #include <float.h>
14553
14554 _ACEOF
14555 if { (eval echo "$as_me:14555: \"$ac_cpp conftest.$ac_ext\"") >&5
14556   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14557   ac_status=$?
14558   egrep -v '^ *\+' conftest.er1 >conftest.err
14559   rm -f conftest.er1
14560   cat conftest.err >&5
14561   echo "$as_me:14561: \$? = $ac_status" >&5
14562   (exit $ac_status); } >/dev/null; then
14563   if test -s conftest.err; then
14564     ac_cpp_err=$ac_c_preproc_warn_flag
14565   else
14566     ac_cpp_err=
14567   fi
14568 else
14569   ac_cpp_err=yes
14570 fi
14571 if test -z "$ac_cpp_err"; then
14572   ac_cv_header_stdc=yes
14573 else
14574   echo "$as_me: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   ac_cv_header_stdc=no
14577 fi
14578 rm -f conftest.err conftest.$ac_ext
14579
14580 if test $ac_cv_header_stdc = yes; then
14581   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14582   cat >conftest.$ac_ext <<_ACEOF
14583 #line 14583 "configure"
14584 #include "confdefs.h"
14585 #include <string.h>
14586
14587 _ACEOF
14588 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14589   egrep "memchr" >/dev/null 2>&1; then
14590   :
14591 else
14592   ac_cv_header_stdc=no
14593 fi
14594 rm -rf conftest*
14595
14596 fi
14597
14598 if test $ac_cv_header_stdc = yes; then
14599   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14600   cat >conftest.$ac_ext <<_ACEOF
14601 #line 14601 "configure"
14602 #include "confdefs.h"
14603 #include <stdlib.h>
14604
14605 _ACEOF
14606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14607   egrep "free" >/dev/null 2>&1; then
14608   :
14609 else
14610   ac_cv_header_stdc=no
14611 fi
14612 rm -rf conftest*
14613
14614 fi
14615
14616 if test $ac_cv_header_stdc = yes; then
14617   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14618   if test "$cross_compiling" = yes; then
14619   :
14620 else
14621   cat >conftest.$ac_ext <<_ACEOF
14622 #line 14622 "configure"
14623 #include "confdefs.h"
14624 #include <ctype.h>
14625 #if ((' ' & 0x0FF) == 0x020)
14626 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14627 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14628 #else
14629 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14630                      || ('j' <= (c) && (c) <= 'r') \
14631                      || ('s' <= (c) && (c) <= 'z'))
14632 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14633 #endif
14634
14635 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14636 int
14637 main ()
14638 {
14639   int i;
14640   for (i = 0; i < 256; i++)
14641     if (XOR (islower (i), ISLOWER (i))
14642         || toupper (i) != TOUPPER (i))
14643       $ac_main_return(2);
14644   $ac_main_return (0);
14645 }
14646 _ACEOF
14647 rm -f conftest$ac_exeext
14648 if { (eval echo "$as_me:14648: \"$ac_link\"") >&5
14649   (eval $ac_link) 2>&5
14650   ac_status=$?
14651   echo "$as_me:14651: \$? = $ac_status" >&5
14652   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14653   { (eval echo "$as_me:14653: \"$ac_try\"") >&5
14654   (eval $ac_try) 2>&5
14655   ac_status=$?
14656   echo "$as_me:14656: \$? = $ac_status" >&5
14657   (exit $ac_status); }; }; then
14658   :
14659 else
14660   echo "$as_me: program exited with status $ac_status" >&5
14661 echo "$as_me: failed program was:" >&5
14662 cat conftest.$ac_ext >&5
14663 ac_cv_header_stdc=no
14664 fi
14665 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14666 fi
14667 fi
14668 fi
14669 echo "$as_me:14669: result: $ac_cv_header_stdc" >&5
14670 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14671 if test $ac_cv_header_stdc = yes; then
14672
14673 cat >>confdefs.h <<\EOF
14674 #define STDC_HEADERS 1
14675 EOF
14676
14677 fi
14678
14679 ac_header_dirent=no
14680 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14681   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14682 echo "$as_me:14682: checking for $ac_hdr that defines DIR" >&5
14683 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14684 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14685   echo $ECHO_N "(cached) $ECHO_C" >&6
14686 else
14687   cat >conftest.$ac_ext <<_ACEOF
14688 #line 14688 "configure"
14689 #include "confdefs.h"
14690 #include <sys/types.h>
14691 #include <$ac_hdr>
14692
14693 int
14694 main ()
14695 {
14696 if ((DIR *) 0)
14697 return 0;
14698   ;
14699   return 0;
14700 }
14701 _ACEOF
14702 rm -f conftest.$ac_objext
14703 if { (eval echo "$as_me:14703: \"$ac_compile\"") >&5
14704   (eval $ac_compile) 2>&5
14705   ac_status=$?
14706   echo "$as_me:14706: \$? = $ac_status" >&5
14707   (exit $ac_status); } &&
14708          { ac_try='test -s conftest.$ac_objext'
14709   { (eval echo "$as_me:14709: \"$ac_try\"") >&5
14710   (eval $ac_try) 2>&5
14711   ac_status=$?
14712   echo "$as_me:14712: \$? = $ac_status" >&5
14713   (exit $ac_status); }; }; then
14714   eval "$as_ac_Header=yes"
14715 else
14716   echo "$as_me: failed program was:" >&5
14717 cat conftest.$ac_ext >&5
14718 eval "$as_ac_Header=no"
14719 fi
14720 rm -f conftest.$ac_objext conftest.$ac_ext
14721 fi
14722 echo "$as_me:14722: result: `eval echo '${'$as_ac_Header'}'`" >&5
14723 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14724 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14725   cat >>confdefs.h <<EOF
14726 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14727 EOF
14728
14729 ac_header_dirent=$ac_hdr; break
14730 fi
14731
14732 done
14733 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14734 if test $ac_header_dirent = dirent.h; then
14735   echo "$as_me:14735: checking for opendir in -ldir" >&5
14736 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14737 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14738   echo $ECHO_N "(cached) $ECHO_C" >&6
14739 else
14740   ac_check_lib_save_LIBS=$LIBS
14741 LIBS="-ldir  $LIBS"
14742 cat >conftest.$ac_ext <<_ACEOF
14743 #line 14743 "configure"
14744 #include "confdefs.h"
14745
14746 /* Override any gcc2 internal prototype to avoid an error.  */
14747 #ifdef __cplusplus
14748 extern "C"
14749 #endif
14750 /* We use char because int might match the return type of a gcc2
14751    builtin and then its argument prototype would still apply.  */
14752 char opendir ();
14753 int
14754 main ()
14755 {
14756 opendir ();
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 rm -f conftest.$ac_objext conftest$ac_exeext
14762 if { (eval echo "$as_me:14762: \"$ac_link\"") >&5
14763   (eval $ac_link) 2>&5
14764   ac_status=$?
14765   echo "$as_me:14765: \$? = $ac_status" >&5
14766   (exit $ac_status); } &&
14767          { ac_try='test -s conftest$ac_exeext'
14768   { (eval echo "$as_me:14768: \"$ac_try\"") >&5
14769   (eval $ac_try) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit $ac_status); }; }; then
14773   ac_cv_lib_dir_opendir=yes
14774 else
14775   echo "$as_me: failed program was:" >&5
14776 cat conftest.$ac_ext >&5
14777 ac_cv_lib_dir_opendir=no
14778 fi
14779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14780 LIBS=$ac_check_lib_save_LIBS
14781 fi
14782 echo "$as_me:14782: result: $ac_cv_lib_dir_opendir" >&5
14783 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14784 if test $ac_cv_lib_dir_opendir = yes; then
14785   LIBS="$LIBS -ldir"
14786 fi
14787
14788 else
14789   echo "$as_me:14789: checking for opendir in -lx" >&5
14790 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14791 if test "${ac_cv_lib_x_opendir+set}" = set; then
14792   echo $ECHO_N "(cached) $ECHO_C" >&6
14793 else
14794   ac_check_lib_save_LIBS=$LIBS
14795 LIBS="-lx  $LIBS"
14796 cat >conftest.$ac_ext <<_ACEOF
14797 #line 14797 "configure"
14798 #include "confdefs.h"
14799
14800 /* Override any gcc2 internal prototype to avoid an error.  */
14801 #ifdef __cplusplus
14802 extern "C"
14803 #endif
14804 /* We use char because int might match the return type of a gcc2
14805    builtin and then its argument prototype would still apply.  */
14806 char opendir ();
14807 int
14808 main ()
14809 {
14810 opendir ();
14811   ;
14812   return 0;
14813 }
14814 _ACEOF
14815 rm -f conftest.$ac_objext conftest$ac_exeext
14816 if { (eval echo "$as_me:14816: \"$ac_link\"") >&5
14817   (eval $ac_link) 2>&5
14818   ac_status=$?
14819   echo "$as_me:14819: \$? = $ac_status" >&5
14820   (exit $ac_status); } &&
14821          { ac_try='test -s conftest$ac_exeext'
14822   { (eval echo "$as_me:14822: \"$ac_try\"") >&5
14823   (eval $ac_try) 2>&5
14824   ac_status=$?
14825   echo "$as_me:14825: \$? = $ac_status" >&5
14826   (exit $ac_status); }; }; then
14827   ac_cv_lib_x_opendir=yes
14828 else
14829   echo "$as_me: failed program was:" >&5
14830 cat conftest.$ac_ext >&5
14831 ac_cv_lib_x_opendir=no
14832 fi
14833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14834 LIBS=$ac_check_lib_save_LIBS
14835 fi
14836 echo "$as_me:14836: result: $ac_cv_lib_x_opendir" >&5
14837 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14838 if test $ac_cv_lib_x_opendir = yes; then
14839   LIBS="$LIBS -lx"
14840 fi
14841
14842 fi
14843
14844 echo "$as_me:14844: checking whether time.h and sys/time.h may both be included" >&5
14845 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14846 if test "${ac_cv_header_time+set}" = set; then
14847   echo $ECHO_N "(cached) $ECHO_C" >&6
14848 else
14849   cat >conftest.$ac_ext <<_ACEOF
14850 #line 14850 "configure"
14851 #include "confdefs.h"
14852 #include <sys/types.h>
14853 #include <sys/time.h>
14854 #include <time.h>
14855
14856 int
14857 main ()
14858 {
14859 if ((struct tm *) 0)
14860 return 0;
14861   ;
14862   return 0;
14863 }
14864 _ACEOF
14865 rm -f conftest.$ac_objext
14866 if { (eval echo "$as_me:14866: \"$ac_compile\"") >&5
14867   (eval $ac_compile) 2>&5
14868   ac_status=$?
14869   echo "$as_me:14869: \$? = $ac_status" >&5
14870   (exit $ac_status); } &&
14871          { ac_try='test -s conftest.$ac_objext'
14872   { (eval echo "$as_me:14872: \"$ac_try\"") >&5
14873   (eval $ac_try) 2>&5
14874   ac_status=$?
14875   echo "$as_me:14875: \$? = $ac_status" >&5
14876   (exit $ac_status); }; }; then
14877   ac_cv_header_time=yes
14878 else
14879   echo "$as_me: failed program was:" >&5
14880 cat conftest.$ac_ext >&5
14881 ac_cv_header_time=no
14882 fi
14883 rm -f conftest.$ac_objext conftest.$ac_ext
14884 fi
14885 echo "$as_me:14885: result: $ac_cv_header_time" >&5
14886 echo "${ECHO_T}$ac_cv_header_time" >&6
14887 if test $ac_cv_header_time = yes; then
14888
14889 cat >>confdefs.h <<\EOF
14890 #define TIME_WITH_SYS_TIME 1
14891 EOF
14892
14893 fi
14894
14895 cf_regex_func=no
14896
14897 cf_regex_libs="regex re"
14898 case $host_os in
14899 (mingw*)
14900         cf_regex_libs="gnurx $cf_regex_libs"
14901         ;;
14902 esac
14903
14904 echo "$as_me:14904: checking for regcomp" >&5
14905 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14906 if test "${ac_cv_func_regcomp+set}" = set; then
14907   echo $ECHO_N "(cached) $ECHO_C" >&6
14908 else
14909   cat >conftest.$ac_ext <<_ACEOF
14910 #line 14910 "configure"
14911 #include "confdefs.h"
14912 /* System header to define __stub macros and hopefully few prototypes,
14913     which can conflict with char regcomp (); below.  */
14914 #include <assert.h>
14915 /* Override any gcc2 internal prototype to avoid an error.  */
14916 #ifdef __cplusplus
14917 extern "C"
14918 #endif
14919 /* We use char because int might match the return type of a gcc2
14920    builtin and then its argument prototype would still apply.  */
14921 char regcomp ();
14922 char (*f) ();
14923
14924 int
14925 main ()
14926 {
14927 /* The GNU C library defines this for functions which it implements
14928     to always fail with ENOSYS.  Some functions are actually named
14929     something starting with __ and the normal name is an alias.  */
14930 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14931 choke me
14932 #else
14933 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14934 #endif
14935
14936   ;
14937   return 0;
14938 }
14939 _ACEOF
14940 rm -f conftest.$ac_objext conftest$ac_exeext
14941 if { (eval echo "$as_me:14941: \"$ac_link\"") >&5
14942   (eval $ac_link) 2>&5
14943   ac_status=$?
14944   echo "$as_me:14944: \$? = $ac_status" >&5
14945   (exit $ac_status); } &&
14946          { ac_try='test -s conftest$ac_exeext'
14947   { (eval echo "$as_me:14947: \"$ac_try\"") >&5
14948   (eval $ac_try) 2>&5
14949   ac_status=$?
14950   echo "$as_me:14950: \$? = $ac_status" >&5
14951   (exit $ac_status); }; }; then
14952   ac_cv_func_regcomp=yes
14953 else
14954   echo "$as_me: failed program was:" >&5
14955 cat conftest.$ac_ext >&5
14956 ac_cv_func_regcomp=no
14957 fi
14958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14959 fi
14960 echo "$as_me:14960: result: $ac_cv_func_regcomp" >&5
14961 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14962 if test $ac_cv_func_regcomp = yes; then
14963   cf_regex_func=regcomp
14964 else
14965
14966         for cf_regex_lib in $cf_regex_libs
14967         do
14968                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14969 echo "$as_me:14969: checking for regcomp in -l$cf_regex_lib" >&5
14970 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14971 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14972   echo $ECHO_N "(cached) $ECHO_C" >&6
14973 else
14974   ac_check_lib_save_LIBS=$LIBS
14975 LIBS="-l$cf_regex_lib  $LIBS"
14976 cat >conftest.$ac_ext <<_ACEOF
14977 #line 14977 "configure"
14978 #include "confdefs.h"
14979
14980 /* Override any gcc2 internal prototype to avoid an error.  */
14981 #ifdef __cplusplus
14982 extern "C"
14983 #endif
14984 /* We use char because int might match the return type of a gcc2
14985    builtin and then its argument prototype would still apply.  */
14986 char regcomp ();
14987 int
14988 main ()
14989 {
14990 regcomp ();
14991   ;
14992   return 0;
14993 }
14994 _ACEOF
14995 rm -f conftest.$ac_objext conftest$ac_exeext
14996 if { (eval echo "$as_me:14996: \"$ac_link\"") >&5
14997   (eval $ac_link) 2>&5
14998   ac_status=$?
14999   echo "$as_me:14999: \$? = $ac_status" >&5
15000   (exit $ac_status); } &&
15001          { ac_try='test -s conftest$ac_exeext'
15002   { (eval echo "$as_me:15002: \"$ac_try\"") >&5
15003   (eval $ac_try) 2>&5
15004   ac_status=$?
15005   echo "$as_me:15005: \$? = $ac_status" >&5
15006   (exit $ac_status); }; }; then
15007   eval "$as_ac_Lib=yes"
15008 else
15009   echo "$as_me: failed program was:" >&5
15010 cat conftest.$ac_ext >&5
15011 eval "$as_ac_Lib=no"
15012 fi
15013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15014 LIBS=$ac_check_lib_save_LIBS
15015 fi
15016 echo "$as_me:15016: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15017 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15018 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15019
15020 cf_add_libs="-l$cf_regex_lib"
15021 # Filter out duplicates - this happens with badly-designed ".pc" files...
15022 for cf_add_1lib in $LIBS
15023 do
15024         for cf_add_2lib in $cf_add_libs
15025         do
15026                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15027                 then
15028                         cf_add_1lib=
15029                         break
15030                 fi
15031         done
15032         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15033 done
15034 LIBS="$cf_add_libs"
15035
15036                                 cf_regex_func=regcomp
15037                                 break
15038 fi
15039
15040         done
15041
15042 fi
15043
15044 if test "$cf_regex_func" = no ; then
15045         echo "$as_me:15045: checking for compile" >&5
15046 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15047 if test "${ac_cv_func_compile+set}" = set; then
15048   echo $ECHO_N "(cached) $ECHO_C" >&6
15049 else
15050   cat >conftest.$ac_ext <<_ACEOF
15051 #line 15051 "configure"
15052 #include "confdefs.h"
15053 /* System header to define __stub macros and hopefully few prototypes,
15054     which can conflict with char compile (); below.  */
15055 #include <assert.h>
15056 /* Override any gcc2 internal prototype to avoid an error.  */
15057 #ifdef __cplusplus
15058 extern "C"
15059 #endif
15060 /* We use char because int might match the return type of a gcc2
15061    builtin and then its argument prototype would still apply.  */
15062 char compile ();
15063 char (*f) ();
15064
15065 int
15066 main ()
15067 {
15068 /* The GNU C library defines this for functions which it implements
15069     to always fail with ENOSYS.  Some functions are actually named
15070     something starting with __ and the normal name is an alias.  */
15071 #if defined (__stub_compile) || defined (__stub___compile)
15072 choke me
15073 #else
15074 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15075 #endif
15076
15077   ;
15078   return 0;
15079 }
15080 _ACEOF
15081 rm -f conftest.$ac_objext conftest$ac_exeext
15082 if { (eval echo "$as_me:15082: \"$ac_link\"") >&5
15083   (eval $ac_link) 2>&5
15084   ac_status=$?
15085   echo "$as_me:15085: \$? = $ac_status" >&5
15086   (exit $ac_status); } &&
15087          { ac_try='test -s conftest$ac_exeext'
15088   { (eval echo "$as_me:15088: \"$ac_try\"") >&5
15089   (eval $ac_try) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); }; }; then
15093   ac_cv_func_compile=yes
15094 else
15095   echo "$as_me: failed program was:" >&5
15096 cat conftest.$ac_ext >&5
15097 ac_cv_func_compile=no
15098 fi
15099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15100 fi
15101 echo "$as_me:15101: result: $ac_cv_func_compile" >&5
15102 echo "${ECHO_T}$ac_cv_func_compile" >&6
15103 if test $ac_cv_func_compile = yes; then
15104   cf_regex_func=compile
15105 else
15106
15107                 echo "$as_me:15107: checking for compile in -lgen" >&5
15108 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15109 if test "${ac_cv_lib_gen_compile+set}" = set; then
15110   echo $ECHO_N "(cached) $ECHO_C" >&6
15111 else
15112   ac_check_lib_save_LIBS=$LIBS
15113 LIBS="-lgen  $LIBS"
15114 cat >conftest.$ac_ext <<_ACEOF
15115 #line 15115 "configure"
15116 #include "confdefs.h"
15117
15118 /* Override any gcc2 internal prototype to avoid an error.  */
15119 #ifdef __cplusplus
15120 extern "C"
15121 #endif
15122 /* We use char because int might match the return type of a gcc2
15123    builtin and then its argument prototype would still apply.  */
15124 char compile ();
15125 int
15126 main ()
15127 {
15128 compile ();
15129   ;
15130   return 0;
15131 }
15132 _ACEOF
15133 rm -f conftest.$ac_objext conftest$ac_exeext
15134 if { (eval echo "$as_me:15134: \"$ac_link\"") >&5
15135   (eval $ac_link) 2>&5
15136   ac_status=$?
15137   echo "$as_me:15137: \$? = $ac_status" >&5
15138   (exit $ac_status); } &&
15139          { ac_try='test -s conftest$ac_exeext'
15140   { (eval echo "$as_me:15140: \"$ac_try\"") >&5
15141   (eval $ac_try) 2>&5
15142   ac_status=$?
15143   echo "$as_me:15143: \$? = $ac_status" >&5
15144   (exit $ac_status); }; }; then
15145   ac_cv_lib_gen_compile=yes
15146 else
15147   echo "$as_me: failed program was:" >&5
15148 cat conftest.$ac_ext >&5
15149 ac_cv_lib_gen_compile=no
15150 fi
15151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15152 LIBS=$ac_check_lib_save_LIBS
15153 fi
15154 echo "$as_me:15154: result: $ac_cv_lib_gen_compile" >&5
15155 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15156 if test $ac_cv_lib_gen_compile = yes; then
15157
15158 cf_add_libs="-lgen"
15159 # Filter out duplicates - this happens with badly-designed ".pc" files...
15160 for cf_add_1lib in $LIBS
15161 do
15162         for cf_add_2lib in $cf_add_libs
15163         do
15164                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15165                 then
15166                         cf_add_1lib=
15167                         break
15168                 fi
15169         done
15170         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15171 done
15172 LIBS="$cf_add_libs"
15173
15174                                 cf_regex_func=compile
15175 fi
15176
15177 fi
15178
15179 fi
15180
15181 if test "$cf_regex_func" = no ; then
15182         { echo "$as_me:15182: WARNING: cannot find regular expression library" >&5
15183 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15184 fi
15185
15186 echo "$as_me:15186: checking for regular-expression headers" >&5
15187 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15188 if test "${cf_cv_regex_hdrs+set}" = set; then
15189   echo $ECHO_N "(cached) $ECHO_C" >&6
15190 else
15191
15192 cf_cv_regex_hdrs=no
15193 case $cf_regex_func in
15194 (compile)
15195         for cf_regex_hdr in regexp.h regexpr.h
15196         do
15197                 cat >conftest.$ac_ext <<_ACEOF
15198 #line 15198 "configure"
15199 #include "confdefs.h"
15200 #include <$cf_regex_hdr>
15201 int
15202 main ()
15203 {
15204
15205                         char *p = compile("", "", "", 0);
15206                         int x = step("", "");
15207
15208   ;
15209   return 0;
15210 }
15211 _ACEOF
15212 rm -f conftest.$ac_objext conftest$ac_exeext
15213 if { (eval echo "$as_me:15213: \"$ac_link\"") >&5
15214   (eval $ac_link) 2>&5
15215   ac_status=$?
15216   echo "$as_me:15216: \$? = $ac_status" >&5
15217   (exit $ac_status); } &&
15218          { ac_try='test -s conftest$ac_exeext'
15219   { (eval echo "$as_me:15219: \"$ac_try\"") >&5
15220   (eval $ac_try) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit $ac_status); }; }; then
15224
15225                         cf_cv_regex_hdrs=$cf_regex_hdr
15226                         break
15227
15228 else
15229   echo "$as_me: failed program was:" >&5
15230 cat conftest.$ac_ext >&5
15231 fi
15232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15233         done
15234         ;;
15235 (*)
15236         for cf_regex_hdr in regex.h
15237         do
15238                 cat >conftest.$ac_ext <<_ACEOF
15239 #line 15239 "configure"
15240 #include "confdefs.h"
15241 #include <sys/types.h>
15242 #include <$cf_regex_hdr>
15243 int
15244 main ()
15245 {
15246
15247                         regex_t *p;
15248                         int x = regcomp(p, "", 0);
15249                         int y = regexec(p, "", 0, 0, 0);
15250                         regfree(p);
15251
15252   ;
15253   return 0;
15254 }
15255 _ACEOF
15256 rm -f conftest.$ac_objext conftest$ac_exeext
15257 if { (eval echo "$as_me:15257: \"$ac_link\"") >&5
15258   (eval $ac_link) 2>&5
15259   ac_status=$?
15260   echo "$as_me:15260: \$? = $ac_status" >&5
15261   (exit $ac_status); } &&
15262          { ac_try='test -s conftest$ac_exeext'
15263   { (eval echo "$as_me:15263: \"$ac_try\"") >&5
15264   (eval $ac_try) 2>&5
15265   ac_status=$?
15266   echo "$as_me:15266: \$? = $ac_status" >&5
15267   (exit $ac_status); }; }; then
15268
15269                         cf_cv_regex_hdrs=$cf_regex_hdr
15270                         break
15271
15272 else
15273   echo "$as_me: failed program was:" >&5
15274 cat conftest.$ac_ext >&5
15275 fi
15276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15277         done
15278         ;;
15279 esac
15280
15281 fi
15282 echo "$as_me:15282: result: $cf_cv_regex_hdrs" >&5
15283 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15284
15285 case $cf_cv_regex_hdrs in
15286         (no)            { echo "$as_me:15286: WARNING: no regular expression header found" >&5
15287 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15288         (regex.h)
15289 cat >>confdefs.h <<\EOF
15290 #define HAVE_REGEX_H_FUNCS 1
15291 EOF
15292  ;;
15293         (regexp.h)
15294 cat >>confdefs.h <<\EOF
15295 #define HAVE_REGEXP_H_FUNCS 1
15296 EOF
15297  ;;
15298         (regexpr.h)
15299 cat >>confdefs.h <<\EOF
15300 #define HAVE_REGEXPR_H_FUNCS 1
15301 EOF
15302  ;;
15303 esac
15304
15305 for ac_header in \
15306 fcntl.h \
15307 getopt.h \
15308 limits.h \
15309 locale.h \
15310 math.h \
15311 poll.h \
15312 sys/bsdtypes.h \
15313 sys/ioctl.h \
15314 sys/param.h \
15315 sys/poll.h \
15316 sys/select.h \
15317 sys/time.h \
15318 sys/times.h \
15319 ttyent.h \
15320 unistd.h \
15321 wctype.h \
15322
15323 do
15324 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15325 echo "$as_me:15325: checking for $ac_header" >&5
15326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15328   echo $ECHO_N "(cached) $ECHO_C" >&6
15329 else
15330   cat >conftest.$ac_ext <<_ACEOF
15331 #line 15331 "configure"
15332 #include "confdefs.h"
15333 #include <$ac_header>
15334 _ACEOF
15335 if { (eval echo "$as_me:15335: \"$ac_cpp conftest.$ac_ext\"") >&5
15336   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15337   ac_status=$?
15338   egrep -v '^ *\+' conftest.er1 >conftest.err
15339   rm -f conftest.er1
15340   cat conftest.err >&5
15341   echo "$as_me:15341: \$? = $ac_status" >&5
15342   (exit $ac_status); } >/dev/null; then
15343   if test -s conftest.err; then
15344     ac_cpp_err=$ac_c_preproc_warn_flag
15345   else
15346     ac_cpp_err=
15347   fi
15348 else
15349   ac_cpp_err=yes
15350 fi
15351 if test -z "$ac_cpp_err"; then
15352   eval "$as_ac_Header=yes"
15353 else
15354   echo "$as_me: failed program was:" >&5
15355   cat conftest.$ac_ext >&5
15356   eval "$as_ac_Header=no"
15357 fi
15358 rm -f conftest.err conftest.$ac_ext
15359 fi
15360 echo "$as_me:15360: result: `eval echo '${'$as_ac_Header'}'`" >&5
15361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15362 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15363   cat >>confdefs.h <<EOF
15364 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15365 EOF
15366
15367 fi
15368 done
15369
15370 for ac_header in unistd.h getopt.h
15371 do
15372 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15373 echo "$as_me:15373: checking for $ac_header" >&5
15374 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15375 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15376   echo $ECHO_N "(cached) $ECHO_C" >&6
15377 else
15378   cat >conftest.$ac_ext <<_ACEOF
15379 #line 15379 "configure"
15380 #include "confdefs.h"
15381 #include <$ac_header>
15382 _ACEOF
15383 if { (eval echo "$as_me:15383: \"$ac_cpp conftest.$ac_ext\"") >&5
15384   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15385   ac_status=$?
15386   egrep -v '^ *\+' conftest.er1 >conftest.err
15387   rm -f conftest.er1
15388   cat conftest.err >&5
15389   echo "$as_me:15389: \$? = $ac_status" >&5
15390   (exit $ac_status); } >/dev/null; then
15391   if test -s conftest.err; then
15392     ac_cpp_err=$ac_c_preproc_warn_flag
15393   else
15394     ac_cpp_err=
15395   fi
15396 else
15397   ac_cpp_err=yes
15398 fi
15399 if test -z "$ac_cpp_err"; then
15400   eval "$as_ac_Header=yes"
15401 else
15402   echo "$as_me: failed program was:" >&5
15403   cat conftest.$ac_ext >&5
15404   eval "$as_ac_Header=no"
15405 fi
15406 rm -f conftest.err conftest.$ac_ext
15407 fi
15408 echo "$as_me:15408: result: `eval echo '${'$as_ac_Header'}'`" >&5
15409 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15410 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15411   cat >>confdefs.h <<EOF
15412 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15413 EOF
15414
15415 fi
15416 done
15417
15418 echo "$as_me:15418: checking for header declaring getopt variables" >&5
15419 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15420 if test "${cf_cv_getopt_header+set}" = set; then
15421   echo $ECHO_N "(cached) $ECHO_C" >&6
15422 else
15423
15424 cf_cv_getopt_header=none
15425 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15426 do
15427 cat >conftest.$ac_ext <<_ACEOF
15428 #line 15428 "configure"
15429 #include "confdefs.h"
15430
15431 #include <$cf_header>
15432 int
15433 main ()
15434 {
15435 int x = optind; char *y = optarg
15436   ;
15437   return 0;
15438 }
15439 _ACEOF
15440 rm -f conftest.$ac_objext
15441 if { (eval echo "$as_me:15441: \"$ac_compile\"") >&5
15442   (eval $ac_compile) 2>&5
15443   ac_status=$?
15444   echo "$as_me:15444: \$? = $ac_status" >&5
15445   (exit $ac_status); } &&
15446          { ac_try='test -s conftest.$ac_objext'
15447   { (eval echo "$as_me:15447: \"$ac_try\"") >&5
15448   (eval $ac_try) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); }; }; then
15452   cf_cv_getopt_header=$cf_header
15453  break
15454 else
15455   echo "$as_me: failed program was:" >&5
15456 cat conftest.$ac_ext >&5
15457 fi
15458 rm -f conftest.$ac_objext conftest.$ac_ext
15459 done
15460
15461 fi
15462 echo "$as_me:15462: result: $cf_cv_getopt_header" >&5
15463 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15464 if test $cf_cv_getopt_header != none ; then
15465
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_GETOPT_HEADER 1
15468 EOF
15469
15470 fi
15471 if test $cf_cv_getopt_header = getopt.h ; then
15472
15473 cat >>confdefs.h <<\EOF
15474 #define NEED_GETOPT_H 1
15475 EOF
15476
15477 fi
15478
15479 # check for ISC (this may also define _POSIX_SOURCE)
15480 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15481 if test "x$ISC" = xyes ; then
15482
15483 echo "$as_me:15483: checking for main in -lcposix" >&5
15484 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15485 if test "${ac_cv_lib_cposix_main+set}" = set; then
15486   echo $ECHO_N "(cached) $ECHO_C" >&6
15487 else
15488   ac_check_lib_save_LIBS=$LIBS
15489 LIBS="-lcposix  $LIBS"
15490 cat >conftest.$ac_ext <<_ACEOF
15491 #line 15491 "configure"
15492 #include "confdefs.h"
15493
15494 int
15495 main ()
15496 {
15497 main ();
15498   ;
15499   return 0;
15500 }
15501 _ACEOF
15502 rm -f conftest.$ac_objext conftest$ac_exeext
15503 if { (eval echo "$as_me:15503: \"$ac_link\"") >&5
15504   (eval $ac_link) 2>&5
15505   ac_status=$?
15506   echo "$as_me:15506: \$? = $ac_status" >&5
15507   (exit $ac_status); } &&
15508          { ac_try='test -s conftest$ac_exeext'
15509   { (eval echo "$as_me:15509: \"$ac_try\"") >&5
15510   (eval $ac_try) 2>&5
15511   ac_status=$?
15512   echo "$as_me:15512: \$? = $ac_status" >&5
15513   (exit $ac_status); }; }; then
15514   ac_cv_lib_cposix_main=yes
15515 else
15516   echo "$as_me: failed program was:" >&5
15517 cat conftest.$ac_ext >&5
15518 ac_cv_lib_cposix_main=no
15519 fi
15520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15521 LIBS=$ac_check_lib_save_LIBS
15522 fi
15523 echo "$as_me:15523: result: $ac_cv_lib_cposix_main" >&5
15524 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15525 if test $ac_cv_lib_cposix_main = yes; then
15526   cat >>confdefs.h <<EOF
15527 #define HAVE_LIBCPOSIX 1
15528 EOF
15529
15530   LIBS="-lcposix $LIBS"
15531
15532 fi
15533
15534         echo "$as_me:15534: checking for bzero in -linet" >&5
15535 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15536 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15537   echo $ECHO_N "(cached) $ECHO_C" >&6
15538 else
15539   ac_check_lib_save_LIBS=$LIBS
15540 LIBS="-linet  $LIBS"
15541 cat >conftest.$ac_ext <<_ACEOF
15542 #line 15542 "configure"
15543 #include "confdefs.h"
15544
15545 /* Override any gcc2 internal prototype to avoid an error.  */
15546 #ifdef __cplusplus
15547 extern "C"
15548 #endif
15549 /* We use char because int might match the return type of a gcc2
15550    builtin and then its argument prototype would still apply.  */
15551 char bzero ();
15552 int
15553 main ()
15554 {
15555 bzero ();
15556   ;
15557   return 0;
15558 }
15559 _ACEOF
15560 rm -f conftest.$ac_objext conftest$ac_exeext
15561 if { (eval echo "$as_me:15561: \"$ac_link\"") >&5
15562   (eval $ac_link) 2>&5
15563   ac_status=$?
15564   echo "$as_me:15564: \$? = $ac_status" >&5
15565   (exit $ac_status); } &&
15566          { ac_try='test -s conftest$ac_exeext'
15567   { (eval echo "$as_me:15567: \"$ac_try\"") >&5
15568   (eval $ac_try) 2>&5
15569   ac_status=$?
15570   echo "$as_me:15570: \$? = $ac_status" >&5
15571   (exit $ac_status); }; }; then
15572   ac_cv_lib_inet_bzero=yes
15573 else
15574   echo "$as_me: failed program was:" >&5
15575 cat conftest.$ac_ext >&5
15576 ac_cv_lib_inet_bzero=no
15577 fi
15578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15579 LIBS=$ac_check_lib_save_LIBS
15580 fi
15581 echo "$as_me:15581: result: $ac_cv_lib_inet_bzero" >&5
15582 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15583 if test $ac_cv_lib_inet_bzero = yes; then
15584
15585 cf_add_libs="-linet"
15586 # Filter out duplicates - this happens with badly-designed ".pc" files...
15587 for cf_add_1lib in $LIBS
15588 do
15589         for cf_add_2lib in $cf_add_libs
15590         do
15591                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15592                 then
15593                         cf_add_1lib=
15594                         break
15595                 fi
15596         done
15597         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15598 done
15599 LIBS="$cf_add_libs"
15600
15601 fi
15602 fi
15603
15604 echo "$as_me:15604: checking if sys/time.h works with sys/select.h" >&5
15605 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15606 if test "${cf_cv_sys_time_select+set}" = set; then
15607   echo $ECHO_N "(cached) $ECHO_C" >&6
15608 else
15609
15610 cat >conftest.$ac_ext <<_ACEOF
15611 #line 15611 "configure"
15612 #include "confdefs.h"
15613
15614 #include <sys/types.h>
15615 #ifdef HAVE_SYS_TIME_H
15616 #include <sys/time.h>
15617 #endif
15618 #ifdef HAVE_SYS_SELECT_H
15619 #include <sys/select.h>
15620 #endif
15621
15622 int
15623 main ()
15624 {
15625
15626   ;
15627   return 0;
15628 }
15629 _ACEOF
15630 rm -f conftest.$ac_objext
15631 if { (eval echo "$as_me:15631: \"$ac_compile\"") >&5
15632   (eval $ac_compile) 2>&5
15633   ac_status=$?
15634   echo "$as_me:15634: \$? = $ac_status" >&5
15635   (exit $ac_status); } &&
15636          { ac_try='test -s conftest.$ac_objext'
15637   { (eval echo "$as_me:15637: \"$ac_try\"") >&5
15638   (eval $ac_try) 2>&5
15639   ac_status=$?
15640   echo "$as_me:15640: \$? = $ac_status" >&5
15641   (exit $ac_status); }; }; then
15642   cf_cv_sys_time_select=yes
15643 else
15644   echo "$as_me: failed program was:" >&5
15645 cat conftest.$ac_ext >&5
15646 cf_cv_sys_time_select=no
15647 fi
15648 rm -f conftest.$ac_objext conftest.$ac_ext
15649
15650 fi
15651
15652 echo "$as_me:15652: result: $cf_cv_sys_time_select" >&5
15653 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15654 test "$cf_cv_sys_time_select" = yes &&
15655 cat >>confdefs.h <<\EOF
15656 #define HAVE_SYS_TIME_SELECT 1
15657 EOF
15658
15659 ###     checks for compiler characteristics
15660 ac_ext=c
15661 ac_cpp='$CPP $CPPFLAGS'
15662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15665 ac_main_return=return
15666
15667 echo "$as_me:15667: checking for an ANSI C-conforming const" >&5
15668 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15669 if test "${ac_cv_c_const+set}" = set; then
15670   echo $ECHO_N "(cached) $ECHO_C" >&6
15671 else
15672   cat >conftest.$ac_ext <<_ACEOF
15673 #line 15673 "configure"
15674 #include "confdefs.h"
15675
15676 int
15677 main ()
15678 {
15679 /* FIXME: Include the comments suggested by Paul. */
15680 #ifndef __cplusplus
15681   /* Ultrix mips cc rejects this.  */
15682   typedef int charset[2];
15683   const charset x;
15684   /* SunOS 4.1.1 cc rejects this.  */
15685   char const *const *ccp;
15686   char **p;
15687   /* NEC SVR4.0.2 mips cc rejects this.  */
15688   struct point {int x, y;};
15689   static struct point const zero = {0,0};
15690   /* AIX XL C 1.02.0.0 rejects this.
15691      It does not let you subtract one const X* pointer from another in
15692      an arm of an if-expression whose if-part is not a constant
15693      expression */
15694   const char *g = "string";
15695   ccp = &g + (g ? g-g : 0);
15696   /* HPUX 7.0 cc rejects these. */
15697   ++ccp;
15698   p = (char**) ccp;
15699   ccp = (char const *const *) p;
15700   { /* SCO 3.2v4 cc rejects this.  */
15701     char *t;
15702     char const *s = 0 ? (char *) 0 : (char const *) 0;
15703
15704     *t++ = 0;
15705   }
15706   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15707     int x[] = {25, 17};
15708     const int *foo = &x[0];
15709     ++foo;
15710   }
15711   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15712     typedef const int *iptr;
15713     iptr p = 0;
15714     ++p;
15715   }
15716   { /* AIX XL C 1.02.0.0 rejects this saying
15717        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15718     struct s { int j; const int *ap[3]; };
15719     struct s *b; b->j = 5;
15720   }
15721   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15722     const int foo = 10;
15723   }
15724 #endif
15725
15726   ;
15727   return 0;
15728 }
15729 _ACEOF
15730 rm -f conftest.$ac_objext
15731 if { (eval echo "$as_me:15731: \"$ac_compile\"") >&5
15732   (eval $ac_compile) 2>&5
15733   ac_status=$?
15734   echo "$as_me:15734: \$? = $ac_status" >&5
15735   (exit $ac_status); } &&
15736          { ac_try='test -s conftest.$ac_objext'
15737   { (eval echo "$as_me:15737: \"$ac_try\"") >&5
15738   (eval $ac_try) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); }; }; then
15742   ac_cv_c_const=yes
15743 else
15744   echo "$as_me: failed program was:" >&5
15745 cat conftest.$ac_ext >&5
15746 ac_cv_c_const=no
15747 fi
15748 rm -f conftest.$ac_objext conftest.$ac_ext
15749 fi
15750 echo "$as_me:15750: result: $ac_cv_c_const" >&5
15751 echo "${ECHO_T}$ac_cv_c_const" >&6
15752 if test $ac_cv_c_const = no; then
15753
15754 cat >>confdefs.h <<\EOF
15755 #define const
15756 EOF
15757
15758 fi
15759
15760 echo "$as_me:15760: checking for inline" >&5
15761 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15762 if test "${ac_cv_c_inline+set}" = set; then
15763   echo $ECHO_N "(cached) $ECHO_C" >&6
15764 else
15765   ac_cv_c_inline=no
15766 for ac_kw in inline __inline__ __inline; do
15767   cat >conftest.$ac_ext <<_ACEOF
15768 #line 15768 "configure"
15769 #include "confdefs.h"
15770 #ifndef __cplusplus
15771 static $ac_kw int static_foo () {return 0; }
15772 $ac_kw int foo () {return 0; }
15773 #endif
15774
15775 _ACEOF
15776 rm -f conftest.$ac_objext
15777 if { (eval echo "$as_me:15777: \"$ac_compile\"") >&5
15778   (eval $ac_compile) 2>&5
15779   ac_status=$?
15780   echo "$as_me:15780: \$? = $ac_status" >&5
15781   (exit $ac_status); } &&
15782          { ac_try='test -s conftest.$ac_objext'
15783   { (eval echo "$as_me:15783: \"$ac_try\"") >&5
15784   (eval $ac_try) 2>&5
15785   ac_status=$?
15786   echo "$as_me:15786: \$? = $ac_status" >&5
15787   (exit $ac_status); }; }; then
15788   ac_cv_c_inline=$ac_kw; break
15789 else
15790   echo "$as_me: failed program was:" >&5
15791 cat conftest.$ac_ext >&5
15792 fi
15793 rm -f conftest.$ac_objext conftest.$ac_ext
15794 done
15795
15796 fi
15797 echo "$as_me:15797: result: $ac_cv_c_inline" >&5
15798 echo "${ECHO_T}$ac_cv_c_inline" >&6
15799 case $ac_cv_c_inline in
15800   inline | yes) ;;
15801   no)
15802 cat >>confdefs.h <<\EOF
15803 #define inline
15804 EOF
15805  ;;
15806   *)  cat >>confdefs.h <<EOF
15807 #define inline $ac_cv_c_inline
15808 EOF
15809  ;;
15810 esac
15811
15812 NCURSES_INLINE=
15813 if test "$ac_cv_c_inline" != no ; then
15814         NCURSES_INLINE=inline
15815         if test "$INTEL_COMPILER" = yes
15816         then
15817                 :
15818         elif test "$CLANG_COMPILER" = yes
15819         then
15820                 :
15821         elif test "$GCC" = yes
15822         then
15823                 echo "$as_me:15823: checking if $CC supports options to tune inlining" >&5
15824 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15825 if test "${cf_cv_gcc_inline+set}" = set; then
15826   echo $ECHO_N "(cached) $ECHO_C" >&6
15827 else
15828
15829                 cf_save_CFLAGS=$CFLAGS
15830                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15831                 cat >conftest.$ac_ext <<_ACEOF
15832 #line 15832 "configure"
15833 #include "confdefs.h"
15834 inline int foo(void) { return 1; }
15835 int
15836 main ()
15837 {
15838 ${cf_cv_main_return:-return} foo()
15839   ;
15840   return 0;
15841 }
15842 _ACEOF
15843 rm -f conftest.$ac_objext
15844 if { (eval echo "$as_me:15844: \"$ac_compile\"") >&5
15845   (eval $ac_compile) 2>&5
15846   ac_status=$?
15847   echo "$as_me:15847: \$? = $ac_status" >&5
15848   (exit $ac_status); } &&
15849          { ac_try='test -s conftest.$ac_objext'
15850   { (eval echo "$as_me:15850: \"$ac_try\"") >&5
15851   (eval $ac_try) 2>&5
15852   ac_status=$?
15853   echo "$as_me:15853: \$? = $ac_status" >&5
15854   (exit $ac_status); }; }; then
15855   cf_cv_gcc_inline=yes
15856 else
15857   echo "$as_me: failed program was:" >&5
15858 cat conftest.$ac_ext >&5
15859 cf_cv_gcc_inline=no
15860 fi
15861 rm -f conftest.$ac_objext conftest.$ac_ext
15862                 CFLAGS=$cf_save_CFLAGS
15863
15864 fi
15865 echo "$as_me:15865: result: $cf_cv_gcc_inline" >&5
15866 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15867                 if test "$cf_cv_gcc_inline" = yes ; then
15868
15869 cf_fix_cppflags=no
15870 cf_new_cflags=
15871 cf_new_cppflags=
15872 cf_new_extra_cppflags=
15873
15874 for cf_add_cflags in --param max-inline-insns-single=1200
15875 do
15876 case $cf_fix_cppflags in
15877 (no)
15878         case $cf_add_cflags in
15879         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15880                 case $cf_add_cflags in
15881                 (-D*)
15882                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15883
15884                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15885                                 && test -z "${cf_tst_cflags}" \
15886                                 && cf_fix_cppflags=yes
15887
15888                         if test $cf_fix_cppflags = yes ; then
15889                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15890                                 continue
15891                         elif test "${cf_tst_cflags}" = "\"'" ; then
15892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15893                                 continue
15894                         fi
15895                         ;;
15896                 esac
15897                 case "$CPPFLAGS" in
15898                 (*$cf_add_cflags)
15899                         ;;
15900                 (*)
15901                         case $cf_add_cflags in
15902                         (-D*)
15903                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15904
15905 CPPFLAGS=`echo "$CPPFLAGS" | \
15906         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15907                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15908
15909                                 ;;
15910                         esac
15911                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15912                         ;;
15913                 esac
15914                 ;;
15915         (*)
15916                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15917                 ;;
15918         esac
15919         ;;
15920 (yes)
15921         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15922
15923         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15924
15925         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15926                 && test -z "${cf_tst_cflags}" \
15927                 && cf_fix_cppflags=no
15928         ;;
15929 esac
15930 done
15931
15932 if test -n "$cf_new_cflags" ; then
15933
15934         CFLAGS="$CFLAGS $cf_new_cflags"
15935 fi
15936
15937 if test -n "$cf_new_cppflags" ; then
15938
15939         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15940 fi
15941
15942 if test -n "$cf_new_extra_cppflags" ; then
15943
15944         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15945 fi
15946
15947                 fi
15948         fi
15949 fi
15950
15951 echo "$as_me:15951: checking for signal global datatype" >&5
15952 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15953 if test "${cf_cv_sig_atomic_t+set}" = set; then
15954   echo $ECHO_N "(cached) $ECHO_C" >&6
15955 else
15956
15957         for cf_type in \
15958                 "volatile sig_atomic_t" \
15959                 "sig_atomic_t" \
15960                 "int"
15961         do
15962         cat >conftest.$ac_ext <<_ACEOF
15963 #line 15963 "configure"
15964 #include "confdefs.h"
15965
15966 #include <sys/types.h>
15967 #include <signal.h>
15968 #include <stdio.h>
15969
15970 extern $cf_type x;
15971 $cf_type x;
15972 static void handler(int sig)
15973 {
15974         x = 5;
15975 }
15976 int
15977 main ()
15978 {
15979 signal(SIGINT, handler);
15980                  x = 1
15981   ;
15982   return 0;
15983 }
15984 _ACEOF
15985 rm -f conftest.$ac_objext
15986 if { (eval echo "$as_me:15986: \"$ac_compile\"") >&5
15987   (eval $ac_compile) 2>&5
15988   ac_status=$?
15989   echo "$as_me:15989: \$? = $ac_status" >&5
15990   (exit $ac_status); } &&
15991          { ac_try='test -s conftest.$ac_objext'
15992   { (eval echo "$as_me:15992: \"$ac_try\"") >&5
15993   (eval $ac_try) 2>&5
15994   ac_status=$?
15995   echo "$as_me:15995: \$? = $ac_status" >&5
15996   (exit $ac_status); }; }; then
15997   cf_cv_sig_atomic_t=$cf_type
15998 else
15999   echo "$as_me: failed program was:" >&5
16000 cat conftest.$ac_ext >&5
16001 cf_cv_sig_atomic_t=no
16002 fi
16003 rm -f conftest.$ac_objext conftest.$ac_ext
16004                 test "$cf_cv_sig_atomic_t" != no && break
16005         done
16006
16007 fi
16008
16009 echo "$as_me:16009: result: $cf_cv_sig_atomic_t" >&5
16010 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16011 test "$cf_cv_sig_atomic_t" != no &&
16012 cat >>confdefs.h <<EOF
16013 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16014 EOF
16015
16016 if test $NCURSES_CHTYPE = auto ; then
16017
16018 echo "$as_me:16018: checking for type of chtype" >&5
16019 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16020 if test "${cf_cv_typeof_chtype+set}" = set; then
16021   echo $ECHO_N "(cached) $ECHO_C" >&6
16022 else
16023
16024                 if test "$cross_compiling" = yes; then
16025   cf_cv_typeof_chtype=long
16026 else
16027   cat >conftest.$ac_ext <<_ACEOF
16028 #line 16028 "configure"
16029 #include "confdefs.h"
16030
16031 #define WANT_BITS 31
16032 #include <stdio.h>
16033 int main()
16034 {
16035         FILE *fp = fopen("cf_test.out", "w");
16036         if (fp != 0) {
16037                 char *result = "long";
16038                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16039                         int n;
16040                         unsigned int x, y;
16041                         for (n = 0; n < WANT_BITS; n++) {
16042                                 x = (1 << n);
16043                                 y = (x >> n);
16044                                 if (y != 1 || x == 0) {
16045                                         x = 0;
16046                                         break;
16047                                 }
16048                         }
16049                         /*
16050                          * If x is nonzero, an int is big enough for the bits
16051                          * that we want.
16052                          */
16053                         result = (x != 0) ? "int" : "long";
16054                 }
16055                 fputs(result, fp);
16056                 fclose(fp);
16057         }
16058         ${cf_cv_main_return:-return}(0);
16059 }
16060
16061 _ACEOF
16062 rm -f conftest$ac_exeext
16063 if { (eval echo "$as_me:16063: \"$ac_link\"") >&5
16064   (eval $ac_link) 2>&5
16065   ac_status=$?
16066   echo "$as_me:16066: \$? = $ac_status" >&5
16067   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16068   { (eval echo "$as_me:16068: \"$ac_try\"") >&5
16069   (eval $ac_try) 2>&5
16070   ac_status=$?
16071   echo "$as_me:16071: \$? = $ac_status" >&5
16072   (exit $ac_status); }; }; then
16073   cf_cv_typeof_chtype=`cat cf_test.out`
16074 else
16075   echo "$as_me: program exited with status $ac_status" >&5
16076 echo "$as_me: failed program was:" >&5
16077 cat conftest.$ac_ext >&5
16078 cf_cv_typeof_chtype=long
16079 fi
16080 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16081 fi
16082                 rm -f cf_test.out
16083
16084 fi
16085
16086 echo "$as_me:16086: result: $cf_cv_typeof_chtype" >&5
16087 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16088
16089 cat >>confdefs.h <<EOF
16090 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16091 EOF
16092
16093 else
16094         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16095 fi
16096 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16097
16098 echo "$as_me:16098: checking if unsigned literals are legal" >&5
16099 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16100 if test "${cf_cv_unsigned_literals+set}" = set; then
16101   echo $ECHO_N "(cached) $ECHO_C" >&6
16102 else
16103
16104         cat >conftest.$ac_ext <<_ACEOF
16105 #line 16105 "configure"
16106 #include "confdefs.h"
16107
16108 int
16109 main ()
16110 {
16111 long x = 1L + 1UL + 1U + 1
16112   ;
16113   return 0;
16114 }
16115 _ACEOF
16116 rm -f conftest.$ac_objext
16117 if { (eval echo "$as_me:16117: \"$ac_compile\"") >&5
16118   (eval $ac_compile) 2>&5
16119   ac_status=$?
16120   echo "$as_me:16120: \$? = $ac_status" >&5
16121   (exit $ac_status); } &&
16122          { ac_try='test -s conftest.$ac_objext'
16123   { (eval echo "$as_me:16123: \"$ac_try\"") >&5
16124   (eval $ac_try) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); }; }; then
16128   cf_cv_unsigned_literals=yes
16129 else
16130   echo "$as_me: failed program was:" >&5
16131 cat conftest.$ac_ext >&5
16132 cf_cv_unsigned_literals=no
16133 fi
16134 rm -f conftest.$ac_objext conftest.$ac_ext
16135
16136 fi
16137
16138 echo "$as_me:16138: result: $cf_cv_unsigned_literals" >&5
16139 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16140
16141 cf_cv_1UL="1"
16142 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16143 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16144
16145 if test $NCURSES_MMASK_T = auto ; then
16146         cf_cv_typeof_mmask_t=long
16147 else
16148         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16149 fi
16150 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16151
16152 ###     Checks for external-data
16153
16154 echo "$as_me:16154: checking if external errno is declared" >&5
16155 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16156 if test "${cf_cv_dcl_errno+set}" = set; then
16157   echo $ECHO_N "(cached) $ECHO_C" >&6
16158 else
16159
16160         cat >conftest.$ac_ext <<_ACEOF
16161 #line 16161 "configure"
16162 #include "confdefs.h"
16163
16164 #ifdef HAVE_STDLIB_H
16165 #include <stdlib.h>
16166 #endif
16167 #include <stdio.h>
16168 #include <sys/types.h>
16169 #include <errno.h>
16170 int
16171 main ()
16172 {
16173 int x = (int) errno
16174   ;
16175   return 0;
16176 }
16177 _ACEOF
16178 rm -f conftest.$ac_objext
16179 if { (eval echo "$as_me:16179: \"$ac_compile\"") >&5
16180   (eval $ac_compile) 2>&5
16181   ac_status=$?
16182   echo "$as_me:16182: \$? = $ac_status" >&5
16183   (exit $ac_status); } &&
16184          { ac_try='test -s conftest.$ac_objext'
16185   { (eval echo "$as_me:16185: \"$ac_try\"") >&5
16186   (eval $ac_try) 2>&5
16187   ac_status=$?
16188   echo "$as_me:16188: \$? = $ac_status" >&5
16189   (exit $ac_status); }; }; then
16190   cf_cv_dcl_errno=yes
16191 else
16192   echo "$as_me: failed program was:" >&5
16193 cat conftest.$ac_ext >&5
16194 cf_cv_dcl_errno=no
16195 fi
16196 rm -f conftest.$ac_objext conftest.$ac_ext
16197
16198 fi
16199 echo "$as_me:16199: result: $cf_cv_dcl_errno" >&5
16200 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16201
16202 if test "$cf_cv_dcl_errno" = no ; then
16203
16204 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16205
16206         cat >>confdefs.h <<EOF
16207 #define $cf_result 1
16208 EOF
16209
16210 fi
16211
16212 # It's possible (for near-UNIX clones) that the data doesn't exist
16213
16214 echo "$as_me:16214: checking if external errno exists" >&5
16215 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16216 if test "${cf_cv_have_errno+set}" = set; then
16217   echo $ECHO_N "(cached) $ECHO_C" >&6
16218 else
16219
16220         cat >conftest.$ac_ext <<_ACEOF
16221 #line 16221 "configure"
16222 #include "confdefs.h"
16223
16224 #undef errno
16225 extern int errno;
16226
16227 int
16228 main ()
16229 {
16230 errno = 2
16231   ;
16232   return 0;
16233 }
16234 _ACEOF
16235 rm -f conftest.$ac_objext conftest$ac_exeext
16236 if { (eval echo "$as_me:16236: \"$ac_link\"") >&5
16237   (eval $ac_link) 2>&5
16238   ac_status=$?
16239   echo "$as_me:16239: \$? = $ac_status" >&5
16240   (exit $ac_status); } &&
16241          { ac_try='test -s conftest$ac_exeext'
16242   { (eval echo "$as_me:16242: \"$ac_try\"") >&5
16243   (eval $ac_try) 2>&5
16244   ac_status=$?
16245   echo "$as_me:16245: \$? = $ac_status" >&5
16246   (exit $ac_status); }; }; then
16247   cf_cv_have_errno=yes
16248 else
16249   echo "$as_me: failed program was:" >&5
16250 cat conftest.$ac_ext >&5
16251 cf_cv_have_errno=no
16252 fi
16253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16254
16255 fi
16256 echo "$as_me:16256: result: $cf_cv_have_errno" >&5
16257 echo "${ECHO_T}$cf_cv_have_errno" >&6
16258
16259 if test "$cf_cv_have_errno" = yes ; then
16260
16261 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16262
16263         cat >>confdefs.h <<EOF
16264 #define $cf_result 1
16265 EOF
16266
16267 fi
16268
16269 echo "$as_me:16269: checking if data-only library module links" >&5
16270 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16271 if test "${cf_cv_link_dataonly+set}" = set; then
16272   echo $ECHO_N "(cached) $ECHO_C" >&6
16273 else
16274
16275         rm -f conftest.a
16276         cat >conftest.$ac_ext <<EOF
16277 #line 16277 "configure"
16278 int     testdata[3] = { 123, 456, 789 };
16279 EOF
16280         if { (eval echo "$as_me:16280: \"$ac_compile\"") >&5
16281   (eval $ac_compile) 2>&5
16282   ac_status=$?
16283   echo "$as_me:16283: \$? = $ac_status" >&5
16284   (exit $ac_status); } ; then
16285                 mv conftest.o data.o && \
16286                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16287         fi
16288         rm -f conftest.$ac_ext data.o
16289         cat >conftest.$ac_ext <<EOF
16290 #line 16290 "configure"
16291 int     testfunc()
16292 {
16293 #if defined(NeXT)
16294         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16295 #else
16296         extern int testdata[3];
16297         return testdata[0] == 123
16298            &&  testdata[1] == 456
16299            &&  testdata[2] == 789;
16300 #endif
16301 }
16302 EOF
16303         if { (eval echo "$as_me:16303: \"$ac_compile\"") >&5
16304   (eval $ac_compile) 2>&5
16305   ac_status=$?
16306   echo "$as_me:16306: \$? = $ac_status" >&5
16307   (exit $ac_status); }; then
16308                 mv conftest.o func.o && \
16309                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16310         fi
16311         rm -f conftest.$ac_ext func.o
16312         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16313         cf_saveLIBS="$LIBS"
16314         LIBS="conftest.a $LIBS"
16315         if test "$cross_compiling" = yes; then
16316   cf_cv_link_dataonly=unknown
16317 else
16318   cat >conftest.$ac_ext <<_ACEOF
16319 #line 16319 "configure"
16320 #include "confdefs.h"
16321
16322         int main()
16323         {
16324                 extern int testfunc();
16325                 ${cf_cv_main_return:-return} (!testfunc());
16326         }
16327
16328 _ACEOF
16329 rm -f conftest$ac_exeext
16330 if { (eval echo "$as_me:16330: \"$ac_link\"") >&5
16331   (eval $ac_link) 2>&5
16332   ac_status=$?
16333   echo "$as_me:16333: \$? = $ac_status" >&5
16334   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16335   { (eval echo "$as_me:16335: \"$ac_try\"") >&5
16336   (eval $ac_try) 2>&5
16337   ac_status=$?
16338   echo "$as_me:16338: \$? = $ac_status" >&5
16339   (exit $ac_status); }; }; then
16340   cf_cv_link_dataonly=yes
16341 else
16342   echo "$as_me: program exited with status $ac_status" >&5
16343 echo "$as_me: failed program was:" >&5
16344 cat conftest.$ac_ext >&5
16345 cf_cv_link_dataonly=no
16346 fi
16347 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16348 fi
16349         LIBS="$cf_saveLIBS"
16350
16351 fi
16352
16353 echo "$as_me:16353: result: $cf_cv_link_dataonly" >&5
16354 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16355
16356 if test "$cf_cv_link_dataonly" = no ; then
16357
16358 cat >>confdefs.h <<\EOF
16359 #define BROKEN_LINKER 1
16360 EOF
16361
16362         BROKEN_LINKER=1
16363 fi
16364
16365 ###     Checks for library functions.
16366
16367 for ac_func in \
16368 getcwd \
16369 getegid \
16370 geteuid \
16371 getopt \
16372 getttynam \
16373 issetugid \
16374 poll \
16375 putenv \
16376 remove \
16377 select \
16378 setbuf \
16379 setbuffer \
16380 setenv \
16381 setvbuf \
16382 sigaction \
16383 sigvec \
16384 strdup \
16385 strstr \
16386 tcgetpgrp \
16387 times \
16388 vsnprintf \
16389
16390 do
16391 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16392 echo "$as_me:16392: checking for $ac_func" >&5
16393 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16394 if eval "test \"\${$as_ac_var+set}\" = set"; then
16395   echo $ECHO_N "(cached) $ECHO_C" >&6
16396 else
16397   cat >conftest.$ac_ext <<_ACEOF
16398 #line 16398 "configure"
16399 #include "confdefs.h"
16400 /* System header to define __stub macros and hopefully few prototypes,
16401     which can conflict with char $ac_func (); below.  */
16402 #include <assert.h>
16403 /* Override any gcc2 internal prototype to avoid an error.  */
16404 #ifdef __cplusplus
16405 extern "C"
16406 #endif
16407 /* We use char because int might match the return type of a gcc2
16408    builtin and then its argument prototype would still apply.  */
16409 char $ac_func ();
16410 char (*f) ();
16411
16412 int
16413 main ()
16414 {
16415 /* The GNU C library defines this for functions which it implements
16416     to always fail with ENOSYS.  Some functions are actually named
16417     something starting with __ and the normal name is an alias.  */
16418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16419 choke me
16420 #else
16421 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16422 #endif
16423
16424   ;
16425   return 0;
16426 }
16427 _ACEOF
16428 rm -f conftest.$ac_objext conftest$ac_exeext
16429 if { (eval echo "$as_me:16429: \"$ac_link\"") >&5
16430   (eval $ac_link) 2>&5
16431   ac_status=$?
16432   echo "$as_me:16432: \$? = $ac_status" >&5
16433   (exit $ac_status); } &&
16434          { ac_try='test -s conftest$ac_exeext'
16435   { (eval echo "$as_me:16435: \"$ac_try\"") >&5
16436   (eval $ac_try) 2>&5
16437   ac_status=$?
16438   echo "$as_me:16438: \$? = $ac_status" >&5
16439   (exit $ac_status); }; }; then
16440   eval "$as_ac_var=yes"
16441 else
16442   echo "$as_me: failed program was:" >&5
16443 cat conftest.$ac_ext >&5
16444 eval "$as_ac_var=no"
16445 fi
16446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16447 fi
16448 echo "$as_me:16448: result: `eval echo '${'$as_ac_var'}'`" >&5
16449 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16450 if test `eval echo '${'$as_ac_var'}'` = yes; then
16451   cat >>confdefs.h <<EOF
16452 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16453 EOF
16454
16455 fi
16456 done
16457
16458 if test "x$ac_cv_func_getopt" = xno &&
16459    test "x$cf_with_progs$cf_with_tests" != xnono; then
16460         { { echo "$as_me:16460: error: getopt is required for building programs" >&5
16461 echo "$as_me: error: getopt is required for building programs" >&2;}
16462    { (exit 1); exit 1; }; }
16463 fi
16464
16465 if test "x$with_getcap" = "xyes" ; then
16466
16467 echo "$as_me:16467: checking for terminal-capability database functions" >&5
16468 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16469 if test "${cf_cv_cgetent+set}" = set; then
16470   echo $ECHO_N "(cached) $ECHO_C" >&6
16471 else
16472
16473 cat >conftest.$ac_ext <<_ACEOF
16474 #line 16474 "configure"
16475 #include "confdefs.h"
16476
16477 #include <stdlib.h>
16478 int
16479 main ()
16480 {
16481
16482         char temp[128];
16483         char *buf = temp;
16484         char *db_array = temp;
16485         cgetent(&buf, &db_array, "vt100");
16486         cgetcap(buf, "tc", '=');
16487         cgetmatch(buf, "tc");
16488
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   cf_cv_cgetent=yes
16506 else
16507   echo "$as_me: failed program was:" >&5
16508 cat conftest.$ac_ext >&5
16509 cf_cv_cgetent=no
16510 fi
16511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16512
16513 fi
16514 echo "$as_me:16514: result: $cf_cv_cgetent" >&5
16515 echo "${ECHO_T}$cf_cv_cgetent" >&6
16516
16517 if test "$cf_cv_cgetent" = yes
16518 then
16519
16520 cat >>confdefs.h <<\EOF
16521 #define HAVE_BSD_CGETENT 1
16522 EOF
16523
16524 echo "$as_me:16524: checking if cgetent uses const parameter" >&5
16525 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16526 if test "${cf_cv_cgetent_const+set}" = set; then
16527   echo $ECHO_N "(cached) $ECHO_C" >&6
16528 else
16529
16530 cat >conftest.$ac_ext <<_ACEOF
16531 #line 16531 "configure"
16532 #include "confdefs.h"
16533
16534 #include <stdlib.h>
16535 int
16536 main ()
16537 {
16538
16539         char temp[128];
16540         char *buf = temp;
16541 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16542         const char *db_array = temp;
16543         cgetent(&buf, &db_array, "vt100");
16544 #endif
16545         cgetcap(buf, "tc", '=');
16546         cgetmatch(buf, "tc");
16547
16548   ;
16549   return 0;
16550 }
16551 _ACEOF
16552 rm -f conftest.$ac_objext conftest$ac_exeext
16553 if { (eval echo "$as_me:16553: \"$ac_link\"") >&5
16554   (eval $ac_link) 2>&5
16555   ac_status=$?
16556   echo "$as_me:16556: \$? = $ac_status" >&5
16557   (exit $ac_status); } &&
16558          { ac_try='test -s conftest$ac_exeext'
16559   { (eval echo "$as_me:16559: \"$ac_try\"") >&5
16560   (eval $ac_try) 2>&5
16561   ac_status=$?
16562   echo "$as_me:16562: \$? = $ac_status" >&5
16563   (exit $ac_status); }; }; then
16564   cf_cv_cgetent_const=yes
16565 else
16566   echo "$as_me: failed program was:" >&5
16567 cat conftest.$ac_ext >&5
16568 cf_cv_cgetent_const=no
16569 fi
16570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16571
16572 fi
16573 echo "$as_me:16573: result: $cf_cv_cgetent_const" >&5
16574 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16575         if test "$cf_cv_cgetent_const" = yes
16576         then
16577
16578 cat >>confdefs.h <<EOF
16579 #define CGETENT_CONST const
16580 EOF
16581
16582         fi
16583 fi
16584
16585 fi
16586
16587 echo "$as_me:16587: checking for isascii" >&5
16588 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16589 if test "${cf_cv_have_isascii+set}" = set; then
16590   echo $ECHO_N "(cached) $ECHO_C" >&6
16591 else
16592
16593         cat >conftest.$ac_ext <<_ACEOF
16594 #line 16594 "configure"
16595 #include "confdefs.h"
16596 #include <ctype.h>
16597 int
16598 main ()
16599 {
16600 int x = isascii(' ')
16601   ;
16602   return 0;
16603 }
16604 _ACEOF
16605 rm -f conftest.$ac_objext conftest$ac_exeext
16606 if { (eval echo "$as_me:16606: \"$ac_link\"") >&5
16607   (eval $ac_link) 2>&5
16608   ac_status=$?
16609   echo "$as_me:16609: \$? = $ac_status" >&5
16610   (exit $ac_status); } &&
16611          { ac_try='test -s conftest$ac_exeext'
16612   { (eval echo "$as_me:16612: \"$ac_try\"") >&5
16613   (eval $ac_try) 2>&5
16614   ac_status=$?
16615   echo "$as_me:16615: \$? = $ac_status" >&5
16616   (exit $ac_status); }; }; then
16617   cf_cv_have_isascii=yes
16618 else
16619   echo "$as_me: failed program was:" >&5
16620 cat conftest.$ac_ext >&5
16621 cf_cv_have_isascii=no
16622 fi
16623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16624
16625 fi
16626 echo "$as_me:16626: result: $cf_cv_have_isascii" >&5
16627 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16628 test "$cf_cv_have_isascii" = yes &&
16629 cat >>confdefs.h <<\EOF
16630 #define HAVE_ISASCII 1
16631 EOF
16632
16633 if test "$ac_cv_func_sigaction" = yes; then
16634 echo "$as_me:16634: checking whether sigaction needs _POSIX_SOURCE" >&5
16635 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16636 cat >conftest.$ac_ext <<_ACEOF
16637 #line 16637 "configure"
16638 #include "confdefs.h"
16639
16640 #include <sys/types.h>
16641 #include <signal.h>
16642 int
16643 main ()
16644 {
16645 struct sigaction act
16646   ;
16647   return 0;
16648 }
16649 _ACEOF
16650 rm -f conftest.$ac_objext
16651 if { (eval echo "$as_me:16651: \"$ac_compile\"") >&5
16652   (eval $ac_compile) 2>&5
16653   ac_status=$?
16654   echo "$as_me:16654: \$? = $ac_status" >&5
16655   (exit $ac_status); } &&
16656          { ac_try='test -s conftest.$ac_objext'
16657   { (eval echo "$as_me:16657: \"$ac_try\"") >&5
16658   (eval $ac_try) 2>&5
16659   ac_status=$?
16660   echo "$as_me:16660: \$? = $ac_status" >&5
16661   (exit $ac_status); }; }; then
16662   sigact_bad=no
16663 else
16664   echo "$as_me: failed program was:" >&5
16665 cat conftest.$ac_ext >&5
16666
16667 cat >conftest.$ac_ext <<_ACEOF
16668 #line 16668 "configure"
16669 #include "confdefs.h"
16670
16671 #define _POSIX_SOURCE
16672 #include <sys/types.h>
16673 #include <signal.h>
16674 int
16675 main ()
16676 {
16677 struct sigaction act
16678   ;
16679   return 0;
16680 }
16681 _ACEOF
16682 rm -f conftest.$ac_objext
16683 if { (eval echo "$as_me:16683: \"$ac_compile\"") >&5
16684   (eval $ac_compile) 2>&5
16685   ac_status=$?
16686   echo "$as_me:16686: \$? = $ac_status" >&5
16687   (exit $ac_status); } &&
16688          { ac_try='test -s conftest.$ac_objext'
16689   { (eval echo "$as_me:16689: \"$ac_try\"") >&5
16690   (eval $ac_try) 2>&5
16691   ac_status=$?
16692   echo "$as_me:16692: \$? = $ac_status" >&5
16693   (exit $ac_status); }; }; then
16694   sigact_bad=yes
16695
16696 cat >>confdefs.h <<\EOF
16697 #define _POSIX_SOURCE 1
16698 EOF
16699
16700 else
16701   echo "$as_me: failed program was:" >&5
16702 cat conftest.$ac_ext >&5
16703 sigact_bad=unknown
16704 fi
16705 rm -f conftest.$ac_objext conftest.$ac_ext
16706 fi
16707 rm -f conftest.$ac_objext conftest.$ac_ext
16708 echo "$as_me:16708: result: $sigact_bad" >&5
16709 echo "${ECHO_T}$sigact_bad" >&6
16710 fi
16711
16712 echo "$as_me:16712: checking if nanosleep really works" >&5
16713 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16714 if test "${cf_cv_func_nanosleep+set}" = set; then
16715   echo $ECHO_N "(cached) $ECHO_C" >&6
16716 else
16717
16718 if test "$cross_compiling" = yes; then
16719   cf_cv_func_nanosleep=unknown
16720 else
16721   cat >conftest.$ac_ext <<_ACEOF
16722 #line 16722 "configure"
16723 #include "confdefs.h"
16724
16725 #include <stdio.h>
16726 #include <errno.h>
16727 #include <time.h>
16728
16729 #ifdef HAVE_SYS_TIME_H
16730 #include <sys/time.h>
16731 #endif
16732
16733 int main() {
16734         struct timespec ts1, ts2;
16735         int code;
16736         ts1.tv_sec  = 0;
16737         ts1.tv_nsec = 750000000;
16738         ts2.tv_sec  = 0;
16739         ts2.tv_nsec = 0;
16740         errno = 0;
16741         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16742         ${cf_cv_main_return:-return}(code != 0);
16743 }
16744
16745 _ACEOF
16746 rm -f conftest$ac_exeext
16747 if { (eval echo "$as_me:16747: \"$ac_link\"") >&5
16748   (eval $ac_link) 2>&5
16749   ac_status=$?
16750   echo "$as_me:16750: \$? = $ac_status" >&5
16751   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16752   { (eval echo "$as_me:16752: \"$ac_try\"") >&5
16753   (eval $ac_try) 2>&5
16754   ac_status=$?
16755   echo "$as_me:16755: \$? = $ac_status" >&5
16756   (exit $ac_status); }; }; then
16757   cf_cv_func_nanosleep=yes
16758 else
16759   echo "$as_me: program exited with status $ac_status" >&5
16760 echo "$as_me: failed program was:" >&5
16761 cat conftest.$ac_ext >&5
16762 cf_cv_func_nanosleep=no
16763 fi
16764 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16765 fi
16766 fi
16767 echo "$as_me:16767: result: $cf_cv_func_nanosleep" >&5
16768 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16769
16770 test "$cf_cv_func_nanosleep" = "yes" &&
16771 cat >>confdefs.h <<\EOF
16772 #define HAVE_NANOSLEEP 1
16773 EOF
16774
16775 for ac_header in \
16776 termio.h \
16777 termios.h \
16778 unistd.h \
16779
16780 do
16781 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16782 echo "$as_me:16782: checking for $ac_header" >&5
16783 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16784 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16785   echo $ECHO_N "(cached) $ECHO_C" >&6
16786 else
16787   cat >conftest.$ac_ext <<_ACEOF
16788 #line 16788 "configure"
16789 #include "confdefs.h"
16790 #include <$ac_header>
16791 _ACEOF
16792 if { (eval echo "$as_me:16792: \"$ac_cpp conftest.$ac_ext\"") >&5
16793   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16794   ac_status=$?
16795   egrep -v '^ *\+' conftest.er1 >conftest.err
16796   rm -f conftest.er1
16797   cat conftest.err >&5
16798   echo "$as_me:16798: \$? = $ac_status" >&5
16799   (exit $ac_status); } >/dev/null; then
16800   if test -s conftest.err; then
16801     ac_cpp_err=$ac_c_preproc_warn_flag
16802   else
16803     ac_cpp_err=
16804   fi
16805 else
16806   ac_cpp_err=yes
16807 fi
16808 if test -z "$ac_cpp_err"; then
16809   eval "$as_ac_Header=yes"
16810 else
16811   echo "$as_me: failed program was:" >&5
16812   cat conftest.$ac_ext >&5
16813   eval "$as_ac_Header=no"
16814 fi
16815 rm -f conftest.err conftest.$ac_ext
16816 fi
16817 echo "$as_me:16817: result: `eval echo '${'$as_ac_Header'}'`" >&5
16818 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16819 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16820   cat >>confdefs.h <<EOF
16821 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16822 EOF
16823
16824 fi
16825 done
16826
16827 if test "$ISC" = yes ; then
16828
16829 for ac_header in sys/termio.h
16830 do
16831 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16832 echo "$as_me:16832: checking for $ac_header" >&5
16833 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16835   echo $ECHO_N "(cached) $ECHO_C" >&6
16836 else
16837   cat >conftest.$ac_ext <<_ACEOF
16838 #line 16838 "configure"
16839 #include "confdefs.h"
16840 #include <$ac_header>
16841 _ACEOF
16842 if { (eval echo "$as_me:16842: \"$ac_cpp conftest.$ac_ext\"") >&5
16843   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16844   ac_status=$?
16845   egrep -v '^ *\+' conftest.er1 >conftest.err
16846   rm -f conftest.er1
16847   cat conftest.err >&5
16848   echo "$as_me:16848: \$? = $ac_status" >&5
16849   (exit $ac_status); } >/dev/null; then
16850   if test -s conftest.err; then
16851     ac_cpp_err=$ac_c_preproc_warn_flag
16852   else
16853     ac_cpp_err=
16854   fi
16855 else
16856   ac_cpp_err=yes
16857 fi
16858 if test -z "$ac_cpp_err"; then
16859   eval "$as_ac_Header=yes"
16860 else
16861   echo "$as_me: failed program was:" >&5
16862   cat conftest.$ac_ext >&5
16863   eval "$as_ac_Header=no"
16864 fi
16865 rm -f conftest.err conftest.$ac_ext
16866 fi
16867 echo "$as_me:16867: result: `eval echo '${'$as_ac_Header'}'`" >&5
16868 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16869 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16870   cat >>confdefs.h <<EOF
16871 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16872 EOF
16873
16874 fi
16875 done
16876
16877 fi
16878 if test "$ac_cv_header_termios_h" = yes ; then
16879         case "$CFLAGS $CPPFLAGS" in
16880         (*-D_POSIX_SOURCE*)
16881                 termios_bad=dunno ;;
16882         (*)     termios_bad=maybe ;;
16883         esac
16884         if test "$termios_bad" = maybe ; then
16885         echo "$as_me:16885: checking whether termios.h needs _POSIX_SOURCE" >&5
16886 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16887         cat >conftest.$ac_ext <<_ACEOF
16888 #line 16888 "configure"
16889 #include "confdefs.h"
16890 #include <termios.h>
16891 int
16892 main ()
16893 {
16894 struct termios foo; int x = foo.c_iflag
16895   ;
16896   return 0;
16897 }
16898 _ACEOF
16899 rm -f conftest.$ac_objext
16900 if { (eval echo "$as_me:16900: \"$ac_compile\"") >&5
16901   (eval $ac_compile) 2>&5
16902   ac_status=$?
16903   echo "$as_me:16903: \$? = $ac_status" >&5
16904   (exit $ac_status); } &&
16905          { ac_try='test -s conftest.$ac_objext'
16906   { (eval echo "$as_me:16906: \"$ac_try\"") >&5
16907   (eval $ac_try) 2>&5
16908   ac_status=$?
16909   echo "$as_me:16909: \$? = $ac_status" >&5
16910   (exit $ac_status); }; }; then
16911   termios_bad=no
16912 else
16913   echo "$as_me: failed program was:" >&5
16914 cat conftest.$ac_ext >&5
16915
16916                 cat >conftest.$ac_ext <<_ACEOF
16917 #line 16917 "configure"
16918 #include "confdefs.h"
16919
16920 #define _POSIX_SOURCE
16921 #include <termios.h>
16922 int
16923 main ()
16924 {
16925 struct termios foo; int x = foo.c_iflag
16926   ;
16927   return 0;
16928 }
16929 _ACEOF
16930 rm -f conftest.$ac_objext
16931 if { (eval echo "$as_me:16931: \"$ac_compile\"") >&5
16932   (eval $ac_compile) 2>&5
16933   ac_status=$?
16934   echo "$as_me:16934: \$? = $ac_status" >&5
16935   (exit $ac_status); } &&
16936          { ac_try='test -s conftest.$ac_objext'
16937   { (eval echo "$as_me:16937: \"$ac_try\"") >&5
16938   (eval $ac_try) 2>&5
16939   ac_status=$?
16940   echo "$as_me:16940: \$? = $ac_status" >&5
16941   (exit $ac_status); }; }; then
16942   termios_bad=unknown
16943 else
16944   echo "$as_me: failed program was:" >&5
16945 cat conftest.$ac_ext >&5
16946 termios_bad=yes
16947 cat >>confdefs.h <<\EOF
16948 #define _POSIX_SOURCE 1
16949 EOF
16950
16951 fi
16952 rm -f conftest.$ac_objext conftest.$ac_ext
16953
16954 fi
16955 rm -f conftest.$ac_objext conftest.$ac_ext
16956         echo "$as_me:16956: result: $termios_bad" >&5
16957 echo "${ECHO_T}$termios_bad" >&6
16958         fi
16959 fi
16960
16961 echo "$as_me:16961: checking for tcgetattr" >&5
16962 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16963 if test "${cf_cv_have_tcgetattr+set}" = set; then
16964   echo $ECHO_N "(cached) $ECHO_C" >&6
16965 else
16966
16967 cat >conftest.$ac_ext <<_ACEOF
16968 #line 16968 "configure"
16969 #include "confdefs.h"
16970
16971 #include <sys/types.h>
16972 #ifdef HAVE_UNISTD_H
16973 #include <unistd.h>
16974 #endif
16975 #ifdef HAVE_TERMIOS_H
16976 #include <termios.h>
16977 #define TTY struct termios
16978 #else
16979 #ifdef HAVE_TERMIO_H
16980 #include <termio.h>
16981 #define TTY struct termio
16982 #endif
16983 #endif
16984
16985 int
16986 main ()
16987 {
16988
16989 TTY foo;
16990 tcgetattr(1, &foo);
16991   ;
16992   return 0;
16993 }
16994 _ACEOF
16995 rm -f conftest.$ac_objext conftest$ac_exeext
16996 if { (eval echo "$as_me:16996: \"$ac_link\"") >&5
16997   (eval $ac_link) 2>&5
16998   ac_status=$?
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit $ac_status); } &&
17001          { ac_try='test -s conftest$ac_exeext'
17002   { (eval echo "$as_me:17002: \"$ac_try\"") >&5
17003   (eval $ac_try) 2>&5
17004   ac_status=$?
17005   echo "$as_me:17005: \$? = $ac_status" >&5
17006   (exit $ac_status); }; }; then
17007   cf_cv_have_tcgetattr=yes
17008 else
17009   echo "$as_me: failed program was:" >&5
17010 cat conftest.$ac_ext >&5
17011 cf_cv_have_tcgetattr=no
17012 fi
17013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17014 fi
17015 echo "$as_me:17015: result: $cf_cv_have_tcgetattr" >&5
17016 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17017 test "$cf_cv_have_tcgetattr" = yes &&
17018 cat >>confdefs.h <<\EOF
17019 #define HAVE_TCGETATTR 1
17020 EOF
17021
17022 echo "$as_me:17022: checking for vsscanf function or workaround" >&5
17023 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17024 if test "${cf_cv_func_vsscanf+set}" = set; then
17025   echo $ECHO_N "(cached) $ECHO_C" >&6
17026 else
17027
17028 cat >conftest.$ac_ext <<_ACEOF
17029 #line 17029 "configure"
17030 #include "confdefs.h"
17031
17032 #include <stdarg.h>
17033 #include <stdio.h>
17034 int
17035 main ()
17036 {
17037
17038         va_list ap;
17039         vsscanf("from", "%d", ap)
17040   ;
17041   return 0;
17042 }
17043 _ACEOF
17044 rm -f conftest.$ac_objext conftest$ac_exeext
17045 if { (eval echo "$as_me:17045: \"$ac_link\"") >&5
17046   (eval $ac_link) 2>&5
17047   ac_status=$?
17048   echo "$as_me:17048: \$? = $ac_status" >&5
17049   (exit $ac_status); } &&
17050          { ac_try='test -s conftest$ac_exeext'
17051   { (eval echo "$as_me:17051: \"$ac_try\"") >&5
17052   (eval $ac_try) 2>&5
17053   ac_status=$?
17054   echo "$as_me:17054: \$? = $ac_status" >&5
17055   (exit $ac_status); }; }; then
17056   cf_cv_func_vsscanf=vsscanf
17057 else
17058   echo "$as_me: failed program was:" >&5
17059 cat conftest.$ac_ext >&5
17060
17061 cat >conftest.$ac_ext <<_ACEOF
17062 #line 17062 "configure"
17063 #include "confdefs.h"
17064
17065 #include <stdarg.h>
17066 #include <stdio.h>
17067 int
17068 main ()
17069 {
17070
17071         FILE strbuf;
17072         char *str = "from";
17073
17074         strbuf._flag = _IOREAD;
17075         strbuf._ptr = strbuf._base = (unsigned char *) str;
17076         strbuf._cnt = strlen(str);
17077         strbuf._file = _NFILE;
17078         return (vfscanf(&strbuf, "%d", ap))
17079   ;
17080   return 0;
17081 }
17082 _ACEOF
17083 rm -f conftest.$ac_objext conftest$ac_exeext
17084 if { (eval echo "$as_me:17084: \"$ac_link\"") >&5
17085   (eval $ac_link) 2>&5
17086   ac_status=$?
17087   echo "$as_me:17087: \$? = $ac_status" >&5
17088   (exit $ac_status); } &&
17089          { ac_try='test -s conftest$ac_exeext'
17090   { (eval echo "$as_me:17090: \"$ac_try\"") >&5
17091   (eval $ac_try) 2>&5
17092   ac_status=$?
17093   echo "$as_me:17093: \$? = $ac_status" >&5
17094   (exit $ac_status); }; }; then
17095   cf_cv_func_vsscanf=vfscanf
17096 else
17097   echo "$as_me: failed program was:" >&5
17098 cat conftest.$ac_ext >&5
17099
17100 cat >conftest.$ac_ext <<_ACEOF
17101 #line 17101 "configure"
17102 #include "confdefs.h"
17103
17104 #include <stdarg.h>
17105 #include <stdio.h>
17106 int
17107 main ()
17108 {
17109
17110         FILE strbuf;
17111         char *str = "from";
17112
17113         strbuf._flag = _IOREAD;
17114         strbuf._ptr = strbuf._base = (unsigned char *) str;
17115         strbuf._cnt = strlen(str);
17116         strbuf._file = _NFILE;
17117         return (_doscan(&strbuf, "%d", ap))
17118   ;
17119   return 0;
17120 }
17121 _ACEOF
17122 rm -f conftest.$ac_objext conftest$ac_exeext
17123 if { (eval echo "$as_me:17123: \"$ac_link\"") >&5
17124   (eval $ac_link) 2>&5
17125   ac_status=$?
17126   echo "$as_me:17126: \$? = $ac_status" >&5
17127   (exit $ac_status); } &&
17128          { ac_try='test -s conftest$ac_exeext'
17129   { (eval echo "$as_me:17129: \"$ac_try\"") >&5
17130   (eval $ac_try) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); }; }; then
17134   cf_cv_func_vsscanf=_doscan
17135 else
17136   echo "$as_me: failed program was:" >&5
17137 cat conftest.$ac_ext >&5
17138
17139 cf_cv_func_vsscanf=no
17140 fi
17141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17142 fi
17143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17144 fi
17145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17146 fi
17147 echo "$as_me:17147: result: $cf_cv_func_vsscanf" >&5
17148 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17149
17150 case $cf_cv_func_vsscanf in
17151 (vsscanf)
17152 cat >>confdefs.h <<\EOF
17153 #define HAVE_VSSCANF 1
17154 EOF
17155 ;;
17156 (vfscanf)
17157 cat >>confdefs.h <<\EOF
17158 #define HAVE_VFSCANF 1
17159 EOF
17160 ;;
17161 (_doscan)
17162 cat >>confdefs.h <<\EOF
17163 #define HAVE__DOSCAN 1
17164 EOF
17165 ;;
17166 esac
17167
17168 echo "$as_me:17168: checking for working mkstemp" >&5
17169 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17170 if test "${cf_cv_func_mkstemp+set}" = set; then
17171   echo $ECHO_N "(cached) $ECHO_C" >&6
17172 else
17173
17174 rm -rf conftest*
17175 if test "$cross_compiling" = yes; then
17176   cf_cv_func_mkstemp=maybe
17177 else
17178   cat >conftest.$ac_ext <<_ACEOF
17179 #line 17179 "configure"
17180 #include "confdefs.h"
17181
17182 #include <sys/types.h>
17183 #include <stdlib.h>
17184 #include <stdio.h>
17185 #include <string.h>
17186 #include <sys/stat.h>
17187 int main()
17188 {
17189         char *tmpl = "conftestXXXXXX";
17190         char name[2][80];
17191         int n;
17192         int result = 0;
17193         int fd;
17194         struct stat sb;
17195
17196         umask(077);
17197         for (n = 0; n < 2; ++n) {
17198                 strcpy(name[n], tmpl);
17199                 if ((fd = mkstemp(name[n])) >= 0) {
17200                         if (!strcmp(name[n], tmpl)
17201                          || stat(name[n], &sb) != 0
17202                          || (sb.st_mode & S_IFMT) != S_IFREG
17203                          || (sb.st_mode & 077) != 0) {
17204                                 result = 1;
17205                         }
17206                         close(fd);
17207                 }
17208         }
17209         if (result == 0
17210          && !strcmp(name[0], name[1]))
17211                 result = 1;
17212         ${cf_cv_main_return:-return}(result);
17213 }
17214
17215 _ACEOF
17216 rm -f conftest$ac_exeext
17217 if { (eval echo "$as_me:17217: \"$ac_link\"") >&5
17218   (eval $ac_link) 2>&5
17219   ac_status=$?
17220   echo "$as_me:17220: \$? = $ac_status" >&5
17221   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17222   { (eval echo "$as_me:17222: \"$ac_try\"") >&5
17223   (eval $ac_try) 2>&5
17224   ac_status=$?
17225   echo "$as_me:17225: \$? = $ac_status" >&5
17226   (exit $ac_status); }; }; then
17227   cf_cv_func_mkstemp=yes
17228
17229 else
17230   echo "$as_me: program exited with status $ac_status" >&5
17231 echo "$as_me: failed program was:" >&5
17232 cat conftest.$ac_ext >&5
17233 cf_cv_func_mkstemp=no
17234
17235 fi
17236 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17237 fi
17238
17239 fi
17240 echo "$as_me:17240: result: $cf_cv_func_mkstemp" >&5
17241 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17242 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17243         echo "$as_me:17243: checking for mkstemp" >&5
17244 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17245 if test "${ac_cv_func_mkstemp+set}" = set; then
17246   echo $ECHO_N "(cached) $ECHO_C" >&6
17247 else
17248   cat >conftest.$ac_ext <<_ACEOF
17249 #line 17249 "configure"
17250 #include "confdefs.h"
17251 /* System header to define __stub macros and hopefully few prototypes,
17252     which can conflict with char mkstemp (); below.  */
17253 #include <assert.h>
17254 /* Override any gcc2 internal prototype to avoid an error.  */
17255 #ifdef __cplusplus
17256 extern "C"
17257 #endif
17258 /* We use char because int might match the return type of a gcc2
17259    builtin and then its argument prototype would still apply.  */
17260 char mkstemp ();
17261 char (*f) ();
17262
17263 int
17264 main ()
17265 {
17266 /* The GNU C library defines this for functions which it implements
17267     to always fail with ENOSYS.  Some functions are actually named
17268     something starting with __ and the normal name is an alias.  */
17269 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17270 choke me
17271 #else
17272 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17273 #endif
17274
17275   ;
17276   return 0;
17277 }
17278 _ACEOF
17279 rm -f conftest.$ac_objext conftest$ac_exeext
17280 if { (eval echo "$as_me:17280: \"$ac_link\"") >&5
17281   (eval $ac_link) 2>&5
17282   ac_status=$?
17283   echo "$as_me:17283: \$? = $ac_status" >&5
17284   (exit $ac_status); } &&
17285          { ac_try='test -s conftest$ac_exeext'
17286   { (eval echo "$as_me:17286: \"$ac_try\"") >&5
17287   (eval $ac_try) 2>&5
17288   ac_status=$?
17289   echo "$as_me:17289: \$? = $ac_status" >&5
17290   (exit $ac_status); }; }; then
17291   ac_cv_func_mkstemp=yes
17292 else
17293   echo "$as_me: failed program was:" >&5
17294 cat conftest.$ac_ext >&5
17295 ac_cv_func_mkstemp=no
17296 fi
17297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17298 fi
17299 echo "$as_me:17299: result: $ac_cv_func_mkstemp" >&5
17300 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17301
17302 fi
17303 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17304
17305 cat >>confdefs.h <<\EOF
17306 #define HAVE_MKSTEMP 1
17307 EOF
17308
17309 fi
17310
17311 # setup for prototype of fallback for vsscanf()
17312
17313 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17314         HAVE_VSSCANF=1
17315 else
17316         HAVE_VSSCANF=0
17317 fi
17318
17319 if test "x$cross_compiling" = xyes ; then
17320         { echo "$as_me:17320: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17321 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17322 else
17323         echo "$as_me:17323: checking whether setvbuf arguments are reversed" >&5
17324 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17325 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17326   echo $ECHO_N "(cached) $ECHO_C" >&6
17327 else
17328   if test "$cross_compiling" = yes; then
17329   { { echo "$as_me:17329: error: cannot run test program while cross compiling" >&5
17330 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17331    { (exit 1); exit 1; }; }
17332 else
17333   cat >conftest.$ac_ext <<_ACEOF
17334 #line 17334 "configure"
17335 #include "confdefs.h"
17336 #include <stdio.h>
17337 /* If setvbuf has the reversed format, exit 0. */
17338 int
17339 main ()
17340 {
17341   /* This call has the arguments reversed.
17342      A reversed system may check and see that the address of main
17343      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17344   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17345     $ac_main_return(1);
17346   putc('\r', stdout);
17347   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17348 }
17349 _ACEOF
17350 rm -f conftest$ac_exeext
17351 if { (eval echo "$as_me:17351: \"$ac_link\"") >&5
17352   (eval $ac_link) 2>&5
17353   ac_status=$?
17354   echo "$as_me:17354: \$? = $ac_status" >&5
17355   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17356   { (eval echo "$as_me:17356: \"$ac_try\"") >&5
17357   (eval $ac_try) 2>&5
17358   ac_status=$?
17359   echo "$as_me:17359: \$? = $ac_status" >&5
17360   (exit $ac_status); }; }; then
17361   ac_cv_func_setvbuf_reversed=yes
17362 else
17363   echo "$as_me: program exited with status $ac_status" >&5
17364 echo "$as_me: failed program was:" >&5
17365 cat conftest.$ac_ext >&5
17366 ac_cv_func_setvbuf_reversed=no
17367 fi
17368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17369 fi
17370 rm -f core core.* *.core
17371 fi
17372 echo "$as_me:17372: result: $ac_cv_func_setvbuf_reversed" >&5
17373 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17374 if test $ac_cv_func_setvbuf_reversed = yes; then
17375
17376 cat >>confdefs.h <<\EOF
17377 #define SETVBUF_REVERSED 1
17378 EOF
17379
17380 fi
17381
17382 fi
17383 echo "$as_me:17383: checking for intptr_t" >&5
17384 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17385 if test "${ac_cv_type_intptr_t+set}" = set; then
17386   echo $ECHO_N "(cached) $ECHO_C" >&6
17387 else
17388   cat >conftest.$ac_ext <<_ACEOF
17389 #line 17389 "configure"
17390 #include "confdefs.h"
17391 $ac_includes_default
17392 int
17393 main ()
17394 {
17395 if ((intptr_t *) 0)
17396   return 0;
17397 if (sizeof (intptr_t))
17398   return 0;
17399   ;
17400   return 0;
17401 }
17402 _ACEOF
17403 rm -f conftest.$ac_objext
17404 if { (eval echo "$as_me:17404: \"$ac_compile\"") >&5
17405   (eval $ac_compile) 2>&5
17406   ac_status=$?
17407   echo "$as_me:17407: \$? = $ac_status" >&5
17408   (exit $ac_status); } &&
17409          { ac_try='test -s conftest.$ac_objext'
17410   { (eval echo "$as_me:17410: \"$ac_try\"") >&5
17411   (eval $ac_try) 2>&5
17412   ac_status=$?
17413   echo "$as_me:17413: \$? = $ac_status" >&5
17414   (exit $ac_status); }; }; then
17415   ac_cv_type_intptr_t=yes
17416 else
17417   echo "$as_me: failed program was:" >&5
17418 cat conftest.$ac_ext >&5
17419 ac_cv_type_intptr_t=no
17420 fi
17421 rm -f conftest.$ac_objext conftest.$ac_ext
17422 fi
17423 echo "$as_me:17423: result: $ac_cv_type_intptr_t" >&5
17424 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17425 if test $ac_cv_type_intptr_t = yes; then
17426   :
17427 else
17428
17429 cat >>confdefs.h <<EOF
17430 #define intptr_t long
17431 EOF
17432
17433 fi
17434
17435 echo "$as_me:17435: checking for ssize_t" >&5
17436 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17437 if test "${ac_cv_type_ssize_t+set}" = set; then
17438   echo $ECHO_N "(cached) $ECHO_C" >&6
17439 else
17440   cat >conftest.$ac_ext <<_ACEOF
17441 #line 17441 "configure"
17442 #include "confdefs.h"
17443 $ac_includes_default
17444 int
17445 main ()
17446 {
17447 if ((ssize_t *) 0)
17448   return 0;
17449 if (sizeof (ssize_t))
17450   return 0;
17451   ;
17452   return 0;
17453 }
17454 _ACEOF
17455 rm -f conftest.$ac_objext
17456 if { (eval echo "$as_me:17456: \"$ac_compile\"") >&5
17457   (eval $ac_compile) 2>&5
17458   ac_status=$?
17459   echo "$as_me:17459: \$? = $ac_status" >&5
17460   (exit $ac_status); } &&
17461          { ac_try='test -s conftest.$ac_objext'
17462   { (eval echo "$as_me:17462: \"$ac_try\"") >&5
17463   (eval $ac_try) 2>&5
17464   ac_status=$?
17465   echo "$as_me:17465: \$? = $ac_status" >&5
17466   (exit $ac_status); }; }; then
17467   ac_cv_type_ssize_t=yes
17468 else
17469   echo "$as_me: failed program was:" >&5
17470 cat conftest.$ac_ext >&5
17471 ac_cv_type_ssize_t=no
17472 fi
17473 rm -f conftest.$ac_objext conftest.$ac_ext
17474 fi
17475 echo "$as_me:17475: result: $ac_cv_type_ssize_t" >&5
17476 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17477 if test $ac_cv_type_ssize_t = yes; then
17478   :
17479 else
17480
17481 cat >>confdefs.h <<EOF
17482 #define ssize_t int
17483 EOF
17484
17485 fi
17486
17487 echo "$as_me:17487: checking for type sigaction_t" >&5
17488 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17489 if test "${cf_cv_type_sigaction+set}" = set; then
17490   echo $ECHO_N "(cached) $ECHO_C" >&6
17491 else
17492
17493         cat >conftest.$ac_ext <<_ACEOF
17494 #line 17494 "configure"
17495 #include "confdefs.h"
17496
17497 #include <signal.h>
17498 int
17499 main ()
17500 {
17501 sigaction_t x
17502   ;
17503   return 0;
17504 }
17505 _ACEOF
17506 rm -f conftest.$ac_objext
17507 if { (eval echo "$as_me:17507: \"$ac_compile\"") >&5
17508   (eval $ac_compile) 2>&5
17509   ac_status=$?
17510   echo "$as_me:17510: \$? = $ac_status" >&5
17511   (exit $ac_status); } &&
17512          { ac_try='test -s conftest.$ac_objext'
17513   { (eval echo "$as_me:17513: \"$ac_try\"") >&5
17514   (eval $ac_try) 2>&5
17515   ac_status=$?
17516   echo "$as_me:17516: \$? = $ac_status" >&5
17517   (exit $ac_status); }; }; then
17518   cf_cv_type_sigaction=yes
17519 else
17520   echo "$as_me: failed program was:" >&5
17521 cat conftest.$ac_ext >&5
17522 cf_cv_type_sigaction=no
17523 fi
17524 rm -f conftest.$ac_objext conftest.$ac_ext
17525 fi
17526
17527 echo "$as_me:17527: result: $cf_cv_type_sigaction" >&5
17528 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17529 test "$cf_cv_type_sigaction" = yes &&
17530 cat >>confdefs.h <<\EOF
17531 #define HAVE_TYPE_SIGACTION 1
17532 EOF
17533
17534 echo "$as_me:17534: checking declaration of size-change" >&5
17535 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17536 if test "${cf_cv_sizechange+set}" = set; then
17537   echo $ECHO_N "(cached) $ECHO_C" >&6
17538 else
17539
17540         cf_cv_sizechange=unknown
17541         cf_save_CPPFLAGS="$CPPFLAGS"
17542
17543 for cf_opts in "" "NEED_PTEM_H"
17544 do
17545
17546         CPPFLAGS="$cf_save_CPPFLAGS"
17547         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17548         cat >conftest.$ac_ext <<_ACEOF
17549 #line 17549 "configure"
17550 #include "confdefs.h"
17551 #include <sys/types.h>
17552 #ifdef HAVE_TERMIOS_H
17553 #include <termios.h>
17554 #else
17555 #ifdef HAVE_TERMIO_H
17556 #include <termio.h>
17557 #endif
17558 #endif
17559 #ifdef NEED_PTEM_H
17560 /* This is a workaround for SCO:  they neglected to define struct winsize in
17561  * termios.h -- it's only in termio.h and ptem.h
17562  */
17563 #include        <sys/stream.h>
17564 #include        <sys/ptem.h>
17565 #endif
17566 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17567 #include <sys/ioctl.h>
17568 #endif
17569
17570 int
17571 main ()
17572 {
17573
17574 #ifdef TIOCGSIZE
17575         struct ttysize win;     /* FIXME: what system is this? */
17576         int y = win.ts_lines;
17577         int x = win.ts_cols;
17578 #else
17579 #ifdef TIOCGWINSZ
17580         struct winsize win;
17581         int y = win.ws_row;
17582         int x = win.ws_col;
17583 #else
17584         no TIOCGSIZE or TIOCGWINSZ
17585 #endif /* TIOCGWINSZ */
17586 #endif /* TIOCGSIZE */
17587
17588   ;
17589   return 0;
17590 }
17591 _ACEOF
17592 rm -f conftest.$ac_objext
17593 if { (eval echo "$as_me:17593: \"$ac_compile\"") >&5
17594   (eval $ac_compile) 2>&5
17595   ac_status=$?
17596   echo "$as_me:17596: \$? = $ac_status" >&5
17597   (exit $ac_status); } &&
17598          { ac_try='test -s conftest.$ac_objext'
17599   { (eval echo "$as_me:17599: \"$ac_try\"") >&5
17600   (eval $ac_try) 2>&5
17601   ac_status=$?
17602   echo "$as_me:17602: \$? = $ac_status" >&5
17603   (exit $ac_status); }; }; then
17604   cf_cv_sizechange=yes
17605 else
17606   echo "$as_me: failed program was:" >&5
17607 cat conftest.$ac_ext >&5
17608 cf_cv_sizechange=no
17609 fi
17610 rm -f conftest.$ac_objext conftest.$ac_ext
17611
17612         CPPFLAGS="$cf_save_CPPFLAGS"
17613         if test "$cf_cv_sizechange" = yes ; then
17614                 echo "size-change succeeded ($cf_opts)" >&5
17615                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17616                 break
17617         fi
17618 done
17619
17620 fi
17621 echo "$as_me:17621: result: $cf_cv_sizechange" >&5
17622 echo "${ECHO_T}$cf_cv_sizechange" >&6
17623 if test "$cf_cv_sizechange" != no ; then
17624
17625 cat >>confdefs.h <<\EOF
17626 #define HAVE_SIZECHANGE 1
17627 EOF
17628
17629         case $cf_cv_sizechange in
17630         (NEED*)
17631                 cat >>confdefs.h <<EOF
17632 #define $cf_cv_sizechange  1
17633 EOF
17634
17635                 ;;
17636         esac
17637 fi
17638
17639 echo "$as_me:17639: checking for memmove" >&5
17640 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17641 if test "${ac_cv_func_memmove+set}" = set; then
17642   echo $ECHO_N "(cached) $ECHO_C" >&6
17643 else
17644   cat >conftest.$ac_ext <<_ACEOF
17645 #line 17645 "configure"
17646 #include "confdefs.h"
17647 /* System header to define __stub macros and hopefully few prototypes,
17648     which can conflict with char memmove (); below.  */
17649 #include <assert.h>
17650 /* Override any gcc2 internal prototype to avoid an error.  */
17651 #ifdef __cplusplus
17652 extern "C"
17653 #endif
17654 /* We use char because int might match the return type of a gcc2
17655    builtin and then its argument prototype would still apply.  */
17656 char memmove ();
17657 char (*f) ();
17658
17659 int
17660 main ()
17661 {
17662 /* The GNU C library defines this for functions which it implements
17663     to always fail with ENOSYS.  Some functions are actually named
17664     something starting with __ and the normal name is an alias.  */
17665 #if defined (__stub_memmove) || defined (__stub___memmove)
17666 choke me
17667 #else
17668 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17669 #endif
17670
17671   ;
17672   return 0;
17673 }
17674 _ACEOF
17675 rm -f conftest.$ac_objext conftest$ac_exeext
17676 if { (eval echo "$as_me:17676: \"$ac_link\"") >&5
17677   (eval $ac_link) 2>&5
17678   ac_status=$?
17679   echo "$as_me:17679: \$? = $ac_status" >&5
17680   (exit $ac_status); } &&
17681          { ac_try='test -s conftest$ac_exeext'
17682   { (eval echo "$as_me:17682: \"$ac_try\"") >&5
17683   (eval $ac_try) 2>&5
17684   ac_status=$?
17685   echo "$as_me:17685: \$? = $ac_status" >&5
17686   (exit $ac_status); }; }; then
17687   ac_cv_func_memmove=yes
17688 else
17689   echo "$as_me: failed program was:" >&5
17690 cat conftest.$ac_ext >&5
17691 ac_cv_func_memmove=no
17692 fi
17693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17694 fi
17695 echo "$as_me:17695: result: $ac_cv_func_memmove" >&5
17696 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17697 if test $ac_cv_func_memmove = yes; then
17698   :
17699 else
17700
17701 echo "$as_me:17701: checking for bcopy" >&5
17702 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17703 if test "${ac_cv_func_bcopy+set}" = set; then
17704   echo $ECHO_N "(cached) $ECHO_C" >&6
17705 else
17706   cat >conftest.$ac_ext <<_ACEOF
17707 #line 17707 "configure"
17708 #include "confdefs.h"
17709 /* System header to define __stub macros and hopefully few prototypes,
17710     which can conflict with char bcopy (); below.  */
17711 #include <assert.h>
17712 /* Override any gcc2 internal prototype to avoid an error.  */
17713 #ifdef __cplusplus
17714 extern "C"
17715 #endif
17716 /* We use char because int might match the return type of a gcc2
17717    builtin and then its argument prototype would still apply.  */
17718 char bcopy ();
17719 char (*f) ();
17720
17721 int
17722 main ()
17723 {
17724 /* The GNU C library defines this for functions which it implements
17725     to always fail with ENOSYS.  Some functions are actually named
17726     something starting with __ and the normal name is an alias.  */
17727 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17728 choke me
17729 #else
17730 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17731 #endif
17732
17733   ;
17734   return 0;
17735 }
17736 _ACEOF
17737 rm -f conftest.$ac_objext conftest$ac_exeext
17738 if { (eval echo "$as_me:17738: \"$ac_link\"") >&5
17739   (eval $ac_link) 2>&5
17740   ac_status=$?
17741   echo "$as_me:17741: \$? = $ac_status" >&5
17742   (exit $ac_status); } &&
17743          { ac_try='test -s conftest$ac_exeext'
17744   { (eval echo "$as_me:17744: \"$ac_try\"") >&5
17745   (eval $ac_try) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit $ac_status); }; }; then
17749   ac_cv_func_bcopy=yes
17750 else
17751   echo "$as_me: failed program was:" >&5
17752 cat conftest.$ac_ext >&5
17753 ac_cv_func_bcopy=no
17754 fi
17755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17756 fi
17757 echo "$as_me:17757: result: $ac_cv_func_bcopy" >&5
17758 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17759 if test $ac_cv_func_bcopy = yes; then
17760
17761         echo "$as_me:17761: checking if bcopy does overlapping moves" >&5
17762 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17763 if test "${cf_cv_good_bcopy+set}" = set; then
17764   echo $ECHO_N "(cached) $ECHO_C" >&6
17765 else
17766
17767                 if test "$cross_compiling" = yes; then
17768   cf_cv_good_bcopy=unknown
17769 else
17770   cat >conftest.$ac_ext <<_ACEOF
17771 #line 17771 "configure"
17772 #include "confdefs.h"
17773
17774 int main() {
17775         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17776         char temp[40];
17777         bcopy(data, temp, sizeof(data));
17778         bcopy(temp+10, temp, 15);
17779         bcopy(temp+5, temp+15, 10);
17780         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17781 }
17782
17783 _ACEOF
17784 rm -f conftest$ac_exeext
17785 if { (eval echo "$as_me:17785: \"$ac_link\"") >&5
17786   (eval $ac_link) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17790   { (eval echo "$as_me:17790: \"$ac_try\"") >&5
17791   (eval $ac_try) 2>&5
17792   ac_status=$?
17793   echo "$as_me:17793: \$? = $ac_status" >&5
17794   (exit $ac_status); }; }; then
17795   cf_cv_good_bcopy=yes
17796 else
17797   echo "$as_me: program exited with status $ac_status" >&5
17798 echo "$as_me: failed program was:" >&5
17799 cat conftest.$ac_ext >&5
17800 cf_cv_good_bcopy=no
17801 fi
17802 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17803 fi
17804
17805 fi
17806 echo "$as_me:17806: result: $cf_cv_good_bcopy" >&5
17807 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17808
17809 else
17810   cf_cv_good_bcopy=no
17811 fi
17812
17813         if test "$cf_cv_good_bcopy" = yes ; then
17814
17815 cat >>confdefs.h <<\EOF
17816 #define USE_OK_BCOPY 1
17817 EOF
17818
17819         else
17820
17821 cat >>confdefs.h <<\EOF
17822 #define USE_MY_MEMMOVE 1
17823 EOF
17824
17825         fi
17826
17827 fi
17828
17829 echo "$as_me:17829: checking if poll really works" >&5
17830 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17831 if test "${cf_cv_working_poll+set}" = set; then
17832   echo $ECHO_N "(cached) $ECHO_C" >&6
17833 else
17834
17835 if test "$cross_compiling" = yes; then
17836   cf_cv_working_poll=unknown
17837 else
17838   cat >conftest.$ac_ext <<_ACEOF
17839 #line 17839 "configure"
17840 #include "confdefs.h"
17841
17842 #include <stdlib.h>
17843 #include <stdio.h>
17844 #include <unistd.h>
17845 #include <fcntl.h>
17846 #ifdef HAVE_POLL_H
17847 #include <poll.h>
17848 #else
17849 #include <sys/poll.h>
17850 #endif
17851 int main() {
17852         struct pollfd myfds;
17853         int ret;
17854
17855         /* check for Darwin bug with respect to "devices" */
17856         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17857         if (myfds.fd < 0)
17858                 myfds.fd = 0;
17859         myfds.events = POLLIN;
17860         myfds.revents = 0;
17861
17862         ret = poll(&myfds, 1, 100);
17863
17864         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17865                 ret = -1;
17866         } else {
17867                 int fd = 0;
17868                 if (!isatty(fd)) {
17869                         fd = open("/dev/tty", 2);       /* O_RDWR */
17870                 }
17871
17872                 if (fd >= 0) {
17873                         /* also check with standard input */
17874                         myfds.fd = fd;
17875                         myfds.events = POLLIN;
17876                         myfds.revents = 0;
17877                         ret = poll(&myfds, 1, 100);
17878                 } else {
17879                         ret = -1;
17880                 }
17881         }
17882         ${cf_cv_main_return:-return}(ret < 0);
17883 }
17884 _ACEOF
17885 rm -f conftest$ac_exeext
17886 if { (eval echo "$as_me:17886: \"$ac_link\"") >&5
17887   (eval $ac_link) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17891   { (eval echo "$as_me:17891: \"$ac_try\"") >&5
17892   (eval $ac_try) 2>&5
17893   ac_status=$?
17894   echo "$as_me:17894: \$? = $ac_status" >&5
17895   (exit $ac_status); }; }; then
17896   cf_cv_working_poll=yes
17897 else
17898   echo "$as_me: program exited with status $ac_status" >&5
17899 echo "$as_me: failed program was:" >&5
17900 cat conftest.$ac_ext >&5
17901 cf_cv_working_poll=no
17902 fi
17903 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17904 fi
17905 fi
17906 echo "$as_me:17906: result: $cf_cv_working_poll" >&5
17907 echo "${ECHO_T}$cf_cv_working_poll" >&6
17908 test "$cf_cv_working_poll" = "yes" &&
17909 cat >>confdefs.h <<\EOF
17910 #define HAVE_WORKING_POLL 1
17911 EOF
17912
17913 echo "$as_me:17913: checking for va_copy" >&5
17914 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17915 if test "${cf_cv_have_va_copy+set}" = set; then
17916   echo $ECHO_N "(cached) $ECHO_C" >&6
17917 else
17918
17919 cat >conftest.$ac_ext <<_ACEOF
17920 #line 17920 "configure"
17921 #include "confdefs.h"
17922
17923 #include <stdarg.h>
17924
17925 int
17926 main ()
17927 {
17928
17929         static va_list dst;
17930         static va_list src;
17931         va_copy(dst, src)
17932   ;
17933   return 0;
17934 }
17935 _ACEOF
17936 rm -f conftest.$ac_objext conftest$ac_exeext
17937 if { (eval echo "$as_me:17937: \"$ac_link\"") >&5
17938   (eval $ac_link) 2>&5
17939   ac_status=$?
17940   echo "$as_me:17940: \$? = $ac_status" >&5
17941   (exit $ac_status); } &&
17942          { ac_try='test -s conftest$ac_exeext'
17943   { (eval echo "$as_me:17943: \"$ac_try\"") >&5
17944   (eval $ac_try) 2>&5
17945   ac_status=$?
17946   echo "$as_me:17946: \$? = $ac_status" >&5
17947   (exit $ac_status); }; }; then
17948   cf_cv_have_va_copy=yes
17949 else
17950   echo "$as_me: failed program was:" >&5
17951 cat conftest.$ac_ext >&5
17952 cf_cv_have_va_copy=no
17953 fi
17954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17955 fi
17956 echo "$as_me:17956: result: $cf_cv_have_va_copy" >&5
17957 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17958
17959 test "$cf_cv_have_va_copy" = yes &&
17960 cat >>confdefs.h <<\EOF
17961 #define HAVE_VA_COPY 1
17962 EOF
17963
17964 echo "$as_me:17964: checking for __va_copy" >&5
17965 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17966 if test "${cf_cv_have___va_copy+set}" = set; then
17967   echo $ECHO_N "(cached) $ECHO_C" >&6
17968 else
17969
17970 cat >conftest.$ac_ext <<_ACEOF
17971 #line 17971 "configure"
17972 #include "confdefs.h"
17973
17974 #include <stdarg.h>
17975
17976 int
17977 main ()
17978 {
17979
17980         static va_list dst;
17981         static va_list src;
17982         __va_copy(dst, src)
17983   ;
17984   return 0;
17985 }
17986 _ACEOF
17987 rm -f conftest.$ac_objext conftest$ac_exeext
17988 if { (eval echo "$as_me:17988: \"$ac_link\"") >&5
17989   (eval $ac_link) 2>&5
17990   ac_status=$?
17991   echo "$as_me:17991: \$? = $ac_status" >&5
17992   (exit $ac_status); } &&
17993          { ac_try='test -s conftest$ac_exeext'
17994   { (eval echo "$as_me:17994: \"$ac_try\"") >&5
17995   (eval $ac_try) 2>&5
17996   ac_status=$?
17997   echo "$as_me:17997: \$? = $ac_status" >&5
17998   (exit $ac_status); }; }; then
17999   cf_cv_have___va_copy=yes
18000 else
18001   echo "$as_me: failed program was:" >&5
18002 cat conftest.$ac_ext >&5
18003 cf_cv_have___va_copy=no
18004 fi
18005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18006 fi
18007 echo "$as_me:18007: result: $cf_cv_have___va_copy" >&5
18008 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18009
18010 test "$cf_cv_have___va_copy" = yes &&
18011 cat >>confdefs.h <<\EOF
18012 #define HAVE___VA_COPY 1
18013 EOF
18014
18015 echo "$as_me:18015: checking for pid_t" >&5
18016 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18017 if test "${ac_cv_type_pid_t+set}" = set; then
18018   echo $ECHO_N "(cached) $ECHO_C" >&6
18019 else
18020   cat >conftest.$ac_ext <<_ACEOF
18021 #line 18021 "configure"
18022 #include "confdefs.h"
18023 $ac_includes_default
18024 int
18025 main ()
18026 {
18027 if ((pid_t *) 0)
18028   return 0;
18029 if (sizeof (pid_t))
18030   return 0;
18031   ;
18032   return 0;
18033 }
18034 _ACEOF
18035 rm -f conftest.$ac_objext
18036 if { (eval echo "$as_me:18036: \"$ac_compile\"") >&5
18037   (eval $ac_compile) 2>&5
18038   ac_status=$?
18039   echo "$as_me:18039: \$? = $ac_status" >&5
18040   (exit $ac_status); } &&
18041          { ac_try='test -s conftest.$ac_objext'
18042   { (eval echo "$as_me:18042: \"$ac_try\"") >&5
18043   (eval $ac_try) 2>&5
18044   ac_status=$?
18045   echo "$as_me:18045: \$? = $ac_status" >&5
18046   (exit $ac_status); }; }; then
18047   ac_cv_type_pid_t=yes
18048 else
18049   echo "$as_me: failed program was:" >&5
18050 cat conftest.$ac_ext >&5
18051 ac_cv_type_pid_t=no
18052 fi
18053 rm -f conftest.$ac_objext conftest.$ac_ext
18054 fi
18055 echo "$as_me:18055: result: $ac_cv_type_pid_t" >&5
18056 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18057 if test $ac_cv_type_pid_t = yes; then
18058   :
18059 else
18060
18061 cat >>confdefs.h <<EOF
18062 #define pid_t int
18063 EOF
18064
18065 fi
18066
18067 for ac_header in unistd.h vfork.h
18068 do
18069 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18070 echo "$as_me:18070: checking for $ac_header" >&5
18071 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18073   echo $ECHO_N "(cached) $ECHO_C" >&6
18074 else
18075   cat >conftest.$ac_ext <<_ACEOF
18076 #line 18076 "configure"
18077 #include "confdefs.h"
18078 #include <$ac_header>
18079 _ACEOF
18080 if { (eval echo "$as_me:18080: \"$ac_cpp conftest.$ac_ext\"") >&5
18081   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18082   ac_status=$?
18083   egrep -v '^ *\+' conftest.er1 >conftest.err
18084   rm -f conftest.er1
18085   cat conftest.err >&5
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit $ac_status); } >/dev/null; then
18088   if test -s conftest.err; then
18089     ac_cpp_err=$ac_c_preproc_warn_flag
18090   else
18091     ac_cpp_err=
18092   fi
18093 else
18094   ac_cpp_err=yes
18095 fi
18096 if test -z "$ac_cpp_err"; then
18097   eval "$as_ac_Header=yes"
18098 else
18099   echo "$as_me: failed program was:" >&5
18100   cat conftest.$ac_ext >&5
18101   eval "$as_ac_Header=no"
18102 fi
18103 rm -f conftest.err conftest.$ac_ext
18104 fi
18105 echo "$as_me:18105: result: `eval echo '${'$as_ac_Header'}'`" >&5
18106 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18107 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18108   cat >>confdefs.h <<EOF
18109 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18110 EOF
18111
18112 fi
18113 done
18114
18115 for ac_func in fork vfork
18116 do
18117 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18118 echo "$as_me:18118: checking for $ac_func" >&5
18119 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18120 if eval "test \"\${$as_ac_var+set}\" = set"; then
18121   echo $ECHO_N "(cached) $ECHO_C" >&6
18122 else
18123   cat >conftest.$ac_ext <<_ACEOF
18124 #line 18124 "configure"
18125 #include "confdefs.h"
18126 /* System header to define __stub macros and hopefully few prototypes,
18127     which can conflict with char $ac_func (); below.  */
18128 #include <assert.h>
18129 /* Override any gcc2 internal prototype to avoid an error.  */
18130 #ifdef __cplusplus
18131 extern "C"
18132 #endif
18133 /* We use char because int might match the return type of a gcc2
18134    builtin and then its argument prototype would still apply.  */
18135 char $ac_func ();
18136 char (*f) ();
18137
18138 int
18139 main ()
18140 {
18141 /* The GNU C library defines this for functions which it implements
18142     to always fail with ENOSYS.  Some functions are actually named
18143     something starting with __ and the normal name is an alias.  */
18144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18145 choke me
18146 #else
18147 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18148 #endif
18149
18150   ;
18151   return 0;
18152 }
18153 _ACEOF
18154 rm -f conftest.$ac_objext conftest$ac_exeext
18155 if { (eval echo "$as_me:18155: \"$ac_link\"") >&5
18156   (eval $ac_link) 2>&5
18157   ac_status=$?
18158   echo "$as_me:18158: \$? = $ac_status" >&5
18159   (exit $ac_status); } &&
18160          { ac_try='test -s conftest$ac_exeext'
18161   { (eval echo "$as_me:18161: \"$ac_try\"") >&5
18162   (eval $ac_try) 2>&5
18163   ac_status=$?
18164   echo "$as_me:18164: \$? = $ac_status" >&5
18165   (exit $ac_status); }; }; then
18166   eval "$as_ac_var=yes"
18167 else
18168   echo "$as_me: failed program was:" >&5
18169 cat conftest.$ac_ext >&5
18170 eval "$as_ac_var=no"
18171 fi
18172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18173 fi
18174 echo "$as_me:18174: result: `eval echo '${'$as_ac_var'}'`" >&5
18175 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18176 if test `eval echo '${'$as_ac_var'}'` = yes; then
18177   cat >>confdefs.h <<EOF
18178 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18179 EOF
18180
18181 fi
18182 done
18183
18184 ac_cv_func_fork_works=$ac_cv_func_fork
18185 if test "x$ac_cv_func_fork" = xyes; then
18186   echo "$as_me:18186: checking for working fork" >&5
18187 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18188 if test "${ac_cv_func_fork_works+set}" = set; then
18189   echo $ECHO_N "(cached) $ECHO_C" >&6
18190 else
18191   if test "$cross_compiling" = yes; then
18192   ac_cv_func_fork_works=cross
18193 else
18194   cat >conftest.$ac_ext <<_ACEOF
18195 /* By Rüdiger Kuhlmann. */
18196       #include <sys/types.h>
18197       #if HAVE_UNISTD_H
18198       # include <unistd.h>
18199       #endif
18200       /* Some systems only have a dummy stub for fork() */
18201       int main ()
18202       {
18203         if (fork() < 0)
18204           $ac_main_return (1);
18205         $ac_main_return (0);
18206       }
18207 _ACEOF
18208 rm -f conftest$ac_exeext
18209 if { (eval echo "$as_me:18209: \"$ac_link\"") >&5
18210   (eval $ac_link) 2>&5
18211   ac_status=$?
18212   echo "$as_me:18212: \$? = $ac_status" >&5
18213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18214   { (eval echo "$as_me:18214: \"$ac_try\"") >&5
18215   (eval $ac_try) 2>&5
18216   ac_status=$?
18217   echo "$as_me:18217: \$? = $ac_status" >&5
18218   (exit $ac_status); }; }; then
18219   ac_cv_func_fork_works=yes
18220 else
18221   echo "$as_me: program exited with status $ac_status" >&5
18222 echo "$as_me: failed program was:" >&5
18223 cat conftest.$ac_ext >&5
18224 ac_cv_func_fork_works=no
18225 fi
18226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18227 fi
18228 fi
18229 echo "$as_me:18229: result: $ac_cv_func_fork_works" >&5
18230 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18231
18232 fi
18233 if test "x$ac_cv_func_fork_works" = xcross; then
18234   case $host in
18235     *-*-amigaos* | *-*-msdosdjgpp*)
18236       # Override, as these systems have only a dummy fork() stub
18237       ac_cv_func_fork_works=no
18238       ;;
18239     *)
18240       ac_cv_func_fork_works=yes
18241       ;;
18242   esac
18243   { echo "$as_me:18243: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18244 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18245 fi
18246 ac_cv_func_vfork_works=$ac_cv_func_vfork
18247 if test "x$ac_cv_func_vfork" = xyes; then
18248   echo "$as_me:18248: checking for working vfork" >&5
18249 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18250 if test "${ac_cv_func_vfork_works+set}" = set; then
18251   echo $ECHO_N "(cached) $ECHO_C" >&6
18252 else
18253   if test "$cross_compiling" = yes; then
18254   ac_cv_func_vfork_works=cross
18255 else
18256   cat >conftest.$ac_ext <<_ACEOF
18257 #line 18257 "configure"
18258 #include "confdefs.h"
18259 /* Thanks to Paul Eggert for this test.  */
18260 #include <stdio.h>
18261 #include <sys/types.h>
18262 #include <sys/stat.h>
18263 #if HAVE_UNISTD_H
18264 # include <unistd.h>
18265 #endif
18266 #if HAVE_VFORK_H
18267 # include <vfork.h>
18268 #endif
18269 /* On some sparc systems, changes by the child to local and incoming
18270    argument registers are propagated back to the parent.  The compiler
18271    is told about this with #include <vfork.h>, but some compilers
18272    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18273    static variable whose address is put into a register that is
18274    clobbered by the vfork.  */
18275 static
18276 #ifdef __cplusplus
18277 sparc_address_test (int arg)
18278 # else
18279 sparc_address_test (arg) int arg;
18280 #endif
18281 {
18282   static pid_t child;
18283   if (!child) {
18284     child = vfork ();
18285     if (child < 0) {
18286       perror ("vfork");
18287       _exit(2);
18288     }
18289     if (!child) {
18290       arg = getpid();
18291       write(-1, "", 0);
18292       _exit (arg);
18293     }
18294   }
18295 }
18296
18297 int
18298 main ()
18299 {
18300   pid_t parent = getpid ();
18301   pid_t child;
18302
18303   sparc_address_test ();
18304
18305   child = vfork ();
18306
18307   if (child == 0) {
18308     /* Here is another test for sparc vfork register problems.  This
18309        test uses lots of local variables, at least as many local
18310        variables as main has allocated so far including compiler
18311        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18312        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18313        reuse the register of parent for one of the local variables,
18314        since it will think that parent can't possibly be used any more
18315        in this routine.  Assigning to the local variable will thus
18316        munge parent in the parent process.  */
18317     pid_t
18318       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18319       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18320     /* Convince the compiler that p..p7 are live; otherwise, it might
18321        use the same hardware register for all 8 local variables.  */
18322     if (p != p1 || p != p2 || p != p3 || p != p4
18323         || p != p5 || p != p6 || p != p7)
18324       _exit(1);
18325
18326     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18327        from child file descriptors.  If the child closes a descriptor
18328        before it execs or exits, this munges the parent's descriptor
18329        as well.  Test for this by closing stdout in the child.  */
18330     _exit(close(fileno(stdout)) != 0);
18331   } else {
18332     int status;
18333     struct stat st;
18334
18335     while (wait(&status) != child)
18336       ;
18337     $ac_main_return(
18338          /* Was there some problem with vforking?  */
18339          child < 0
18340
18341          /* Did the child fail?  (This shouldn't happen.)  */
18342          || status
18343
18344          /* Did the vfork/compiler bug occur?  */
18345          || parent != getpid()
18346
18347          /* Did the file descriptor bug occur?  */
18348          || fstat(fileno(stdout), &st) != 0
18349          );
18350   }
18351 }
18352 _ACEOF
18353 rm -f conftest$ac_exeext
18354 if { (eval echo "$as_me:18354: \"$ac_link\"") >&5
18355   (eval $ac_link) 2>&5
18356   ac_status=$?
18357   echo "$as_me:18357: \$? = $ac_status" >&5
18358   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18359   { (eval echo "$as_me:18359: \"$ac_try\"") >&5
18360   (eval $ac_try) 2>&5
18361   ac_status=$?
18362   echo "$as_me:18362: \$? = $ac_status" >&5
18363   (exit $ac_status); }; }; then
18364   ac_cv_func_vfork_works=yes
18365 else
18366   echo "$as_me: program exited with status $ac_status" >&5
18367 echo "$as_me: failed program was:" >&5
18368 cat conftest.$ac_ext >&5
18369 ac_cv_func_vfork_works=no
18370 fi
18371 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18372 fi
18373 fi
18374 echo "$as_me:18374: result: $ac_cv_func_vfork_works" >&5
18375 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18376
18377 fi;
18378 if test "x$ac_cv_func_fork_works" = xcross; then
18379   ac_cv_func_vfork_works=ac_cv_func_vfork
18380   { echo "$as_me:18380: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18381 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18382 fi
18383
18384 if test "x$ac_cv_func_vfork_works" = xyes; then
18385
18386 cat >>confdefs.h <<\EOF
18387 #define HAVE_WORKING_VFORK 1
18388 EOF
18389
18390 else
18391
18392 cat >>confdefs.h <<\EOF
18393 #define vfork fork
18394 EOF
18395
18396 fi
18397 if test "x$ac_cv_func_fork_works" = xyes; then
18398
18399 cat >>confdefs.h <<\EOF
18400 #define HAVE_WORKING_FORK 1
18401 EOF
18402
18403 fi
18404
18405 # special check for test/ditto.c
18406
18407 echo "$as_me:18407: checking for openpty in -lutil" >&5
18408 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18409 if test "${ac_cv_lib_util_openpty+set}" = set; then
18410   echo $ECHO_N "(cached) $ECHO_C" >&6
18411 else
18412   ac_check_lib_save_LIBS=$LIBS
18413 LIBS="-lutil  $LIBS"
18414 cat >conftest.$ac_ext <<_ACEOF
18415 #line 18415 "configure"
18416 #include "confdefs.h"
18417
18418 /* Override any gcc2 internal prototype to avoid an error.  */
18419 #ifdef __cplusplus
18420 extern "C"
18421 #endif
18422 /* We use char because int might match the return type of a gcc2
18423    builtin and then its argument prototype would still apply.  */
18424 char openpty ();
18425 int
18426 main ()
18427 {
18428 openpty ();
18429   ;
18430   return 0;
18431 }
18432 _ACEOF
18433 rm -f conftest.$ac_objext conftest$ac_exeext
18434 if { (eval echo "$as_me:18434: \"$ac_link\"") >&5
18435   (eval $ac_link) 2>&5
18436   ac_status=$?
18437   echo "$as_me:18437: \$? = $ac_status" >&5
18438   (exit $ac_status); } &&
18439          { ac_try='test -s conftest$ac_exeext'
18440   { (eval echo "$as_me:18440: \"$ac_try\"") >&5
18441   (eval $ac_try) 2>&5
18442   ac_status=$?
18443   echo "$as_me:18443: \$? = $ac_status" >&5
18444   (exit $ac_status); }; }; then
18445   ac_cv_lib_util_openpty=yes
18446 else
18447   echo "$as_me: failed program was:" >&5
18448 cat conftest.$ac_ext >&5
18449 ac_cv_lib_util_openpty=no
18450 fi
18451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18452 LIBS=$ac_check_lib_save_LIBS
18453 fi
18454 echo "$as_me:18454: result: $ac_cv_lib_util_openpty" >&5
18455 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18456 if test $ac_cv_lib_util_openpty = yes; then
18457   cf_cv_lib_util=yes
18458 else
18459   cf_cv_lib_util=no
18460 fi
18461
18462 echo "$as_me:18462: checking for openpty header" >&5
18463 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18464 if test "${cf_cv_func_openpty+set}" = set; then
18465   echo $ECHO_N "(cached) $ECHO_C" >&6
18466 else
18467
18468         cf_save_LIBS="$LIBS"
18469         test $cf_cv_lib_util = yes &&
18470 cf_add_libs="-lutil"
18471 # Filter out duplicates - this happens with badly-designed ".pc" files...
18472 for cf_add_1lib in $LIBS
18473 do
18474         for cf_add_2lib in $cf_add_libs
18475         do
18476                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18477                 then
18478                         cf_add_1lib=
18479                         break
18480                 fi
18481         done
18482         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18483 done
18484 LIBS="$cf_add_libs"
18485
18486         for cf_header in pty.h libutil.h util.h
18487         do
18488         cat >conftest.$ac_ext <<_ACEOF
18489 #line 18489 "configure"
18490 #include "confdefs.h"
18491
18492 #include <$cf_header>
18493
18494 int
18495 main ()
18496 {
18497
18498         int x = openpty((int *)0, (int *)0, (char *)0,
18499                                    (struct termios *)0, (struct winsize *)0);
18500
18501   ;
18502   return 0;
18503 }
18504 _ACEOF
18505 rm -f conftest.$ac_objext conftest$ac_exeext
18506 if { (eval echo "$as_me:18506: \"$ac_link\"") >&5
18507   (eval $ac_link) 2>&5
18508   ac_status=$?
18509   echo "$as_me:18509: \$? = $ac_status" >&5
18510   (exit $ac_status); } &&
18511          { ac_try='test -s conftest$ac_exeext'
18512   { (eval echo "$as_me:18512: \"$ac_try\"") >&5
18513   (eval $ac_try) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit $ac_status); }; }; then
18517
18518                 cf_cv_func_openpty=$cf_header
18519                 break
18520
18521 else
18522   echo "$as_me: failed program was:" >&5
18523 cat conftest.$ac_ext >&5
18524
18525                 cf_cv_func_openpty=no
18526
18527 fi
18528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18529         done
18530         LIBS="$cf_save_LIBS"
18531
18532 fi
18533 echo "$as_me:18533: result: $cf_cv_func_openpty" >&5
18534 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18535
18536 if test "$cf_cv_func_openpty" != no ; then
18537
18538 cat >>confdefs.h <<EOF
18539 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18540 EOF
18541
18542 cat >>confdefs.h <<\EOF
18543 #define USE_XTERM_PTY 1
18544 EOF
18545
18546         if test "x$cf_cv_lib_util" = xyes ; then
18547
18548 cf_add_libs="-lutil"
18549 # Filter out duplicates - this happens with badly-designed ".pc" files...
18550 for cf_add_1lib in $TEST_LIBS
18551 do
18552         for cf_add_2lib in $cf_add_libs
18553         do
18554                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18555                 then
18556                         cf_add_1lib=
18557                         break
18558                 fi
18559         done
18560         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18561 done
18562 TEST_LIBS="$cf_add_libs"
18563
18564         fi
18565 fi
18566
18567 if test "$with_hashed_db" != no ; then
18568
18569 cat >>confdefs.h <<\EOF
18570 #define USE_HASHED_DB 1
18571 EOF
18572
18573 case $with_hashed_db in
18574 (yes|*able*)
18575         ;;
18576 (*)
18577         if test -d "$with_hashed_db" ; then
18578
18579 if test -n "$with_hashed_db/include" ; then
18580   for cf_add_incdir in $with_hashed_db/include
18581   do
18582         while test $cf_add_incdir != /usr/include
18583         do
18584           if test -d $cf_add_incdir
18585           then
18586                 cf_have_incdir=no
18587                 if test -n "$CFLAGS$CPPFLAGS" ; then
18588                   # a loop is needed to ensure we can add subdirs of existing dirs
18589                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18590                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18591                           cf_have_incdir=yes; break
18592                         fi
18593                   done
18594                 fi
18595
18596                 if test "$cf_have_incdir" = no ; then
18597                   if test "$cf_add_incdir" = /usr/local/include ; then
18598                         if test "$GCC" = yes
18599                         then
18600                           cf_save_CPPFLAGS=$CPPFLAGS
18601                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18602                           cat >conftest.$ac_ext <<_ACEOF
18603 #line 18603 "configure"
18604 #include "confdefs.h"
18605 #include <stdio.h>
18606 int
18607 main ()
18608 {
18609 printf("Hello")
18610   ;
18611   return 0;
18612 }
18613 _ACEOF
18614 rm -f conftest.$ac_objext
18615 if { (eval echo "$as_me:18615: \"$ac_compile\"") >&5
18616   (eval $ac_compile) 2>&5
18617   ac_status=$?
18618   echo "$as_me:18618: \$? = $ac_status" >&5
18619   (exit $ac_status); } &&
18620          { ac_try='test -s conftest.$ac_objext'
18621   { (eval echo "$as_me:18621: \"$ac_try\"") >&5
18622   (eval $ac_try) 2>&5
18623   ac_status=$?
18624   echo "$as_me:18624: \$? = $ac_status" >&5
18625   (exit $ac_status); }; }; then
18626   :
18627 else
18628   echo "$as_me: failed program was:" >&5
18629 cat conftest.$ac_ext >&5
18630 cf_have_incdir=yes
18631 fi
18632 rm -f conftest.$ac_objext conftest.$ac_ext
18633                           CPPFLAGS=$cf_save_CPPFLAGS
18634                         fi
18635                   fi
18636                 fi
18637
18638                 if test "$cf_have_incdir" = no ; then
18639                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18640
18641 echo "${as_me:-configure}:18641: testing adding $cf_add_incdir to include-path ..." 1>&5
18642
18643                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18644
18645                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18646                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18647                   cf_add_incdir="$cf_top_incdir"
18648                 else
18649                   break
18650                 fi
18651           else
18652                 break
18653           fi
18654         done
18655   done
18656 fi
18657
18658 if test -n "$with_hashed_db/lib" ; then
18659         for cf_add_libdir in $with_hashed_db/lib
18660         do
18661                 if test $cf_add_libdir = /usr/lib ; then
18662                         :
18663                 elif test -d $cf_add_libdir
18664                 then
18665                         cf_have_libdir=no
18666                         if test -n "$LDFLAGS$LIBS" ; then
18667                                 # a loop is needed to ensure we can add subdirs of existing dirs
18668                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18669                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18670                                                 cf_have_libdir=yes; break
18671                                         fi
18672                                 done
18673                         fi
18674                         if test "$cf_have_libdir" = no ; then
18675                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18676
18677 echo "${as_me:-configure}:18677: testing adding $cf_add_libdir to library-path ..." 1>&5
18678
18679                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18680                         fi
18681                 fi
18682         done
18683 fi
18684
18685         else
18686                 case "$with_hashed_db" in
18687                 (./*|../*|/*)
18688                         { echo "$as_me:18688: WARNING: no such directory $with_hashed_db" >&5
18689 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18690                         ;;
18691                 (*)
18692
18693 cf_search=
18694
18695 test "x$prefix" != "xNONE" && \
18696 test -d "$prefix" && \
18697  {
18698         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18699         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18700         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18701         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18702         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18703         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18704 }
18705
18706 for cf_subdir_prefix in \
18707         /usr \
18708         /usr/local \
18709         /usr/pkg \
18710         /opt \
18711         /opt/local \
18712         $HOME
18713 do
18714
18715 test "x$cf_subdir_prefix" != "x$prefix" && \
18716 test -d "$cf_subdir_prefix" && \
18717 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18718         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18719         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18720         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18721         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18722         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18723         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"
18724 }
18725
18726 done
18727
18728         for cf_item in $cf_search
18729         do
18730                 case $cf_item in
18731                 (*/$with_hashed_db)
18732
18733 if test -n "$cf_item" ; then
18734   for cf_add_incdir in $cf_item
18735   do
18736         while test $cf_add_incdir != /usr/include
18737         do
18738           if test -d $cf_add_incdir
18739           then
18740                 cf_have_incdir=no
18741                 if test -n "$CFLAGS$CPPFLAGS" ; then
18742                   # a loop is needed to ensure we can add subdirs of existing dirs
18743                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18744                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18745                           cf_have_incdir=yes; break
18746                         fi
18747                   done
18748                 fi
18749
18750                 if test "$cf_have_incdir" = no ; then
18751                   if test "$cf_add_incdir" = /usr/local/include ; then
18752                         if test "$GCC" = yes
18753                         then
18754                           cf_save_CPPFLAGS=$CPPFLAGS
18755                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18756                           cat >conftest.$ac_ext <<_ACEOF
18757 #line 18757 "configure"
18758 #include "confdefs.h"
18759 #include <stdio.h>
18760 int
18761 main ()
18762 {
18763 printf("Hello")
18764   ;
18765   return 0;
18766 }
18767 _ACEOF
18768 rm -f conftest.$ac_objext
18769 if { (eval echo "$as_me:18769: \"$ac_compile\"") >&5
18770   (eval $ac_compile) 2>&5
18771   ac_status=$?
18772   echo "$as_me:18772: \$? = $ac_status" >&5
18773   (exit $ac_status); } &&
18774          { ac_try='test -s conftest.$ac_objext'
18775   { (eval echo "$as_me:18775: \"$ac_try\"") >&5
18776   (eval $ac_try) 2>&5
18777   ac_status=$?
18778   echo "$as_me:18778: \$? = $ac_status" >&5
18779   (exit $ac_status); }; }; then
18780   :
18781 else
18782   echo "$as_me: failed program was:" >&5
18783 cat conftest.$ac_ext >&5
18784 cf_have_incdir=yes
18785 fi
18786 rm -f conftest.$ac_objext conftest.$ac_ext
18787                           CPPFLAGS=$cf_save_CPPFLAGS
18788                         fi
18789                   fi
18790                 fi
18791
18792                 if test "$cf_have_incdir" = no ; then
18793                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18794
18795 echo "${as_me:-configure}:18795: testing adding $cf_add_incdir to include-path ..." 1>&5
18796
18797                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18798
18799                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18800                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18801                   cf_add_incdir="$cf_top_incdir"
18802                 else
18803                   break
18804                 fi
18805           else
18806                 break
18807           fi
18808         done
18809   done
18810 fi
18811
18812                         ;;
18813                 esac
18814         done
18815
18816 cf_search=
18817
18818 test "x$prefix" != "xNONE" && \
18819 test -d "$prefix" && \
18820  {
18821         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18822         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18823         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18824         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18825         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18826         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18827 }
18828
18829 for cf_subdir_prefix in \
18830         /usr \
18831         /usr/local \
18832         /usr/pkg \
18833         /opt \
18834         /opt/local \
18835         $HOME
18836 do
18837
18838 test "x$cf_subdir_prefix" != "x$prefix" && \
18839 test -d "$cf_subdir_prefix" && \
18840 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18841         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18842         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18843         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18844         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18845         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18846         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"
18847 }
18848
18849 done
18850
18851         for cf_item in $cf_search
18852         do
18853                 case $cf_item in
18854                 (*/$with_hashed_db)
18855
18856 if test -n "$cf_item" ; then
18857         for cf_add_libdir in $cf_item
18858         do
18859                 if test $cf_add_libdir = /usr/lib ; then
18860                         :
18861                 elif test -d $cf_add_libdir
18862                 then
18863                         cf_have_libdir=no
18864                         if test -n "$LDFLAGS$LIBS" ; then
18865                                 # a loop is needed to ensure we can add subdirs of existing dirs
18866                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18867                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18868                                                 cf_have_libdir=yes; break
18869                                         fi
18870                                 done
18871                         fi
18872                         if test "$cf_have_libdir" = no ; then
18873                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18874
18875 echo "${as_me:-configure}:18875: testing adding $cf_add_libdir to library-path ..." 1>&5
18876
18877                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18878                         fi
18879                 fi
18880         done
18881 fi
18882
18883                         ;;
18884                 esac
18885         done
18886
18887                         ;;
18888                 esac
18889         fi
18890 esac
18891
18892 echo "$as_me:18892: checking for db.h" >&5
18893 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18894 if test "${ac_cv_header_db_h+set}" = set; then
18895   echo $ECHO_N "(cached) $ECHO_C" >&6
18896 else
18897   cat >conftest.$ac_ext <<_ACEOF
18898 #line 18898 "configure"
18899 #include "confdefs.h"
18900 #include <db.h>
18901 _ACEOF
18902 if { (eval echo "$as_me:18902: \"$ac_cpp conftest.$ac_ext\"") >&5
18903   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18904   ac_status=$?
18905   egrep -v '^ *\+' conftest.er1 >conftest.err
18906   rm -f conftest.er1
18907   cat conftest.err >&5
18908   echo "$as_me:18908: \$? = $ac_status" >&5
18909   (exit $ac_status); } >/dev/null; then
18910   if test -s conftest.err; then
18911     ac_cpp_err=$ac_c_preproc_warn_flag
18912   else
18913     ac_cpp_err=
18914   fi
18915 else
18916   ac_cpp_err=yes
18917 fi
18918 if test -z "$ac_cpp_err"; then
18919   ac_cv_header_db_h=yes
18920 else
18921   echo "$as_me: failed program was:" >&5
18922   cat conftest.$ac_ext >&5
18923   ac_cv_header_db_h=no
18924 fi
18925 rm -f conftest.err conftest.$ac_ext
18926 fi
18927 echo "$as_me:18927: result: $ac_cv_header_db_h" >&5
18928 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18929 if test $ac_cv_header_db_h = yes; then
18930
18931 echo "$as_me:18931: checking for version of db" >&5
18932 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18933 if test "${cf_cv_hashed_db_version+set}" = set; then
18934   echo $ECHO_N "(cached) $ECHO_C" >&6
18935 else
18936
18937 cf_cv_hashed_db_version=unknown
18938
18939 for cf_db_version in 1 2 3 4 5 6
18940 do
18941
18942 echo "${as_me:-configure}:18942: testing checking for db version $cf_db_version ..." 1>&5
18943
18944         cat >conftest.$ac_ext <<_ACEOF
18945 #line 18945 "configure"
18946 #include "confdefs.h"
18947
18948 $ac_includes_default
18949 #include <db.h>
18950
18951 #ifdef DB_VERSION_MAJOR
18952         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18953 #if $cf_db_version == DB_VERSION_MAJOR
18954         /* ok */
18955 #else
18956         make an error
18957 #endif
18958 #else
18959 #if $cf_db_version == 1
18960         /* ok: assuming this is DB 1.8.5 */
18961 #else
18962         make an error
18963 #endif
18964 #endif
18965
18966 int
18967 main ()
18968 {
18969 DBT *foo = 0
18970   ;
18971   return 0;
18972 }
18973 _ACEOF
18974 rm -f conftest.$ac_objext
18975 if { (eval echo "$as_me:18975: \"$ac_compile\"") >&5
18976   (eval $ac_compile) 2>&5
18977   ac_status=$?
18978   echo "$as_me:18978: \$? = $ac_status" >&5
18979   (exit $ac_status); } &&
18980          { ac_try='test -s conftest.$ac_objext'
18981   { (eval echo "$as_me:18981: \"$ac_try\"") >&5
18982   (eval $ac_try) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit $ac_status); }; }; then
18986
18987         cf_cv_hashed_db_version=$cf_db_version
18988         break
18989
18990 else
18991   echo "$as_me: failed program was:" >&5
18992 cat conftest.$ac_ext >&5
18993 fi
18994 rm -f conftest.$ac_objext conftest.$ac_ext
18995 done
18996
18997 fi
18998 echo "$as_me:18998: result: $cf_cv_hashed_db_version" >&5
18999 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19000
19001 if test "$cf_cv_hashed_db_version" = unknown ; then
19002         { { echo "$as_me:19002: error: Cannot determine version of db" >&5
19003 echo "$as_me: error: Cannot determine version of db" >&2;}
19004    { (exit 1); exit 1; }; }
19005 else
19006
19007 echo "$as_me:19007: checking for db libraries" >&5
19008 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19009 if test "${cf_cv_hashed_db_libs+set}" = set; then
19010   echo $ECHO_N "(cached) $ECHO_C" >&6
19011 else
19012
19013 cf_cv_hashed_db_libs=unknown
19014 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19015 do
19016         cf_save_libs="$LIBS"
19017         if test -n "$cf_db_libs"; then
19018
19019 cf_add_libs="-l$cf_db_libs"
19020 # Filter out duplicates - this happens with badly-designed ".pc" files...
19021 for cf_add_1lib in $LIBS
19022 do
19023         for cf_add_2lib in $cf_add_libs
19024         do
19025                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19026                 then
19027                         cf_add_1lib=
19028                         break
19029                 fi
19030         done
19031         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19032 done
19033 LIBS="$cf_add_libs"
19034
19035         fi
19036
19037 echo "${as_me:-configure}:19037: testing checking for library "$cf_db_libs" ..." 1>&5
19038
19039         cat >conftest.$ac_ext <<_ACEOF
19040 #line 19040 "configure"
19041 #include "confdefs.h"
19042
19043 $ac_includes_default
19044 #include <db.h>
19045
19046 int
19047 main ()
19048 {
19049
19050         char *path = "/tmp/foo";
19051 #ifdef DB_VERSION_MAJOR
19052 #if DB_VERSION_MAJOR >= 4
19053         DB *result = 0;
19054         db_create(&result, NULL, 0);
19055         result->open(result,
19056                 NULL,
19057                 path,
19058                 path,
19059                 DB_HASH,
19060                 DB_CREATE,
19061                 0644);
19062 #elif DB_VERSION_MAJOR >= 3
19063         DB *result = 0;
19064         db_create(&result, NULL, 0);
19065         result->open(result,
19066                 path,
19067                 path,
19068                 DB_HASH,
19069                 DB_CREATE,
19070                 0644);
19071 #elif DB_VERSION_MAJOR >= 2
19072         DB *result = 0;
19073         db_open(path,
19074                 DB_HASH,
19075                 DB_CREATE,
19076                 0644,
19077                 (DB_ENV *) 0,
19078                 (DB_INFO *) 0,
19079                 &result);
19080 #endif /* DB_VERSION_MAJOR */
19081 #else
19082         DB *result = dbopen(path,
19083                      2,
19084                      0644,
19085                      DB_HASH,
19086                      0);
19087 #endif
19088         ${cf_cv_main_return:-return}(result != 0)
19089
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 rm -f conftest.$ac_objext conftest$ac_exeext
19095 if { (eval echo "$as_me:19095: \"$ac_link\"") >&5
19096   (eval $ac_link) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit $ac_status); } &&
19100          { ac_try='test -s conftest$ac_exeext'
19101   { (eval echo "$as_me:19101: \"$ac_try\"") >&5
19102   (eval $ac_try) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit $ac_status); }; }; then
19106
19107         if test -n "$cf_db_libs" ; then
19108                 cf_cv_hashed_db_libs=$cf_db_libs
19109         else
19110                 cf_cv_hashed_db_libs=default
19111         fi
19112         LIBS="$cf_save_libs"
19113         break
19114
19115 else
19116   echo "$as_me: failed program was:" >&5
19117 cat conftest.$ac_ext >&5
19118 fi
19119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19120         LIBS="$cf_save_libs"
19121 done
19122
19123 fi
19124 echo "$as_me:19124: result: $cf_cv_hashed_db_libs" >&5
19125 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19126
19127         if test "$cf_cv_hashed_db_libs" = unknown ; then
19128                 { { echo "$as_me:19128: error: Cannot determine library for db" >&5
19129 echo "$as_me: error: Cannot determine library for db" >&2;}
19130    { (exit 1); exit 1; }; }
19131         elif test "$cf_cv_hashed_db_libs" != default ; then
19132
19133 cf_add_libs="-l$cf_cv_hashed_db_libs"
19134 # Filter out duplicates - this happens with badly-designed ".pc" files...
19135 for cf_add_1lib in $LIBS
19136 do
19137         for cf_add_2lib in $cf_add_libs
19138         do
19139                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19140                 then
19141                         cf_add_1lib=
19142                         break
19143                 fi
19144         done
19145         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19146 done
19147 LIBS="$cf_add_libs"
19148
19149         fi
19150 fi
19151
19152 else
19153
19154         { { echo "$as_me:19154: error: Cannot find db.h" >&5
19155 echo "$as_me: error: Cannot find db.h" >&2;}
19156    { (exit 1); exit 1; }; }
19157
19158 fi
19159
19160 fi
19161
19162 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19163         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19164         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19165 fi
19166
19167 # Just in case, check if the C compiler has a bool type.
19168
19169 echo "$as_me:19169: checking if we should include stdbool.h" >&5
19170 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19171
19172 if test "${cf_cv_header_stdbool_h+set}" = set; then
19173   echo $ECHO_N "(cached) $ECHO_C" >&6
19174 else
19175
19176         cat >conftest.$ac_ext <<_ACEOF
19177 #line 19177 "configure"
19178 #include "confdefs.h"
19179
19180 int
19181 main ()
19182 {
19183 bool foo = false
19184   ;
19185   return 0;
19186 }
19187 _ACEOF
19188 rm -f conftest.$ac_objext
19189 if { (eval echo "$as_me:19189: \"$ac_compile\"") >&5
19190   (eval $ac_compile) 2>&5
19191   ac_status=$?
19192   echo "$as_me:19192: \$? = $ac_status" >&5
19193   (exit $ac_status); } &&
19194          { ac_try='test -s conftest.$ac_objext'
19195   { (eval echo "$as_me:19195: \"$ac_try\"") >&5
19196   (eval $ac_try) 2>&5
19197   ac_status=$?
19198   echo "$as_me:19198: \$? = $ac_status" >&5
19199   (exit $ac_status); }; }; then
19200   cf_cv_header_stdbool_h=0
19201 else
19202   echo "$as_me: failed program was:" >&5
19203 cat conftest.$ac_ext >&5
19204 cat >conftest.$ac_ext <<_ACEOF
19205 #line 19205 "configure"
19206 #include "confdefs.h"
19207
19208 #ifndef __BEOS__
19209 #include <stdbool.h>
19210 #endif
19211
19212 int
19213 main ()
19214 {
19215 bool foo = false
19216   ;
19217   return 0;
19218 }
19219 _ACEOF
19220 rm -f conftest.$ac_objext
19221 if { (eval echo "$as_me:19221: \"$ac_compile\"") >&5
19222   (eval $ac_compile) 2>&5
19223   ac_status=$?
19224   echo "$as_me:19224: \$? = $ac_status" >&5
19225   (exit $ac_status); } &&
19226          { ac_try='test -s conftest.$ac_objext'
19227   { (eval echo "$as_me:19227: \"$ac_try\"") >&5
19228   (eval $ac_try) 2>&5
19229   ac_status=$?
19230   echo "$as_me:19230: \$? = $ac_status" >&5
19231   (exit $ac_status); }; }; then
19232   cf_cv_header_stdbool_h=1
19233 else
19234   echo "$as_me: failed program was:" >&5
19235 cat conftest.$ac_ext >&5
19236 cf_cv_header_stdbool_h=0
19237 fi
19238 rm -f conftest.$ac_objext conftest.$ac_ext
19239 fi
19240 rm -f conftest.$ac_objext conftest.$ac_ext
19241 fi
19242
19243 if test "$cf_cv_header_stdbool_h" = 1
19244 then    echo "$as_me:19244: result: yes" >&5
19245 echo "${ECHO_T}yes" >&6
19246 else    echo "$as_me:19246: result: no" >&5
19247 echo "${ECHO_T}no" >&6
19248 fi
19249
19250 echo "$as_me:19250: checking for builtin bool type" >&5
19251 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19252
19253 if test "${cf_cv_cc_bool_type+set}" = set; then
19254   echo $ECHO_N "(cached) $ECHO_C" >&6
19255 else
19256
19257         cat >conftest.$ac_ext <<_ACEOF
19258 #line 19258 "configure"
19259 #include "confdefs.h"
19260
19261 #include <stdio.h>
19262 #include <sys/types.h>
19263
19264 int
19265 main ()
19266 {
19267 bool x = false
19268   ;
19269   return 0;
19270 }
19271 _ACEOF
19272 rm -f conftest.$ac_objext
19273 if { (eval echo "$as_me:19273: \"$ac_compile\"") >&5
19274   (eval $ac_compile) 2>&5
19275   ac_status=$?
19276   echo "$as_me:19276: \$? = $ac_status" >&5
19277   (exit $ac_status); } &&
19278          { ac_try='test -s conftest.$ac_objext'
19279   { (eval echo "$as_me:19279: \"$ac_try\"") >&5
19280   (eval $ac_try) 2>&5
19281   ac_status=$?
19282   echo "$as_me:19282: \$? = $ac_status" >&5
19283   (exit $ac_status); }; }; then
19284   cf_cv_cc_bool_type=1
19285 else
19286   echo "$as_me: failed program was:" >&5
19287 cat conftest.$ac_ext >&5
19288 cf_cv_cc_bool_type=0
19289 fi
19290 rm -f conftest.$ac_objext conftest.$ac_ext
19291
19292 fi
19293
19294 if test "$cf_cv_cc_bool_type" = 1
19295 then    echo "$as_me:19295: result: yes" >&5
19296 echo "${ECHO_T}yes" >&6
19297 else    echo "$as_me:19297: result: no" >&5
19298 echo "${ECHO_T}no" >&6
19299 fi
19300
19301 # Check for C++ compiler characteristics (and ensure that it's there!)
19302 if test -n "$CXX" ; then
19303         ac_ext=cc
19304 ac_cpp='$CXXCPP $CPPFLAGS'
19305 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19306 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19307 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19308 ac_main_return=return
19309
19310 if test -n "$GXX" ; then
19311 case $cf_cv_system_name in
19312 (os2*)
19313         cf_stdcpp_libname=stdcpp
19314         ;;
19315 (*)
19316         cf_stdcpp_libname=stdc++
19317         ;;
19318 esac
19319 echo "$as_me:19319: checking for library $cf_stdcpp_libname" >&5
19320 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19321 if test "${cf_cv_libstdcpp+set}" = set; then
19322   echo $ECHO_N "(cached) $ECHO_C" >&6
19323 else
19324
19325         cf_save="$LIBS"
19326
19327 cf_add_libs="-l$cf_stdcpp_libname"
19328 # Filter out duplicates - this happens with badly-designed ".pc" files...
19329 for cf_add_1lib in $LIBS
19330 do
19331         for cf_add_2lib in $cf_add_libs
19332         do
19333                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19334                 then
19335                         cf_add_1lib=
19336                         break
19337                 fi
19338         done
19339         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19340 done
19341 LIBS="$cf_add_libs"
19342
19343 cat >conftest.$ac_ext <<_ACEOF
19344 #line 19344 "configure"
19345 #include "confdefs.h"
19346
19347 #include <strstream.h>
19348 int
19349 main ()
19350 {
19351
19352 char buf[80];
19353 strstreambuf foo(buf, sizeof(buf))
19354
19355   ;
19356   return 0;
19357 }
19358 _ACEOF
19359 rm -f conftest.$ac_objext conftest$ac_exeext
19360 if { (eval echo "$as_me:19360: \"$ac_link\"") >&5
19361   (eval $ac_link) 2>&5
19362   ac_status=$?
19363   echo "$as_me:19363: \$? = $ac_status" >&5
19364   (exit $ac_status); } &&
19365          { ac_try='test -s conftest$ac_exeext'
19366   { (eval echo "$as_me:19366: \"$ac_try\"") >&5
19367   (eval $ac_try) 2>&5
19368   ac_status=$?
19369   echo "$as_me:19369: \$? = $ac_status" >&5
19370   (exit $ac_status); }; }; then
19371   cf_cv_libstdcpp=yes
19372 else
19373   echo "$as_me: failed program was:" >&5
19374 cat conftest.$ac_ext >&5
19375 cf_cv_libstdcpp=no
19376 fi
19377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19378         LIBS="$cf_save"
19379
19380 fi
19381 echo "$as_me:19381: result: $cf_cv_libstdcpp" >&5
19382 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19383 test "$cf_cv_libstdcpp" = yes &&
19384 cf_add_libs="-l$cf_stdcpp_libname"
19385 # Filter out duplicates - this happens with badly-designed ".pc" files...
19386 for cf_add_1lib in $CXXLIBS
19387 do
19388         for cf_add_2lib in $cf_add_libs
19389         do
19390                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19391                 then
19392                         cf_add_1lib=
19393                         break
19394                 fi
19395         done
19396         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19397 done
19398 CXXLIBS="$cf_add_libs"
19399
19400 fi
19401
19402         echo "$as_me:19402: checking whether $CXX understands -c and -o together" >&5
19403 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19404 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19405   echo $ECHO_N "(cached) $ECHO_C" >&6
19406 else
19407
19408 cat > conftest.$ac_ext <<CF_EOF
19409 #include <stdio.h>
19410 int main()
19411 {
19412         ${cf_cv_main_return:-return}(0);
19413 }
19414 CF_EOF
19415 # We do the test twice because some compilers refuse to overwrite an
19416 # existing .o file with -o, though they will create one.
19417 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19418 if { (eval echo "$as_me:19418: \"$ac_try\"") >&5
19419   (eval $ac_try) 2>&5
19420   ac_status=$?
19421   echo "$as_me:19421: \$? = $ac_status" >&5
19422   (exit $ac_status); } &&
19423   test -f conftest2.$ac_objext && { (eval echo "$as_me:19423: \"$ac_try\"") >&5
19424   (eval $ac_try) 2>&5
19425   ac_status=$?
19426   echo "$as_me:19426: \$? = $ac_status" >&5
19427   (exit $ac_status); };
19428 then
19429   eval cf_cv_prog_CXX_c_o=yes
19430 else
19431   eval cf_cv_prog_CXX_c_o=no
19432 fi
19433 rm -rf conftest*
19434
19435 fi
19436 if test $cf_cv_prog_CXX_c_o = yes; then
19437   echo "$as_me:19437: result: yes" >&5
19438 echo "${ECHO_T}yes" >&6
19439 else
19440   echo "$as_me:19440: result: no" >&5
19441 echo "${ECHO_T}no" >&6
19442 fi
19443
19444         case $GXX_VERSION in
19445         (1*|2.0-6*)
19446                 cf_cxx_library=yes
19447                 ;;
19448         (*-2.7*|2.7*)
19449
19450 cf_cxx_library=unknown
19451 case $cf_cv_system_name in
19452 (os2*)
19453         cf_gpp_libname=gpp
19454         ;;
19455 (*)
19456         cf_gpp_libname=g++
19457         ;;
19458 esac
19459 if test "$GXX" = yes; then
19460         echo "$as_me:19460: checking for lib$cf_gpp_libname" >&5
19461 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19462         cf_save="$LIBS"
19463
19464 cf_add_libs="-l$cf_gpp_libname"
19465 # Filter out duplicates - this happens with badly-designed ".pc" files...
19466 for cf_add_1lib in $LIBS
19467 do
19468         for cf_add_2lib in $cf_add_libs
19469         do
19470                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19471                 then
19472                         cf_add_1lib=
19473                         break
19474                 fi
19475         done
19476         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19477 done
19478 LIBS="$cf_add_libs"
19479
19480         cat >conftest.$ac_ext <<_ACEOF
19481 #line 19481 "configure"
19482 #include "confdefs.h"
19483
19484 #include <$cf_gpp_libname/builtin.h>
19485
19486 int
19487 main ()
19488 {
19489 two_arg_error_handler_t foo2 = lib_error_handler
19490   ;
19491   return 0;
19492 }
19493 _ACEOF
19494 rm -f conftest.$ac_objext conftest$ac_exeext
19495 if { (eval echo "$as_me:19495: \"$ac_link\"") >&5
19496   (eval $ac_link) 2>&5
19497   ac_status=$?
19498   echo "$as_me:19498: \$? = $ac_status" >&5
19499   (exit $ac_status); } &&
19500          { ac_try='test -s conftest$ac_exeext'
19501   { (eval echo "$as_me:19501: \"$ac_try\"") >&5
19502   (eval $ac_try) 2>&5
19503   ac_status=$?
19504   echo "$as_me:19504: \$? = $ac_status" >&5
19505   (exit $ac_status); }; }; then
19506   cf_cxx_library=yes
19507
19508 cf_add_libs="-l$cf_gpp_libname"
19509 # Filter out duplicates - this happens with badly-designed ".pc" files...
19510 for cf_add_1lib in $CXXLIBS
19511 do
19512         for cf_add_2lib in $cf_add_libs
19513         do
19514                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19515                 then
19516                         cf_add_1lib=
19517                         break
19518                 fi
19519         done
19520         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19521 done
19522 CXXLIBS="$cf_add_libs"
19523
19524          if test "$cf_gpp_libname" = cpp ; then
19525
19526 cat >>confdefs.h <<\EOF
19527 #define HAVE_GPP_BUILTIN_H 1
19528 EOF
19529
19530          else
19531
19532 cat >>confdefs.h <<\EOF
19533 #define HAVE_GXX_BUILTIN_H 1
19534 EOF
19535
19536          fi
19537 else
19538   echo "$as_me: failed program was:" >&5
19539 cat conftest.$ac_ext >&5
19540 cat >conftest.$ac_ext <<_ACEOF
19541 #line 19541 "configure"
19542 #include "confdefs.h"
19543
19544 #include <builtin.h>
19545
19546 int
19547 main ()
19548 {
19549 two_arg_error_handler_t foo2 = lib_error_handler
19550   ;
19551   return 0;
19552 }
19553 _ACEOF
19554 rm -f conftest.$ac_objext conftest$ac_exeext
19555 if { (eval echo "$as_me:19555: \"$ac_link\"") >&5
19556   (eval $ac_link) 2>&5
19557   ac_status=$?
19558   echo "$as_me:19558: \$? = $ac_status" >&5
19559   (exit $ac_status); } &&
19560          { ac_try='test -s conftest$ac_exeext'
19561   { (eval echo "$as_me:19561: \"$ac_try\"") >&5
19562   (eval $ac_try) 2>&5
19563   ac_status=$?
19564   echo "$as_me:19564: \$? = $ac_status" >&5
19565   (exit $ac_status); }; }; then
19566   cf_cxx_library=yes
19567
19568 cf_add_libs="-l$cf_gpp_libname"
19569 # Filter out duplicates - this happens with badly-designed ".pc" files...
19570 for cf_add_1lib in $CXXLIBS
19571 do
19572         for cf_add_2lib in $cf_add_libs
19573         do
19574                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19575                 then
19576                         cf_add_1lib=
19577                         break
19578                 fi
19579         done
19580         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19581 done
19582 CXXLIBS="$cf_add_libs"
19583
19584 cat >>confdefs.h <<\EOF
19585 #define HAVE_BUILTIN_H 1
19586 EOF
19587
19588 else
19589   echo "$as_me: failed program was:" >&5
19590 cat conftest.$ac_ext >&5
19591 cf_cxx_library=no
19592 fi
19593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19594 fi
19595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19596         LIBS="$cf_save"
19597         echo "$as_me:19597: result: $cf_cxx_library" >&5
19598 echo "${ECHO_T}$cf_cxx_library" >&6
19599 fi
19600
19601                 ;;
19602         (*)
19603                 cf_cxx_library=no
19604                 ;;
19605         esac
19606
19607         ac_ext=cc
19608 ac_cpp='$CXXCPP $CPPFLAGS'
19609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19610 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19612 ac_main_return=return
19613 echo "$as_me:19613: checking how to run the C++ preprocessor" >&5
19614 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19615 if test -z "$CXXCPP"; then
19616   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19617   echo $ECHO_N "(cached) $ECHO_C" >&6
19618 else
19619       # Double quotes because CXXCPP needs to be expanded
19620     for CXXCPP in "$CXX -E" "/lib/cpp"
19621     do
19622       ac_preproc_ok=false
19623 for ac_cxx_preproc_warn_flag in '' yes
19624 do
19625   # Use a header file that comes with gcc, so configuring glibc
19626   # with a fresh cross-compiler works.
19627   # On the NeXT, cc -E runs the code through the compiler's parser,
19628   # not just through cpp. "Syntax error" is here to catch this case.
19629   cat >conftest.$ac_ext <<_ACEOF
19630 #line 19630 "configure"
19631 #include "confdefs.h"
19632 #include <assert.h>
19633                      Syntax error
19634 _ACEOF
19635 if { (eval echo "$as_me:19635: \"$ac_cpp conftest.$ac_ext\"") >&5
19636   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19637   ac_status=$?
19638   egrep -v '^ *\+' conftest.er1 >conftest.err
19639   rm -f conftest.er1
19640   cat conftest.err >&5
19641   echo "$as_me:19641: \$? = $ac_status" >&5
19642   (exit $ac_status); } >/dev/null; then
19643   if test -s conftest.err; then
19644     ac_cpp_err=$ac_cxx_preproc_warn_flag
19645   else
19646     ac_cpp_err=
19647   fi
19648 else
19649   ac_cpp_err=yes
19650 fi
19651 if test -z "$ac_cpp_err"; then
19652   :
19653 else
19654   echo "$as_me: failed program was:" >&5
19655   cat conftest.$ac_ext >&5
19656   # Broken: fails on valid input.
19657 continue
19658 fi
19659 rm -f conftest.err conftest.$ac_ext
19660
19661   # OK, works on sane cases.  Now check whether non-existent headers
19662   # can be detected and how.
19663   cat >conftest.$ac_ext <<_ACEOF
19664 #line 19664 "configure"
19665 #include "confdefs.h"
19666 #include <ac_nonexistent.h>
19667 _ACEOF
19668 if { (eval echo "$as_me:19668: \"$ac_cpp conftest.$ac_ext\"") >&5
19669   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19670   ac_status=$?
19671   egrep -v '^ *\+' conftest.er1 >conftest.err
19672   rm -f conftest.er1
19673   cat conftest.err >&5
19674   echo "$as_me:19674: \$? = $ac_status" >&5
19675   (exit $ac_status); } >/dev/null; then
19676   if test -s conftest.err; then
19677     ac_cpp_err=$ac_cxx_preproc_warn_flag
19678   else
19679     ac_cpp_err=
19680   fi
19681 else
19682   ac_cpp_err=yes
19683 fi
19684 if test -z "$ac_cpp_err"; then
19685   # Broken: success on invalid input.
19686 continue
19687 else
19688   echo "$as_me: failed program was:" >&5
19689   cat conftest.$ac_ext >&5
19690   # Passes both tests.
19691 ac_preproc_ok=:
19692 break
19693 fi
19694 rm -f conftest.err conftest.$ac_ext
19695
19696 done
19697 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19698 rm -f conftest.err conftest.$ac_ext
19699 if $ac_preproc_ok; then
19700   break
19701 fi
19702
19703     done
19704     ac_cv_prog_CXXCPP=$CXXCPP
19705
19706 fi
19707   CXXCPP=$ac_cv_prog_CXXCPP
19708 else
19709   ac_cv_prog_CXXCPP=$CXXCPP
19710 fi
19711 echo "$as_me:19711: result: $CXXCPP" >&5
19712 echo "${ECHO_T}$CXXCPP" >&6
19713 ac_preproc_ok=false
19714 for ac_cxx_preproc_warn_flag in '' yes
19715 do
19716   # Use a header file that comes with gcc, so configuring glibc
19717   # with a fresh cross-compiler works.
19718   # On the NeXT, cc -E runs the code through the compiler's parser,
19719   # not just through cpp. "Syntax error" is here to catch this case.
19720   cat >conftest.$ac_ext <<_ACEOF
19721 #line 19721 "configure"
19722 #include "confdefs.h"
19723 #include <assert.h>
19724                      Syntax error
19725 _ACEOF
19726 if { (eval echo "$as_me:19726: \"$ac_cpp conftest.$ac_ext\"") >&5
19727   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19728   ac_status=$?
19729   egrep -v '^ *\+' conftest.er1 >conftest.err
19730   rm -f conftest.er1
19731   cat conftest.err >&5
19732   echo "$as_me:19732: \$? = $ac_status" >&5
19733   (exit $ac_status); } >/dev/null; then
19734   if test -s conftest.err; then
19735     ac_cpp_err=$ac_cxx_preproc_warn_flag
19736   else
19737     ac_cpp_err=
19738   fi
19739 else
19740   ac_cpp_err=yes
19741 fi
19742 if test -z "$ac_cpp_err"; then
19743   :
19744 else
19745   echo "$as_me: failed program was:" >&5
19746   cat conftest.$ac_ext >&5
19747   # Broken: fails on valid input.
19748 continue
19749 fi
19750 rm -f conftest.err conftest.$ac_ext
19751
19752   # OK, works on sane cases.  Now check whether non-existent headers
19753   # can be detected and how.
19754   cat >conftest.$ac_ext <<_ACEOF
19755 #line 19755 "configure"
19756 #include "confdefs.h"
19757 #include <ac_nonexistent.h>
19758 _ACEOF
19759 if { (eval echo "$as_me:19759: \"$ac_cpp conftest.$ac_ext\"") >&5
19760   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19761   ac_status=$?
19762   egrep -v '^ *\+' conftest.er1 >conftest.err
19763   rm -f conftest.er1
19764   cat conftest.err >&5
19765   echo "$as_me:19765: \$? = $ac_status" >&5
19766   (exit $ac_status); } >/dev/null; then
19767   if test -s conftest.err; then
19768     ac_cpp_err=$ac_cxx_preproc_warn_flag
19769   else
19770     ac_cpp_err=
19771   fi
19772 else
19773   ac_cpp_err=yes
19774 fi
19775 if test -z "$ac_cpp_err"; then
19776   # Broken: success on invalid input.
19777 continue
19778 else
19779   echo "$as_me: failed program was:" >&5
19780   cat conftest.$ac_ext >&5
19781   # Passes both tests.
19782 ac_preproc_ok=:
19783 break
19784 fi
19785 rm -f conftest.err conftest.$ac_ext
19786
19787 done
19788 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19789 rm -f conftest.err conftest.$ac_ext
19790 if $ac_preproc_ok; then
19791   :
19792 else
19793   { { echo "$as_me:19793: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19794 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19795    { (exit 1); exit 1; }; }
19796 fi
19797
19798 ac_ext=cc
19799 ac_cpp='$CXXCPP $CPPFLAGS'
19800 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19801 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19802 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19803 ac_main_return=return
19804
19805 for ac_header in typeinfo
19806 do
19807 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19808 echo "$as_me:19808: checking for $ac_header" >&5
19809 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19810 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19811   echo $ECHO_N "(cached) $ECHO_C" >&6
19812 else
19813   cat >conftest.$ac_ext <<_ACEOF
19814 #line 19814 "configure"
19815 #include "confdefs.h"
19816 #include <$ac_header>
19817 _ACEOF
19818 if { (eval echo "$as_me:19818: \"$ac_cpp conftest.$ac_ext\"") >&5
19819   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19820   ac_status=$?
19821   egrep -v '^ *\+' conftest.er1 >conftest.err
19822   rm -f conftest.er1
19823   cat conftest.err >&5
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); } >/dev/null; then
19826   if test -s conftest.err; then
19827     ac_cpp_err=$ac_cxx_preproc_warn_flag
19828   else
19829     ac_cpp_err=
19830   fi
19831 else
19832   ac_cpp_err=yes
19833 fi
19834 if test -z "$ac_cpp_err"; then
19835   eval "$as_ac_Header=yes"
19836 else
19837   echo "$as_me: failed program was:" >&5
19838   cat conftest.$ac_ext >&5
19839   eval "$as_ac_Header=no"
19840 fi
19841 rm -f conftest.err conftest.$ac_ext
19842 fi
19843 echo "$as_me:19843: result: `eval echo '${'$as_ac_Header'}'`" >&5
19844 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19845 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19846   cat >>confdefs.h <<EOF
19847 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19848 EOF
19849
19850 fi
19851 done
19852
19853 for ac_header in iostream
19854 do
19855 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19856 echo "$as_me:19856: checking for $ac_header" >&5
19857 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19858 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19859   echo $ECHO_N "(cached) $ECHO_C" >&6
19860 else
19861   cat >conftest.$ac_ext <<_ACEOF
19862 #line 19862 "configure"
19863 #include "confdefs.h"
19864 #include <$ac_header>
19865 _ACEOF
19866 if { (eval echo "$as_me:19866: \"$ac_cpp conftest.$ac_ext\"") >&5
19867   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19868   ac_status=$?
19869   egrep -v '^ *\+' conftest.er1 >conftest.err
19870   rm -f conftest.er1
19871   cat conftest.err >&5
19872   echo "$as_me:19872: \$? = $ac_status" >&5
19873   (exit $ac_status); } >/dev/null; then
19874   if test -s conftest.err; then
19875     ac_cpp_err=$ac_cxx_preproc_warn_flag
19876   else
19877     ac_cpp_err=
19878   fi
19879 else
19880   ac_cpp_err=yes
19881 fi
19882 if test -z "$ac_cpp_err"; then
19883   eval "$as_ac_Header=yes"
19884 else
19885   echo "$as_me: failed program was:" >&5
19886   cat conftest.$ac_ext >&5
19887   eval "$as_ac_Header=no"
19888 fi
19889 rm -f conftest.err conftest.$ac_ext
19890 fi
19891 echo "$as_me:19891: result: `eval echo '${'$as_ac_Header'}'`" >&5
19892 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19893 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19894   cat >>confdefs.h <<EOF
19895 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19896 EOF
19897
19898 fi
19899 done
19900
19901 if test x"$ac_cv_header_iostream" = xyes ; then
19902         echo "$as_me:19902: checking if iostream uses std-namespace" >&5
19903 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19904         cat >conftest.$ac_ext <<_ACEOF
19905 #line 19905 "configure"
19906 #include "confdefs.h"
19907
19908 #include <iostream>
19909 using std::endl;
19910 using std::cerr;
19911 int
19912 main ()
19913 {
19914
19915 cerr << "testing" << endl;
19916
19917   ;
19918   return 0;
19919 }
19920 _ACEOF
19921 rm -f conftest.$ac_objext
19922 if { (eval echo "$as_me:19922: \"$ac_compile\"") >&5
19923   (eval $ac_compile) 2>&5
19924   ac_status=$?
19925   echo "$as_me:19925: \$? = $ac_status" >&5
19926   (exit $ac_status); } &&
19927          { ac_try='test -s conftest.$ac_objext'
19928   { (eval echo "$as_me:19928: \"$ac_try\"") >&5
19929   (eval $ac_try) 2>&5
19930   ac_status=$?
19931   echo "$as_me:19931: \$? = $ac_status" >&5
19932   (exit $ac_status); }; }; then
19933   cf_iostream_namespace=yes
19934 else
19935   echo "$as_me: failed program was:" >&5
19936 cat conftest.$ac_ext >&5
19937 cf_iostream_namespace=no
19938 fi
19939 rm -f conftest.$ac_objext conftest.$ac_ext
19940         echo "$as_me:19940: result: $cf_iostream_namespace" >&5
19941 echo "${ECHO_T}$cf_iostream_namespace" >&6
19942         if test "$cf_iostream_namespace" = yes ; then
19943
19944 cat >>confdefs.h <<\EOF
19945 #define IOSTREAM_NAMESPACE 1
19946 EOF
19947
19948         fi
19949 fi
19950
19951 echo "$as_me:19951: checking if we should include stdbool.h" >&5
19952 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19953
19954 if test "${cf_cv_header_stdbool_h+set}" = set; then
19955   echo $ECHO_N "(cached) $ECHO_C" >&6
19956 else
19957
19958         cat >conftest.$ac_ext <<_ACEOF
19959 #line 19959 "configure"
19960 #include "confdefs.h"
19961
19962 int
19963 main ()
19964 {
19965 bool foo = false
19966   ;
19967   return 0;
19968 }
19969 _ACEOF
19970 rm -f conftest.$ac_objext
19971 if { (eval echo "$as_me:19971: \"$ac_compile\"") >&5
19972   (eval $ac_compile) 2>&5
19973   ac_status=$?
19974   echo "$as_me:19974: \$? = $ac_status" >&5
19975   (exit $ac_status); } &&
19976          { ac_try='test -s conftest.$ac_objext'
19977   { (eval echo "$as_me:19977: \"$ac_try\"") >&5
19978   (eval $ac_try) 2>&5
19979   ac_status=$?
19980   echo "$as_me:19980: \$? = $ac_status" >&5
19981   (exit $ac_status); }; }; then
19982   cf_cv_header_stdbool_h=0
19983 else
19984   echo "$as_me: failed program was:" >&5
19985 cat conftest.$ac_ext >&5
19986 cat >conftest.$ac_ext <<_ACEOF
19987 #line 19987 "configure"
19988 #include "confdefs.h"
19989
19990 #ifndef __BEOS__
19991 #include <stdbool.h>
19992 #endif
19993
19994 int
19995 main ()
19996 {
19997 bool foo = false
19998   ;
19999   return 0;
20000 }
20001 _ACEOF
20002 rm -f conftest.$ac_objext
20003 if { (eval echo "$as_me:20003: \"$ac_compile\"") >&5
20004   (eval $ac_compile) 2>&5
20005   ac_status=$?
20006   echo "$as_me:20006: \$? = $ac_status" >&5
20007   (exit $ac_status); } &&
20008          { ac_try='test -s conftest.$ac_objext'
20009   { (eval echo "$as_me:20009: \"$ac_try\"") >&5
20010   (eval $ac_try) 2>&5
20011   ac_status=$?
20012   echo "$as_me:20012: \$? = $ac_status" >&5
20013   (exit $ac_status); }; }; then
20014   cf_cv_header_stdbool_h=1
20015 else
20016   echo "$as_me: failed program was:" >&5
20017 cat conftest.$ac_ext >&5
20018 cf_cv_header_stdbool_h=0
20019 fi
20020 rm -f conftest.$ac_objext conftest.$ac_ext
20021 fi
20022 rm -f conftest.$ac_objext conftest.$ac_ext
20023 fi
20024
20025 if test "$cf_cv_header_stdbool_h" = 1
20026 then    echo "$as_me:20026: result: yes" >&5
20027 echo "${ECHO_T}yes" >&6
20028 else    echo "$as_me:20028: result: no" >&5
20029 echo "${ECHO_T}no" >&6
20030 fi
20031
20032 echo "$as_me:20032: checking for builtin bool type" >&5
20033 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20034
20035 if test "${cf_cv_builtin_bool+set}" = set; then
20036   echo $ECHO_N "(cached) $ECHO_C" >&6
20037 else
20038
20039         cat >conftest.$ac_ext <<_ACEOF
20040 #line 20040 "configure"
20041 #include "confdefs.h"
20042
20043 #include <stdio.h>
20044 #include <sys/types.h>
20045
20046 int
20047 main ()
20048 {
20049 bool x = false
20050   ;
20051   return 0;
20052 }
20053 _ACEOF
20054 rm -f conftest.$ac_objext
20055 if { (eval echo "$as_me:20055: \"$ac_compile\"") >&5
20056   (eval $ac_compile) 2>&5
20057   ac_status=$?
20058   echo "$as_me:20058: \$? = $ac_status" >&5
20059   (exit $ac_status); } &&
20060          { ac_try='test -s conftest.$ac_objext'
20061   { (eval echo "$as_me:20061: \"$ac_try\"") >&5
20062   (eval $ac_try) 2>&5
20063   ac_status=$?
20064   echo "$as_me:20064: \$? = $ac_status" >&5
20065   (exit $ac_status); }; }; then
20066   cf_cv_builtin_bool=1
20067 else
20068   echo "$as_me: failed program was:" >&5
20069 cat conftest.$ac_ext >&5
20070 cf_cv_builtin_bool=0
20071 fi
20072 rm -f conftest.$ac_objext conftest.$ac_ext
20073
20074 fi
20075
20076 if test "$cf_cv_builtin_bool" = 1
20077 then    echo "$as_me:20077: result: yes" >&5
20078 echo "${ECHO_T}yes" >&6
20079 else    echo "$as_me:20079: result: no" >&5
20080 echo "${ECHO_T}no" >&6
20081 fi
20082
20083 echo "$as_me:20083: checking for size of bool" >&5
20084 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20085 if test "${cf_cv_type_of_bool+set}" = set; then
20086   echo $ECHO_N "(cached) $ECHO_C" >&6
20087 else
20088
20089         rm -f cf_test.out
20090         if test "$cross_compiling" = yes; then
20091   cf_cv_type_of_bool=unknown
20092 else
20093   cat >conftest.$ac_ext <<_ACEOF
20094 #line 20094 "configure"
20095 #include "confdefs.h"
20096
20097 #include <stdlib.h>
20098 #include <stdio.h>
20099
20100 #if defined(__cplusplus)
20101
20102 #ifdef HAVE_GXX_BUILTIN_H
20103 #include <g++/builtin.h>
20104 #elif HAVE_GPP_BUILTIN_H
20105 #include <gpp/builtin.h>
20106 #elif HAVE_BUILTIN_H
20107 #include <builtin.h>
20108 #endif
20109
20110 #else
20111
20112 #if $cf_cv_header_stdbool_h
20113 #include <stdbool.h>
20114 #endif
20115
20116 #endif
20117
20118 int main()
20119 {
20120         FILE *fp = fopen("cf_test.out", "w");
20121         if (fp != 0) {
20122                 bool x = true;
20123                 if ((bool)(-x) >= 0)
20124                         fputs("unsigned ", fp);
20125                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20126                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20127                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20128                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20129                 fclose(fp);
20130         }
20131         ${cf_cv_main_return:-return}(0);
20132 }
20133
20134 _ACEOF
20135 rm -f conftest$ac_exeext
20136 if { (eval echo "$as_me:20136: \"$ac_link\"") >&5
20137   (eval $ac_link) 2>&5
20138   ac_status=$?
20139   echo "$as_me:20139: \$? = $ac_status" >&5
20140   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20141   { (eval echo "$as_me:20141: \"$ac_try\"") >&5
20142   (eval $ac_try) 2>&5
20143   ac_status=$?
20144   echo "$as_me:20144: \$? = $ac_status" >&5
20145   (exit $ac_status); }; }; then
20146   cf_cv_type_of_bool=`cat cf_test.out`
20147                  if test -z "$cf_cv_type_of_bool"; then
20148                    cf_cv_type_of_bool=unknown
20149                  fi
20150 else
20151   echo "$as_me: program exited with status $ac_status" >&5
20152 echo "$as_me: failed program was:" >&5
20153 cat conftest.$ac_ext >&5
20154 cf_cv_type_of_bool=unknown
20155 fi
20156 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20157 fi
20158
20159 fi
20160
20161         rm -f cf_test.out
20162 echo "$as_me:20162: result: $cf_cv_type_of_bool" >&5
20163 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20164 if test "$cf_cv_type_of_bool" = unknown ; then
20165         case .$NCURSES_BOOL in
20166         (.auto|.) NCURSES_BOOL=unsigned;;
20167         esac
20168         { echo "$as_me:20168: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20169 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20170         cf_cv_type_of_bool=$NCURSES_BOOL
20171 fi
20172
20173 echo "$as_me:20173: checking for special defines needed for etip.h" >&5
20174 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20175 cf_save_CXXFLAGS="$CXXFLAGS"
20176 cf_result="none"
20177
20178 # etip.h includes ncurses.h which includes ncurses_dll.h
20179 # But ncurses_dll.h is generated - fix here.
20180 test -d include || mkdir include
20181 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
20182
20183 for cf_math in "" MATH_H
20184 do
20185 for cf_excp in "" MATH_EXCEPTION
20186 do
20187         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20188         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20189         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20190 cat >conftest.$ac_ext <<_ACEOF
20191 #line 20191 "configure"
20192 #include "confdefs.h"
20193
20194 #include <etip.h.in>
20195
20196 int
20197 main ()
20198 {
20199
20200   ;
20201   return 0;
20202 }
20203 _ACEOF
20204 rm -f conftest.$ac_objext
20205 if { (eval echo "$as_me:20205: \"$ac_compile\"") >&5
20206   (eval $ac_compile) 2>&5
20207   ac_status=$?
20208   echo "$as_me:20208: \$? = $ac_status" >&5
20209   (exit $ac_status); } &&
20210          { ac_try='test -s conftest.$ac_objext'
20211   { (eval echo "$as_me:20211: \"$ac_try\"") >&5
20212   (eval $ac_try) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit $ac_status); }; }; then
20216
20217         test -n "$cf_math" && cat >>confdefs.h <<EOF
20218 #define ETIP_NEEDS_${cf_math} 1
20219 EOF
20220
20221         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20222 #define ETIP_NEEDS_${cf_excp} 1
20223 EOF
20224
20225         cf_result="$cf_math $cf_excp"
20226         break 2
20227
20228 else
20229   echo "$as_me: failed program was:" >&5
20230 cat conftest.$ac_ext >&5
20231 fi
20232 rm -f conftest.$ac_objext conftest.$ac_ext
20233 done
20234 done
20235 echo "$as_me:20235: result: $cf_result" >&5
20236 echo "${ECHO_T}$cf_result" >&6
20237 CXXFLAGS="$cf_save_CXXFLAGS"
20238
20239 if test -n "$CXX"; then
20240 echo "$as_me:20240: checking if $CXX accepts parameter initialization" >&5
20241 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20242 if test "${cf_cv_cpp_param_init+set}" = set; then
20243   echo $ECHO_N "(cached) $ECHO_C" >&6
20244 else
20245
20246         ac_ext=cc
20247 ac_cpp='$CXXCPP $CPPFLAGS'
20248 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20249 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20250 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20251 ac_main_return=return
20252
20253         if test "$cross_compiling" = yes; then
20254   cf_cv_cpp_param_init=unknown
20255 else
20256   cat >conftest.$ac_ext <<_ACEOF
20257 #line 20257 "configure"
20258 #include "confdefs.h"
20259
20260 class TEST {
20261 private:
20262         int value;
20263 public:
20264         TEST(int x = 1);
20265         ~TEST();
20266 };
20267
20268 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20269 {
20270         value = x;
20271 }
20272 int main() { }
20273
20274 _ACEOF
20275 rm -f conftest$ac_exeext
20276 if { (eval echo "$as_me:20276: \"$ac_link\"") >&5
20277   (eval $ac_link) 2>&5
20278   ac_status=$?
20279   echo "$as_me:20279: \$? = $ac_status" >&5
20280   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20281   { (eval echo "$as_me:20281: \"$ac_try\"") >&5
20282   (eval $ac_try) 2>&5
20283   ac_status=$?
20284   echo "$as_me:20284: \$? = $ac_status" >&5
20285   (exit $ac_status); }; }; then
20286   cf_cv_cpp_param_init=yes
20287 else
20288   echo "$as_me: program exited with status $ac_status" >&5
20289 echo "$as_me: failed program was:" >&5
20290 cat conftest.$ac_ext >&5
20291 cf_cv_cpp_param_init=no
20292 fi
20293 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20294 fi
20295         ac_ext=cc
20296 ac_cpp='$CXXCPP $CPPFLAGS'
20297 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20298 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20299 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20300 ac_main_return=return
20301
20302 fi
20303 echo "$as_me:20303: result: $cf_cv_cpp_param_init" >&5
20304 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20305 fi
20306 test "$cf_cv_cpp_param_init" = yes &&
20307 cat >>confdefs.h <<\EOF
20308 #define CPP_HAS_PARAM_INIT 1
20309 EOF
20310
20311 if test -n "$CXX"; then
20312
20313 echo "$as_me:20313: checking if $CXX accepts static_cast" >&5
20314 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20315 if test "${cf_cv_cpp_static_cast+set}" = set; then
20316   echo $ECHO_N "(cached) $ECHO_C" >&6
20317 else
20318
20319         ac_ext=cc
20320 ac_cpp='$CXXCPP $CPPFLAGS'
20321 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20322 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20323 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20324 ac_main_return=return
20325
20326         cat >conftest.$ac_ext <<_ACEOF
20327 #line 20327 "configure"
20328 #include "confdefs.h"
20329
20330 class NCursesPanel
20331 {
20332 public:
20333   NCursesPanel(int nlines,
20334                int ncols,
20335                int begin_y = 0,
20336                int begin_x = 0)
20337   {
20338   }
20339   NCursesPanel();
20340   ~NCursesPanel();
20341 };
20342
20343 template<class T> class NCursesUserPanel : public NCursesPanel
20344 {
20345 public:
20346   NCursesUserPanel (int nlines,
20347                     int ncols,
20348                     int begin_y = 0,
20349                     int begin_x = 0,
20350                     const T* p_UserData = static_cast<T*>(0))
20351     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20352   {
20353   };
20354   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20355   {
20356   };
20357
20358   virtual ~NCursesUserPanel() {};
20359 };
20360
20361 int
20362 main ()
20363 {
20364
20365         const char* p_UserData = static_cast<char*>(0)
20366   ;
20367   return 0;
20368 }
20369 _ACEOF
20370 rm -f conftest.$ac_objext
20371 if { (eval echo "$as_me:20371: \"$ac_compile\"") >&5
20372   (eval $ac_compile) 2>&5
20373   ac_status=$?
20374   echo "$as_me:20374: \$? = $ac_status" >&5
20375   (exit $ac_status); } &&
20376          { ac_try='test -s conftest.$ac_objext'
20377   { (eval echo "$as_me:20377: \"$ac_try\"") >&5
20378   (eval $ac_try) 2>&5
20379   ac_status=$?
20380   echo "$as_me:20380: \$? = $ac_status" >&5
20381   (exit $ac_status); }; }; then
20382   cf_cv_cpp_static_cast=yes
20383 else
20384   echo "$as_me: failed program was:" >&5
20385 cat conftest.$ac_ext >&5
20386 cf_cv_cpp_static_cast=no
20387 fi
20388 rm -f conftest.$ac_objext conftest.$ac_ext
20389
20390         ac_ext=cc
20391 ac_cpp='$CXXCPP $CPPFLAGS'
20392 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20393 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20394 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20395 ac_main_return=return
20396
20397 fi
20398 echo "$as_me:20398: result: $cf_cv_cpp_static_cast" >&5
20399 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20400
20401 fi
20402
20403 test "$cf_cv_cpp_static_cast" = yes &&
20404 cat >>confdefs.h <<\EOF
20405 #define CPP_HAS_STATIC_CAST 1
20406 EOF
20407
20408         CXX_AR='$(AR)'
20409         CXX_ARFLAGS='$(ARFLAGS)'
20410         case $cf_cv_system_name in
20411         (irix*)
20412             if test "$GXX" != yes ; then
20413                 CXX_AR='$(CXX)'
20414                 CXX_ARFLAGS='-ar -o'
20415             fi
20416             ;;
20417         (sco3.2v5*)
20418             CXXLDFLAGS="-u main"
20419             ;;
20420         (solaris2*)
20421             if test "$GXX" != yes ; then
20422                 CXX_AR='$(CXX)'
20423                 CXX_ARFLAGS='-xar -o'
20424             fi
20425             ;;
20426         esac
20427
20428 else
20429         cf_cxx_library=no
20430         cf_cv_builtin_bool=1
20431
20432         # Just because we are not configuring against C++ right now does not
20433         # mean that a user will not want to use C++.  Some distributors disable
20434         # the C++ portion of this configuration as a shortcut (or just to avoid
20435         # compiling the demo in the c++ directory).  So we need a reasonable
20436         # default for the 'bool' type.
20437         #
20438         # Caveat: since the storage of the bool type is not standardized, it
20439         # may change.
20440
20441         if test "$NCURSES_BOOL" != auto ; then
20442                 cf_cv_type_of_bool=$NCURSES_BOOL
20443                 cf_cv_header_stdbool_h=0
20444         else
20445                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20446
20447 echo "$as_me:20447: checking for size of bool" >&5
20448 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20449 if test "${cf_cv_type_of_bool+set}" = set; then
20450   echo $ECHO_N "(cached) $ECHO_C" >&6
20451 else
20452
20453         rm -f cf_test.out
20454         if test "$cross_compiling" = yes; then
20455   cf_cv_type_of_bool=unknown
20456 else
20457   cat >conftest.$ac_ext <<_ACEOF
20458 #line 20458 "configure"
20459 #include "confdefs.h"
20460
20461 #include <stdlib.h>
20462 #include <stdio.h>
20463
20464 #if defined(__cplusplus)
20465
20466 #ifdef HAVE_GXX_BUILTIN_H
20467 #include <g++/builtin.h>
20468 #elif HAVE_GPP_BUILTIN_H
20469 #include <gpp/builtin.h>
20470 #elif HAVE_BUILTIN_H
20471 #include <builtin.h>
20472 #endif
20473
20474 #else
20475
20476 #if $cf_cv_header_stdbool_h
20477 #include <stdbool.h>
20478 #endif
20479
20480 #endif
20481
20482 int main()
20483 {
20484         FILE *fp = fopen("cf_test.out", "w");
20485         if (fp != 0) {
20486                 bool x = true;
20487                 if ((bool)(-x) >= 0)
20488                         fputs("unsigned ", fp);
20489                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20490                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20491                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20492                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20493                 fclose(fp);
20494         }
20495         ${cf_cv_main_return:-return}(0);
20496 }
20497
20498 _ACEOF
20499 rm -f conftest$ac_exeext
20500 if { (eval echo "$as_me:20500: \"$ac_link\"") >&5
20501   (eval $ac_link) 2>&5
20502   ac_status=$?
20503   echo "$as_me:20503: \$? = $ac_status" >&5
20504   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20505   { (eval echo "$as_me:20505: \"$ac_try\"") >&5
20506   (eval $ac_try) 2>&5
20507   ac_status=$?
20508   echo "$as_me:20508: \$? = $ac_status" >&5
20509   (exit $ac_status); }; }; then
20510   cf_cv_type_of_bool=`cat cf_test.out`
20511                  if test -z "$cf_cv_type_of_bool"; then
20512                    cf_cv_type_of_bool=unknown
20513                  fi
20514 else
20515   echo "$as_me: program exited with status $ac_status" >&5
20516 echo "$as_me: failed program was:" >&5
20517 cat conftest.$ac_ext >&5
20518 cf_cv_type_of_bool=unknown
20519 fi
20520 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20521 fi
20522
20523 fi
20524
20525         rm -f cf_test.out
20526 echo "$as_me:20526: result: $cf_cv_type_of_bool" >&5
20527 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20528 if test "$cf_cv_type_of_bool" = unknown ; then
20529         case .$NCURSES_BOOL in
20530         (.auto|.) NCURSES_BOOL=unsigned;;
20531         esac
20532         { echo "$as_me:20532: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20533 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20534         cf_cv_type_of_bool=$NCURSES_BOOL
20535 fi
20536
20537                 else
20538                         echo "$as_me:20538: checking for fallback type of bool" >&5
20539 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20540                         case "$host_cpu" in
20541                         (i?86)  cf_cv_type_of_bool=char ;;
20542                         (*)     cf_cv_type_of_bool=int  ;;
20543                         esac
20544                         echo "$as_me:20544: result: $cf_cv_type_of_bool" >&5
20545 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20546                 fi
20547         fi
20548 fi
20549
20550 # If the C compiler did not declare bool, and we did not determine that the C++
20551 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20552 # ncurses library use the same type as C++ bool.  Note that this allows one to
20553 # specify the type of bool in a configure-script option and postpone
20554 # integration with the C++ compiler provided that the types are compatible.
20555 USE_CXX_BOOL=1
20556 if test $cf_cv_cc_bool_type = 1
20557 then
20558         # oops: C has a bool.  Unlikely, but C++ could differ.
20559         USE_CXX_BOOL=0
20560 elif test $cf_cv_builtin_bool = 0
20561 then
20562         # C++ has no bool
20563         USE_CXX_BOOL=0
20564 else
20565         # this is the normal case
20566         USE_CXX_BOOL='defined(__cplusplus)'
20567 fi
20568
20569 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20570
20571         if test "$cf_with_ada" != "no" ; then
20572                 if test "$with_libtool" != "no"; then
20573                         { echo "$as_me:20573: WARNING: libtool does not support Ada - disabling feature" >&5
20574 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20575                         cf_with_ada=no
20576                 fi
20577         fi
20578
20579         if test "$cf_with_ada" != "no" ; then
20580
20581 cf_ada_make=gnatmake
20582 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20583 set dummy $cf_ada_make; ac_word=$2
20584 echo "$as_me:20584: checking for $ac_word" >&5
20585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20586 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20587   echo $ECHO_N "(cached) $ECHO_C" >&6
20588 else
20589   if test -n "$gnat_exists"; then
20590   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20591 else
20592   ac_save_IFS=$IFS; IFS=$ac_path_separator
20593 ac_dummy="$PATH"
20594 for ac_dir in $ac_dummy; do
20595   IFS=$ac_save_IFS
20596   test -z "$ac_dir" && ac_dir=.
20597   $as_executable_p "$ac_dir/$ac_word" || continue
20598 ac_cv_prog_gnat_exists="yes"
20599 echo "$as_me:20599: found $ac_dir/$ac_word" >&5
20600 break
20601 done
20602
20603   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20604 fi
20605 fi
20606 gnat_exists=$ac_cv_prog_gnat_exists
20607 if test -n "$gnat_exists"; then
20608   echo "$as_me:20608: result: $gnat_exists" >&5
20609 echo "${ECHO_T}$gnat_exists" >&6
20610 else
20611   echo "$as_me:20611: result: no" >&5
20612 echo "${ECHO_T}no" >&6
20613 fi
20614
20615 if test "$ac_cv_prog_gnat_exists" = no; then
20616         cf_ada_make=
20617         cf_cv_prog_gnat_correct=no
20618 else
20619
20620 echo "$as_me:20620: checking for gnat version" >&5
20621 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20622 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20623         grep '[0-9].[0-9][0-9]*' |\
20624         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20625 echo "$as_me:20625: result: $cf_gnat_version" >&5
20626 echo "${ECHO_T}$cf_gnat_version" >&6
20627
20628 case $cf_gnat_version in
20629 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20630         cf_cv_prog_gnat_correct=yes
20631         ;;
20632 (*)
20633         { echo "$as_me:20633: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20634 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20635         cf_cv_prog_gnat_correct=no
20636         ;;
20637 esac
20638
20639         # Extract the first word of "m4", so it can be a program name with args.
20640 set dummy m4; ac_word=$2
20641 echo "$as_me:20641: checking for $ac_word" >&5
20642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20643 if test "${ac_cv_prog_M4_exists+set}" = set; then
20644   echo $ECHO_N "(cached) $ECHO_C" >&6
20645 else
20646   if test -n "$M4_exists"; then
20647   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20648 else
20649   ac_save_IFS=$IFS; IFS=$ac_path_separator
20650 ac_dummy="$PATH"
20651 for ac_dir in $ac_dummy; do
20652   IFS=$ac_save_IFS
20653   test -z "$ac_dir" && ac_dir=.
20654   $as_executable_p "$ac_dir/$ac_word" || continue
20655 ac_cv_prog_M4_exists="yes"
20656 echo "$as_me:20656: found $ac_dir/$ac_word" >&5
20657 break
20658 done
20659
20660   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20661 fi
20662 fi
20663 M4_exists=$ac_cv_prog_M4_exists
20664 if test -n "$M4_exists"; then
20665   echo "$as_me:20665: result: $M4_exists" >&5
20666 echo "${ECHO_T}$M4_exists" >&6
20667 else
20668   echo "$as_me:20668: result: no" >&5
20669 echo "${ECHO_T}no" >&6
20670 fi
20671
20672         if test "$ac_cv_prog_M4_exists" = no; then
20673                 cf_cv_prog_gnat_correct=no
20674                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20675         fi
20676         if test "$cf_cv_prog_gnat_correct" = yes; then
20677                 echo "$as_me:20677: checking if GNAT works" >&5
20678 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20679
20680 rm -rf conftest* *~conftest*
20681 cat >>conftest.ads <<CF_EOF
20682 procedure conftest;
20683 CF_EOF
20684 cat >>conftest.adb <<CF_EOF
20685 with Text_IO;
20686 with GNAT.OS_Lib;
20687 procedure conftest is
20688 begin
20689    Text_IO.Put ("Hello World");
20690    Text_IO.New_Line;
20691    GNAT.OS_Lib.OS_Exit (0);
20692 end conftest;
20693 CF_EOF
20694 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20695    if ( ./conftest 1>&5 2>&1 ) ; then
20696       cf_cv_prog_gnat_correct=yes
20697    else
20698       cf_cv_prog_gnat_correct=no
20699    fi
20700 else
20701    cf_cv_prog_gnat_correct=no
20702 fi
20703 rm -rf conftest* *~conftest*
20704
20705                 echo "$as_me:20705: result: $cf_cv_prog_gnat_correct" >&5
20706 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20707         fi
20708 fi
20709
20710                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20711
20712         ADAFLAGS="$ADAFLAGS -gnatpn"
20713
20714         echo "$as_me:20714: checking optimization options for ADAFLAGS" >&5
20715 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20716         case "$CFLAGS" in
20717         (*-g*)
20718
20719         ADAFLAGS="$ADAFLAGS -g"
20720
20721                 ;;
20722         esac
20723         case "$CFLAGS" in
20724         (*-O*)
20725                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20726
20727         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20728
20729                 ;;
20730         esac
20731         echo "$as_me:20731: result: $ADAFLAGS" >&5
20732 echo "${ECHO_T}$ADAFLAGS" >&6
20733
20734 echo "$as_me:20734: checking if GNATPREP supports -T option" >&5
20735 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20736 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20737   echo $ECHO_N "(cached) $ECHO_C" >&6
20738 else
20739
20740 cf_cv_gnatprep_opt_t=no
20741 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20742
20743 fi
20744 echo "$as_me:20744: result: $cf_cv_gnatprep_opt_t" >&5
20745 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20746 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20747
20748 echo "$as_me:20748: checking if GNAT supports generics" >&5
20749 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20750 case $cf_gnat_version in
20751 (3.[1-9]*|[4-9].*)
20752         cf_gnat_generics=yes
20753         ;;
20754 (*)
20755         cf_gnat_generics=no
20756         ;;
20757 esac
20758 echo "$as_me:20758: result: $cf_gnat_generics" >&5
20759 echo "${ECHO_T}$cf_gnat_generics" >&6
20760
20761 if test "$cf_gnat_generics" = yes
20762 then
20763         cf_compile_generics=generics
20764         cf_generic_objects="\${GENOBJS}"
20765 else
20766         cf_compile_generics=
20767         cf_generic_objects=
20768 fi
20769
20770 echo "$as_me:20770: checking if GNAT supports SIGINT" >&5
20771 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20772 if test "${cf_cv_gnat_sigint+set}" = set; then
20773   echo $ECHO_N "(cached) $ECHO_C" >&6
20774 else
20775
20776 rm -rf conftest* *~conftest*
20777 cat >>conftest.ads <<CF_EOF
20778 with Ada.Interrupts.Names;
20779
20780 package ConfTest is
20781
20782    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20783    pragma Unreserve_All_Interrupts;
20784    pragma Warnings (On);
20785
20786    protected Process is
20787       procedure Stop;
20788       function Continue return Boolean;
20789       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20790    private
20791       Done : Boolean := False;
20792    end Process;
20793
20794 end ConfTest;
20795 CF_EOF
20796 cat >>conftest.adb <<CF_EOF
20797 package body ConfTest is
20798    protected body Process is
20799       procedure Stop is
20800       begin
20801          Done := True;
20802       end Stop;
20803       function Continue return Boolean is
20804       begin
20805          return not Done;
20806       end Continue;
20807    end Process;
20808 end ConfTest;
20809 CF_EOF
20810 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20811       cf_cv_gnat_sigint=yes
20812 else
20813    cf_cv_gnat_sigint=no
20814 fi
20815 rm -rf conftest* *~conftest*
20816
20817 fi
20818 echo "$as_me:20818: result: $cf_cv_gnat_sigint" >&5
20819 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20820
20821 if test $cf_cv_gnat_sigint = yes ; then
20822         USE_GNAT_SIGINT=""
20823 else
20824         USE_GNAT_SIGINT="#"
20825 fi
20826
20827 cf_gnat_libraries=no
20828 cf_gnat_projects=no
20829
20830 if test "$enable_gnat_projects" != no ; then
20831 echo "$as_me:20831: checking if GNAT supports project files" >&5
20832 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20833 case $cf_gnat_version in
20834 (3.[0-9]*)
20835         ;;
20836 (*)
20837         case $cf_cv_system_name in
20838         (cygwin*|msys*)
20839                 ;;
20840         (*)
20841                 mkdir conftest.src conftest.bin conftest.lib
20842                 cd conftest.src
20843                 rm -rf conftest* *~conftest*
20844                 cat >>library.gpr <<CF_EOF
20845 project Library is
20846   Kind := External ("LIB_KIND");
20847   for Library_Name use "ConfTest";
20848   for Object_Dir use ".";
20849   for Library_ALI_Dir use External("LIBRARY_DIR");
20850   for Library_Version use External ("SONAME");
20851   for Library_Kind use Kind;
20852   for Library_Dir use External("BUILD_DIR");
20853   Source_Dir := External ("SOURCE_DIR");
20854   for Source_Dirs use (Source_Dir);
20855 end Library;
20856 CF_EOF
20857                 cat >>confpackage.ads <<CF_EOF
20858 package ConfPackage is
20859    procedure conftest;
20860 end ConfPackage;
20861 CF_EOF
20862                 cat >>confpackage.adb <<CF_EOF
20863 with Text_IO;
20864 package body ConfPackage is
20865    procedure conftest is
20866    begin
20867       Text_IO.Put ("Hello World");
20868       Text_IO.New_Line;
20869    end conftest;
20870 end ConfPackage;
20871 CF_EOF
20872                 if ( $cf_ada_make $ADAFLAGS \
20873                                 -Plibrary.gpr \
20874                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20875                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20876                                 -XSOURCE_DIR=`pwd` \
20877                                 -XSONAME=libConfTest.so.1 \
20878                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20879                         cf_gnat_projects=yes
20880                 fi
20881                 cd ..
20882                 if test -f conftest.lib/confpackage.ali
20883                 then
20884                         cf_gnat_libraries=yes
20885                 fi
20886                 rm -rf conftest* *~conftest*
20887                 ;;
20888         esac
20889         ;;
20890 esac
20891 echo "$as_me:20891: result: $cf_gnat_projects" >&5
20892 echo "${ECHO_T}$cf_gnat_projects" >&6
20893 fi # enable_gnat_projects
20894
20895 if test $cf_gnat_projects = yes
20896 then
20897         echo "$as_me:20897: checking if GNAT supports libraries" >&5
20898 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20899         echo "$as_me:20899: result: $cf_gnat_libraries" >&5
20900 echo "${ECHO_T}$cf_gnat_libraries" >&6
20901 fi
20902
20903 if test "$cf_gnat_projects" = yes
20904 then
20905         USE_OLD_MAKERULES="#"
20906         USE_GNAT_PROJECTS=""
20907 else
20908         USE_OLD_MAKERULES=""
20909         USE_GNAT_PROJECTS="#"
20910 fi
20911
20912 if test "$cf_gnat_libraries" = yes
20913 then
20914         USE_GNAT_LIBRARIES=""
20915 else
20916         USE_GNAT_LIBRARIES="#"
20917 fi
20918
20919 echo "$as_me:20919: checking for ada-compiler" >&5
20920 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20921
20922 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20923 if test "${with_ada_compiler+set}" = set; then
20924   withval="$with_ada_compiler"
20925   cf_ada_compiler=$withval
20926 else
20927   cf_ada_compiler=gnatmake
20928 fi;
20929
20930 echo "$as_me:20930: result: $cf_ada_compiler" >&5
20931 echo "${ECHO_T}$cf_ada_compiler" >&6
20932
20933                         cf_ada_package=terminal_interface
20934
20935 echo "$as_me:20935: checking for ada-include" >&5
20936 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20937
20938 # Check whether --with-ada-include or --without-ada-include was given.
20939 if test "${with_ada_include+set}" = set; then
20940   withval="$with_ada_include"
20941
20942 else
20943   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20944 fi; if test -n "$prefix/share/ada/adainclude" ; then
20945
20946 if test "x$prefix" != xNONE; then
20947         cf_path_syntax="$prefix"
20948 else
20949         cf_path_syntax="$ac_default_prefix"
20950 fi
20951
20952 case ".$withval" in
20953 (.\$\(*\)*|.\'*\'*)
20954         ;;
20955 (..|./*|.\\*)
20956         ;;
20957 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20958         ;;
20959 (.\${*prefix}*|.\${*dir}*)
20960         eval withval="$withval"
20961         case ".$withval" in
20962         (.NONE/*)
20963                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20964                 ;;
20965         esac
20966         ;;
20967 (.no|.NONE/*)
20968         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20969         ;;
20970 (*)
20971         { { echo "$as_me:20971: error: expected a pathname, not \"$withval\"" >&5
20972 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20973    { (exit 1); exit 1; }; }
20974         ;;
20975 esac
20976
20977 fi
20978 eval ADA_INCLUDE="$withval"
20979
20980 echo "$as_me:20980: result: $ADA_INCLUDE" >&5
20981 echo "${ECHO_T}$ADA_INCLUDE" >&6
20982
20983 echo "$as_me:20983: checking for ada-objects" >&5
20984 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20985
20986 # Check whether --with-ada-objects or --without-ada-objects was given.
20987 if test "${with_ada_objects+set}" = set; then
20988   withval="$with_ada_objects"
20989
20990 else
20991   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20992 fi; if test -n "$prefix/lib/ada/adalib" ; then
20993
20994 if test "x$prefix" != xNONE; then
20995         cf_path_syntax="$prefix"
20996 else
20997         cf_path_syntax="$ac_default_prefix"
20998 fi
20999
21000 case ".$withval" in
21001 (.\$\(*\)*|.\'*\'*)
21002         ;;
21003 (..|./*|.\\*)
21004         ;;
21005 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21006         ;;
21007 (.\${*prefix}*|.\${*dir}*)
21008         eval withval="$withval"
21009         case ".$withval" in
21010         (.NONE/*)
21011                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21012                 ;;
21013         esac
21014         ;;
21015 (.no|.NONE/*)
21016         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21017         ;;
21018 (*)
21019         { { echo "$as_me:21019: error: expected a pathname, not \"$withval\"" >&5
21020 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21021    { (exit 1); exit 1; }; }
21022         ;;
21023 esac
21024
21025 fi
21026 eval ADA_OBJECTS="$withval"
21027
21028 echo "$as_me:21028: result: $ADA_OBJECTS" >&5
21029 echo "${ECHO_T}$ADA_OBJECTS" >&6
21030
21031 echo "$as_me:21031: checking if an Ada95 shared-library should be built" >&5
21032 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21033
21034 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21035 if test "${with_ada_sharedlib+set}" = set; then
21036   withval="$with_ada_sharedlib"
21037   with_ada_sharedlib=$withval
21038 else
21039   with_ada_sharedlib=no
21040 fi;
21041 echo "$as_me:21041: result: $with_ada_sharedlib" >&5
21042 echo "${ECHO_T}$with_ada_sharedlib" >&6
21043
21044 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21045 MAKE_ADA_SHAREDLIB="#"
21046
21047 if test "x$with_ada_sharedlib" != xno
21048 then
21049         MAKE_ADA_SHAREDLIB=
21050         if test "x$with_ada_sharedlib" != xyes
21051         then
21052                 ADA_SHAREDLIB="$with_ada_sharedlib"
21053         fi
21054 fi
21055
21056                 fi
21057         fi
21058 else
21059         cf_with_ada=no
21060 fi
21061
21062 # do this "late" to avoid conflict with header-checks
21063 if test "x$with_widec" = xyes ; then
21064         echo "$as_me:21064: checking for wchar_t" >&5
21065 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21066 if test "${ac_cv_type_wchar_t+set}" = set; then
21067   echo $ECHO_N "(cached) $ECHO_C" >&6
21068 else
21069   cat >conftest.$ac_ext <<_ACEOF
21070 #line 21070 "configure"
21071 #include "confdefs.h"
21072 $ac_includes_default
21073 int
21074 main ()
21075 {
21076 if ((wchar_t *) 0)
21077   return 0;
21078 if (sizeof (wchar_t))
21079   return 0;
21080   ;
21081   return 0;
21082 }
21083 _ACEOF
21084 rm -f conftest.$ac_objext
21085 if { (eval echo "$as_me:21085: \"$ac_compile\"") >&5
21086   (eval $ac_compile) 2>&5
21087   ac_status=$?
21088   echo "$as_me:21088: \$? = $ac_status" >&5
21089   (exit $ac_status); } &&
21090          { ac_try='test -s conftest.$ac_objext'
21091   { (eval echo "$as_me:21091: \"$ac_try\"") >&5
21092   (eval $ac_try) 2>&5
21093   ac_status=$?
21094   echo "$as_me:21094: \$? = $ac_status" >&5
21095   (exit $ac_status); }; }; then
21096   ac_cv_type_wchar_t=yes
21097 else
21098   echo "$as_me: failed program was:" >&5
21099 cat conftest.$ac_ext >&5
21100 ac_cv_type_wchar_t=no
21101 fi
21102 rm -f conftest.$ac_objext conftest.$ac_ext
21103 fi
21104 echo "$as_me:21104: result: $ac_cv_type_wchar_t" >&5
21105 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21106
21107 echo "$as_me:21107: checking size of wchar_t" >&5
21108 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21109 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21110   echo $ECHO_N "(cached) $ECHO_C" >&6
21111 else
21112   if test "$ac_cv_type_wchar_t" = yes; then
21113   if test "$cross_compiling" = yes; then
21114   # Depending upon the size, compute the lo and hi bounds.
21115 cat >conftest.$ac_ext <<_ACEOF
21116 #line 21116 "configure"
21117 #include "confdefs.h"
21118 $ac_includes_default
21119 int
21120 main ()
21121 {
21122 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21123   ;
21124   return 0;
21125 }
21126 _ACEOF
21127 rm -f conftest.$ac_objext
21128 if { (eval echo "$as_me:21128: \"$ac_compile\"") >&5
21129   (eval $ac_compile) 2>&5
21130   ac_status=$?
21131   echo "$as_me:21131: \$? = $ac_status" >&5
21132   (exit $ac_status); } &&
21133          { ac_try='test -s conftest.$ac_objext'
21134   { (eval echo "$as_me:21134: \"$ac_try\"") >&5
21135   (eval $ac_try) 2>&5
21136   ac_status=$?
21137   echo "$as_me:21137: \$? = $ac_status" >&5
21138   (exit $ac_status); }; }; then
21139   ac_lo=0 ac_mid=0
21140   while :; do
21141     cat >conftest.$ac_ext <<_ACEOF
21142 #line 21142 "configure"
21143 #include "confdefs.h"
21144 $ac_includes_default
21145 int
21146 main ()
21147 {
21148 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21149   ;
21150   return 0;
21151 }
21152 _ACEOF
21153 rm -f conftest.$ac_objext
21154 if { (eval echo "$as_me:21154: \"$ac_compile\"") >&5
21155   (eval $ac_compile) 2>&5
21156   ac_status=$?
21157   echo "$as_me:21157: \$? = $ac_status" >&5
21158   (exit $ac_status); } &&
21159          { ac_try='test -s conftest.$ac_objext'
21160   { (eval echo "$as_me:21160: \"$ac_try\"") >&5
21161   (eval $ac_try) 2>&5
21162   ac_status=$?
21163   echo "$as_me:21163: \$? = $ac_status" >&5
21164   (exit $ac_status); }; }; then
21165   ac_hi=$ac_mid; break
21166 else
21167   echo "$as_me: failed program was:" >&5
21168 cat conftest.$ac_ext >&5
21169 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21170 fi
21171 rm -f conftest.$ac_objext conftest.$ac_ext
21172   done
21173 else
21174   echo "$as_me: failed program was:" >&5
21175 cat conftest.$ac_ext >&5
21176 ac_hi=-1 ac_mid=-1
21177   while :; do
21178     cat >conftest.$ac_ext <<_ACEOF
21179 #line 21179 "configure"
21180 #include "confdefs.h"
21181 $ac_includes_default
21182 int
21183 main ()
21184 {
21185 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21186   ;
21187   return 0;
21188 }
21189 _ACEOF
21190 rm -f conftest.$ac_objext
21191 if { (eval echo "$as_me:21191: \"$ac_compile\"") >&5
21192   (eval $ac_compile) 2>&5
21193   ac_status=$?
21194   echo "$as_me:21194: \$? = $ac_status" >&5
21195   (exit $ac_status); } &&
21196          { ac_try='test -s conftest.$ac_objext'
21197   { (eval echo "$as_me:21197: \"$ac_try\"") >&5
21198   (eval $ac_try) 2>&5
21199   ac_status=$?
21200   echo "$as_me:21200: \$? = $ac_status" >&5
21201   (exit $ac_status); }; }; then
21202   ac_lo=$ac_mid; break
21203 else
21204   echo "$as_me: failed program was:" >&5
21205 cat conftest.$ac_ext >&5
21206 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21207 fi
21208 rm -f conftest.$ac_objext conftest.$ac_ext
21209   done
21210 fi
21211 rm -f conftest.$ac_objext conftest.$ac_ext
21212 # Binary search between lo and hi bounds.
21213 while test "x$ac_lo" != "x$ac_hi"; do
21214   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21215   cat >conftest.$ac_ext <<_ACEOF
21216 #line 21216 "configure"
21217 #include "confdefs.h"
21218 $ac_includes_default
21219 int
21220 main ()
21221 {
21222 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21223   ;
21224   return 0;
21225 }
21226 _ACEOF
21227 rm -f conftest.$ac_objext
21228 if { (eval echo "$as_me:21228: \"$ac_compile\"") >&5
21229   (eval $ac_compile) 2>&5
21230   ac_status=$?
21231   echo "$as_me:21231: \$? = $ac_status" >&5
21232   (exit $ac_status); } &&
21233          { ac_try='test -s conftest.$ac_objext'
21234   { (eval echo "$as_me:21234: \"$ac_try\"") >&5
21235   (eval $ac_try) 2>&5
21236   ac_status=$?
21237   echo "$as_me:21237: \$? = $ac_status" >&5
21238   (exit $ac_status); }; }; then
21239   ac_hi=$ac_mid
21240 else
21241   echo "$as_me: failed program was:" >&5
21242 cat conftest.$ac_ext >&5
21243 ac_lo=`expr $ac_mid + 1`
21244 fi
21245 rm -f conftest.$ac_objext conftest.$ac_ext
21246 done
21247 ac_cv_sizeof_wchar_t=$ac_lo
21248 else
21249   if test "$cross_compiling" = yes; then
21250   { { echo "$as_me:21250: error: cannot run test program while cross compiling" >&5
21251 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21252    { (exit 1); exit 1; }; }
21253 else
21254   cat >conftest.$ac_ext <<_ACEOF
21255 #line 21255 "configure"
21256 #include "confdefs.h"
21257 $ac_includes_default
21258 int
21259 main ()
21260 {
21261 FILE *f = fopen ("conftest.val", "w");
21262 if (!f)
21263   $ac_main_return (1);
21264 fprintf (f, "%d", (sizeof (wchar_t)));
21265 fclose (f);
21266   ;
21267   return 0;
21268 }
21269 _ACEOF
21270 rm -f conftest$ac_exeext
21271 if { (eval echo "$as_me:21271: \"$ac_link\"") >&5
21272   (eval $ac_link) 2>&5
21273   ac_status=$?
21274   echo "$as_me:21274: \$? = $ac_status" >&5
21275   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21276   { (eval echo "$as_me:21276: \"$ac_try\"") >&5
21277   (eval $ac_try) 2>&5
21278   ac_status=$?
21279   echo "$as_me:21279: \$? = $ac_status" >&5
21280   (exit $ac_status); }; }; then
21281   ac_cv_sizeof_wchar_t=`cat conftest.val`
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 fi
21287 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21288 fi
21289 fi
21290 rm -f conftest.val
21291 else
21292   ac_cv_sizeof_wchar_t=0
21293 fi
21294 fi
21295 echo "$as_me:21295: result: $ac_cv_sizeof_wchar_t" >&5
21296 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21297 cat >>confdefs.h <<EOF
21298 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21299 EOF
21300
21301 fi
21302
21303 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21304 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21305 ###
21306 ### ticlib modules may be a separate library, otherwise contained in termlib.
21307 ### termlib modules may be a separate library, otherwise contained in ncurses.
21308 ###
21309 ### The of "+" or " " between the tokens controls the way the script
21310 ### chooses to split module lists into libraries.
21311 ###
21312 ### (see CF_LIB_RULES).
21313 echo "$as_me:21313: checking for library subsets" >&5
21314 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21315 LIB_SUBSETS=
21316
21317 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21318         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21319         if test "$with_ticlib" != no ; then
21320                 LIB_SUBSETS="${LIB_SUBSETS} "
21321         else
21322                 LIB_SUBSETS="${LIB_SUBSETS}+"
21323         fi
21324 fi
21325
21326 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21327 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21328
21329 if test "$with_termlib" != no ; then
21330         LIB_SUBSETS="${LIB_SUBSETS} "
21331 else
21332         LIB_SUBSETS="${LIB_SUBSETS}+"
21333 fi
21334
21335 LIB_SUBSETS="${LIB_SUBSETS}base"
21336
21337 # Most term-driver calls are to tinfo, but some like init_pair are to the
21338 # base library (so it resides in base).
21339 if test "$with_term_driver" != no ; then
21340         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21341         case $cf_cv_system_name in
21342         (*mingw32*|*mingw64*)
21343                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21344                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21345                 ;;
21346         (*)
21347                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21348                 ;;
21349         esac
21350 fi
21351
21352 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21353 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21354
21355 echo "$as_me:21355: result: $LIB_SUBSETS" >&5
21356 echo "${ECHO_T}$LIB_SUBSETS" >&6
21357
21358 ### Construct the list of include-directories to be generated
21359
21360 if test "$srcdir" != "."; then
21361         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21362 fi
21363 CPPFLAGS="-I../include $CPPFLAGS"
21364 if test "$srcdir" != "."; then
21365         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21366 fi
21367 CPPFLAGS="-I. $CPPFLAGS"
21368
21369 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21370 if test "$srcdir" != "."; then
21371         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21372 fi
21373 if test "$GCC" != yes; then
21374         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21375 elif test "$includedir" != "/usr/include"; then
21376         if test "$includedir" = '${prefix}/include' ; then
21377                 if test x$prefix != x/usr ; then
21378                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21379                 fi
21380         else
21381                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21382         fi
21383 fi
21384
21385 ### Build up pieces for makefile rules
21386 echo "$as_me:21386: checking default library suffix" >&5
21387 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21388
21389         case $DFT_LWR_MODEL in
21390         (libtool) DFT_ARG_SUFFIX=''   ;;
21391         (normal)  DFT_ARG_SUFFIX=''   ;;
21392         (debug)   DFT_ARG_SUFFIX='_g' ;;
21393         (profile) DFT_ARG_SUFFIX='_p' ;;
21394         (shared)  DFT_ARG_SUFFIX=''   ;;
21395         esac
21396         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21397 echo "$as_me:21397: result: $DFT_ARG_SUFFIX" >&5
21398 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21399
21400 echo "$as_me:21400: checking default library-dependency suffix" >&5
21401 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21402
21403         case X$DFT_LWR_MODEL in
21404         (Xlibtool)
21405                 DFT_LIB_SUFFIX='.la'
21406                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21407                 ;;
21408         (Xdebug)
21409                 DFT_LIB_SUFFIX='_g.a'
21410                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21411                 ;;
21412         (Xprofile)
21413                 DFT_LIB_SUFFIX='_p.a'
21414                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21415                 ;;
21416         (Xshared)
21417                 case $cf_cv_system_name in
21418                 (aix[5-7]*)
21419                         DFT_LIB_SUFFIX='.so'
21420                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21421                         ;;
21422                 (cygwin*|msys*|mingw*)
21423                         DFT_LIB_SUFFIX='.dll'
21424                         DFT_DEP_SUFFIX='.dll.a'
21425                         ;;
21426                 (darwin*)
21427                         DFT_LIB_SUFFIX='.dylib'
21428                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21429                         ;;
21430                 (hpux*)
21431                         case $target in
21432                         (ia64*)
21433                                 DFT_LIB_SUFFIX='.so'
21434                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21435                                 ;;
21436                         (*)
21437                                 DFT_LIB_SUFFIX='.sl'
21438                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21439                                 ;;
21440                         esac
21441                         ;;
21442                 (*)
21443                         DFT_LIB_SUFFIX='.so'
21444                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21445                         ;;
21446                 esac
21447                 ;;
21448         (*)
21449                 DFT_LIB_SUFFIX='.a'
21450                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21451                 ;;
21452         esac
21453         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21454         then
21455                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21456                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21457         fi
21458 echo "$as_me:21458: result: $DFT_DEP_SUFFIX" >&5
21459 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21460
21461 echo "$as_me:21461: checking default object directory" >&5
21462 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21463
21464         case $DFT_LWR_MODEL in
21465         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21466         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21467         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21468         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21469         (shared)
21470                 case $cf_cv_system_name in
21471                 (cygwin|msys)
21472                         DFT_OBJ_SUBDIR='objects' ;;
21473                 (*)
21474                         DFT_OBJ_SUBDIR='obj_s' ;;
21475                 esac
21476         esac
21477 echo "$as_me:21477: result: $DFT_OBJ_SUBDIR" >&5
21478 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21479
21480 if test "x$cf_with_cxx" = xyes ; then
21481 echo "$as_me:21481: checking c++ library-dependency suffix" >&5
21482 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21483 if test "$with_libtool" != "no"; then
21484         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21485         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21486 elif test "$with_shared_cxx" != "no"; then
21487         # also for g++ users...
21488         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21489 else
21490         # we normally make a static library because C/C++ library rules differ
21491
21492         case Xnormal in
21493         (Xlibtool)
21494                 CXX_LIB_SUFFIX='.la'
21495                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21496                 ;;
21497         (Xdebug)
21498                 CXX_LIB_SUFFIX='_g.a'
21499                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21500                 ;;
21501         (Xprofile)
21502                 CXX_LIB_SUFFIX='_p.a'
21503                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21504                 ;;
21505         (Xshared)
21506                 case $cf_cv_system_name in
21507                 (aix[5-7]*)
21508                         CXX_LIB_SUFFIX='.so'
21509                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21510                         ;;
21511                 (cygwin*|msys*|mingw*)
21512                         CXX_LIB_SUFFIX='.dll'
21513                         CXX_DEP_SUFFIX='.dll.a'
21514                         ;;
21515                 (darwin*)
21516                         CXX_LIB_SUFFIX='.dylib'
21517                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21518                         ;;
21519                 (hpux*)
21520                         case $target in
21521                         (ia64*)
21522                                 CXX_LIB_SUFFIX='.so'
21523                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21524                                 ;;
21525                         (*)
21526                                 CXX_LIB_SUFFIX='.sl'
21527                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21528                                 ;;
21529                         esac
21530                         ;;
21531                 (*)
21532                         CXX_LIB_SUFFIX='.so'
21533                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21534                         ;;
21535                 esac
21536                 ;;
21537         (*)
21538                 CXX_LIB_SUFFIX='.a'
21539                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21540                 ;;
21541         esac
21542         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21543         then
21544                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21545                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21546         fi
21547
21548 fi
21549 echo "$as_me:21549: result: $CXX_LIB_SUFFIX" >&5
21550 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21551
21552 fi
21553
21554 # do not want -ldl in build except as needed for -lncurses dependency
21555 if test "x$with_dlsym" = xyes ; then
21556 if test $DFT_LWR_MODEL = shared || \
21557    test $DFT_LWR_MODEL = libtool ; then
21558
21559 # remove dl library from $LIBS
21560 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21561
21562 fi
21563 fi
21564 ### Set up low-level terminfo dependencies for makefiles.
21565
21566 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21567 # do not need libdl
21568 TICS_LIST=
21569 if test "x$with_dlsym" = xyes ; then
21570
21571 # remove dl library from $SHLIB_LIST
21572 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21573
21574 fi
21575
21576 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21577 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21578 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21579 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21580 then
21581         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21582 fi
21583
21584 if test "$with_ticlib" != no ; then
21585
21586         if test "x$with_ticlib" != xyes ; then
21587                 TICS_NAME=$with_ticlib
21588                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21589                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21590                 TICS_LIB_SUFFIX="${with_ticlib}"
21591         else
21592                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21593                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21594                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21595         fi
21596         TICS_LDFLAGS="-L${LIB_DIR}"
21597         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21598 else
21599         TICS_LDFLAGS="-L${LIB_DIR}"
21600         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21601 fi
21602
21603 if test "$with_termlib" != no ; then
21604
21605         if test "x$with_termlib" != xyes ; then
21606                 TINFO_NAME=$with_termlib
21607                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21608                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21609                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21610                 TINFO_LIB_SUFFIX="${with_termlib}"
21611         else
21612                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21613                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21614                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21615                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21616         fi
21617
21618         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21619         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21620         if test "$DFT_LWR_MODEL" = "libtool"; then
21621                 TEST_ARGS="${TEST_DEPS}"
21622                 TEST_ARG2="${TEST_DEP2}"
21623                 TINFO_LDFLAGS="-L${LIB_DIR}"
21624                 TINFO_LIBS="$TEST_ARGS"
21625                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21626                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21627         else
21628                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21629                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21630                 if test "x$with_term_driver" != xno ; then
21631                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21632                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21633                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21634                 else
21635                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21636                         TINFO_LIBS="$TEST_ARGS"
21637                 fi
21638                 TINFO_LDFLAGS="-L${LIB_DIR}"
21639                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21640         fi
21641 else
21642         # the next lines are needed for linking libtic over libncurses
21643         TINFO_NAME=${LIB_NAME}
21644         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21645         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21646         if test "x$with_tic_depends" = xyes ; then
21647                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21648         else
21649                 TICS_LIST="$SHLIB_LIST"
21650         fi
21651
21652         TINFO_LDFLAGS="-L${LIB_DIR}"
21653         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21654 fi
21655
21656 if test "$DFT_LWR_MODEL" = shared ; then
21657         case $cf_cv_system_name in
21658         (cygwin*|msys*)
21659                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21660                 TINFO_SUFFIX=.dll
21661                 ;;
21662         esac
21663 fi
21664
21665 if test "x$with_dlsym" = xyes ; then
21666
21667 # remove dl library from $TICS_LIST
21668 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21669
21670 fi
21671
21672 if test "$DFT_LWR_MODEL" = "libtool"; then
21673         OBJEXT=lo
21674 fi
21675
21676 # needed for Ada95
21677 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21678
21679 case $DFT_LWR_MODEL in
21680 (normal|debug|profile)
21681
21682 if test "$GCC" = yes ; then
21683         case $cf_cv_system_name in
21684         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21685                 LDFLAGS_STATIC=
21686                 LDFLAGS_SHARED=
21687                 ;;
21688         (*)     # normally, except when broken
21689                 LDFLAGS_STATIC=-static
21690                 LDFLAGS_SHARED=-dynamic
21691                 ;;
21692         esac
21693 else
21694         case $cf_cv_system_name in
21695         (aix[4-7]*)     # from ld manpage
21696                 LDFLAGS_STATIC=-bstatic
21697                 LDFLAGS_SHARED=-bdynamic
21698                 ;;
21699         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21700                 # We could also use just "archive" and "shared".
21701                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21702                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21703                 ;;
21704         (irix*)         # from ld manpage IRIX64
21705                 LDFLAGS_STATIC=-Bstatic
21706                 LDFLAGS_SHARED=-Bdynamic
21707                 ;;
21708         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21709                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21710                 LDFLAGS_STATIC=-noso
21711                 LDFLAGS_SHARED=-so_archive
21712                 ;;
21713         (solaris2*)
21714                 LDFLAGS_STATIC=-Bstatic
21715                 LDFLAGS_SHARED=-Bdynamic
21716                 ;;
21717         esac
21718 fi
21719
21720 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21721 then
21722         echo "$as_me:21722: checking if linker supports switching between static/dynamic" >&5
21723 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21724
21725         rm -f libconftest.a
21726         cat >conftest.$ac_ext <<EOF
21727 #line 21727 "configure"
21728 #include <stdio.h>
21729 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21730 EOF
21731         if { (eval echo "$as_me:21731: \"$ac_compile\"") >&5
21732   (eval $ac_compile) 2>&5
21733   ac_status=$?
21734   echo "$as_me:21734: \$? = $ac_status" >&5
21735   (exit $ac_status); } ; then
21736                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21737                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21738         fi
21739         rm -f conftest.*
21740
21741         cf_save_LIBS="$LIBS"
21742
21743         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21744         cat >conftest.$ac_ext <<_ACEOF
21745 #line 21745 "configure"
21746 #include "confdefs.h"
21747
21748 #line 21748 "configure"
21749 #include <stdio.h>
21750 int cf_ldflags_static(FILE *fp);
21751
21752 int
21753 main ()
21754 {
21755
21756         return cf_ldflags_static(stdin);
21757
21758   ;
21759   return 0;
21760 }
21761 _ACEOF
21762 rm -f conftest.$ac_objext conftest$ac_exeext
21763 if { (eval echo "$as_me:21763: \"$ac_link\"") >&5
21764   (eval $ac_link) 2>&5
21765   ac_status=$?
21766   echo "$as_me:21766: \$? = $ac_status" >&5
21767   (exit $ac_status); } &&
21768          { ac_try='test -s conftest$ac_exeext'
21769   { (eval echo "$as_me:21769: \"$ac_try\"") >&5
21770   (eval $ac_try) 2>&5
21771   ac_status=$?
21772   echo "$as_me:21772: \$? = $ac_status" >&5
21773   (exit $ac_status); }; }; then
21774
21775         # some linkers simply ignore the -dynamic
21776         case x`file conftest$ac_exeext 2>/dev/null` in
21777         (*static*)
21778                 cf_ldflags_static=no
21779                 ;;
21780         (*)
21781                 cf_ldflags_static=yes
21782                 ;;
21783         esac
21784
21785 else
21786   echo "$as_me: failed program was:" >&5
21787 cat conftest.$ac_ext >&5
21788 cf_ldflags_static=no
21789 fi
21790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21791
21792         rm -f libconftest.*
21793         LIBS="$cf_save_LIBS"
21794
21795         echo "$as_me:21795: result: $cf_ldflags_static" >&5
21796 echo "${ECHO_T}$cf_ldflags_static" >&6
21797
21798         if test $cf_ldflags_static != yes
21799         then
21800                 LDFLAGS_STATIC=
21801                 LDFLAGS_SHARED=
21802         fi
21803 else
21804         LDFLAGS_STATIC=
21805         LDFLAGS_SHARED=
21806 fi
21807
21808         ;;
21809 esac
21810
21811 echo "$as_me:21811: checking where we will install curses.h" >&5
21812 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21813
21814 includesubdir=
21815 if test "$with_overwrite" = no && \
21816  ( test "x$includedir" = 'x${prefix}/include' || \
21817    test "x$includedir" = "x${prefix}/include" )
21818 then
21819         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21820 fi
21821 echo "$as_me:21821: result: ${includedir}${includesubdir}" >&5
21822 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21823
21824 ### Resolve a conflict between normal and wide-curses by forcing applications
21825 ### that will need libutf8 to add it to their configure script.
21826 if test "$with_overwrite" != no ; then
21827 if test "$NCURSES_LIBUTF8" = 1 ; then
21828         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21829         { echo "$as_me:21829: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21830 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21831 fi
21832 fi
21833 WITH_OVERWRITE=$with_overwrite
21834
21835 # used to separate tack out of the tree
21836 NCURSES_TREE=
21837
21838 ### predefined stuff for the test programs
21839
21840 cat >>confdefs.h <<\EOF
21841 #define HAVE_SLK_COLOR 1
21842 EOF
21843
21844 ### Construct the list of subdirectories for which we'll customize makefiles
21845 ### with the appropriate compile-rules.
21846
21847 echo "$as_me:21847: checking for src modules" >&5
21848 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21849
21850 # dependencies and linker-arguments for test-programs
21851 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21852 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21853 if test "$DFT_LWR_MODEL" = "libtool"; then
21854         TEST_ARGS="${TEST_DEPS}"
21855         TEST_ARG2="${TEST_DEP2}"
21856 else
21857         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21858         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21859 fi
21860
21861 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21862 cf_cv_src_modules=
21863 for cf_dir in $modules_to_build
21864 do
21865         if test -f $srcdir/$cf_dir/modules; then
21866
21867                 # We may/may not have tack in the distribution, though the
21868                 # makefile is.
21869                 if test $cf_dir = tack ; then
21870                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21871                                 continue
21872                         fi
21873                 fi
21874
21875                 if test -z "$cf_cv_src_modules"; then
21876                         cf_cv_src_modules=$cf_dir
21877                 else
21878                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21879                 fi
21880
21881                 # Make the ncurses_cfg.h file record the library interface files as
21882                 # well.  These are header files that are the same name as their
21883                 # directory.  Ncurses is the only library that does not follow
21884                 # that pattern.
21885                 if test $cf_dir = tack ; then
21886                         continue
21887                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21888
21889 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21890
21891                         cat >>confdefs.h <<EOF
21892 #define HAVE_${cf_have_include}_H 1
21893 EOF
21894
21895                         cat >>confdefs.h <<EOF
21896 #define HAVE_LIB${cf_have_include} 1
21897 EOF
21898
21899                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21900                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21901                         if test "$DFT_LWR_MODEL" = "libtool"; then
21902                                 TEST_ARGS="${TEST_DEPS}"
21903                                 TEST_ARG2="${TEST_DEP2}"
21904                         else
21905                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21906                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
21907                         fi
21908                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
21909                 fi
21910         fi
21911 done
21912 echo "$as_me:21912: result: $cf_cv_src_modules" >&5
21913 echo "${ECHO_T}$cf_cv_src_modules" >&6
21914
21915 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21916 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21917
21918 SRC_SUBDIRS=
21919 if test "x$cf_with_manpages" != xno ; then
21920         SRC_SUBDIRS="$SRC_SUBDIRS man"
21921 fi
21922 SRC_SUBDIRS="$SRC_SUBDIRS include"
21923 for cf_dir in $cf_cv_src_modules
21924 do
21925         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21926 done
21927 if test "x$cf_with_tests" != "xno" ; then
21928         SRC_SUBDIRS="$SRC_SUBDIRS test"
21929 fi
21930 # always make this, to install the ncurses-config script
21931 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21932 if test "$cf_with_cxx_binding" != no; then
21933         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
21934         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21935 fi
21936
21937 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21938 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21939
21940 ADA_SUBDIRS=
21941 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21942         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21943         ADA_SUBDIRS="gen src"
21944         if test "x$cf_with_tests" != "xno" ; then
21945                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21946         fi
21947 fi
21948
21949 SUB_MAKEFILES=
21950 for cf_dir in $SRC_SUBDIRS
21951 do
21952         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21953 done
21954
21955 if test -n "$ADA_SUBDIRS"; then
21956         for cf_dir in $ADA_SUBDIRS
21957         do
21958                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21959         done
21960
21961 fi
21962
21963 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21964    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21965    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
21966 fi
21967
21968 DIRS_TO_MAKE="lib"
21969 for cf_item in $cf_list_models
21970 do
21971
21972         case $cf_item in
21973         (libtool) cf_subdir='obj_lo'  ;;
21974         (normal)  cf_subdir='objects' ;;
21975         (debug)   cf_subdir='obj_g' ;;
21976         (profile) cf_subdir='obj_p' ;;
21977         (shared)
21978                 case $cf_cv_system_name in
21979                 (cygwin|msys)
21980                         cf_subdir='objects' ;;
21981                 (*)
21982                         cf_subdir='obj_s' ;;
21983                 esac
21984         esac
21985
21986         for cf_item2 in $DIRS_TO_MAKE
21987         do
21988                 test $cf_item2 = $cf_subdir && break
21989         done
21990         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21991 done
21992 for cf_dir in $DIRS_TO_MAKE
21993 do
21994         test ! -d $cf_dir && mkdir $cf_dir
21995 done
21996
21997 # symbols that differ when compiling Ada95 by itself.
21998 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
21999
22000 # values to use as strings
22001
22002 cat >>confdefs.h <<EOF
22003 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22004 EOF
22005
22006 cat >>confdefs.h <<EOF
22007 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22008 EOF
22009
22010 ### Now that we're done running tests, add the compiler-warnings, if any
22011
22012 cf_fix_cppflags=no
22013 cf_new_cflags=
22014 cf_new_cppflags=
22015 cf_new_extra_cppflags=
22016
22017 for cf_add_cflags in $EXTRA_CFLAGS
22018 do
22019 case $cf_fix_cppflags in
22020 (no)
22021         case $cf_add_cflags in
22022         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22023                 case $cf_add_cflags in
22024                 (-D*)
22025                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22026
22027                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22028                                 && test -z "${cf_tst_cflags}" \
22029                                 && cf_fix_cppflags=yes
22030
22031                         if test $cf_fix_cppflags = yes ; then
22032                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22033                                 continue
22034                         elif test "${cf_tst_cflags}" = "\"'" ; then
22035                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22036                                 continue
22037                         fi
22038                         ;;
22039                 esac
22040                 case "$CPPFLAGS" in
22041                 (*$cf_add_cflags)
22042                         ;;
22043                 (*)
22044                         case $cf_add_cflags in
22045                         (-D*)
22046                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22047
22048 CPPFLAGS=`echo "$CPPFLAGS" | \
22049         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22050                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22051
22052                                 ;;
22053                         esac
22054                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22055                         ;;
22056                 esac
22057                 ;;
22058         (*)
22059                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22060                 ;;
22061         esac
22062         ;;
22063 (yes)
22064         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22065
22066         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22067
22068         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22069                 && test -z "${cf_tst_cflags}" \
22070                 && cf_fix_cppflags=no
22071         ;;
22072 esac
22073 done
22074
22075 if test -n "$cf_new_cflags" ; then
22076
22077         CFLAGS="$CFLAGS $cf_new_cflags"
22078 fi
22079
22080 if test -n "$cf_new_cppflags" ; then
22081
22082         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22083 fi
22084
22085 if test -n "$cf_new_extra_cppflags" ; then
22086
22087         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22088 fi
22089
22090 ### Define substitutions for header files to avoid name-pollution
22091
22092 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22093         HAVE_TCGETATTR=1
22094 else
22095         HAVE_TCGETATTR=0
22096 fi
22097
22098 if test "x$ac_cv_header_stdint_h" = xyes ; then
22099         HAVE_STDINT_H=1
22100 else
22101         HAVE_STDINT_H=0
22102 fi
22103
22104 if test "x$ac_cv_header_termio_h" = xyes ; then
22105         HAVE_TERMIO_H=1
22106 else
22107         HAVE_TERMIO_H=0
22108 fi
22109
22110 if test "x$ac_cv_header_termios_h" = xyes ; then
22111         HAVE_TERMIOS_H=1
22112 else
22113         HAVE_TERMIOS_H=0
22114 fi
22115
22116 ################################################################################
22117 test "x$use_database" = xyes && \
22118 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22119
22120 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22121 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22122
22123 if test "x$enable_pc_files" = xyes ; then \
22124 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22125 MAKE_PC_FILES=
22126 else
22127 MAKE_PC_FILES="#"
22128 fi
22129
22130 # Extract the first word of "tic", so it can be a program name with args.
22131 set dummy tic; ac_word=$2
22132 echo "$as_me:22132: checking for $ac_word" >&5
22133 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22134 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22135   echo $ECHO_N "(cached) $ECHO_C" >&6
22136 else
22137   case $TIC_PATH in
22138   [\\/]* | ?:[\\/]*)
22139   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22140   ;;
22141   *)
22142   ac_save_IFS=$IFS; IFS=$ac_path_separator
22143 ac_dummy="$PATH:/usr/local/ncurses/bin"
22144 for ac_dir in $ac_dummy; do
22145   IFS=$ac_save_IFS
22146   test -z "$ac_dir" && ac_dir=.
22147   if $as_executable_p "$ac_dir/$ac_word"; then
22148    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22149    echo "$as_me:22149: found $ac_dir/$ac_word" >&5
22150    break
22151 fi
22152 done
22153
22154   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22155   ;;
22156 esac
22157 fi
22158 TIC_PATH=$ac_cv_path_TIC_PATH
22159
22160 if test -n "$TIC_PATH"; then
22161   echo "$as_me:22161: result: $TIC_PATH" >&5
22162 echo "${ECHO_T}$TIC_PATH" >&6
22163 else
22164   echo "$as_me:22164: result: no" >&5
22165 echo "${ECHO_T}no" >&6
22166 fi
22167
22168 if test -n "$FALLBACK_LIST"
22169 then
22170         if test "$TIC_PATH" = unknown
22171         then
22172                 { echo "$as_me:22172: WARNING: no tic program found for fallbacks" >&5
22173 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22174         fi
22175 fi
22176
22177 if test "x$cf_with_tests" != xno ; then
22178         MAKE_TESTS=
22179 else
22180         MAKE_TESTS="#"
22181 fi
22182
22183 ADAHTML_DIR=../../doc/html/ada
22184
22185 # these could be configurable, but are not currently
22186 PANEL_NAME=panel
22187 MENU_NAME=menu
22188 FORM_NAME=form
22189 CXX_NAME=ncurses++
22190
22191 # workaround for g++ versus Solaris (20131116)
22192 case $cf_cv_system_name in
22193 (solaris2*)
22194         case "x$CPPFLAGS" in
22195         (*-D_XOPEN_SOURCE_EXTENDED*)
22196                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22197
22198 echo "${as_me:-configure}:22198: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22199
22200                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22201                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22202                 ;;
22203         esac
22204         ;;
22205 esac
22206
22207 # Help to automatically enable the extended curses features when using either
22208 # the *-config or the ".pc" files by adding defines.
22209 echo "$as_me:22209: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22210 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22211 PKG_CFLAGS=
22212 for cf_loop1 in $CPPFLAGS_after_XOPEN
22213 do
22214         cf_found=no
22215         for cf_loop2 in $CPPFLAGS_before_XOPEN
22216         do
22217                 if test "x$cf_loop1" = "x$cf_loop2"
22218                 then
22219                         cf_found=yes
22220                         break
22221                 fi
22222         done
22223         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22224 done
22225 echo "$as_me:22225: result: $PKG_CFLAGS" >&5
22226 echo "${ECHO_T}$PKG_CFLAGS" >&6
22227
22228 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22229 case "x$NCURSES_OSPEED" in
22230 (*short*)
22231         cf_compatible=1
22232         ;;
22233 (*)
22234         cf_compatible=0
22235         ;;
22236 esac
22237
22238 cat >>confdefs.h <<EOF
22239 #define NCURSES_OSPEED_COMPAT $cf_compatible
22240 EOF
22241
22242 case "x$cf_cv_typeof_chtype" in
22243 (xshort|xint|xlong)
22244         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22245         ;;
22246 esac
22247
22248 case "x$cf_cv_typeof_mmask_t" in
22249 (xshort|xint|xlong)
22250         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22251         ;;
22252 esac
22253
22254 # substitute into misc/Makefile to suppress
22255 # (un)install.data from the
22256 # (un)install rules.
22257 if test "x$cf_with_db_install" = "xno"; then
22258         MISC_INSTALL_DATA=
22259         MISC_UNINSTALL_DATA=
22260 else
22261         MISC_INSTALL_DATA=install.data
22262         MISC_UNINSTALL_DATA=uninstall.data
22263 fi
22264
22265 SUB_SCRIPTS=
22266
22267 if test -n "$PACKAGE"
22268 then
22269         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22270         export PACKAGE
22271         echo "package: $PACKAGE"
22272 fi
22273
22274 UNALTERED_SYMS=
22275 cf_filter_syms=no
22276
22277 if test -n "$RESULTING_SYMS"
22278 then
22279         cf_filter_syms=$cf_dft_filter_syms
22280         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22281
22282 echo "${as_me:-configure}:22282: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22283
22284 fi
22285
22286 if test "x$WILDCARD_SYMS" = xno
22287 then
22288         cf_filter_syms=yes
22289 fi
22290
22291 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22292 if test $cf_filter_syms = yes
22293 then
22294         RESULTING_SYMS=resulting.map
22295 fi
22296
22297 if test "x$cross_compiling" = xyes ; then
22298         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22299 else
22300         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22301 fi
22302
22303 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"
22304 ac_config_commands="$ac_config_commands default"
22305 cat >confcache <<\_ACEOF
22306 # This file is a shell script that caches the results of configure
22307 # tests run on this system so they can be shared between configure
22308 # scripts and configure runs, see configure's option --config-cache.
22309 # It is not useful on other systems.  If it contains results you don't
22310 # want to keep, you may remove or edit it.
22311 #
22312 # config.status only pays attention to the cache file if you give it
22313 # the --recheck option to rerun configure.
22314 #
22315 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22316 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22317 # following values.
22318
22319 _ACEOF
22320
22321 # The following way of writing the cache mishandles newlines in values,
22322 # but we know of no workaround that is simple, portable, and efficient.
22323 # So, don't put newlines in cache variables' values.
22324 # Ultrix sh set writes to stderr and can't be redirected directly,
22325 # and sets the high bit in the cache file unless we assign to the vars.
22326 {
22327   (set) 2>&1 |
22328     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22329     *ac_space=\ *)
22330       # `set' does not quote correctly, so add quotes (double-quote
22331       # substitution turns \\\\ into \\, and sed turns \\ into \).
22332       sed -n \
22333         "s/'/'\\\\''/g;
22334           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22335       ;;
22336     *)
22337       # `set' quotes correctly as required by POSIX, so do not add quotes.
22338       sed -n \
22339         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22340       ;;
22341     esac;
22342 } |
22343   sed '
22344      t clear
22345      : clear
22346      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22347      t end
22348      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22349      : end' >>confcache
22350 if cmp -s $cache_file confcache; then :; else
22351   if test -w $cache_file; then
22352     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22353     cat confcache >$cache_file
22354   else
22355     echo "not updating unwritable cache $cache_file"
22356   fi
22357 fi
22358 rm -f confcache
22359
22360 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22361 # Let make expand exec_prefix.
22362 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22363
22364 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22365 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22366 # trailing colons and then remove the whole line if VPATH becomes empty
22367 # (actually we leave an empty line to preserve line numbers).
22368 if test "x$srcdir" = x.; then
22369   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22370 s/:*\$(srcdir):*/:/;
22371 s/:*\${srcdir}:*/:/;
22372 s/:*@srcdir@:*/:/;
22373 s/^\([^=]*=[    ]*\):*/\1/;
22374 s/:*$//;
22375 s/^[^=]*=[      ]*$//;
22376 }'
22377 fi
22378
22379 DEFS=-DHAVE_CONFIG_H
22380
22381 : ${CONFIG_STATUS=./config.status}
22382 ac_clean_files_save=$ac_clean_files
22383 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22384 { echo "$as_me:22384: creating $CONFIG_STATUS" >&5
22385 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22386 cat >$CONFIG_STATUS <<_ACEOF
22387 #! $SHELL
22388 # Generated automatically by configure.
22389 # Run this file to recreate the current configuration.
22390 # Compiler output produced by configure, useful for debugging
22391 # configure, is in config.log if it exists.
22392
22393 debug=false
22394 SHELL=\${CONFIG_SHELL-$SHELL}
22395 ac_cs_invocation="\$0 \$@"
22396
22397 _ACEOF
22398
22399 cat >>$CONFIG_STATUS <<\_ACEOF
22400 # Be Bourne compatible
22401 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22402   emulate sh
22403   NULLCMD=:
22404 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22405   set -o posix
22406 fi
22407
22408 # Name of the executable.
22409 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22410
22411 if expr a : '\(a\)' >/dev/null 2>&1; then
22412   as_expr=expr
22413 else
22414   as_expr=false
22415 fi
22416
22417 rm -f conf$$ conf$$.exe conf$$.file
22418 echo >conf$$.file
22419 if ln -s conf$$.file conf$$ 2>/dev/null; then
22420   # We could just check for DJGPP; but this test a) works b) is more generic
22421   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22422   if test -f conf$$.exe; then
22423     # Don't use ln at all; we don't have any links
22424     as_ln_s='cp -p'
22425   else
22426     as_ln_s='ln -s'
22427   fi
22428 elif ln conf$$.file conf$$ 2>/dev/null; then
22429   as_ln_s=ln
22430 else
22431   as_ln_s='cp -p'
22432 fi
22433 rm -f conf$$ conf$$.exe conf$$.file
22434
22435 as_executable_p="test -f"
22436
22437 # Support unset when possible.
22438 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22439   as_unset=unset
22440 else
22441   as_unset=false
22442 fi
22443
22444 # NLS nuisances.
22445 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22446 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22447 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22448 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22449 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22450 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22451 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22452 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22453
22454 # IFS
22455 # We need space, tab and new line, in precisely that order.
22456 as_nl='
22457 '
22458 IFS="   $as_nl"
22459
22460 # CDPATH.
22461 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22462
22463 exec 6>&1
22464
22465 _ACEOF
22466
22467 # Files that config.status was made for.
22468 if test -n "$ac_config_files"; then
22469   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22470 fi
22471
22472 if test -n "$ac_config_headers"; then
22473   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22474 fi
22475
22476 if test -n "$ac_config_links"; then
22477   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22478 fi
22479
22480 if test -n "$ac_config_commands"; then
22481   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22482 fi
22483
22484 cat >>$CONFIG_STATUS <<\EOF
22485
22486 ac_cs_usage="\
22487 \`$as_me' instantiates files from templates according to the
22488 current configuration.
22489
22490 Usage: $0 [OPTIONS] [FILE]...
22491
22492   -h, --help       print this help, then exit
22493   -V, --version    print version number, then exit
22494   -d, --debug      don't remove temporary files
22495       --recheck    update $as_me by reconfiguring in the same conditions
22496   --file=FILE[:TEMPLATE]
22497                    instantiate the configuration file FILE
22498   --header=FILE[:TEMPLATE]
22499                    instantiate the configuration header FILE
22500
22501 Configuration files:
22502 $config_files
22503
22504 Configuration headers:
22505 $config_headers
22506
22507 Configuration commands:
22508 $config_commands
22509
22510 Report bugs to <dickey@invisible-island.net>."
22511 EOF
22512
22513 cat >>$CONFIG_STATUS <<EOF
22514 ac_cs_version="\\
22515 config.status
22516 configured by $0, generated by GNU Autoconf 2.52.20141204,
22517   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22518
22519 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22520 Free Software Foundation, Inc.
22521 This config.status script is free software; the Free Software Foundation
22522 gives unlimited permission to copy, distribute and modify it."
22523 srcdir=$srcdir
22524 INSTALL="$INSTALL"
22525 EOF
22526
22527 cat >>$CONFIG_STATUS <<\EOF
22528 # If no file are specified by the user, then we need to provide default
22529 # value.  By we need to know if files were specified by the user.
22530 ac_need_defaults=:
22531 while test $# != 0
22532 do
22533   case $1 in
22534   --*=*)
22535     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22536     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22537     shift
22538     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22539     shift
22540     ;;
22541   -*);;
22542   *) # This is not an option, so the user has probably given explicit
22543      # arguments.
22544      ac_need_defaults=false;;
22545   esac
22546
22547   case $1 in
22548   # Handling of the options.
22549 EOF
22550 cat >>$CONFIG_STATUS <<EOF
22551   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22552     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22553     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22554 EOF
22555 cat >>$CONFIG_STATUS <<\EOF
22556   --version | --vers* | -V )
22557     echo "$ac_cs_version"; exit 0 ;;
22558   --he | --h)
22559     # Conflict between --help and --header
22560     { { echo "$as_me:22560: error: ambiguous option: $1
22561 Try \`$0 --help' for more information." >&5
22562 echo "$as_me: error: ambiguous option: $1
22563 Try \`$0 --help' for more information." >&2;}
22564    { (exit 1); exit 1; }; };;
22565   --help | --hel | -h )
22566     echo "$ac_cs_usage"; exit 0 ;;
22567   --debug | --d* | -d )
22568     debug=: ;;
22569   --file | --fil | --fi | --f )
22570     shift
22571     CONFIG_FILES="$CONFIG_FILES $1"
22572     ac_need_defaults=false;;
22573   --header | --heade | --head | --hea )
22574     shift
22575     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22576     ac_need_defaults=false;;
22577
22578   # This is an error.
22579   -*) { { echo "$as_me:22579: error: unrecognized option: $1
22580 Try \`$0 --help' for more information." >&5
22581 echo "$as_me: error: unrecognized option: $1
22582 Try \`$0 --help' for more information." >&2;}
22583    { (exit 1); exit 1; }; } ;;
22584
22585   *) ac_config_targets="$ac_config_targets $1" ;;
22586
22587   esac
22588   shift
22589 done
22590
22591 exec 5>>config.log
22592 cat >&5 << _ACEOF
22593
22594 ## ----------------------- ##
22595 ## Running config.status.  ##
22596 ## ----------------------- ##
22597
22598 This file was extended by $as_me 2.52.20141204, executed with
22599   CONFIG_FILES    = $CONFIG_FILES
22600   CONFIG_HEADERS  = $CONFIG_HEADERS
22601   CONFIG_LINKS    = $CONFIG_LINKS
22602   CONFIG_COMMANDS = $CONFIG_COMMANDS
22603   > $ac_cs_invocation
22604 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22605
22606 _ACEOF
22607 EOF
22608
22609 cat >>$CONFIG_STATUS <<EOF
22610 #
22611 # INIT-COMMANDS section.
22612 #
22613
22614 ### Special initialization commands, used to pass information from the
22615 ### configuration-run into config.status
22616
22617 AWK="$AWK"
22618 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22619 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22620 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22621 ECHO_LD="$ECHO_LD"
22622 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22623 LDCONFIG="$LDCONFIG"
22624 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22625 LIB_NAME="$LIB_NAME"
22626 LIB_PREFIX="$LIB_PREFIX"
22627 LIB_SUBSETS="$LIB_SUBSETS"
22628 LIB_SUFFIX="$LIB_SUFFIX"
22629 LIB_TRACING="$LIB_TRACING"
22630 LN_S="$LN_S"
22631 MAKE_TERMINFO="$MAKE_TERMINFO"
22632 NCURSES_MAJOR="$NCURSES_MAJOR"
22633 NCURSES_MINOR="$NCURSES_MINOR"
22634 NCURSES_OSPEED="$NCURSES_OSPEED"
22635 NCURSES_PATCH="$NCURSES_PATCH"
22636 SRC_SUBDIRS="$SRC_SUBDIRS"
22637 TERMINFO="$TERMINFO"
22638 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22639 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22640 TICS_NAME="$TICS_NAME"
22641 TIC_PATH="$TIC_PATH"
22642 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22643 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22644 TINFO_NAME="$TINFO_NAME"
22645 TINFO_SUFFIX="$TINFO_SUFFIX"
22646 UNALTERED_SYMS="$UNALTERED_SYMS"
22647 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22648 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22649 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22650 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22651 WILDCARD_SYMS="$WILDCARD_SYMS"
22652 WITH_CURSES_H="$with_curses_h"
22653 WITH_ECHO="${enable_echo:=yes}"
22654 WITH_OVERWRITE="$with_overwrite"
22655 cf_LIST_MODELS="$cf_list_models"
22656 cf_cv_abi_version="$cf_cv_abi_version"
22657 cf_cv_do_relink="$cf_cv_do_relink"
22658 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22659 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22660 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22661 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22662 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22663 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22664 cf_cv_rel_version="$cf_cv_rel_version"
22665 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22666 cf_cv_shared_soname='$cf_cv_shared_soname'
22667 cf_cv_shlib_version="$cf_cv_shlib_version"
22668 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22669 cf_cv_system_name="$cf_cv_system_name"
22670 cf_cv_term_driver="$with_term_driver"
22671 cf_with_ada="$cf_with_ada"
22672 cf_with_cxx_binding="$cf_with_cxx_binding"
22673 cf_with_db_install="$cf_with_db_install"
22674 cf_with_manpages="$cf_with_manpages"
22675 cf_with_tests="$cf_with_tests"
22676 host="$host"
22677 target="$target"
22678 with_shared_cxx="$with_shared_cxx"
22679
22680 EOF
22681
22682 cat >>$CONFIG_STATUS <<\EOF
22683 for ac_config_target in $ac_config_targets
22684 do
22685   case "$ac_config_target" in
22686   # Handling of arguments.
22687   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22688   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22689   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22690   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22691   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22692   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22693   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22694   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22695   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22696   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22697   *) { { echo "$as_me:22697: error: invalid argument: $ac_config_target" >&5
22698 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22699    { (exit 1); exit 1; }; };;
22700   esac
22701 done
22702
22703 # If the user did not use the arguments to specify the items to instantiate,
22704 # then the envvar interface is used.  Set only those that are not.
22705 # We use the long form for the default assignment because of an extremely
22706 # bizarre bug on SunOS 4.1.3.
22707 if $ac_need_defaults; then
22708   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22709   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22710   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22711 fi
22712
22713 # Create a temporary directory, and hook for its removal unless debugging.
22714 $debug ||
22715 {
22716   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22717   trap '{ (exit 1); exit 1; }' 1 2 13 15
22718 }
22719
22720 # Create a (secure) tmp directory for tmp files.
22721 : ${TMPDIR=/tmp}
22722 {
22723   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22724   test -n "$tmp" && test -d "$tmp"
22725 }  ||
22726 {
22727   tmp=$TMPDIR/cs$$-$RANDOM
22728   (umask 077 && mkdir $tmp)
22729 } ||
22730 {
22731    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22732    { (exit 1); exit 1; }
22733 }
22734
22735 EOF
22736
22737 cat >>$CONFIG_STATUS <<EOF
22738
22739 #
22740 # CONFIG_FILES section.
22741 #
22742
22743 # No need to generate the scripts if there are no CONFIG_FILES.
22744 # This happens for instance when ./config.status config.h
22745 if test -n "\$CONFIG_FILES"; then
22746   # Protect against being on the right side of a sed subst in config.status.
22747   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22748    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22749 s,@SHELL@,$SHELL,;t t
22750 s,@exec_prefix@,$exec_prefix,;t t
22751 s,@prefix@,$prefix,;t t
22752 s,@program_transform_name@,$program_transform_name,;t t
22753 s,@bindir@,$bindir,;t t
22754 s,@sbindir@,$sbindir,;t t
22755 s,@libexecdir@,$libexecdir,;t t
22756 s,@datarootdir@,$datarootdir,;t t
22757 s,@datadir@,$datadir,;t t
22758 s,@sysconfdir@,$sysconfdir,;t t
22759 s,@sharedstatedir@,$sharedstatedir,;t t
22760 s,@localstatedir@,$localstatedir,;t t
22761 s,@libdir@,$libdir,;t t
22762 s,@includedir@,$includedir,;t t
22763 s,@oldincludedir@,$oldincludedir,;t t
22764 s,@infodir@,$infodir,;t t
22765 s,@mandir@,$mandir,;t t
22766 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22767 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22768 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22769 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22770 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22771 s,@build_alias@,$build_alias,;t t
22772 s,@host_alias@,$host_alias,;t t
22773 s,@target_alias@,$target_alias,;t t
22774 s,@ECHO_C@,$ECHO_C,;t t
22775 s,@ECHO_N@,$ECHO_N,;t t
22776 s,@ECHO_T@,$ECHO_T,;t t
22777 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22778 s,@DEFS@,$DEFS,;t t
22779 s,@LIBS@,$LIBS,;t t
22780 s,@top_builddir@,$top_builddir,;t t
22781 s,@EGREP@,$EGREP,;t t
22782 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22783 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22784 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22785 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22786 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22787 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22788 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22789 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22790 s,@VERSION@,$VERSION,;t t
22791 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22792 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22793 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22794 s,@PACKAGE@,$PACKAGE,;t t
22795 s,@build@,$build,;t t
22796 s,@build_cpu@,$build_cpu,;t t
22797 s,@build_vendor@,$build_vendor,;t t
22798 s,@build_os@,$build_os,;t t
22799 s,@host@,$host,;t t
22800 s,@host_cpu@,$host_cpu,;t t
22801 s,@host_vendor@,$host_vendor,;t t
22802 s,@host_os@,$host_os,;t t
22803 s,@target@,$target,;t t
22804 s,@target_cpu@,$target_cpu,;t t
22805 s,@target_vendor@,$target_vendor,;t t
22806 s,@target_os@,$target_os,;t t
22807 s,@CC@,$CC,;t t
22808 s,@CFLAGS@,$CFLAGS,;t t
22809 s,@LDFLAGS@,$LDFLAGS,;t t
22810 s,@CPPFLAGS@,$CPPFLAGS,;t t
22811 s,@ac_ct_CC@,$ac_ct_CC,;t t
22812 s,@EXEEXT@,$EXEEXT,;t t
22813 s,@OBJEXT@,$OBJEXT,;t t
22814 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22815 s,@CPP@,$CPP,;t t
22816 s,@LDCONFIG@,$LDCONFIG,;t t
22817 s,@CXX@,$CXX,;t t
22818 s,@CXXFLAGS@,$CXXFLAGS,;t t
22819 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22820 s,@AWK@,$AWK,;t t
22821 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22822 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22823 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22824 s,@LINT@,$LINT,;t t
22825 s,@LINT_OPTS@,$LINT_OPTS,;t t
22826 s,@LN_S@,$LN_S,;t t
22827 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22828 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22829 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22830 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22831 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22832 s,@SET_MAKE@,$SET_MAKE,;t t
22833 s,@CTAGS@,$CTAGS,;t t
22834 s,@ETAGS@,$ETAGS,;t t
22835 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22836 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22837 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22838 s,@RANLIB@,$RANLIB,;t t
22839 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22840 s,@LD@,$LD,;t t
22841 s,@ac_ct_LD@,$ac_ct_LD,;t t
22842 s,@AR@,$AR,;t t
22843 s,@ac_ct_AR@,$ac_ct_AR,;t t
22844 s,@NM@,$NM,;t t
22845 s,@ac_ct_NM@,$ac_ct_NM,;t t
22846 s,@ARFLAGS@,$ARFLAGS,;t t
22847 s,@DESTDIR@,$DESTDIR,;t t
22848 s,@BUILD_CC@,$BUILD_CC,;t t
22849 s,@BUILD_CPP@,$BUILD_CPP,;t t
22850 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22851 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22852 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22853 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22854 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22855 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22856 s,@cf_list_models@,$cf_list_models,;t t
22857 s,@ABI_VERSION@,$ABI_VERSION,;t t
22858 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22859 s,@LIBTOOL@,$LIBTOOL,;t t
22860 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22861 s,@LT_UNDEF@,$LT_UNDEF,;t t
22862 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22863 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22864 s,@LIB_CREATE@,$LIB_CREATE,;t t
22865 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22866 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22867 s,@LIB_PREP@,$LIB_PREP,;t t
22868 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22869 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22870 s,@LIB_LINK@,$LIB_LINK,;t t
22871 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22872 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22873 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22874 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22875 s,@TICS_NAME@,$TICS_NAME,;t t
22876 s,@TINFO_NAME@,$TINFO_NAME,;t t
22877 s,@LIB_NAME@,$LIB_NAME,;t t
22878 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22879 s,@CC_G_OPT@,$CC_G_OPT,;t t
22880 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22881 s,@LD_MODEL@,$LD_MODEL,;t t
22882 s,@shlibdir@,$shlibdir,;t t
22883 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22884 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22885 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22886 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22887 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22888 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22889 s,@LINK_PROGS@,$LINK_PROGS,;t t
22890 s,@LINK_TESTS@,$LINK_TESTS,;t t
22891 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22892 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22893 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22894 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22895 s,@RPATH_LIST@,$RPATH_LIST,;t t
22896 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22897 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22898 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22899 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22900 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22901 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
22902 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22903 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22904 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22905 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22906 s,@XTERM_KBS@,$XTERM_KBS,;t t
22907 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22908 s,@TERMINFO@,$TERMINFO,;t t
22909 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22910 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22911 s,@TERMPATH@,$TERMPATH,;t t
22912 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22913 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22914 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22915 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22916 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22917 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22918 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22919 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22920 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22921 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22922 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22923 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22924 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22925 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22926 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22927 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22928 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22929 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22930 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22931 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22932 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22933 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22934 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22935 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22936 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22937 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22938 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22939 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22940 s,@PTHREAD@,$PTHREAD,;t t
22941 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22942 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22943 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22944 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22945 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22946 s,@ECHO_LT@,$ECHO_LT,;t t
22947 s,@ECHO_LD@,$ECHO_LD,;t t
22948 s,@RULE_CC@,$RULE_CC,;t t
22949 s,@SHOW_CC@,$SHOW_CC,;t t
22950 s,@ECHO_CC@,$ECHO_CC,;t t
22951 s,@ECHO_LINK@,$ECHO_LINK,;t t
22952 s,@ADAFLAGS@,$ADAFLAGS,;t t
22953 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22954 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22955 s,@ADA_TRACE@,$ADA_TRACE,;t t
22956 s,@MATH_LIB@,$MATH_LIB,;t t
22957 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22958 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22959 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22960 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22961 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22962 s,@TEST_LIBS@,$TEST_LIBS,;t t
22963 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22964 s,@CXXCPP@,$CXXCPP,;t t
22965 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22966 s,@CXX_AR@,$CXX_AR,;t t
22967 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22968 s,@CXXLIBS@,$CXXLIBS,;t t
22969 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22970 s,@gnat_exists@,$gnat_exists,;t t
22971 s,@M4_exists@,$M4_exists,;t t
22972 s,@cf_ada_make@,$cf_ada_make,;t t
22973 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22974 s,@cf_compile_generics@,$cf_compile_generics,;t t
22975 s,@cf_generic_objects@,$cf_generic_objects,;t t
22976 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22977 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22978 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22979 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22980 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22981 s,@cf_ada_package@,$cf_ada_package,;t t
22982 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22983 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22984 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22985 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22986 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22987 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22988 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22989 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22990 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22991 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
22992 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
22993 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
22994 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22995 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22996 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22997 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22998 s,@TICS_LIBS@,$TICS_LIBS,;t t
22999 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23000 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23001 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23002 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23003 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23004 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23005 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23006 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23007 s,@includesubdir@,$includesubdir,;t t
23008 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23009 s,@TICS_LIST@,$TICS_LIST,;t t
23010 s,@TINFO_LIST@,$TINFO_LIST,;t t
23011 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23012 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23013 s,@TEST_ARGS@,$TEST_ARGS,;t t
23014 s,@TEST_DEPS@,$TEST_DEPS,;t t
23015 s,@TEST_ARG2@,$TEST_ARG2,;t t
23016 s,@TEST_DEP2@,$TEST_DEP2,;t t
23017 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23018 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23019 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23020 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23021 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23022 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23023 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23024 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23025 s,@cross_compiling@,$cross_compiling,;t t
23026 s,@TIC_PATH@,$TIC_PATH,;t t
23027 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23028 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23029 s,@PANEL_NAME@,$PANEL_NAME,;t t
23030 s,@MENU_NAME@,$MENU_NAME,;t t
23031 s,@FORM_NAME@,$FORM_NAME,;t t
23032 s,@CXX_NAME@,$CXX_NAME,;t t
23033 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23034 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23035 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23036 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23037 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23038 CEOF
23039
23040 EOF
23041
23042   cat >>$CONFIG_STATUS <<\EOF
23043   # Split the substitutions into bite-sized pieces for seds with
23044   # small command number limits, like on Digital OSF/1 and HP-UX.
23045   ac_max_sed_lines=48
23046   ac_sed_frag=1 # Number of current file.
23047   ac_beg=1 # First line for current file.
23048   ac_end=$ac_max_sed_lines # Line after last line for current file.
23049   ac_more_lines=:
23050   ac_sed_cmds=
23051   while $ac_more_lines; do
23052     if test $ac_beg -gt 1; then
23053       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23054     else
23055       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23056     fi
23057     if test ! -s $tmp/subs.frag; then
23058       ac_more_lines=false
23059     else
23060       # The purpose of the label and of the branching condition is to
23061       # speed up the sed processing (if there are no `@' at all, there
23062       # is no need to browse any of the substitutions).
23063       # These are the two extra sed commands mentioned above.
23064       (echo ':t
23065   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23066       if test -z "$ac_sed_cmds"; then
23067         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23068       else
23069         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23070       fi
23071       ac_sed_frag=`expr $ac_sed_frag + 1`
23072       ac_beg=$ac_end
23073       ac_end=`expr $ac_end + $ac_max_sed_lines`
23074     fi
23075   done
23076   if test -z "$ac_sed_cmds"; then
23077     ac_sed_cmds=cat
23078   fi
23079 fi # test -n "$CONFIG_FILES"
23080
23081 EOF
23082 cat >>$CONFIG_STATUS <<\EOF
23083 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23084   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23085   case $ac_file in
23086   - | *:- | *:-:* ) # input from stdin
23087         cat >$tmp/stdin
23088         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23089         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23090   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23091         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23092   * )   ac_file_in=$ac_file.in ;;
23093   esac
23094
23095   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23096   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23097          X"$ac_file" : 'X\(//\)[^/]' \| \
23098          X"$ac_file" : 'X\(//\)$' \| \
23099          X"$ac_file" : 'X\(/\)' \| \
23100          .     : '\(.\)' 2>/dev/null ||
23101 echo X"$ac_file" |
23102     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23103           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23104           /^X\(\/\/\)$/{ s//\1/; q; }
23105           /^X\(\/\).*/{ s//\1/; q; }
23106           s/.*/./; q'`
23107   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23108     { case "$ac_dir" in
23109   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23110   *)                      as_incr_dir=.;;
23111 esac
23112 as_dummy="$ac_dir"
23113 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23114   case $as_mkdir_dir in
23115     # Skip DOS drivespec
23116     ?:) as_incr_dir=$as_mkdir_dir ;;
23117     *)
23118       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23119       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23120     ;;
23121   esac
23122 done; }
23123
23124     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23125     # A "../" for each directory in $ac_dir_suffix.
23126     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23127   else
23128     ac_dir_suffix= ac_dots=
23129   fi
23130
23131   case $srcdir in
23132   .)  ac_srcdir=.
23133       if test -z "$ac_dots"; then
23134          ac_top_srcdir=.
23135       else
23136          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23137       fi ;;
23138   [\\/]* | ?:[\\/]* )
23139       ac_srcdir=$srcdir$ac_dir_suffix;
23140       ac_top_srcdir=$srcdir ;;
23141   *) # Relative path.
23142     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23143     ac_top_srcdir=$ac_dots$srcdir ;;
23144   esac
23145
23146   case $INSTALL in
23147   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23148   *) ac_INSTALL=$ac_dots$INSTALL ;;
23149   esac
23150
23151   if test x"$ac_file" != x-; then
23152     { echo "$as_me:23152: creating $ac_file" >&5
23153 echo "$as_me: creating $ac_file" >&6;}
23154     rm -f "$ac_file"
23155   fi
23156   # Let's still pretend it is `configure' which instantiates (i.e., don't
23157   # use $as_me), people would be surprised to read:
23158   #    /* config.h.  Generated automatically by config.status.  */
23159   configure_input="Generated automatically from `echo $ac_file_in |
23160                                                  sed 's,.*/,,'` by configure."
23161
23162   # First look for the input files in the build tree, otherwise in the
23163   # src tree.
23164   ac_file_inputs=`IFS=:
23165     for f in $ac_file_in; do
23166       case $f in
23167       -) echo $tmp/stdin ;;
23168       [\\/$]*)
23169          # Absolute (can't be DOS-style, as IFS=:)
23170          test -f "$f" || { { echo "$as_me:23170: error: cannot find input file: $f" >&5
23171 echo "$as_me: error: cannot find input file: $f" >&2;}
23172    { (exit 1); exit 1; }; }
23173          echo $f;;
23174       *) # Relative
23175          if test -f "$f"; then
23176            # Build tree
23177            echo $f
23178          elif test -f "$srcdir/$f"; then
23179            # Source tree
23180            echo $srcdir/$f
23181          else
23182            # /dev/null tree
23183            { { echo "$as_me:23183: error: cannot find input file: $f" >&5
23184 echo "$as_me: error: cannot find input file: $f" >&2;}
23185    { (exit 1); exit 1; }; }
23186          fi;;
23187       esac
23188     done` || { (exit 1); exit 1; }
23189 EOF
23190 cat >>$CONFIG_STATUS <<\EOF
23191   ac_warn_datarootdir=no
23192   if test x"$ac_file" != x-; then
23193     for ac_item in $ac_file_inputs
23194     do
23195       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23196       if test -n "$ac_seen"; then
23197         ac_used=`grep '@datarootdir@' $ac_item`
23198         if test -z "$ac_used"; then
23199           { echo "$as_me:23199: WARNING: datarootdir was used implicitly but not set:
23200 $ac_seen" >&5
23201 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23202 $ac_seen" >&2;}
23203           ac_warn_datarootdir=yes
23204         fi
23205       fi
23206       ac_seen=`grep '${datarootdir}' $ac_item`
23207       if test -n "$ac_seen"; then
23208         { echo "$as_me:23208: WARNING: datarootdir was used explicitly but not set:
23209 $ac_seen" >&5
23210 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23211 $ac_seen" >&2;}
23212         ac_warn_datarootdir=yes
23213       fi
23214     done
23215   fi
23216
23217 if test "x$ac_warn_datarootdir" = xyes; then
23218   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23219 fi
23220
23221 EOF
23222 cat >>$CONFIG_STATUS <<EOF
23223   sed "$ac_vpsub
23224 $extrasub
23225 EOF
23226 cat >>$CONFIG_STATUS <<\EOF
23227 :t
23228 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23229 s,@configure_input@,$configure_input,;t t
23230 s,@srcdir@,$ac_srcdir,;t t
23231 s,@top_srcdir@,$ac_top_srcdir,;t t
23232 s,@INSTALL@,$ac_INSTALL,;t t
23233 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23234   rm -f $tmp/stdin
23235   if test x"$ac_file" != x-; then
23236     cp $tmp/out $ac_file
23237
23238     for ac_name in prefix exec_prefix datarootdir
23239     do
23240         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23241         if test -n "$ac_seen"; then
23242             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23243             if test -z "$ac_init"; then
23244               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23245               { echo "$as_me:23245: WARNING: Variable $ac_name is used but was not set:
23246 $ac_seen" >&5
23247 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23248 $ac_seen" >&2;}
23249             fi
23250         fi
23251     done
23252     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23253     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23254     if test -s $tmp/out; then
23255       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23256       { echo "$as_me:23256: WARNING: Some variables may not be substituted:
23257 $ac_seen" >&5
23258 echo "$as_me: WARNING: Some variables may not be substituted:
23259 $ac_seen" >&2;}
23260     fi
23261   else
23262     cat $tmp/out
23263   fi
23264   rm -f $tmp/out
23265
23266 done
23267 EOF
23268 cat >>$CONFIG_STATUS <<\EOF
23269
23270 #
23271 # CONFIG_HEADER section.
23272 #
23273
23274 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23275 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23276 #
23277 # ac_d sets the value in "#define NAME VALUE" lines.
23278 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23279 ac_dB='[        ].*$,\1#\2'
23280 ac_dC=' '
23281 ac_dD=',;t'
23282 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23283 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23284 ac_iB='\([      ]\),\1#\2define\3'
23285 ac_iC=' '
23286 ac_iD='\4,;t'
23287 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23288 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23289 ac_uB='$,\1#\2define\3'
23290 ac_uC=' '
23291 ac_uD=',;t'
23292
23293 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23294   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23295   case $ac_file in
23296   - | *:- | *:-:* ) # input from stdin
23297         cat >$tmp/stdin
23298         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23299         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23300   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23301         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23302   * )   ac_file_in=$ac_file.in ;;
23303   esac
23304
23305   test x"$ac_file" != x- && { echo "$as_me:23305: creating $ac_file" >&5
23306 echo "$as_me: creating $ac_file" >&6;}
23307
23308   # First look for the input files in the build tree, otherwise in the
23309   # src tree.
23310   ac_file_inputs=`IFS=:
23311     for f in $ac_file_in; do
23312       case $f in
23313       -) echo $tmp/stdin ;;
23314       [\\/$]*)
23315          # Absolute (can't be DOS-style, as IFS=:)
23316          test -f "$f" || { { echo "$as_me:23316: error: cannot find input file: $f" >&5
23317 echo "$as_me: error: cannot find input file: $f" >&2;}
23318    { (exit 1); exit 1; }; }
23319          echo $f;;
23320       *) # Relative
23321          if test -f "$f"; then
23322            # Build tree
23323            echo $f
23324          elif test -f "$srcdir/$f"; then
23325            # Source tree
23326            echo $srcdir/$f
23327          else
23328            # /dev/null tree
23329            { { echo "$as_me:23329: error: cannot find input file: $f" >&5
23330 echo "$as_me: error: cannot find input file: $f" >&2;}
23331    { (exit 1); exit 1; }; }
23332          fi;;
23333       esac
23334     done` || { (exit 1); exit 1; }
23335   # Remove the trailing spaces.
23336   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23337
23338 EOF
23339
23340 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23341 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23342 # be either 'cat' or 'sort'.
23343 cat confdefs.h | uniq >conftest.vals
23344
23345 # Break up conftest.vals because some shells have a limit on
23346 # the size of here documents, and old seds have small limits too.
23347
23348 rm -f conftest.tail
23349 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23350 while grep . conftest.vals >/dev/null
23351 do
23352   # Write chunks of a limited-size here document to conftest.frag.
23353   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23354   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23355   echo 'CEOF' >> $CONFIG_STATUS
23356   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23357   rm -f conftest.vals
23358   mv conftest.tail conftest.vals
23359 done
23360 rm -f conftest.vals
23361
23362 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23363 # marker @DEFS@.
23364 echo '  cat >> conftest.edit <<CEOF
23365 /@DEFS@/r conftest.frag
23366 /@DEFS@/d
23367 CEOF
23368 sed -f conftest.edit $tmp/in > $tmp/out
23369 rm -f $tmp/in
23370 mv $tmp/out $tmp/in
23371 rm -f conftest.edit conftest.frag
23372 ' >> $CONFIG_STATUS
23373
23374 cat >>$CONFIG_STATUS <<\EOF
23375   # Let's still pretend it is `configure' which instantiates (i.e., don't
23376   # use $as_me), people would be surprised to read:
23377   #    /* config.h.  Generated automatically by config.status.  */
23378   if test x"$ac_file" = x-; then
23379     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23380   else
23381     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23382   fi
23383   cat $tmp/in >>$tmp/config.h
23384   rm -f $tmp/in
23385   if test x"$ac_file" != x-; then
23386     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23387       { echo "$as_me:23387: $ac_file is unchanged" >&5
23388 echo "$as_me: $ac_file is unchanged" >&6;}
23389     else
23390       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23391          X"$ac_file" : 'X\(//\)[^/]' \| \
23392          X"$ac_file" : 'X\(//\)$' \| \
23393          X"$ac_file" : 'X\(/\)' \| \
23394          .     : '\(.\)' 2>/dev/null ||
23395 echo X"$ac_file" |
23396     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23397           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23398           /^X\(\/\/\)$/{ s//\1/; q; }
23399           /^X\(\/\).*/{ s//\1/; q; }
23400           s/.*/./; q'`
23401       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23402         { case "$ac_dir" in
23403   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23404   *)                      as_incr_dir=.;;
23405 esac
23406 as_dummy="$ac_dir"
23407 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23408   case $as_mkdir_dir in
23409     # Skip DOS drivespec
23410     ?:) as_incr_dir=$as_mkdir_dir ;;
23411     *)
23412       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23413       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23414     ;;
23415   esac
23416 done; }
23417
23418       fi
23419       rm -f $ac_file
23420       mv $tmp/config.h $ac_file
23421     fi
23422   else
23423     cat $tmp/config.h
23424     rm -f $tmp/config.h
23425   fi
23426 done
23427 EOF
23428 cat >>$CONFIG_STATUS <<\EOF
23429 #
23430 # CONFIG_COMMANDS section.
23431 #
23432 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23433   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23434   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23435
23436   case $ac_dest in
23437     default )
23438 if test "x$cf_with_tests" != xno ; then
23439
23440 for cf_dir in test
23441 do
23442         if test ! -d $srcdir/$cf_dir; then
23443                 continue
23444         elif test -f $srcdir/$cf_dir/programs; then
23445                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23446         fi
23447 done
23448
23449 fi
23450
23451 cf_prefix=$LIB_PREFIX
23452
23453 case $cf_cv_shlib_version in
23454 (cygdll|msysdll|mingw)
23455         TINFO_NAME=$TINFO_ARG_SUFFIX
23456         TINFO_SUFFIX=.dll
23457         ;;
23458 esac
23459
23460 if test -n "$TINFO_SUFFIX" ; then
23461         case $TINFO_SUFFIX in
23462         (tw*)
23463                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23464                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23465                 ;;
23466         (t*)
23467                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23468                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23469                 ;;
23470         (w*)
23471                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23472                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23473                 ;;
23474         esac
23475 fi
23476
23477 for cf_dir in $SRC_SUBDIRS
23478 do
23479         if test ! -d $srcdir/$cf_dir ; then
23480                 continue
23481         elif test -f $srcdir/$cf_dir/modules; then
23482
23483                 SHARED_LIB=
23484                 Libs_To_Make=
23485
23486                 cf_sed_options=
23487                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23488                 then
23489                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23490                         cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
23491                 fi
23492
23493                 if test "x$WILDCARD_SYMS" = xno
23494                 then
23495                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23496                 fi
23497
23498                 if test "x$cf_sed_options" != "x"
23499                 then
23500                         cat >>$cf_dir/Makefile <<CF_EOF
23501
23502 # Generated by CF_LIB_RULES
23503 resulting.map: $UNALTERED_SYMS
23504         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23505
23506 clean::
23507         rm -f resulting.map
23508 CF_EOF
23509                 fi
23510
23511                 for cf_item in $cf_LIST_MODELS
23512                 do
23513
23514         case X$cf_item in
23515         (Xlibtool)
23516                 cf_suffix='.la'
23517                 cf_depsuf=$cf_suffix
23518                 ;;
23519         (Xdebug)
23520                 cf_suffix='_g.a'
23521                 cf_depsuf=$cf_suffix
23522                 ;;
23523         (Xprofile)
23524                 cf_suffix='_p.a'
23525                 cf_depsuf=$cf_suffix
23526                 ;;
23527         (Xshared)
23528                 case $cf_cv_system_name in
23529                 (aix[5-7]*)
23530                         cf_suffix='.so'
23531                         cf_depsuf=$cf_suffix
23532                         ;;
23533                 (cygwin*|msys*|mingw*)
23534                         cf_suffix='.dll'
23535                         cf_depsuf='.dll.a'
23536                         ;;
23537                 (darwin*)
23538                         cf_suffix='.dylib'
23539                         cf_depsuf=$cf_suffix
23540                         ;;
23541                 (hpux*)
23542                         case $target in
23543                         (ia64*)
23544                                 cf_suffix='.so'
23545                                 cf_depsuf=$cf_suffix
23546                                 ;;
23547                         (*)
23548                                 cf_suffix='.sl'
23549                                 cf_depsuf=$cf_suffix
23550                                 ;;
23551                         esac
23552                         ;;
23553                 (*)
23554                         cf_suffix='.so'
23555                         cf_depsuf=$cf_suffix
23556                         ;;
23557                 esac
23558                 ;;
23559         (*)
23560                 cf_suffix='.a'
23561                 cf_depsuf=$cf_suffix
23562                 ;;
23563         esac
23564         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23565         then
23566                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23567                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23568         fi
23569
23570                         cf_libname=$cf_dir
23571                         test "$cf_dir" = c++ && cf_libname=ncurses++
23572                         if test $cf_item = shared ; then
23573                                 if test -n "${LIB_SUFFIX}"
23574                                 then
23575                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23576                                 else
23577                                         cf_shared_suffix="$cf_suffix"
23578                                 fi
23579                                 if test "$cf_cv_do_symlinks" = yes ; then
23580                                         cf_version_name=
23581
23582                                         case "$cf_cv_shlib_version" in
23583                                         (rel)
23584                                                 cf_version_name=REL_VERSION
23585                                                 ;;
23586                                         (abi)
23587                                                 cf_version_name=ABI_VERSION
23588                                                 ;;
23589                                         esac
23590
23591                                         if test -n "$cf_version_name"
23592                                         then
23593                                                 case "$cf_cv_system_name" in
23594                                                 (darwin*)
23595                                                         # "w", etc?
23596                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23597                                                         ;;
23598                                                 (*)
23599                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23600                                                         ;;
23601                                                 esac
23602                                         fi
23603                                         if test -n "${USE_LIB_SUFFIX}"
23604                                         then
23605                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23606                                         else
23607                                                 cf_shared_suffix="$cf_suffix"
23608                                         fi
23609                                 fi
23610                                 # cygwin needs import library, and has unique naming convention
23611                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23612                                 # use 'cyg' prefix for shared lib.
23613                                 case $cf_cv_shlib_version in
23614                                 (cygdll)
23615                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23616                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23617                                         ;;
23618                                 (msysdll)
23619                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23620                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23621                                         ;;
23622                                 (mingw)
23623                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23624                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23625                                         ;;
23626                                 (*)
23627                                         cf_add_lib=
23628                                         ;;
23629                                 esac
23630                                 if test -n "$cf_add_lib"
23631                                 then
23632                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23633                                         continue
23634                                 fi
23635                         fi
23636                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23637                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23638                 done
23639
23640                 if test $cf_dir = ncurses ; then
23641                         cf_subsets="$LIB_SUBSETS"
23642                         cf_r_parts="$cf_subsets"
23643                         cf_liblist="$Libs_To_Make"
23644
23645                         while test -n "$cf_r_parts"
23646                         do
23647                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23648                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23649                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23650                                         cf_add_lib=
23651                                         case $cf_l_parts in
23652                                         (*termlib*)
23653                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23654                                                 ;;
23655                                         (*ticlib*)
23656                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23657                                                 ;;
23658                                         (*)
23659                                                 break
23660                                                 ;;
23661                                         esac
23662                                         if test -n "$cf_add_lib"; then
23663                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23664                                         fi
23665                                 else
23666                                         break
23667                                 fi
23668                         done
23669                 else
23670                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23671                 fi
23672
23673                 if test $cf_dir = c++; then
23674                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23675                                 cf_list=
23676                                 for cf_item in $Libs_To_Make
23677                                 do
23678                                         case $cf_item in
23679                                         (*.a)
23680                                                 ;;
23681                                         (*)
23682                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23683                                                 ;;
23684                                         esac
23685                                         for cf_test in $cf_list
23686                                         do
23687                                                 if test "$cf_test" = "$cf_item"
23688                                                 then
23689                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23690                                                         cf_item=
23691                                                         break
23692                                                 fi
23693                                         done
23694                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23695                                 done
23696                                 Libs_To_Make="$cf_list"
23697                         fi
23698                 fi
23699
23700                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23701                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23702                         $cf_dir/Makefile >$cf_dir/Makefile.out
23703                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23704
23705                 $AWK -f $srcdir/mk-0th.awk \
23706                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23707                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23708
23709                 for cf_subset in $cf_subsets
23710                 do
23711                         cf_subdirs=
23712                         for cf_item in $cf_LIST_MODELS
23713                         do
23714
23715                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23716
23717 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23718
23719                         CXX_MODEL=$cf_ITEM
23720                         if test "$CXX_MODEL" = SHARED; then
23721                                 case $cf_cv_shlib_version in
23722                                 (cygdll|msysdll|mingw)
23723                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23724
23725 echo "${as_me:-configure}:23725: testing overriding CXX_MODEL to SHARED ..." 1>&5
23726
23727                                         with_shared_cxx=yes
23728                                         ;;
23729                                 (*)
23730                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23731                                         ;;
23732                                 esac
23733                         fi
23734
23735         case X$cf_item in
23736         (Xlibtool)
23737                 cf_suffix='.la'
23738                 cf_depsuf=$cf_suffix
23739                 ;;
23740         (Xdebug)
23741                 cf_suffix='_g.a'
23742                 cf_depsuf=$cf_suffix
23743                 ;;
23744         (Xprofile)
23745                 cf_suffix='_p.a'
23746                 cf_depsuf=$cf_suffix
23747                 ;;
23748         (Xshared)
23749                 case $cf_cv_system_name in
23750                 (aix[5-7]*)
23751                         cf_suffix='.so'
23752                         cf_depsuf=$cf_suffix
23753                         ;;
23754                 (cygwin*|msys*|mingw*)
23755                         cf_suffix='.dll'
23756                         cf_depsuf='.dll.a'
23757                         ;;
23758                 (darwin*)
23759                         cf_suffix='.dylib'
23760                         cf_depsuf=$cf_suffix
23761                         ;;
23762                 (hpux*)
23763                         case $target in
23764                         (ia64*)
23765                                 cf_suffix='.so'
23766                                 cf_depsuf=$cf_suffix
23767                                 ;;
23768                         (*)
23769                                 cf_suffix='.sl'
23770                                 cf_depsuf=$cf_suffix
23771                                 ;;
23772                         esac
23773                         ;;
23774                 (*)
23775                         cf_suffix='.so'
23776                         cf_depsuf=$cf_suffix
23777                         ;;
23778                 esac
23779                 ;;
23780         (*)
23781                 cf_suffix='.a'
23782                 cf_depsuf=$cf_suffix
23783                 ;;
23784         esac
23785         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23786         then
23787                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23788                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23789         fi
23790
23791         case $cf_item in
23792         (libtool) cf_subdir='obj_lo'  ;;
23793         (normal)  cf_subdir='objects' ;;
23794         (debug)   cf_subdir='obj_g' ;;
23795         (profile) cf_subdir='obj_p' ;;
23796         (shared)
23797                 case $cf_cv_system_name in
23798                 (cygwin|msys)
23799                         cf_subdir='objects' ;;
23800                 (*)
23801                         cf_subdir='obj_s' ;;
23802                 esac
23803         esac
23804
23805                         # Test for case where we build libtinfo with a different name.
23806                         cf_libname=$cf_dir
23807                         if test $cf_dir = ncurses ; then
23808                                 case $cf_subset in
23809                                 (*base*)
23810                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23811                                         ;;
23812                                 (*termlib*)
23813                                         cf_libname=$TINFO_LIB_SUFFIX
23814                                         ;;
23815                                 (ticlib*)
23816                                         cf_libname=$TICS_LIB_SUFFIX
23817                                         ;;
23818                                 esac
23819                         elif test $cf_dir = c++ ; then
23820                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23821                         else
23822                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23823                         fi
23824                         if test -n "${USE_ARG_SUFFIX}" ; then
23825                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23826                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23827                         fi
23828
23829                         # These dependencies really are for development, not
23830                         # builds, but they are useful in porting, too.
23831                         cf_depend="../include/ncurses_cfg.h"
23832                         if test "$srcdir" = "."; then
23833                                 cf_reldir="."
23834                         else
23835                                 cf_reldir="\${srcdir}"
23836                         fi
23837
23838                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23839                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23840                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23841                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23842                         fi
23843
23844                         cf_dir_suffix=
23845                         old_cf_suffix="$cf_suffix"
23846                         if test "$cf_cv_shlib_version_infix" = yes ; then
23847                         if test -n "$USE_LIB_SUFFIX" ; then
23848                                 case $USE_LIB_SUFFIX in
23849                                 (tw*)
23850                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
23851                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23852                                         cf_dir_suffix=tw$EXTRA_SUFFIX
23853                                         ;;
23854                                 (t*)
23855                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
23856                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
23857                                         cf_dir_suffix=t$EXTRA_SUFFIX
23858                                         ;;
23859                                 (w*)
23860                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
23861                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
23862                                         cf_dir_suffix=w$EXTRA_SUFFIX
23863                                         ;;
23864                                 (*)
23865                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
23866                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
23867                                         cf_dir_suffix=$EXTRA_SUFFIX
23868                                         ;;
23869                                 esac
23870                         fi
23871                         fi
23872
23873                         $AWK -f $srcdir/mk-1st.awk \
23874                                 name=${cf_libname}${cf_dir_suffix} \
23875                                 traces=$LIB_TRACING \
23876                                 MODEL=$cf_ITEM \
23877                                 CXX_MODEL=$CXX_MODEL \
23878                                 model=$cf_subdir \
23879                                 prefix=$cf_prefix \
23880                                 suffix=$cf_suffix \
23881                                 subset=$cf_subset \
23882                                 driver=$cf_cv_term_driver \
23883                                 SymLink="$LN_S" \
23884                                 TermlibRoot=$TINFO_NAME \
23885                                 TermlibSuffix=$TINFO_SUFFIX \
23886                                 ShlibVer=$cf_cv_shlib_version \
23887                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23888                                 ReLink=${cf_cv_do_relink:-no} \
23889                                 DoLinks=$cf_cv_do_symlinks \
23890                                 rmSoLocs=$cf_cv_rm_so_locs \
23891                                 ldconfig="$LDCONFIG" \
23892                                 overwrite=$WITH_OVERWRITE \
23893                                 depend="$cf_depend" \
23894                                 host="$host" \
23895                                 libtool_version="$LIBTOOL_VERSION" \
23896                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23897
23898                         cf_suffix="$old_cf_suffix"
23899
23900                         for cf_subdir2 in $cf_subdirs lib
23901                         do
23902                                 test $cf_subdir = $cf_subdir2 && break
23903                         done
23904                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23905                         $AWK -f $srcdir/mk-2nd.awk \
23906                                 name=$cf_dir \
23907                                 traces=$LIB_TRACING \
23908                                 MODEL=$cf_ITEM \
23909                                 model=$cf_subdir \
23910                                 subset=$cf_subset \
23911                                 srcdir=$srcdir \
23912                                 echo=$WITH_ECHO \
23913                                 crenames=$cf_cv_prog_CC_c_o \
23914                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23915                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23916                         cf_subdirs="$cf_subdirs $cf_subdir"
23917                         done
23918                 done
23919         fi
23920
23921         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23922 done
23923
23924 for cf_dir in $SRC_SUBDIRS
23925 do
23926         if test ! -d $srcdir/$cf_dir ; then
23927                 continue
23928         fi
23929
23930         if test -f $cf_dir/Makefile ; then
23931                 case "$cf_dir" in
23932                 (Ada95)
23933                         echo 'libs \' >> Makefile
23934                         echo 'install.libs \' >> Makefile
23935                         echo 'uninstall.libs ::' >> Makefile
23936                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23937                         ;;
23938                 esac
23939         fi
23940
23941         if test -f $srcdir/$cf_dir/modules; then
23942                 echo >> Makefile
23943                 if test -f $srcdir/$cf_dir/headers; then
23944 cat >> Makefile <<CF_EOF
23945 install.includes \\
23946 uninstall.includes \\
23947 CF_EOF
23948                 fi
23949 if test "$cf_dir" != "c++" ; then
23950 echo 'lint \' >> Makefile
23951 fi
23952 cat >> Makefile <<CF_EOF
23953 libs \\
23954 lintlib \\
23955 install.libs \\
23956 uninstall.libs \\
23957 install.$cf_dir \\
23958 uninstall.$cf_dir ::
23959         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23960 CF_EOF
23961         elif test -f $srcdir/$cf_dir/headers; then
23962 cat >> Makefile <<CF_EOF
23963
23964 libs \\
23965 install.libs \\
23966 uninstall.libs \\
23967 install.includes \\
23968 uninstall.includes ::
23969         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23970 CF_EOF
23971 fi
23972 done
23973
23974 if test "x$cf_with_db_install" = xyes; then
23975 cat >> Makefile <<CF_EOF
23976
23977 install.libs uninstall.libs \\
23978 install.data uninstall.data ::
23979 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23980 CF_EOF
23981 else
23982 cat >> Makefile <<CF_EOF
23983
23984 install.libs uninstall.libs ::
23985         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23986 CF_EOF
23987 fi
23988
23989 if test "x$cf_with_manpages" = xyes; then
23990 cat >> Makefile <<CF_EOF
23991
23992 install.man \\
23993 uninstall.man ::
23994         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23995 CF_EOF
23996 fi
23997
23998 cat >> Makefile <<CF_EOF
23999
24000 distclean ::
24001         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24002         rm -f headers.sh headers.sed mk_shared_lib.sh
24003         rm -f edit_man.* man_alias.*
24004         rm -rf \${DIRS_TO_MAKE}
24005 CF_EOF
24006
24007 # Special case: tack's manpage lives in its own directory.
24008 if test "x$cf_with_manpages" = xyes; then
24009 if test -d tack ; then
24010 if test -f $srcdir/$tack.h; then
24011 cat >> Makefile <<CF_EOF
24012
24013 install.man \\
24014 uninstall.man ::
24015         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24016 CF_EOF
24017 fi
24018 fi
24019 fi
24020
24021 rm -f headers.sed headers.sh
24022
24023 echo creating headers.sh
24024 cat >headers.sh <<CF_EOF
24025 #! $SHELL
24026 # This shell script is generated by the 'configure' script.  It is invoked in a
24027 # subdirectory of the build tree.  It generates a sed-script in the parent
24028 # directory that is used to adjust includes for header files that reside in a
24029 # subdirectory of /usr/include, etc.
24030 PRG=""
24031 while test \$# != 3
24032 do
24033 PRG="\$PRG \$1"; shift
24034 done
24035 DST=\$1
24036 REF=\$2
24037 SRC=\$3
24038 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24039 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24040 echo installing \$SRC in \$DST
24041 CF_EOF
24042
24043 if test $WITH_CURSES_H = yes; then
24044         cat >>headers.sh <<CF_EOF
24045 case \$DST in
24046 (/*/include/*)
24047         END=\`basename \$DST\`
24048         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24049         do
24050                 NAME=\`basename \$i\`
24051                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24052         done
24053         ;;
24054 (*)
24055         echo "" >> \$TMPSED
24056         ;;
24057 esac
24058 CF_EOF
24059
24060 else
24061         cat >>headers.sh <<CF_EOF
24062 case \$DST in
24063 (/*/include/*)
24064         END=\`basename \$DST\`
24065         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24066         do
24067                 NAME=\`basename \$i\`
24068                 if test "\$NAME" = "curses.h"
24069                 then
24070                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24071                         NAME=ncurses.h
24072                 fi
24073                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24074         done
24075         ;;
24076 (*)
24077         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24078         ;;
24079 esac
24080 CF_EOF
24081 fi
24082 cat >>headers.sh <<CF_EOF
24083 rm -f \$TMPSRC
24084 sed -f \$TMPSED \$SRC > \$TMPSRC
24085 NAME=\`basename \$SRC\`
24086 CF_EOF
24087 if test $WITH_CURSES_H != yes; then
24088         cat >>headers.sh <<CF_EOF
24089 test "\$NAME" = "curses.h" && NAME=ncurses.h
24090 CF_EOF
24091 fi
24092 cat >>headers.sh <<CF_EOF
24093 # Just in case someone gzip'd manpages, remove the conflicting copy.
24094 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24095
24096 eval \$PRG \$TMPSRC \$DST/\$NAME
24097 rm -f \$TMPSRC \$TMPSED
24098 CF_EOF
24099
24100 chmod 0755 headers.sh
24101
24102 for cf_dir in $SRC_SUBDIRS
24103 do
24104         if test ! -d $srcdir/$cf_dir ; then
24105                 continue
24106         fi
24107
24108         if test -f $srcdir/$cf_dir/headers; then
24109                 $AWK -f $srcdir/mk-hdr.awk \
24110                         subset="$LIB_SUBSETS" \
24111                         compat="$WITH_CURSES_H" \
24112                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24113         fi
24114
24115         if test -f $srcdir/$cf_dir/modules; then
24116                 if test "$cf_dir" != "c++" ; then
24117                         cat >>$cf_dir/Makefile <<"CF_EOF"
24118 depend : ${AUTO_SRC}
24119         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24120
24121 # DO NOT DELETE THIS LINE -- make depend depends on it.
24122 CF_EOF
24123                 fi
24124         fi
24125 done
24126
24127 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24128 if test -z "$USE_OLD_MAKERULES" ; then
24129         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24130 fi
24131 fi
24132  ;;
24133   esac
24134 done
24135 EOF
24136
24137 cat >>$CONFIG_STATUS <<\EOF
24138
24139 { (exit 0); exit 0; }
24140 EOF
24141 chmod +x $CONFIG_STATUS
24142 ac_clean_files=$ac_clean_files_save
24143
24144 # configure is writing to config.log, and then calls config.status.
24145 # config.status does its own redirection, appending to config.log.
24146 # Unfortunately, on DOS this fails, as config.log is still kept open
24147 # by configure, so config.status won't be able to write to it; its
24148 # output is simply discarded.  So we exec the FD to /dev/null,
24149 # effectively closing config.log, so it can be properly (re)opened and
24150 # appended to by config.status.  When coming back to configure, we
24151 # need to make the FD available again.
24152 if test "$no_create" != yes; then
24153   ac_cs_success=:
24154   exec 5>/dev/null
24155   $SHELL $CONFIG_STATUS || ac_cs_success=false
24156   exec 5>>config.log
24157   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24158   # would make configure fail if this is the last instruction.
24159   $ac_cs_success || { (exit 1); exit 1; }
24160 fi
24161 ${MAKE:-make} preinstall