]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20150912
[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 case $PKG_CONFIG in
3575 (no|none|yes)
3576         echo "$as_me:3576: checking for pkg-config library directory" >&5
3577 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3578         ;;
3579 (*)
3580         echo "$as_me:3580: checking for $PKG_CONFIG library directory" >&5
3581 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3582         ;;
3583 esac
3584
3585 PKG_CONFIG_LIBDIR=no
3586
3587 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3588 if test "${with_pkg_config_libdir+set}" = set; then
3589   withval="$with_pkg_config_libdir"
3590   PKG_CONFIG_LIBDIR=$withval
3591 else
3592   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3593 fi;
3594
3595 case x$PKG_CONFIG_LIBDIR in
3596 (x/*)
3597         ;;
3598 (xyes)
3599         # Look for the library directory using the same prefix as the executable
3600         if test "x$PKG_CONFIG" = xnone
3601         then
3602                 cf_path=$prefix
3603         else
3604                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3605         fi
3606
3607         # If you don't like using the default architecture, you have to specify the
3608         # intended library directory and corresponding compiler/linker options.
3609         #
3610         # This case allows for Debian's 2014-flavor of multiarch, along with the
3611         # most common variations before that point.  Some other variants spell the
3612         # directory differently, e.g., "pkg-config", and put it in unusual places.
3613         # pkg-config has always been poorly standardized, which is ironic...
3614         case x`(arch) 2>/dev/null` in
3615         (*64)
3616                 cf_search_path="\
3617                         $cf_path/lib/*64-linux-gnu \
3618                         $cf_path/share \
3619                         $cf_path/lib64 \
3620                         $cf_path/lib32 \
3621                         $cf_path/lib"
3622                 ;;
3623         (*)
3624                 cf_search_path="\
3625                         $cf_path/lib/*-linux-gnu \
3626                         $cf_path/share \
3627                         $cf_path/lib32 \
3628                         $cf_path/lib \
3629                         $cf_path/libdata"
3630                 ;;
3631         esac
3632
3633         test -n "$verbose" && echo "    list..." 1>&6
3634
3635 echo "${as_me:-configure}:3635: testing list... ..." 1>&5
3636
3637         for cf_config in $cf_search_path
3638         do
3639                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3640
3641 echo "${as_me:-configure}:3641: testing checking $cf_config/pkgconfig ..." 1>&5
3642
3643                 if test -d $cf_config/pkgconfig
3644                 then
3645                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3646                         echo "$as_me:3646: checking done" >&5
3647 echo $ECHO_N "checking done... $ECHO_C" >&6
3648                         break
3649                 fi
3650         done
3651         ;;
3652 (*)
3653         ;;
3654 esac
3655
3656 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3657         echo "$as_me:3657: result: $PKG_CONFIG_LIBDIR" >&5
3658 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3659 fi
3660
3661 if test "x$PKG_CONFIG" != xnone
3662 then
3663         echo "$as_me:3663: checking if we should install .pc files for $PKG_CONFIG" >&5
3664 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3665 else
3666         echo "$as_me:3666: checking if we should install .pc files" >&5
3667 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3668 fi
3669
3670 # Check whether --enable-pc-files or --disable-pc-files was given.
3671 if test "${enable_pc_files+set}" = set; then
3672   enableval="$enable_pc_files"
3673   enable_pc_files=$enableval
3674 else
3675   enable_pc_files=no
3676 fi;
3677 echo "$as_me:3677: result: $enable_pc_files" >&5
3678 echo "${ECHO_T}$enable_pc_files" >&6
3679
3680 if test "x$enable_pc_files" != xno
3681 then
3682         case "x$PKG_CONFIG_LIBDIR" in
3683         (xno|xyes)
3684                 { echo "$as_me:3684: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3685 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3686                 MAKE_PC_FILES="#"
3687                 ;;
3688         (*)
3689
3690 if test "x$prefix" != xNONE; then
3691         cf_path_syntax="$prefix"
3692 else
3693         cf_path_syntax="$ac_default_prefix"
3694 fi
3695
3696 case ".$PKG_CONFIG_LIBDIR" in
3697 (.\$\(*\)*|.\'*\'*)
3698         ;;
3699 (..|./*|.\\*)
3700         ;;
3701 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3702         ;;
3703 (.\${*prefix}*|.\${*dir}*)
3704         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3705         case ".$PKG_CONFIG_LIBDIR" in
3706         (.NONE/*)
3707                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3708                 ;;
3709         esac
3710         ;;
3711 (.no|.NONE/*)
3712         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3713         ;;
3714 (*)
3715         { { echo "$as_me:3715: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3716 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3717    { (exit 1); exit 1; }; }
3718         ;;
3719 esac
3720
3721                 MAKE_PC_FILES=
3722                 ;;
3723         esac
3724 else
3725         MAKE_PC_FILES="#"
3726 fi
3727
3728 if test -z "$MAKE_PC_FILES"
3729 then
3730         echo "$as_me:3730: checking for suffix to add to pc-files" >&5
3731 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3732
3733 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3734 if test "${with_pc_suffix+set}" = set; then
3735   withval="$with_pc_suffix"
3736   case "x$withval" in
3737         (xyes|xno)
3738                 PC_MODULE_SUFFIX=
3739                 ;;
3740         (*)     PC_MODULE_SUFFIX="$withval"
3741                 ;;
3742         esac
3743 fi;
3744         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3745         echo "$as_me:3745: result: $PC_MODULE_SUFFIX" >&5
3746 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3747         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3748
3749 fi
3750
3751 echo "$as_me:3751: checking if we should assume mixed-case filenames" >&5
3752 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3753
3754 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3755 if test "${enable_mixed_case+set}" = set; then
3756   enableval="$enable_mixed_case"
3757   enable_mixedcase=$enableval
3758 else
3759   enable_mixedcase=auto
3760 fi;
3761 echo "$as_me:3761: result: $enable_mixedcase" >&5
3762 echo "${ECHO_T}$enable_mixedcase" >&6
3763 if test "$enable_mixedcase" = "auto" ; then
3764
3765 echo "$as_me:3765: checking if filesystem supports mixed-case filenames" >&5
3766 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3767 if test "${cf_cv_mixedcase+set}" = set; then
3768   echo $ECHO_N "(cached) $ECHO_C" >&6
3769 else
3770
3771 if test "$cross_compiling" = yes ; then
3772         case $target_alias in
3773         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3774                 cf_cv_mixedcase=no
3775                 ;;
3776         (*)
3777                 cf_cv_mixedcase=yes
3778                 ;;
3779         esac
3780 else
3781         rm -f conftest CONFTEST
3782         echo test >conftest
3783         if test -f CONFTEST ; then
3784                 cf_cv_mixedcase=no
3785         else
3786                 cf_cv_mixedcase=yes
3787         fi
3788         rm -f conftest CONFTEST
3789 fi
3790
3791 fi
3792 echo "$as_me:3792: result: $cf_cv_mixedcase" >&5
3793 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3794 test "$cf_cv_mixedcase" = yes &&
3795 cat >>confdefs.h <<\EOF
3796 #define MIXEDCASE_FILENAMES 1
3797 EOF
3798
3799 else
3800         cf_cv_mixedcase=$enable_mixedcase
3801         if test "x$enable_mixedcase" = "xyes" ; then
3802
3803 cat >>confdefs.h <<\EOF
3804 #define MIXEDCASE_FILENAMES 1
3805 EOF
3806
3807         fi
3808 fi
3809
3810 # do this after mixed-case option (tags/TAGS is not as important as tic).
3811 echo "$as_me:3811: checking whether ${MAKE-make} sets \${MAKE}" >&5
3812 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3813 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3814 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3815   echo $ECHO_N "(cached) $ECHO_C" >&6
3816 else
3817   cat >conftest.make <<\EOF
3818 all:
3819         @echo 'ac_maketemp="${MAKE}"'
3820 EOF
3821 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3822 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3823 if test -n "$ac_maketemp"; then
3824   eval ac_cv_prog_make_${ac_make}_set=yes
3825 else
3826   eval ac_cv_prog_make_${ac_make}_set=no
3827 fi
3828 rm -f conftest.make
3829 fi
3830 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3831   echo "$as_me:3831: result: yes" >&5
3832 echo "${ECHO_T}yes" >&6
3833   SET_MAKE=
3834 else
3835   echo "$as_me:3835: result: no" >&5
3836 echo "${ECHO_T}no" >&6
3837   SET_MAKE="MAKE=${MAKE-make}"
3838 fi
3839
3840 for ac_prog in exctags ctags
3841 do
3842   # Extract the first word of "$ac_prog", so it can be a program name with args.
3843 set dummy $ac_prog; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_CTAGS+set}" = set; then
3847   echo $ECHO_N "(cached) $ECHO_C" >&6
3848 else
3849   if test -n "$CTAGS"; then
3850   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3851 else
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_CTAGS="$ac_prog"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860 break
3861 done
3862
3863 fi
3864 fi
3865 CTAGS=$ac_cv_prog_CTAGS
3866 if test -n "$CTAGS"; then
3867   echo "$as_me:3867: result: $CTAGS" >&5
3868 echo "${ECHO_T}$CTAGS" >&6
3869 else
3870   echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3872 fi
3873
3874   test -n "$CTAGS" && break
3875 done
3876
3877 for ac_prog in exetags etags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_ETAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$ETAGS"; then
3887   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_ETAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 ETAGS=$ac_cv_prog_ETAGS
3903 if test -n "$ETAGS"; then
3904   echo "$as_me:3904: result: $ETAGS" >&5
3905 echo "${ECHO_T}$ETAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$ETAGS" && break
3912 done
3913
3914 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3915 set dummy ${CTAGS:-ctags}; ac_word=$2
3916 echo "$as_me:3916: checking for $ac_word" >&5
3917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3918 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3919   echo $ECHO_N "(cached) $ECHO_C" >&6
3920 else
3921   if test -n "$MAKE_LOWER_TAGS"; then
3922   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3923 else
3924   ac_save_IFS=$IFS; IFS=$ac_path_separator
3925 ac_dummy="$PATH"
3926 for ac_dir in $ac_dummy; do
3927   IFS=$ac_save_IFS
3928   test -z "$ac_dir" && ac_dir=.
3929   $as_executable_p "$ac_dir/$ac_word" || continue
3930 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3931 echo "$as_me:3931: found $ac_dir/$ac_word" >&5
3932 break
3933 done
3934
3935   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3936 fi
3937 fi
3938 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3939 if test -n "$MAKE_LOWER_TAGS"; then
3940   echo "$as_me:3940: result: $MAKE_LOWER_TAGS" >&5
3941 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3942 else
3943   echo "$as_me:3943: result: no" >&5
3944 echo "${ECHO_T}no" >&6
3945 fi
3946
3947 if test "$cf_cv_mixedcase" = yes ; then
3948         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3949 set dummy ${ETAGS:-etags}; ac_word=$2
3950 echo "$as_me:3950: checking for $ac_word" >&5
3951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3952 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3953   echo $ECHO_N "(cached) $ECHO_C" >&6
3954 else
3955   if test -n "$MAKE_UPPER_TAGS"; then
3956   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3957 else
3958   ac_save_IFS=$IFS; IFS=$ac_path_separator
3959 ac_dummy="$PATH"
3960 for ac_dir in $ac_dummy; do
3961   IFS=$ac_save_IFS
3962   test -z "$ac_dir" && ac_dir=.
3963   $as_executable_p "$ac_dir/$ac_word" || continue
3964 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3965 echo "$as_me:3965: found $ac_dir/$ac_word" >&5
3966 break
3967 done
3968
3969   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3970 fi
3971 fi
3972 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3973 if test -n "$MAKE_UPPER_TAGS"; then
3974   echo "$as_me:3974: result: $MAKE_UPPER_TAGS" >&5
3975 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3976 else
3977   echo "$as_me:3977: result: no" >&5
3978 echo "${ECHO_T}no" >&6
3979 fi
3980
3981 else
3982         MAKE_UPPER_TAGS=no
3983 fi
3984
3985 if test "$MAKE_UPPER_TAGS" = yes ; then
3986         MAKE_UPPER_TAGS=
3987 else
3988         MAKE_UPPER_TAGS="#"
3989 fi
3990
3991 if test "$MAKE_LOWER_TAGS" = yes ; then
3992         MAKE_LOWER_TAGS=
3993 else
3994         MAKE_LOWER_TAGS="#"
3995 fi
3996
3997 echo "$as_me:3997: checking for makeflags variable" >&5
3998 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3999 if test "${cf_cv_makeflags+set}" = set; then
4000   echo $ECHO_N "(cached) $ECHO_C" >&6
4001 else
4002
4003         cf_cv_makeflags=''
4004         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4005         do
4006                 cat >cf_makeflags.tmp <<CF_EOF
4007 SHELL = $SHELL
4008 all :
4009         @ echo '.$cf_option'
4010 CF_EOF
4011                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4012                 case "$cf_result" in
4013                 (.*k|.*kw)
4014                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4015                         case "$cf_result" in
4016                         (.*CC=*)        cf_cv_makeflags=
4017                                 ;;
4018                         (*)     cf_cv_makeflags=$cf_option
4019                                 ;;
4020                         esac
4021                         break
4022                         ;;
4023                 (.-)    ;;
4024                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4025                         ;;
4026                 esac
4027         done
4028         rm -f cf_makeflags.tmp
4029
4030 fi
4031 echo "$as_me:4031: result: $cf_cv_makeflags" >&5
4032 echo "${ECHO_T}$cf_cv_makeflags" >&6
4033
4034 if test -n "$ac_tool_prefix"; then
4035   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4036 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4037 echo "$as_me:4037: checking for $ac_word" >&5
4038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4039 if test "${ac_cv_prog_RANLIB+set}" = set; then
4040   echo $ECHO_N "(cached) $ECHO_C" >&6
4041 else
4042   if test -n "$RANLIB"; then
4043   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4044 else
4045   ac_save_IFS=$IFS; IFS=$ac_path_separator
4046 ac_dummy="$PATH"
4047 for ac_dir in $ac_dummy; do
4048   IFS=$ac_save_IFS
4049   test -z "$ac_dir" && ac_dir=.
4050   $as_executable_p "$ac_dir/$ac_word" || continue
4051 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4052 echo "$as_me:4052: found $ac_dir/$ac_word" >&5
4053 break
4054 done
4055
4056 fi
4057 fi
4058 RANLIB=$ac_cv_prog_RANLIB
4059 if test -n "$RANLIB"; then
4060   echo "$as_me:4060: result: $RANLIB" >&5
4061 echo "${ECHO_T}$RANLIB" >&6
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065 fi
4066
4067 fi
4068 if test -z "$ac_cv_prog_RANLIB"; then
4069   ac_ct_RANLIB=$RANLIB
4070   # Extract the first word of "ranlib", so it can be a program name with args.
4071 set dummy ranlib; ac_word=$2
4072 echo "$as_me:4072: checking for $ac_word" >&5
4073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077   if test -n "$ac_ct_RANLIB"; then
4078   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4079 else
4080   ac_save_IFS=$IFS; IFS=$ac_path_separator
4081 ac_dummy="$PATH"
4082 for ac_dir in $ac_dummy; do
4083   IFS=$ac_save_IFS
4084   test -z "$ac_dir" && ac_dir=.
4085   $as_executable_p "$ac_dir/$ac_word" || continue
4086 ac_cv_prog_ac_ct_RANLIB="ranlib"
4087 echo "$as_me:4087: found $ac_dir/$ac_word" >&5
4088 break
4089 done
4090
4091   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4092 fi
4093 fi
4094 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4095 if test -n "$ac_ct_RANLIB"; then
4096   echo "$as_me:4096: result: $ac_ct_RANLIB" >&5
4097 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4098 else
4099   echo "$as_me:4099: result: no" >&5
4100 echo "${ECHO_T}no" >&6
4101 fi
4102
4103   RANLIB=$ac_ct_RANLIB
4104 else
4105   RANLIB="$ac_cv_prog_RANLIB"
4106 fi
4107
4108 if test -n "$ac_tool_prefix"; then
4109   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4110 set dummy ${ac_tool_prefix}ld; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_LD+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$LD"; then
4117   ac_cv_prog_LD="$LD" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_LD="${ac_tool_prefix}ld"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130 fi
4131 fi
4132 LD=$ac_cv_prog_LD
4133 if test -n "$LD"; then
4134   echo "$as_me:4134: result: $LD" >&5
4135 echo "${ECHO_T}$LD" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141 fi
4142 if test -z "$ac_cv_prog_LD"; then
4143   ac_ct_LD=$LD
4144   # Extract the first word of "ld", so it can be a program name with args.
4145 set dummy ld; ac_word=$2
4146 echo "$as_me:4146: checking for $ac_word" >&5
4147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4148 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4149   echo $ECHO_N "(cached) $ECHO_C" >&6
4150 else
4151   if test -n "$ac_ct_LD"; then
4152   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4153 else
4154   ac_save_IFS=$IFS; IFS=$ac_path_separator
4155 ac_dummy="$PATH"
4156 for ac_dir in $ac_dummy; do
4157   IFS=$ac_save_IFS
4158   test -z "$ac_dir" && ac_dir=.
4159   $as_executable_p "$ac_dir/$ac_word" || continue
4160 ac_cv_prog_ac_ct_LD="ld"
4161 echo "$as_me:4161: found $ac_dir/$ac_word" >&5
4162 break
4163 done
4164
4165   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4166 fi
4167 fi
4168 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4169 if test -n "$ac_ct_LD"; then
4170   echo "$as_me:4170: result: $ac_ct_LD" >&5
4171 echo "${ECHO_T}$ac_ct_LD" >&6
4172 else
4173   echo "$as_me:4173: result: no" >&5
4174 echo "${ECHO_T}no" >&6
4175 fi
4176
4177   LD=$ac_ct_LD
4178 else
4179   LD="$ac_cv_prog_LD"
4180 fi
4181
4182 if test -n "$ac_tool_prefix"; then
4183   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4184 set dummy ${ac_tool_prefix}ar; ac_word=$2
4185 echo "$as_me:4185: checking for $ac_word" >&5
4186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4187 if test "${ac_cv_prog_AR+set}" = set; then
4188   echo $ECHO_N "(cached) $ECHO_C" >&6
4189 else
4190   if test -n "$AR"; then
4191   ac_cv_prog_AR="$AR" # Let the user override the test.
4192 else
4193   ac_save_IFS=$IFS; IFS=$ac_path_separator
4194 ac_dummy="$PATH"
4195 for ac_dir in $ac_dummy; do
4196   IFS=$ac_save_IFS
4197   test -z "$ac_dir" && ac_dir=.
4198   $as_executable_p "$ac_dir/$ac_word" || continue
4199 ac_cv_prog_AR="${ac_tool_prefix}ar"
4200 echo "$as_me:4200: found $ac_dir/$ac_word" >&5
4201 break
4202 done
4203
4204 fi
4205 fi
4206 AR=$ac_cv_prog_AR
4207 if test -n "$AR"; then
4208   echo "$as_me:4208: result: $AR" >&5
4209 echo "${ECHO_T}$AR" >&6
4210 else
4211   echo "$as_me:4211: result: no" >&5
4212 echo "${ECHO_T}no" >&6
4213 fi
4214
4215 fi
4216 if test -z "$ac_cv_prog_AR"; then
4217   ac_ct_AR=$AR
4218   # Extract the first word of "ar", so it can be a program name with args.
4219 set dummy ar; ac_word=$2
4220 echo "$as_me:4220: checking for $ac_word" >&5
4221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4222 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4223   echo $ECHO_N "(cached) $ECHO_C" >&6
4224 else
4225   if test -n "$ac_ct_AR"; then
4226   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4227 else
4228   ac_save_IFS=$IFS; IFS=$ac_path_separator
4229 ac_dummy="$PATH"
4230 for ac_dir in $ac_dummy; do
4231   IFS=$ac_save_IFS
4232   test -z "$ac_dir" && ac_dir=.
4233   $as_executable_p "$ac_dir/$ac_word" || continue
4234 ac_cv_prog_ac_ct_AR="ar"
4235 echo "$as_me:4235: found $ac_dir/$ac_word" >&5
4236 break
4237 done
4238
4239   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4240 fi
4241 fi
4242 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4243 if test -n "$ac_ct_AR"; then
4244   echo "$as_me:4244: result: $ac_ct_AR" >&5
4245 echo "${ECHO_T}$ac_ct_AR" >&6
4246 else
4247   echo "$as_me:4247: result: no" >&5
4248 echo "${ECHO_T}no" >&6
4249 fi
4250
4251   AR=$ac_ct_AR
4252 else
4253   AR="$ac_cv_prog_AR"
4254 fi
4255
4256 if test -n "$ac_tool_prefix"; then
4257   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4258 set dummy ${ac_tool_prefix}nm; ac_word=$2
4259 echo "$as_me:4259: checking for $ac_word" >&5
4260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4261 if test "${ac_cv_prog_NM+set}" = set; then
4262   echo $ECHO_N "(cached) $ECHO_C" >&6
4263 else
4264   if test -n "$NM"; then
4265   ac_cv_prog_NM="$NM" # Let the user override the test.
4266 else
4267   ac_save_IFS=$IFS; IFS=$ac_path_separator
4268 ac_dummy="$PATH"
4269 for ac_dir in $ac_dummy; do
4270   IFS=$ac_save_IFS
4271   test -z "$ac_dir" && ac_dir=.
4272   $as_executable_p "$ac_dir/$ac_word" || continue
4273 ac_cv_prog_NM="${ac_tool_prefix}nm"
4274 echo "$as_me:4274: found $ac_dir/$ac_word" >&5
4275 break
4276 done
4277
4278 fi
4279 fi
4280 NM=$ac_cv_prog_NM
4281 if test -n "$NM"; then
4282   echo "$as_me:4282: result: $NM" >&5
4283 echo "${ECHO_T}$NM" >&6
4284 else
4285   echo "$as_me:4285: result: no" >&5
4286 echo "${ECHO_T}no" >&6
4287 fi
4288
4289 fi
4290 if test -z "$ac_cv_prog_NM"; then
4291   ac_ct_NM=$NM
4292   # Extract the first word of "nm", so it can be a program name with args.
4293 set dummy nm; ac_word=$2
4294 echo "$as_me:4294: checking for $ac_word" >&5
4295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4296 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4297   echo $ECHO_N "(cached) $ECHO_C" >&6
4298 else
4299   if test -n "$ac_ct_NM"; then
4300   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4301 else
4302   ac_save_IFS=$IFS; IFS=$ac_path_separator
4303 ac_dummy="$PATH"
4304 for ac_dir in $ac_dummy; do
4305   IFS=$ac_save_IFS
4306   test -z "$ac_dir" && ac_dir=.
4307   $as_executable_p "$ac_dir/$ac_word" || continue
4308 ac_cv_prog_ac_ct_NM="nm"
4309 echo "$as_me:4309: found $ac_dir/$ac_word" >&5
4310 break
4311 done
4312
4313   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4314 fi
4315 fi
4316 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4317 if test -n "$ac_ct_NM"; then
4318   echo "$as_me:4318: result: $ac_ct_NM" >&5
4319 echo "${ECHO_T}$ac_ct_NM" >&6
4320 else
4321   echo "$as_me:4321: result: no" >&5
4322 echo "${ECHO_T}no" >&6
4323 fi
4324
4325   NM=$ac_ct_NM
4326 else
4327   NM="$ac_cv_prog_NM"
4328 fi
4329
4330 if test -n "$ac_tool_prefix"; then
4331   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4332 set dummy ${ac_tool_prefix}ar; ac_word=$2
4333 echo "$as_me:4333: checking for $ac_word" >&5
4334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4335 if test "${ac_cv_prog_AR+set}" = set; then
4336   echo $ECHO_N "(cached) $ECHO_C" >&6
4337 else
4338   if test -n "$AR"; then
4339   ac_cv_prog_AR="$AR" # Let the user override the test.
4340 else
4341   ac_save_IFS=$IFS; IFS=$ac_path_separator
4342 ac_dummy="$PATH"
4343 for ac_dir in $ac_dummy; do
4344   IFS=$ac_save_IFS
4345   test -z "$ac_dir" && ac_dir=.
4346   $as_executable_p "$ac_dir/$ac_word" || continue
4347 ac_cv_prog_AR="${ac_tool_prefix}ar"
4348 echo "$as_me:4348: found $ac_dir/$ac_word" >&5
4349 break
4350 done
4351
4352 fi
4353 fi
4354 AR=$ac_cv_prog_AR
4355 if test -n "$AR"; then
4356   echo "$as_me:4356: result: $AR" >&5
4357 echo "${ECHO_T}$AR" >&6
4358 else
4359   echo "$as_me:4359: result: no" >&5
4360 echo "${ECHO_T}no" >&6
4361 fi
4362
4363 fi
4364 if test -z "$ac_cv_prog_AR"; then
4365   ac_ct_AR=$AR
4366   # Extract the first word of "ar", so it can be a program name with args.
4367 set dummy ar; ac_word=$2
4368 echo "$as_me:4368: checking for $ac_word" >&5
4369 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4370 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4371   echo $ECHO_N "(cached) $ECHO_C" >&6
4372 else
4373   if test -n "$ac_ct_AR"; then
4374   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4375 else
4376   ac_save_IFS=$IFS; IFS=$ac_path_separator
4377 ac_dummy="$PATH"
4378 for ac_dir in $ac_dummy; do
4379   IFS=$ac_save_IFS
4380   test -z "$ac_dir" && ac_dir=.
4381   $as_executable_p "$ac_dir/$ac_word" || continue
4382 ac_cv_prog_ac_ct_AR="ar"
4383 echo "$as_me:4383: found $ac_dir/$ac_word" >&5
4384 break
4385 done
4386
4387   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4388 fi
4389 fi
4390 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4391 if test -n "$ac_ct_AR"; then
4392   echo "$as_me:4392: result: $ac_ct_AR" >&5
4393 echo "${ECHO_T}$ac_ct_AR" >&6
4394 else
4395   echo "$as_me:4395: result: no" >&5
4396 echo "${ECHO_T}no" >&6
4397 fi
4398
4399   AR=$ac_ct_AR
4400 else
4401   AR="$ac_cv_prog_AR"
4402 fi
4403
4404 echo "$as_me:4404: checking for options to update archives" >&5
4405 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4406 if test "${cf_cv_ar_flags+set}" = set; then
4407   echo $ECHO_N "(cached) $ECHO_C" >&6
4408 else
4409
4410         cf_cv_ar_flags=unknown
4411         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4412         do
4413
4414                 # check if $ARFLAGS already contains this choice
4415                 if test "x$ARFLAGS" != "x" ; then
4416                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4417                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4418                                 cf_cv_ar_flags=
4419                                 break
4420                         fi
4421                 fi
4422
4423                 rm -f conftest.$ac_cv_objext
4424                 rm -f conftest.a
4425
4426                 cat >conftest.$ac_ext <<EOF
4427 #line 4427 "configure"
4428 int     testdata[3] = { 123, 456, 789 };
4429 EOF
4430                 if { (eval echo "$as_me:4430: \"$ac_compile\"") >&5
4431   (eval $ac_compile) 2>&5
4432   ac_status=$?
4433   echo "$as_me:4433: \$? = $ac_status" >&5
4434   (exit $ac_status); } ; then
4435                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4436                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4437                         if test -f conftest.a ; then
4438                                 cf_cv_ar_flags=$cf_ar_flags
4439                                 break
4440                         fi
4441                 else
4442                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4443
4444 echo "${as_me:-configure}:4444: testing cannot compile test-program ..." 1>&5
4445
4446                         break
4447                 fi
4448         done
4449         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4450
4451 fi
4452 echo "$as_me:4452: result: $cf_cv_ar_flags" >&5
4453 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4454
4455 if test -n "$ARFLAGS" ; then
4456         if test -n "$cf_cv_ar_flags" ; then
4457                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4458         fi
4459 else
4460         ARFLAGS=$cf_cv_ar_flags
4461 fi
4462
4463 echo "$as_me:4463: checking if you have specified an install-prefix" >&5
4464 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4465
4466 # Check whether --with-install-prefix or --without-install-prefix was given.
4467 if test "${with_install_prefix+set}" = set; then
4468   withval="$with_install_prefix"
4469   case "x$withval" in
4470         (xyes|xno)
4471                 ;;
4472         (*)     DESTDIR="$withval"
4473                 ;;
4474         esac
4475 fi;
4476 echo "$as_me:4476: result: $DESTDIR" >&5
4477 echo "${ECHO_T}$DESTDIR" >&6
4478
4479 ###############################################################################
4480
4481 # If we're cross-compiling, allow the user to override the tools and their
4482 # options.  The configure script is oriented toward identifying the host
4483 # compiler, etc., but we need a build compiler to generate parts of the source.
4484
4485 if test "$cross_compiling" = yes ; then
4486
4487         # defaults that we might want to override
4488         : ${BUILD_CFLAGS:=''}
4489         : ${BUILD_CPPFLAGS:=''}
4490         : ${BUILD_LDFLAGS:=''}
4491         : ${BUILD_LIBS:=''}
4492         : ${BUILD_EXEEXT:='$x'}
4493         : ${BUILD_OBJEXT:='o'}
4494
4495 # Check whether --with-build-cc or --without-build-cc was given.
4496 if test "${with_build_cc+set}" = set; then
4497   withval="$with_build_cc"
4498   BUILD_CC="$withval"
4499 else
4500   for ac_prog in gcc cc cl
4501 do
4502   # Extract the first word of "$ac_prog", so it can be a program name with args.
4503 set dummy $ac_prog; ac_word=$2
4504 echo "$as_me:4504: checking for $ac_word" >&5
4505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4506 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   if test -n "$BUILD_CC"; then
4510   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4511 else
4512   ac_save_IFS=$IFS; IFS=$ac_path_separator
4513 ac_dummy="$PATH"
4514 for ac_dir in $ac_dummy; do
4515   IFS=$ac_save_IFS
4516   test -z "$ac_dir" && ac_dir=.
4517   $as_executable_p "$ac_dir/$ac_word" || continue
4518 ac_cv_prog_BUILD_CC="$ac_prog"
4519 echo "$as_me:4519: found $ac_dir/$ac_word" >&5
4520 break
4521 done
4522
4523 fi
4524 fi
4525 BUILD_CC=$ac_cv_prog_BUILD_CC
4526 if test -n "$BUILD_CC"; then
4527   echo "$as_me:4527: result: $BUILD_CC" >&5
4528 echo "${ECHO_T}$BUILD_CC" >&6
4529 else
4530   echo "$as_me:4530: result: no" >&5
4531 echo "${ECHO_T}no" >&6
4532 fi
4533
4534   test -n "$BUILD_CC" && break
4535 done
4536
4537 fi;
4538         echo "$as_me:4538: checking for native build C compiler" >&5
4539 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4540         echo "$as_me:4540: result: $BUILD_CC" >&5
4541 echo "${ECHO_T}$BUILD_CC" >&6
4542
4543         echo "$as_me:4543: checking for native build C preprocessor" >&5
4544 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4545
4546 # Check whether --with-build-cpp or --without-build-cpp was given.
4547 if test "${with_build_cpp+set}" = set; then
4548   withval="$with_build_cpp"
4549   BUILD_CPP="$withval"
4550 else
4551   BUILD_CPP='${BUILD_CC} -E'
4552 fi;
4553         echo "$as_me:4553: result: $BUILD_CPP" >&5
4554 echo "${ECHO_T}$BUILD_CPP" >&6
4555
4556         echo "$as_me:4556: checking for native build C flags" >&5
4557 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4558
4559 # Check whether --with-build-cflags or --without-build-cflags was given.
4560 if test "${with_build_cflags+set}" = set; then
4561   withval="$with_build_cflags"
4562   BUILD_CFLAGS="$withval"
4563 fi;
4564         echo "$as_me:4564: result: $BUILD_CFLAGS" >&5
4565 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4566
4567         echo "$as_me:4567: checking for native build C preprocessor-flags" >&5
4568 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4569
4570 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4571 if test "${with_build_cppflags+set}" = set; then
4572   withval="$with_build_cppflags"
4573   BUILD_CPPFLAGS="$withval"
4574 fi;
4575         echo "$as_me:4575: result: $BUILD_CPPFLAGS" >&5
4576 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4577
4578         echo "$as_me:4578: checking for native build linker-flags" >&5
4579 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4580
4581 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4582 if test "${with_build_ldflags+set}" = set; then
4583   withval="$with_build_ldflags"
4584   BUILD_LDFLAGS="$withval"
4585 fi;
4586         echo "$as_me:4586: result: $BUILD_LDFLAGS" >&5
4587 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4588
4589         echo "$as_me:4589: checking for native build linker-libraries" >&5
4590 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4591
4592 # Check whether --with-build-libs or --without-build-libs was given.
4593 if test "${with_build_libs+set}" = set; then
4594   withval="$with_build_libs"
4595   BUILD_LIBS="$withval"
4596 fi;
4597         echo "$as_me:4597: result: $BUILD_LIBS" >&5
4598 echo "${ECHO_T}$BUILD_LIBS" >&6
4599
4600         # this assumes we're on Unix.
4601         BUILD_EXEEXT=
4602         BUILD_OBJEXT=o
4603
4604         : ${BUILD_CC:='${CC}'}
4605
4606         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4607                 { { echo "$as_me:4607: error: Cross-build requires two compilers.
4608 Use --with-build-cc to specify the native compiler." >&5
4609 echo "$as_me: error: Cross-build requires two compilers.
4610 Use --with-build-cc to specify the native compiler." >&2;}
4611    { (exit 1); exit 1; }; }
4612         fi
4613
4614 else
4615         : ${BUILD_CC:='${CC}'}
4616         : ${BUILD_CPP:='${CPP}'}
4617         : ${BUILD_CFLAGS:='${CFLAGS}'}
4618         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4619         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4620         : ${BUILD_LIBS:='${LIBS}'}
4621         : ${BUILD_EXEEXT:='$x'}
4622         : ${BUILD_OBJEXT:='o'}
4623 fi
4624
4625 ###############################################################################
4626
4627 ### Options to allow the user to specify the set of libraries which are used.
4628 ### Use "--without-normal --with-shared" to allow the default model to be
4629 ### shared, for example.
4630 cf_list_models=""
4631
4632 echo "$as_me:4632: checking if libtool -version-number should be used" >&5
4633 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4634
4635 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4636 if test "${enable_libtool_version+set}" = set; then
4637   enableval="$enable_libtool_version"
4638   test "$enableval" != no && enableval=yes
4639         if test "$enableval" != "yes" ; then
4640     cf_libtool_version=no
4641         else
4642                 cf_libtool_version=yes
4643         fi
4644 else
4645   enableval=yes
4646         cf_libtool_version=yes
4647
4648 fi;
4649 echo "$as_me:4649: result: $cf_libtool_version" >&5
4650 echo "${ECHO_T}$cf_libtool_version" >&6
4651
4652 if test "$cf_libtool_version" = yes ; then
4653         LIBTOOL_VERSION="-version-number"
4654 else
4655         LIBTOOL_VERSION="-version-info"
4656         case "x$VERSION" in
4657         (x)
4658                 { echo "$as_me:4658: WARNING: VERSION was not set" >&5
4659 echo "$as_me: WARNING: VERSION was not set" >&2;}
4660                 ;;
4661         (x*.*.*)
4662                 ABI_VERSION="$VERSION"
4663                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4664
4665 echo "${as_me:-configure}:4665: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4666
4667                 ;;
4668         (x*:*:*)
4669                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4670                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4671
4672 echo "${as_me:-configure}:4672: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4673
4674                 ;;
4675         (*)
4676                 { echo "$as_me:4676: WARNING: unexpected VERSION value: $VERSION" >&5
4677 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4678                 ;;
4679         esac
4680 fi
4681
4682 LIBTOOL=
4683
4684 # common library maintenance symbols that are convenient for libtool scripts:
4685 LIB_CREATE='${AR} -cr'
4686 LIB_OBJECT='${OBJECTS}'
4687 LIB_SUFFIX=.a
4688 LIB_PREP="$RANLIB"
4689
4690 # symbols used to prop libtool up to enable it to determine what it should be
4691 # doing:
4692 LIB_CLEAN=
4693 LIB_COMPILE=
4694 LIB_LINK='${CC}'
4695 LIB_INSTALL=
4696 LIB_UNINSTALL=
4697
4698 echo "$as_me:4698: checking if you want to build libraries with libtool" >&5
4699 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4700
4701 # Check whether --with-libtool or --without-libtool was given.
4702 if test "${with_libtool+set}" = set; then
4703   withval="$with_libtool"
4704   with_libtool=$withval
4705 else
4706   with_libtool=no
4707 fi;
4708 echo "$as_me:4708: result: $with_libtool" >&5
4709 echo "${ECHO_T}$with_libtool" >&6
4710 if test "$with_libtool" != "no"; then
4711
4712         if test "$with_libtool" != "yes" ; then
4713
4714 if test "x$prefix" != xNONE; then
4715         cf_path_syntax="$prefix"
4716 else
4717         cf_path_syntax="$ac_default_prefix"
4718 fi
4719
4720 case ".$with_libtool" in
4721 (.\$\(*\)*|.\'*\'*)
4722         ;;
4723 (..|./*|.\\*)
4724         ;;
4725 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4726         ;;
4727 (.\${*prefix}*|.\${*dir}*)
4728         eval with_libtool="$with_libtool"
4729         case ".$with_libtool" in
4730         (.NONE/*)
4731                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4732                 ;;
4733         esac
4734         ;;
4735 (.no|.NONE/*)
4736         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4737         ;;
4738 (*)
4739         { { echo "$as_me:4739: error: expected a pathname, not \"$with_libtool\"" >&5
4740 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4741    { (exit 1); exit 1; }; }
4742         ;;
4743 esac
4744
4745                 LIBTOOL=$with_libtool
4746         else
4747                 if test -n "$ac_tool_prefix"; then
4748   for ac_prog in libtool glibtool
4749   do
4750     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4751 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4752 echo "$as_me:4752: checking for $ac_word" >&5
4753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4754 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4755   echo $ECHO_N "(cached) $ECHO_C" >&6
4756 else
4757   if test -n "$LIBTOOL"; then
4758   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4759 else
4760   ac_save_IFS=$IFS; IFS=$ac_path_separator
4761 ac_dummy="$PATH"
4762 for ac_dir in $ac_dummy; do
4763   IFS=$ac_save_IFS
4764   test -z "$ac_dir" && ac_dir=.
4765   $as_executable_p "$ac_dir/$ac_word" || continue
4766 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4767 echo "$as_me:4767: found $ac_dir/$ac_word" >&5
4768 break
4769 done
4770
4771 fi
4772 fi
4773 LIBTOOL=$ac_cv_prog_LIBTOOL
4774 if test -n "$LIBTOOL"; then
4775   echo "$as_me:4775: result: $LIBTOOL" >&5
4776 echo "${ECHO_T}$LIBTOOL" >&6
4777 else
4778   echo "$as_me:4778: result: no" >&5
4779 echo "${ECHO_T}no" >&6
4780 fi
4781
4782     test -n "$LIBTOOL" && break
4783   done
4784 fi
4785 if test -z "$LIBTOOL"; then
4786   ac_ct_LIBTOOL=$LIBTOOL
4787   for ac_prog in libtool glibtool
4788 do
4789   # Extract the first word of "$ac_prog", so it can be a program name with args.
4790 set dummy $ac_prog; ac_word=$2
4791 echo "$as_me:4791: checking for $ac_word" >&5
4792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4793 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4794   echo $ECHO_N "(cached) $ECHO_C" >&6
4795 else
4796   if test -n "$ac_ct_LIBTOOL"; then
4797   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4798 else
4799   ac_save_IFS=$IFS; IFS=$ac_path_separator
4800 ac_dummy="$PATH"
4801 for ac_dir in $ac_dummy; do
4802   IFS=$ac_save_IFS
4803   test -z "$ac_dir" && ac_dir=.
4804   $as_executable_p "$ac_dir/$ac_word" || continue
4805 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4806 echo "$as_me:4806: found $ac_dir/$ac_word" >&5
4807 break
4808 done
4809
4810 fi
4811 fi
4812 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4813 if test -n "$ac_ct_LIBTOOL"; then
4814   echo "$as_me:4814: result: $ac_ct_LIBTOOL" >&5
4815 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4816 else
4817   echo "$as_me:4817: result: no" >&5
4818 echo "${ECHO_T}no" >&6
4819 fi
4820
4821   test -n "$ac_ct_LIBTOOL" && break
4822 done
4823 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4824
4825   LIBTOOL=$ac_ct_LIBTOOL
4826 fi
4827
4828 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4829 then
4830         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.].*//'`
4831 else
4832         cf_cv_libtool_version=
4833 fi
4834 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4835
4836                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4837                 then
4838
4839 unset ac_cv_prog_ac_ct_LIBTOOL
4840 unset ac_ct_LIBTOOL
4841 unset LIBTOOL
4842
4843                         if test -n "$ac_tool_prefix"; then
4844   for ac_prog in glibtool
4845   do
4846     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4847 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4848 echo "$as_me:4848: checking for $ac_word" >&5
4849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4850 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4851   echo $ECHO_N "(cached) $ECHO_C" >&6
4852 else
4853   if test -n "$LIBTOOL"; then
4854   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4855 else
4856   ac_save_IFS=$IFS; IFS=$ac_path_separator
4857 ac_dummy="$PATH"
4858 for ac_dir in $ac_dummy; do
4859   IFS=$ac_save_IFS
4860   test -z "$ac_dir" && ac_dir=.
4861   $as_executable_p "$ac_dir/$ac_word" || continue
4862 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4863 echo "$as_me:4863: found $ac_dir/$ac_word" >&5
4864 break
4865 done
4866
4867 fi
4868 fi
4869 LIBTOOL=$ac_cv_prog_LIBTOOL
4870 if test -n "$LIBTOOL"; then
4871   echo "$as_me:4871: result: $LIBTOOL" >&5
4872 echo "${ECHO_T}$LIBTOOL" >&6
4873 else
4874   echo "$as_me:4874: result: no" >&5
4875 echo "${ECHO_T}no" >&6
4876 fi
4877
4878     test -n "$LIBTOOL" && break
4879   done
4880 fi
4881 if test -z "$LIBTOOL"; then
4882   ac_ct_LIBTOOL=$LIBTOOL
4883   for ac_prog in glibtool
4884 do
4885   # Extract the first word of "$ac_prog", so it can be a program name with args.
4886 set dummy $ac_prog; ac_word=$2
4887 echo "$as_me:4887: checking for $ac_word" >&5
4888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4889 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4890   echo $ECHO_N "(cached) $ECHO_C" >&6
4891 else
4892   if test -n "$ac_ct_LIBTOOL"; then
4893   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4894 else
4895   ac_save_IFS=$IFS; IFS=$ac_path_separator
4896 ac_dummy="$PATH"
4897 for ac_dir in $ac_dummy; do
4898   IFS=$ac_save_IFS
4899   test -z "$ac_dir" && ac_dir=.
4900   $as_executable_p "$ac_dir/$ac_word" || continue
4901 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4902 echo "$as_me:4902: found $ac_dir/$ac_word" >&5
4903 break
4904 done
4905
4906 fi
4907 fi
4908 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4909 if test -n "$ac_ct_LIBTOOL"; then
4910   echo "$as_me:4910: result: $ac_ct_LIBTOOL" >&5
4911 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4912 else
4913   echo "$as_me:4913: result: no" >&5
4914 echo "${ECHO_T}no" >&6
4915 fi
4916
4917   test -n "$ac_ct_LIBTOOL" && break
4918 done
4919 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4920
4921   LIBTOOL=$ac_ct_LIBTOOL
4922 fi
4923
4924 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4925 then
4926         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.].*//'`
4927 else
4928         cf_cv_libtool_version=
4929 fi
4930 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4931
4932                 fi
4933         fi
4934         if test -z "$LIBTOOL" ; then
4935                 { { echo "$as_me:4935: error: Cannot find libtool" >&5
4936 echo "$as_me: error: Cannot find libtool" >&2;}
4937    { (exit 1); exit 1; }; }
4938         fi
4939         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4940         LIB_OBJECT='${OBJECTS:.o=.lo}'
4941         LIB_SUFFIX=.la
4942         LIB_CLEAN='${LIBTOOL} --mode=clean'
4943         LIB_COMPILE='${LIBTOOL} --mode=compile'
4944         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4945         LIB_INSTALL='${LIBTOOL} --mode=install'
4946         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4947         LIB_PREP=:
4948
4949 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4950 then
4951         echo "$as_me:4951: checking version of $LIBTOOL" >&5
4952 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4953
4954 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4955 then
4956         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.].*//'`
4957 else
4958         cf_cv_libtool_version=
4959 fi
4960 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4961
4962         echo "$as_me:4962: result: $cf_cv_libtool_version" >&5
4963 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4964         if test -z "$cf_cv_libtool_version" ; then
4965                 { { echo "$as_me:4965: error: This is not GNU libtool" >&5
4966 echo "$as_me: error: This is not GNU libtool" >&2;}
4967    { (exit 1); exit 1; }; }
4968         fi
4969 else
4970         { { echo "$as_me:4970: error: GNU libtool has not been found" >&5
4971 echo "$as_me: error: GNU libtool has not been found" >&2;}
4972    { (exit 1); exit 1; }; }
4973 fi
4974
4975         # special hack to add -no-undefined (which libtool should do for itself)
4976         LT_UNDEF=
4977         case "$cf_cv_system_name" in
4978         (cygwin*|msys*|mingw32*|uwin*|aix[4-7])
4979                 LT_UNDEF=-no-undefined
4980                 ;;
4981         esac
4982
4983         # special hack to add --tag option for C++ compiler
4984         case $cf_cv_libtool_version in
4985         (1.[5-9]*|[2-9].[0-9.a-z]*)
4986                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4987                 LIBTOOL="$LIBTOOL --tag=CC"
4988                 ;;
4989         (*)
4990                 LIBTOOL_CXX="$LIBTOOL"
4991                 ;;
4992         esac
4993 else
4994         LIBTOOL=""
4995         LIBTOOL_CXX=""
4996 fi
4997
4998 test -z "$LIBTOOL" && ECHO_LT=
4999
5000 if test "$with_libtool" != "no" ; then
5001
5002 cf_list_models="$cf_list_models libtool"
5003
5004 else
5005
5006 echo "$as_me:5006: checking if you want to build shared libraries" >&5
5007 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5008
5009 # Check whether --with-shared or --without-shared was given.
5010 if test "${with_shared+set}" = set; then
5011   withval="$with_shared"
5012   with_shared=$withval
5013 else
5014   with_shared=no
5015 fi;
5016 echo "$as_me:5016: result: $with_shared" >&5
5017 echo "${ECHO_T}$with_shared" >&6
5018 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5019
5020 echo "$as_me:5020: checking if you want to build static libraries" >&5
5021 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5022
5023 # Check whether --with-normal or --without-normal was given.
5024 if test "${with_normal+set}" = set; then
5025   withval="$with_normal"
5026   with_normal=$withval
5027 else
5028   with_normal=yes
5029 fi;
5030 echo "$as_me:5030: result: $with_normal" >&5
5031 echo "${ECHO_T}$with_normal" >&6
5032 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5033
5034 echo "$as_me:5034: checking if you want to build debug libraries" >&5
5035 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5036
5037 # Check whether --with-debug or --without-debug was given.
5038 if test "${with_debug+set}" = set; then
5039   withval="$with_debug"
5040   with_debug=$withval
5041 else
5042   with_debug=yes
5043 fi;
5044 echo "$as_me:5044: result: $with_debug" >&5
5045 echo "${ECHO_T}$with_debug" >&6
5046 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5047
5048 echo "$as_me:5048: checking if you want to build profiling libraries" >&5
5049 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5050
5051 # Check whether --with-profile or --without-profile was given.
5052 if test "${with_profile+set}" = set; then
5053   withval="$with_profile"
5054   with_profile=$withval
5055 else
5056   with_profile=no
5057 fi;
5058 echo "$as_me:5058: result: $with_profile" >&5
5059 echo "${ECHO_T}$with_profile" >&6
5060 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5061
5062 fi
5063
5064 if test "X$cf_with_cxx_binding" != Xno; then
5065 if test "x$with_shared" = "xyes"; then
5066 echo "$as_me:5066: checking if you want to build C++ shared libraries" >&5
5067 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5068
5069 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5070 if test "${with_cxx_shared+set}" = set; then
5071   withval="$with_cxx_shared"
5072   with_shared_cxx=$withval
5073 else
5074   with_shared_cxx=no
5075 fi;
5076 echo "$as_me:5076: result: $with_shared_cxx" >&5
5077 echo "${ECHO_T}$with_shared_cxx" >&6
5078 fi
5079 fi
5080
5081 ###############################################################################
5082
5083 echo "$as_me:5083: checking for specified models" >&5
5084 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5085 test -z "$cf_list_models" && cf_list_models=normal
5086 test "$with_libtool" != "no" && cf_list_models=libtool
5087 echo "$as_me:5087: result: $cf_list_models" >&5
5088 echo "${ECHO_T}$cf_list_models" >&6
5089
5090 ### Use the first model as the default, and save its suffix for use in building
5091 ### up test-applications.
5092 echo "$as_me:5092: checking for default model" >&5
5093 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5094 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5095 echo "$as_me:5095: result: $DFT_LWR_MODEL" >&5
5096 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5097
5098 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5099
5100 TICS_NAME=tic
5101
5102 TINFO_NAME=tinfo
5103
5104 LIB_NAME=ncurses
5105
5106 LIB_DIR=../lib
5107 LIB_2ND=../../lib
5108
5109 echo "$as_me:5109: checking if you want to have a library-prefix" >&5
5110 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5111
5112 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5113 if test "${with_lib_prefix+set}" = set; then
5114   withval="$with_lib_prefix"
5115   with_lib_prefix=$withval
5116 else
5117   with_lib_prefix=auto
5118 fi;
5119 echo "$as_me:5119: result: $with_lib_prefix" >&5
5120 echo "${ECHO_T}$with_lib_prefix" >&6
5121
5122 if test $with_lib_prefix = auto
5123 then
5124
5125         case $cf_cv_system_name in
5126         (OS/2*|os2*)
5127                 LIB_PREFIX=''
5128                 ;;
5129         (*)     LIB_PREFIX='lib'
5130                 ;;
5131         esac
5132 cf_prefix=$LIB_PREFIX
5133
5134 elif test $with_lib_prefix = no
5135 then
5136         LIB_PREFIX=
5137 else
5138         LIB_PREFIX=$with_lib_prefix
5139 fi
5140
5141 LIB_SUFFIX=
5142
5143         echo "$as_me:5143: checking for PATH separator" >&5
5144 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5145         case $cf_cv_system_name in
5146         (os2*)  PATH_SEPARATOR=';'  ;;
5147         (*)     ${PATH_SEPARATOR:=':'}  ;;
5148         esac
5149
5150         echo "$as_me:5150: result: $PATH_SEPARATOR" >&5
5151 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5152
5153 ###############################################################################
5154
5155 echo "$as_me:5155: checking if you want to build a separate terminfo library" >&5
5156 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5157
5158 # Check whether --with-termlib or --without-termlib was given.
5159 if test "${with_termlib+set}" = set; then
5160   withval="$with_termlib"
5161   with_termlib=$withval
5162 else
5163   with_termlib=no
5164 fi;
5165 echo "$as_me:5165: result: $with_termlib" >&5
5166 echo "${ECHO_T}$with_termlib" >&6
5167
5168 echo "$as_me:5168: checking if you want to build a separate tic library" >&5
5169 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5170
5171 # Check whether --with-ticlib or --without-ticlib was given.
5172 if test "${with_ticlib+set}" = set; then
5173   withval="$with_ticlib"
5174   with_ticlib=$withval
5175 else
5176   with_ticlib=no
5177 fi;
5178 echo "$as_me:5178: result: $with_ticlib" >&5
5179 echo "${ECHO_T}$with_ticlib" >&6
5180
5181 ### Checks for special libraries, must be done up-front.
5182 SHLIB_LIST=""
5183
5184 echo "$as_me:5184: checking if you want to link with the GPM mouse library" >&5
5185 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5186
5187 # Check whether --with-gpm or --without-gpm was given.
5188 if test "${with_gpm+set}" = set; then
5189   withval="$with_gpm"
5190   with_gpm=$withval
5191 else
5192   with_gpm=maybe
5193 fi;
5194 echo "$as_me:5194: result: $with_gpm" >&5
5195 echo "${ECHO_T}$with_gpm" >&6
5196
5197 if test "$with_gpm" != no ; then
5198         echo "$as_me:5198: checking for gpm.h" >&5
5199 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5200 if test "${ac_cv_header_gpm_h+set}" = set; then
5201   echo $ECHO_N "(cached) $ECHO_C" >&6
5202 else
5203   cat >conftest.$ac_ext <<_ACEOF
5204 #line 5204 "configure"
5205 #include "confdefs.h"
5206 #include <gpm.h>
5207 _ACEOF
5208 if { (eval echo "$as_me:5208: \"$ac_cpp conftest.$ac_ext\"") >&5
5209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5210   ac_status=$?
5211   egrep -v '^ *\+' conftest.er1 >conftest.err
5212   rm -f conftest.er1
5213   cat conftest.err >&5
5214   echo "$as_me:5214: \$? = $ac_status" >&5
5215   (exit $ac_status); } >/dev/null; then
5216   if test -s conftest.err; then
5217     ac_cpp_err=$ac_c_preproc_warn_flag
5218   else
5219     ac_cpp_err=
5220   fi
5221 else
5222   ac_cpp_err=yes
5223 fi
5224 if test -z "$ac_cpp_err"; then
5225   ac_cv_header_gpm_h=yes
5226 else
5227   echo "$as_me: failed program was:" >&5
5228   cat conftest.$ac_ext >&5
5229   ac_cv_header_gpm_h=no
5230 fi
5231 rm -f conftest.err conftest.$ac_ext
5232 fi
5233 echo "$as_me:5233: result: $ac_cv_header_gpm_h" >&5
5234 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5235 if test $ac_cv_header_gpm_h = yes; then
5236
5237 cat >>confdefs.h <<\EOF
5238 #define HAVE_GPM_H 1
5239 EOF
5240
5241                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5242                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5243
5244 echo "${as_me:-configure}:5244: testing assuming we really have GPM library ..." 1>&5
5245
5246 cat >>confdefs.h <<\EOF
5247 #define HAVE_LIBGPM 1
5248 EOF
5249
5250                 else
5251                         echo "$as_me:5251: checking for Gpm_Open in -lgpm" >&5
5252 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5253 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5254   echo $ECHO_N "(cached) $ECHO_C" >&6
5255 else
5256   ac_check_lib_save_LIBS=$LIBS
5257 LIBS="-lgpm  $LIBS"
5258 cat >conftest.$ac_ext <<_ACEOF
5259 #line 5259 "configure"
5260 #include "confdefs.h"
5261
5262 /* Override any gcc2 internal prototype to avoid an error.  */
5263 #ifdef __cplusplus
5264 extern "C"
5265 #endif
5266 /* We use char because int might match the return type of a gcc2
5267    builtin and then its argument prototype would still apply.  */
5268 char Gpm_Open ();
5269 int
5270 main ()
5271 {
5272 Gpm_Open ();
5273   ;
5274   return 0;
5275 }
5276 _ACEOF
5277 rm -f conftest.$ac_objext conftest$ac_exeext
5278 if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
5279   (eval $ac_link) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); } &&
5283          { ac_try='test -s conftest$ac_exeext'
5284   { (eval echo "$as_me:5284: \"$ac_try\"") >&5
5285   (eval $ac_try) 2>&5
5286   ac_status=$?
5287   echo "$as_me:5287: \$? = $ac_status" >&5
5288   (exit $ac_status); }; }; then
5289   ac_cv_lib_gpm_Gpm_Open=yes
5290 else
5291   echo "$as_me: failed program was:" >&5
5292 cat conftest.$ac_ext >&5
5293 ac_cv_lib_gpm_Gpm_Open=no
5294 fi
5295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5296 LIBS=$ac_check_lib_save_LIBS
5297 fi
5298 echo "$as_me:5298: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5299 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5300 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5301   :
5302 else
5303
5304                                 { { echo "$as_me:5304: error: Cannot link with GPM library" >&5
5305 echo "$as_me: error: Cannot link with GPM library" >&2;}
5306    { (exit 1); exit 1; }; }
5307                 fi
5308                 with_gpm=yes
5309
5310 fi
5311
5312 else
5313
5314                 test "$with_gpm" != maybe && { echo "$as_me:5314: WARNING: Cannot find GPM header" >&5
5315 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5316                 with_gpm=no
5317
5318 fi
5319
5320 fi
5321
5322 if test "$with_gpm" != no ; then
5323         echo "$as_me:5323: checking if you want to load GPM dynamically" >&5
5324 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5325
5326 # Check whether --with-dlsym or --without-dlsym was given.
5327 if test "${with_dlsym+set}" = set; then
5328   withval="$with_dlsym"
5329   with_dlsym=$withval
5330 else
5331   with_dlsym=yes
5332 fi;
5333         echo "$as_me:5333: result: $with_dlsym" >&5
5334 echo "${ECHO_T}$with_dlsym" >&6
5335         if test "x$with_dlsym" = xyes ; then
5336
5337 cf_have_dlsym=no
5338 echo "$as_me:5338: checking for dlsym" >&5
5339 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5340 if test "${ac_cv_func_dlsym+set}" = set; then
5341   echo $ECHO_N "(cached) $ECHO_C" >&6
5342 else
5343   cat >conftest.$ac_ext <<_ACEOF
5344 #line 5344 "configure"
5345 #include "confdefs.h"
5346 /* System header to define __stub macros and hopefully few prototypes,
5347     which can conflict with char dlsym (); below.  */
5348 #include <assert.h>
5349 /* Override any gcc2 internal prototype to avoid an error.  */
5350 #ifdef __cplusplus
5351 extern "C"
5352 #endif
5353 /* We use char because int might match the return type of a gcc2
5354    builtin and then its argument prototype would still apply.  */
5355 char dlsym ();
5356 char (*f) ();
5357
5358 int
5359 main ()
5360 {
5361 /* The GNU C library defines this for functions which it implements
5362     to always fail with ENOSYS.  Some functions are actually named
5363     something starting with __ and the normal name is an alias.  */
5364 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5365 choke me
5366 #else
5367 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5368 #endif
5369
5370   ;
5371   return 0;
5372 }
5373 _ACEOF
5374 rm -f conftest.$ac_objext conftest$ac_exeext
5375 if { (eval echo "$as_me:5375: \"$ac_link\"") >&5
5376   (eval $ac_link) 2>&5
5377   ac_status=$?
5378   echo "$as_me:5378: \$? = $ac_status" >&5
5379   (exit $ac_status); } &&
5380          { ac_try='test -s conftest$ac_exeext'
5381   { (eval echo "$as_me:5381: \"$ac_try\"") >&5
5382   (eval $ac_try) 2>&5
5383   ac_status=$?
5384   echo "$as_me:5384: \$? = $ac_status" >&5
5385   (exit $ac_status); }; }; then
5386   ac_cv_func_dlsym=yes
5387 else
5388   echo "$as_me: failed program was:" >&5
5389 cat conftest.$ac_ext >&5
5390 ac_cv_func_dlsym=no
5391 fi
5392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5393 fi
5394 echo "$as_me:5394: result: $ac_cv_func_dlsym" >&5
5395 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5396 if test $ac_cv_func_dlsym = yes; then
5397   cf_have_dlsym=yes
5398 else
5399
5400 cf_have_libdl=no
5401 echo "$as_me:5401: checking for dlsym in -ldl" >&5
5402 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5403 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5404   echo $ECHO_N "(cached) $ECHO_C" >&6
5405 else
5406   ac_check_lib_save_LIBS=$LIBS
5407 LIBS="-ldl  $LIBS"
5408 cat >conftest.$ac_ext <<_ACEOF
5409 #line 5409 "configure"
5410 #include "confdefs.h"
5411
5412 /* Override any gcc2 internal prototype to avoid an error.  */
5413 #ifdef __cplusplus
5414 extern "C"
5415 #endif
5416 /* We use char because int might match the return type of a gcc2
5417    builtin and then its argument prototype would still apply.  */
5418 char dlsym ();
5419 int
5420 main ()
5421 {
5422 dlsym ();
5423   ;
5424   return 0;
5425 }
5426 _ACEOF
5427 rm -f conftest.$ac_objext conftest$ac_exeext
5428 if { (eval echo "$as_me:5428: \"$ac_link\"") >&5
5429   (eval $ac_link) 2>&5
5430   ac_status=$?
5431   echo "$as_me:5431: \$? = $ac_status" >&5
5432   (exit $ac_status); } &&
5433          { ac_try='test -s conftest$ac_exeext'
5434   { (eval echo "$as_me:5434: \"$ac_try\"") >&5
5435   (eval $ac_try) 2>&5
5436   ac_status=$?
5437   echo "$as_me:5437: \$? = $ac_status" >&5
5438   (exit $ac_status); }; }; then
5439   ac_cv_lib_dl_dlsym=yes
5440 else
5441   echo "$as_me: failed program was:" >&5
5442 cat conftest.$ac_ext >&5
5443 ac_cv_lib_dl_dlsym=no
5444 fi
5445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5446 LIBS=$ac_check_lib_save_LIBS
5447 fi
5448 echo "$as_me:5448: result: $ac_cv_lib_dl_dlsym" >&5
5449 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5450 if test $ac_cv_lib_dl_dlsym = yes; then
5451
5452         cf_have_dlsym=yes
5453         cf_have_libdl=yes
5454 fi
5455
5456 fi
5457
5458 if test "$cf_have_dlsym" = yes ; then
5459         test "$cf_have_libdl" = yes && {
5460 cf_add_libs="-ldl"
5461 # Filter out duplicates - this happens with badly-designed ".pc" files...
5462 for cf_add_1lib in $LIBS
5463 do
5464         for cf_add_2lib in $cf_add_libs
5465         do
5466                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5467                 then
5468                         cf_add_1lib=
5469                         break
5470                 fi
5471         done
5472         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5473 done
5474 LIBS="$cf_add_libs"
5475  }
5476
5477         echo "$as_me:5477: checking whether able to link to dl*() functions" >&5
5478 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5479         cat >conftest.$ac_ext <<_ACEOF
5480 #line 5480 "configure"
5481 #include "confdefs.h"
5482 #include <dlfcn.h>
5483 int
5484 main ()
5485 {
5486
5487                 void *obj;
5488                 if ((obj = dlopen("filename", 0)) != 0) {
5489                         if (dlsym(obj, "symbolname") == 0) {
5490                         dlclose(obj);
5491                         }
5492                 }
5493   ;
5494   return 0;
5495 }
5496 _ACEOF
5497 rm -f conftest.$ac_objext conftest$ac_exeext
5498 if { (eval echo "$as_me:5498: \"$ac_link\"") >&5
5499   (eval $ac_link) 2>&5
5500   ac_status=$?
5501   echo "$as_me:5501: \$? = $ac_status" >&5
5502   (exit $ac_status); } &&
5503          { ac_try='test -s conftest$ac_exeext'
5504   { (eval echo "$as_me:5504: \"$ac_try\"") >&5
5505   (eval $ac_try) 2>&5
5506   ac_status=$?
5507   echo "$as_me:5507: \$? = $ac_status" >&5
5508   (exit $ac_status); }; }; then
5509
5510 cat >>confdefs.h <<\EOF
5511 #define HAVE_LIBDL 1
5512 EOF
5513
5514 else
5515   echo "$as_me: failed program was:" >&5
5516 cat conftest.$ac_ext >&5
5517
5518                 { { echo "$as_me:5518: error: Cannot link test program for libdl" >&5
5519 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5520    { (exit 1); exit 1; }; }
5521 fi
5522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5523         echo "$as_me:5523: result: ok" >&5
5524 echo "${ECHO_T}ok" >&6
5525 else
5526         { { echo "$as_me:5526: error: Cannot find dlsym function" >&5
5527 echo "$as_me: error: Cannot find dlsym function" >&2;}
5528    { (exit 1); exit 1; }; }
5529 fi
5530
5531                 if test "x$with_gpm" != xyes ; then
5532                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5533
5534 echo "${as_me:-configure}:5534: testing assuming soname for gpm is $with_gpm ..." 1>&5
5535
5536                         cf_cv_gpm_soname="$with_gpm"
5537                 else
5538
5539 echo "$as_me:5539: checking for soname of gpm library" >&5
5540 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5541 if test "${cf_cv_gpm_soname+set}" = set; then
5542   echo $ECHO_N "(cached) $ECHO_C" >&6
5543 else
5544
5545 cf_cv_gpm_soname=unknown
5546 if test "$cross_compiling" != yes ; then
5547 cat >conftest.$ac_ext <<CF_EOF
5548 #include <gpm.h>
5549 int main()
5550 {
5551 if (Gpm_Open(0,0)) Gpm_Close();
5552         ${cf_cv_main_return:-return}(0);
5553 }
5554 CF_EOF
5555 cf_save_LIBS="$LIBS"
5556
5557 cf_add_libs="-lgpm"
5558 # Filter out duplicates - this happens with badly-designed ".pc" files...
5559 for cf_add_1lib in $LIBS
5560 do
5561         for cf_add_2lib in $cf_add_libs
5562         do
5563                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5564                 then
5565                         cf_add_1lib=
5566                         break
5567                 fi
5568         done
5569         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5570 done
5571 LIBS="$cf_add_libs"
5572
5573         if { (eval echo "$as_me:5573: \"$ac_compile\"") >&5
5574   (eval $ac_compile) 2>&5
5575   ac_status=$?
5576   echo "$as_me:5576: \$? = $ac_status" >&5
5577   (exit $ac_status); } ; then
5578                 if { (eval echo "$as_me:5578: \"$ac_link\"") >&5
5579   (eval $ac_link) 2>&5
5580   ac_status=$?
5581   echo "$as_me:5581: \$? = $ac_status" >&5
5582   (exit $ac_status); } ; then
5583                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5584                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5585                 fi
5586         fi
5587 rm -rf conftest*
5588 LIBS="$cf_save_LIBS"
5589 fi
5590
5591 fi
5592 echo "$as_me:5592: result: $cf_cv_gpm_soname" >&5
5593 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5594
5595                 fi
5596                 test "$cf_cv_gpm_soname" != "unknown" &&
5597 cat >>confdefs.h <<EOF
5598 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5599 EOF
5600
5601                 SHLIB_LIST="-ldl $SHLIB_LIST"
5602         else
5603                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5604
5605 cf_add_libs="-lgpm"
5606 # Filter out duplicates - this happens with badly-designed ".pc" files...
5607 for cf_add_1lib in $TEST_LIBS
5608 do
5609         for cf_add_2lib in $cf_add_libs
5610         do
5611                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5612                 then
5613                         cf_add_1lib=
5614                         break
5615                 fi
5616         done
5617         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5618 done
5619 TEST_LIBS="$cf_add_libs"
5620
5621         fi
5622
5623 cat >>confdefs.h <<\EOF
5624 #define HAVE_LIBGPM 1
5625 EOF
5626
5627 echo "$as_me:5627: checking for Gpm_Wgetch in -lgpm" >&5
5628 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5629 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5630   echo $ECHO_N "(cached) $ECHO_C" >&6
5631 else
5632   ac_check_lib_save_LIBS=$LIBS
5633 LIBS="-lgpm  $LIBS"
5634 cat >conftest.$ac_ext <<_ACEOF
5635 #line 5635 "configure"
5636 #include "confdefs.h"
5637
5638 /* Override any gcc2 internal prototype to avoid an error.  */
5639 #ifdef __cplusplus
5640 extern "C"
5641 #endif
5642 /* We use char because int might match the return type of a gcc2
5643    builtin and then its argument prototype would still apply.  */
5644 char Gpm_Wgetch ();
5645 int
5646 main ()
5647 {
5648 Gpm_Wgetch ();
5649   ;
5650   return 0;
5651 }
5652 _ACEOF
5653 rm -f conftest.$ac_objext conftest$ac_exeext
5654 if { (eval echo "$as_me:5654: \"$ac_link\"") >&5
5655   (eval $ac_link) 2>&5
5656   ac_status=$?
5657   echo "$as_me:5657: \$? = $ac_status" >&5
5658   (exit $ac_status); } &&
5659          { ac_try='test -s conftest$ac_exeext'
5660   { (eval echo "$as_me:5660: \"$ac_try\"") >&5
5661   (eval $ac_try) 2>&5
5662   ac_status=$?
5663   echo "$as_me:5663: \$? = $ac_status" >&5
5664   (exit $ac_status); }; }; then
5665   ac_cv_lib_gpm_Gpm_Wgetch=yes
5666 else
5667   echo "$as_me: failed program was:" >&5
5668 cat conftest.$ac_ext >&5
5669 ac_cv_lib_gpm_Gpm_Wgetch=no
5670 fi
5671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5672 LIBS=$ac_check_lib_save_LIBS
5673 fi
5674 echo "$as_me:5674: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5675 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5676 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5677
5678 echo "$as_me:5678: checking if GPM is weakly bound to curses library" >&5
5679 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5680 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5681   echo $ECHO_N "(cached) $ECHO_C" >&6
5682 else
5683
5684 cf_cv_check_gpm_wgetch=unknown
5685 if test "$cross_compiling" != yes ; then
5686
5687 cat >conftest.$ac_ext <<CF_EOF
5688 #include <gpm.h>
5689 int main()
5690 {
5691         Gpm_Wgetch();
5692         ${cf_cv_main_return:-return}(0);
5693 }
5694 CF_EOF
5695
5696         cf_save_LIBS="$LIBS"
5697         # This only works if we can look at the symbol table.  If a shared
5698         # library is stripped for install, we cannot use that.  So we're forced
5699         # to rely on the static library, noting that some packagers may not
5700         # include it.
5701         LIBS="-static -lgpm -dynamic $LIBS"
5702         if { (eval echo "$as_me:5702: \"$ac_compile\"") >&5
5703   (eval $ac_compile) 2>&5
5704   ac_status=$?
5705   echo "$as_me:5705: \$? = $ac_status" >&5
5706   (exit $ac_status); } ; then
5707                 if { (eval echo "$as_me:5707: \"$ac_link\"") >&5
5708   (eval $ac_link) 2>&5
5709   ac_status=$?
5710   echo "$as_me:5710: \$? = $ac_status" >&5
5711   (exit $ac_status); } ; then
5712                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5713                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5714                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5715                 fi
5716         fi
5717         rm -rf conftest*
5718         LIBS="$cf_save_LIBS"
5719 fi
5720
5721 fi
5722 echo "$as_me:5722: result: $cf_cv_check_gpm_wgetch" >&5
5723 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5724
5725 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5726         { echo "$as_me:5726: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5727 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5728 fi
5729
5730 fi
5731
5732 fi
5733
5734 # not everyone has "test -c"
5735 if test -c /dev/sysmouse 2>/dev/null ; then
5736 echo "$as_me:5736: checking if you want to use sysmouse" >&5
5737 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5738
5739 # Check whether --with-sysmouse or --without-sysmouse was given.
5740 if test "${with_sysmouse+set}" = set; then
5741   withval="$with_sysmouse"
5742   cf_with_sysmouse=$withval
5743 else
5744   cf_with_sysmouse=maybe
5745 fi;
5746         if test "$cf_with_sysmouse" != no ; then
5747         cat >conftest.$ac_ext <<_ACEOF
5748 #line 5748 "configure"
5749 #include "confdefs.h"
5750
5751 #include <osreldate.h>
5752 #if (__FreeBSD_version >= 400017)
5753 #include <sys/consio.h>
5754 #include <sys/fbio.h>
5755 #else
5756 #include <machine/console.h>
5757 #endif
5758
5759 int
5760 main ()
5761 {
5762
5763         struct mouse_info the_mouse;
5764         ioctl(0, CONS_MOUSECTL, &the_mouse);
5765
5766   ;
5767   return 0;
5768 }
5769 _ACEOF
5770 rm -f conftest.$ac_objext
5771 if { (eval echo "$as_me:5771: \"$ac_compile\"") >&5
5772   (eval $ac_compile) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); } &&
5776          { ac_try='test -s conftest.$ac_objext'
5777   { (eval echo "$as_me:5777: \"$ac_try\"") >&5
5778   (eval $ac_try) 2>&5
5779   ac_status=$?
5780   echo "$as_me:5780: \$? = $ac_status" >&5
5781   (exit $ac_status); }; }; then
5782   cf_with_sysmouse=yes
5783 else
5784   echo "$as_me: failed program was:" >&5
5785 cat conftest.$ac_ext >&5
5786 cf_with_sysmouse=no
5787 fi
5788 rm -f conftest.$ac_objext conftest.$ac_ext
5789         fi
5790 echo "$as_me:5790: result: $cf_with_sysmouse" >&5
5791 echo "${ECHO_T}$cf_with_sysmouse" >&6
5792 test "$cf_with_sysmouse" = yes &&
5793 cat >>confdefs.h <<\EOF
5794 #define USE_SYSMOUSE 1
5795 EOF
5796
5797 fi
5798
5799 if test X"$CC_G_OPT" = X"" ; then
5800         CC_G_OPT='-g'
5801         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5802 fi
5803
5804 if test X"$CXX_G_OPT" = X"" ; then
5805         CXX_G_OPT='-g'
5806         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5807 fi
5808
5809 echo "$as_me:5809: checking for default loader flags" >&5
5810 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5811 case $DFT_LWR_MODEL in
5812 (libtool) LD_MODEL=''   ;;
5813 (normal)  LD_MODEL=''   ;;
5814 (debug)   LD_MODEL=$CC_G_OPT ;;
5815 (profile) LD_MODEL='-pg';;
5816 (shared)  LD_MODEL=''   ;;
5817 esac
5818 echo "$as_me:5818: result: $LD_MODEL" >&5
5819 echo "${ECHO_T}$LD_MODEL" >&6
5820
5821 case $DFT_LWR_MODEL in
5822 (shared)
5823
5824 echo "$as_me:5824: checking if rpath option should be used" >&5
5825 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5826
5827 # Check whether --enable-rpath or --disable-rpath was given.
5828 if test "${enable_rpath+set}" = set; then
5829   enableval="$enable_rpath"
5830   cf_cv_enable_rpath=$enableval
5831 else
5832   cf_cv_enable_rpath=no
5833 fi;
5834 echo "$as_me:5834: result: $cf_cv_enable_rpath" >&5
5835 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5836
5837 echo "$as_me:5837: checking if shared libraries should be relinked during install" >&5
5838 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5839
5840 # Check whether --enable-relink or --disable-relink was given.
5841 if test "${enable_relink+set}" = set; then
5842   enableval="$enable_relink"
5843   cf_cv_do_relink=$enableval
5844 else
5845   cf_cv_do_relink=yes
5846 fi;
5847 echo "$as_me:5847: result: $cf_cv_do_relink" >&5
5848 echo "${ECHO_T}$cf_cv_do_relink" >&6
5849         ;;
5850 esac
5851
5852 # we will build libraries one-level down.
5853 rel_builddir=..
5854
5855 LD_RPATH_OPT=
5856 echo "$as_me:5856: checking for an rpath option" >&5
5857 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5858 case $cf_cv_system_name in
5859 (irix*)
5860         if test "$GCC" = yes; then
5861                 LD_RPATH_OPT="-Wl,-rpath,"
5862         else
5863                 LD_RPATH_OPT="-rpath "
5864         fi
5865         ;;
5866 (linux*|gnu*|k*bsd*-gnu)
5867         LD_RPATH_OPT="-Wl,-rpath,"
5868         ;;
5869 (openbsd[2-9].*|mirbsd*)
5870         LD_RPATH_OPT="-Wl,-rpath,"
5871         ;;
5872 (dragonfly*|freebsd*)
5873         LD_RPATH_OPT="-rpath "
5874         ;;
5875 (netbsd*)
5876         LD_RPATH_OPT="-Wl,-rpath,"
5877         ;;
5878 (osf*|mls+*)
5879         LD_RPATH_OPT="-rpath "
5880         ;;
5881 (solaris2*)
5882         LD_RPATH_OPT="-R"
5883         ;;
5884 (*)
5885         ;;
5886 esac
5887 echo "$as_me:5887: result: $LD_RPATH_OPT" >&5
5888 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5889
5890 case "x$LD_RPATH_OPT" in
5891 (x-R*)
5892         echo "$as_me:5892: checking if we need a space after rpath option" >&5
5893 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5894         cf_save_LIBS="$LIBS"
5895
5896 cf_add_libs="${LD_RPATH_OPT}$libdir"
5897 # Filter out duplicates - this happens with badly-designed ".pc" files...
5898 for cf_add_1lib in $LIBS
5899 do
5900         for cf_add_2lib in $cf_add_libs
5901         do
5902                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5903                 then
5904                         cf_add_1lib=
5905                         break
5906                 fi
5907         done
5908         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5909 done
5910 LIBS="$cf_add_libs"
5911
5912         cat >conftest.$ac_ext <<_ACEOF
5913 #line 5913 "configure"
5914 #include "confdefs.h"
5915
5916 int
5917 main ()
5918 {
5919
5920   ;
5921   return 0;
5922 }
5923 _ACEOF
5924 rm -f conftest.$ac_objext conftest$ac_exeext
5925 if { (eval echo "$as_me:5925: \"$ac_link\"") >&5
5926   (eval $ac_link) 2>&5
5927   ac_status=$?
5928   echo "$as_me:5928: \$? = $ac_status" >&5
5929   (exit $ac_status); } &&
5930          { ac_try='test -s conftest$ac_exeext'
5931   { (eval echo "$as_me:5931: \"$ac_try\"") >&5
5932   (eval $ac_try) 2>&5
5933   ac_status=$?
5934   echo "$as_me:5934: \$? = $ac_status" >&5
5935   (exit $ac_status); }; }; then
5936   cf_rpath_space=no
5937 else
5938   echo "$as_me: failed program was:" >&5
5939 cat conftest.$ac_ext >&5
5940 cf_rpath_space=yes
5941 fi
5942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5943         LIBS="$cf_save_LIBS"
5944         echo "$as_me:5944: result: $cf_rpath_space" >&5
5945 echo "${ECHO_T}$cf_rpath_space" >&6
5946         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5947         ;;
5948 esac
5949
5950         RM_SHARED_OPTS=
5951         LOCAL_LDFLAGS=
5952         LOCAL_LDFLAGS2=
5953         LD_SHARED_OPTS=
5954         INSTALL_LIB="-m 644"
5955         : ${rel_builddir:=.}
5956
5957         shlibdir=$libdir
5958
5959         MAKE_DLLS="#"
5960
5961         cf_cv_do_symlinks=no
5962         cf_ld_rpath_opt=
5963         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5964
5965         echo "$as_me:5965: checking if release/abi version should be used for shared libs" >&5
5966 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5967
5968 # Check whether --with-shlib-version or --without-shlib-version was given.
5969 if test "${with_shlib_version+set}" = set; then
5970   withval="$with_shlib_version"
5971   test -z "$withval" && withval=auto
5972         case $withval in
5973         (yes)
5974                 cf_cv_shlib_version=auto
5975                 ;;
5976         (rel|abi|auto)
5977                 cf_cv_shlib_version=$withval
5978                 ;;
5979         (*)
5980                 echo "$as_me:5980: result: $withval" >&5
5981 echo "${ECHO_T}$withval" >&6
5982                 { { echo "$as_me:5982: error: option value must be one of: rel, abi, or auto" >&5
5983 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5984    { (exit 1); exit 1; }; }
5985                 ;;
5986         esac
5987
5988 else
5989   cf_cv_shlib_version=auto
5990 fi;
5991         echo "$as_me:5991: result: $cf_cv_shlib_version" >&5
5992 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5993
5994         cf_cv_rm_so_locs=no
5995         cf_try_cflags=
5996
5997         # Some less-capable ports of gcc support only -fpic
5998         CC_SHARED_OPTS=
5999         if test "$GCC" = yes
6000         then
6001                 echo "$as_me:6001: checking which $CC option to use" >&5
6002 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6003                 cf_save_CFLAGS="$CFLAGS"
6004                 for CC_SHARED_OPTS in -fPIC -fpic ''
6005                 do
6006                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6007                         cat >conftest.$ac_ext <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010 #include <stdio.h>
6011 int
6012 main ()
6013 {
6014 int x = 1
6015   ;
6016   return 0;
6017 }
6018 _ACEOF
6019 rm -f conftest.$ac_objext
6020 if { (eval echo "$as_me:6020: \"$ac_compile\"") >&5
6021   (eval $ac_compile) 2>&5
6022   ac_status=$?
6023   echo "$as_me:6023: \$? = $ac_status" >&5
6024   (exit $ac_status); } &&
6025          { ac_try='test -s conftest.$ac_objext'
6026   { (eval echo "$as_me:6026: \"$ac_try\"") >&5
6027   (eval $ac_try) 2>&5
6028   ac_status=$?
6029   echo "$as_me:6029: \$? = $ac_status" >&5
6030   (exit $ac_status); }; }; then
6031   break
6032 else
6033   echo "$as_me: failed program was:" >&5
6034 cat conftest.$ac_ext >&5
6035 fi
6036 rm -f conftest.$ac_objext conftest.$ac_ext
6037                 done
6038                 echo "$as_me:6038: result: $CC_SHARED_OPTS" >&5
6039 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6040                 CFLAGS="$cf_save_CFLAGS"
6041         fi
6042
6043         cf_cv_shlib_version_infix=no
6044
6045         case $cf_cv_system_name in
6046         (aix4.3-9*|aix[5-7]*)
6047                 if test "$GCC" = yes; then
6048                         CC_SHARED_OPTS='-Wl,-brtl'
6049                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6050                 else
6051                         CC_SHARED_OPTS='-brtl'
6052                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6053                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6054                 fi
6055                 ;;
6056         (beos*)
6057                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6058                 ;;
6059         (cygwin*)
6060                 CC_SHARED_OPTS=
6061                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6062                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6063                 cf_cv_shlib_version=cygdll
6064                 cf_cv_shlib_version_infix=cygdll
6065                 shlibdir=$bindir
6066                 MAKE_DLLS=
6067                 cat >mk_shared_lib.sh <<-CF_EOF
6068                 #!$SHELL
6069                 SHARED_LIB=\$1
6070                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6071                 shift
6072                 cat <<-EOF
6073                 Linking shared library
6074                 ** SHARED_LIB \$SHARED_LIB
6075                 ** IMPORT_LIB \$IMPORT_LIB
6076 EOF
6077                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6078 CF_EOF
6079                 chmod +x mk_shared_lib.sh
6080                 ;;
6081         (msys*)
6082                 CC_SHARED_OPTS=
6083                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6084                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6085                 cf_cv_shlib_version=msysdll
6086                 cf_cv_shlib_version_infix=msysdll
6087                 shlibdir=$bindir
6088                 MAKE_DLLS=
6089                 cat >mk_shared_lib.sh <<-CF_EOF
6090                 #!$SHELL
6091                 SHARED_LIB=\$1
6092                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6093                 shift
6094                 cat <<-EOF
6095                 Linking shared library
6096                 ** SHARED_LIB \$SHARED_LIB
6097                 ** IMPORT_LIB \$IMPORT_LIB
6098 EOF
6099                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6100 CF_EOF
6101                 chmod +x mk_shared_lib.sh
6102                 ;;
6103         (darwin*)
6104                 cf_try_cflags="no-cpp-precomp"
6105                 CC_SHARED_OPTS="-dynamic"
6106                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6107                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6108                 cf_cv_shlib_version_infix=yes
6109                 echo "$as_me:6109: checking if ld -search_paths_first works" >&5
6110 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6111 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6112   echo $ECHO_N "(cached) $ECHO_C" >&6
6113 else
6114
6115                         cf_save_LDFLAGS=$LDFLAGS
6116                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6117                         cat >conftest.$ac_ext <<_ACEOF
6118 #line 6118 "configure"
6119 #include "confdefs.h"
6120
6121 int
6122 main ()
6123 {
6124 int i;
6125   ;
6126   return 0;
6127 }
6128 _ACEOF
6129 rm -f conftest.$ac_objext conftest$ac_exeext
6130 if { (eval echo "$as_me:6130: \"$ac_link\"") >&5
6131   (eval $ac_link) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); } &&
6135          { ac_try='test -s conftest$ac_exeext'
6136   { (eval echo "$as_me:6136: \"$ac_try\"") >&5
6137   (eval $ac_try) 2>&5
6138   ac_status=$?
6139   echo "$as_me:6139: \$? = $ac_status" >&5
6140   (exit $ac_status); }; }; then
6141   cf_cv_ldflags_search_paths_first=yes
6142 else
6143   echo "$as_me: failed program was:" >&5
6144 cat conftest.$ac_ext >&5
6145 cf_cv_ldflags_search_paths_first=no
6146 fi
6147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6148                                 LDFLAGS=$cf_save_LDFLAGS
6149 fi
6150 echo "$as_me:6150: result: $cf_cv_ldflags_search_paths_first" >&5
6151 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6152                 if test $cf_cv_ldflags_search_paths_first = yes; then
6153                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6154                 fi
6155                 ;;
6156         (hpux[7-8]*)
6157                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6158                 if test "$GCC" != yes; then
6159                         CC_SHARED_OPTS='+Z'
6160                 fi
6161                 MK_SHARED_LIB='${LD} -b -o $@'
6162                 INSTALL_LIB="-m 555"
6163                 ;;
6164         (hpux*)
6165                 # (tested with gcc 2.7.2 -- I don't have c89)
6166                 if test "$GCC" = yes; then
6167                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6168                 else
6169                         CC_SHARED_OPTS='+Z'
6170                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6171                 fi
6172                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6173                 # HP-UX shared libraries must be executable, and should be
6174                 # readonly to exploit a quirk in the memory manager.
6175                 INSTALL_LIB="-m 555"
6176                 ;;
6177         (interix*)
6178                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6179                 if test "$cf_cv_shlib_version" = rel; then
6180                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6181                 else
6182                         cf_shared_soname='`basename `'
6183                 fi
6184                 CC_SHARED_OPTS=
6185                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6186                 ;;
6187         (irix*)
6188                 if test "$cf_cv_enable_rpath" = yes ; then
6189                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6190                 fi
6191                 # tested with IRIX 5.2 and 'cc'.
6192                 if test "$GCC" != yes; then
6193                         CC_SHARED_OPTS='-KPIC'
6194                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6195                 else
6196                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6197                 fi
6198                 cf_cv_rm_so_locs=yes
6199                 ;;
6200         (linux*|gnu*|k*bsd*-gnu)
6201                 if test "$DFT_LWR_MODEL" = "shared" ; then
6202                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6203                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6204                 fi
6205                 if test "$cf_cv_enable_rpath" = yes ; then
6206                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6207                 fi
6208
6209         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6210         if test "$cf_cv_shlib_version" = rel; then
6211                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6212         else
6213                 cf_cv_shared_soname='`basename $@`'
6214         fi
6215
6216                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6217                 ;;
6218         (mingw*)
6219                 cf_cv_shlib_version=mingw
6220                 cf_cv_shlib_version_infix=mingw
6221                 shlibdir=$bindir
6222                 MAKE_DLLS=
6223                 if test "$DFT_LWR_MODEL" = "shared" ; then
6224                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6225                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6226                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6227                 fi
6228                 CC_SHARED_OPTS=
6229                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6230                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6231                 cat >mk_shared_lib.sh <<-CF_EOF
6232                 #!$SHELL
6233                 SHARED_LIB=\$1
6234                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6235                 shift
6236                 cat <<-EOF
6237                 Linking shared library
6238                 ** SHARED_LIB \$SHARED_LIB
6239                 ** IMPORT_LIB \$IMPORT_LIB
6240 EOF
6241                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6242 CF_EOF
6243                 chmod +x mk_shared_lib.sh
6244                 ;;
6245         (openbsd[2-9].*|mirbsd*)
6246                 if test "$DFT_LWR_MODEL" = "shared" ; then
6247                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6248                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6249                 fi
6250                 if test "$cf_cv_enable_rpath" = yes ; then
6251                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6252                 fi
6253                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6254
6255         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6256         if test "$cf_cv_shlib_version" = rel; then
6257                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6258         else
6259                 cf_cv_shared_soname='`basename $@`'
6260         fi
6261
6262                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6263                 ;;
6264         (nto-qnx*|openbsd*|freebsd[12].*)
6265                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6266                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6267                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6268                 ;;
6269         (dragonfly*|freebsd*)
6270                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6271                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6272                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6273                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6274                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6275                 fi
6276
6277         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6278         if test "$cf_cv_shlib_version" = rel; then
6279                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6280         else
6281                 cf_cv_shared_soname='`basename $@`'
6282         fi
6283
6284                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6285                 ;;
6286         (netbsd*)
6287                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6288                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6289                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6290                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6291                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6292                         if test "$cf_cv_shlib_version" = auto; then
6293                         if test -f /usr/libexec/ld.elf_so; then
6294                                 cf_cv_shlib_version=abi
6295                         else
6296                                 cf_cv_shlib_version=rel
6297                         fi
6298                         fi
6299
6300         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6301         if test "$cf_cv_shlib_version" = rel; then
6302                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6303         else
6304                 cf_cv_shared_soname='`basename $@`'
6305         fi
6306
6307                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6308                 else
6309                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6310                 fi
6311                 ;;
6312         (osf*|mls+*)
6313                 # tested with OSF/1 V3.2 and 'cc'
6314                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6315                 # link with shared libs).
6316                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6317                 case $host_os in
6318                 (osf4*)
6319                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6320                         ;;
6321                 esac
6322                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6323                 if test "$DFT_LWR_MODEL" = "shared" ; then
6324                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6325                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6326                 fi
6327                 cf_cv_rm_so_locs=yes
6328                 ;;
6329         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6330                 # tested with osr5.0.5
6331                 if test "$GCC" != yes; then
6332                         CC_SHARED_OPTS='-belf -KPIC'
6333                 fi
6334                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6335                 if test "$cf_cv_enable_rpath" = yes ; then
6336                         # only way is to set LD_RUN_PATH but no switch for it
6337                         RUN_PATH=$libdir
6338                 fi
6339                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6340                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6341                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6342                 ;;
6343         (sunos4*)
6344                 # tested with SunOS 4.1.1 and gcc 2.7.0
6345                 if test "$GCC" != yes; then
6346                         CC_SHARED_OPTS='-KPIC'
6347                 fi
6348                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6349                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6350                 ;;
6351         (solaris2*)
6352                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6353                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6354                 if test "$DFT_LWR_MODEL" = "shared" ; then
6355                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6356                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6357                 fi
6358                 if test "$cf_cv_enable_rpath" = yes ; then
6359                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6360                 fi
6361
6362         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6363         if test "$cf_cv_shlib_version" = rel; then
6364                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6365         else
6366                 cf_cv_shared_soname='`basename $@`'
6367         fi
6368
6369                 if test "$GCC" != yes; then
6370                         cf_save_CFLAGS="$CFLAGS"
6371                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6372                         do
6373                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6374                                 cat >conftest.$ac_ext <<_ACEOF
6375 #line 6375 "configure"
6376 #include "confdefs.h"
6377 #include <stdio.h>
6378 int
6379 main ()
6380 {
6381 printf("Hello\n");
6382   ;
6383   return 0;
6384 }
6385 _ACEOF
6386 rm -f conftest.$ac_objext
6387 if { (eval echo "$as_me:6387: \"$ac_compile\"") >&5
6388   (eval $ac_compile) 2>&5
6389   ac_status=$?
6390   echo "$as_me:6390: \$? = $ac_status" >&5
6391   (exit $ac_status); } &&
6392          { ac_try='test -s conftest.$ac_objext'
6393   { (eval echo "$as_me:6393: \"$ac_try\"") >&5
6394   (eval $ac_try) 2>&5
6395   ac_status=$?
6396   echo "$as_me:6396: \$? = $ac_status" >&5
6397   (exit $ac_status); }; }; then
6398   break
6399 else
6400   echo "$as_me: failed program was:" >&5
6401 cat conftest.$ac_ext >&5
6402 fi
6403 rm -f conftest.$ac_objext conftest.$ac_ext
6404                         done
6405                         CFLAGS="$cf_save_CFLAGS"
6406                         CC_SHARED_OPTS=$cf_shared_opts
6407                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6408                 else
6409                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6410                 fi
6411                 ;;
6412         (sysv5uw7*|unix_sv*)
6413                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6414                 if test "$GCC" != yes; then
6415                         CC_SHARED_OPTS='-KPIC'
6416                 fi
6417                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6418                 ;;
6419         (*)
6420                 CC_SHARED_OPTS='unknown'
6421                 MK_SHARED_LIB='echo unknown'
6422                 ;;
6423         esac
6424
6425         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6426         case "$cf_cv_shlib_version" in
6427         (rel|abi)
6428                 case "$MK_SHARED_LIB" in
6429                 (*'-o $@')
6430                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6431                         ;;
6432                 (*)
6433                         { echo "$as_me:6433: WARNING: ignored --with-shlib-version" >&5
6434 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6435                         ;;
6436                 esac
6437                 ;;
6438         esac
6439
6440         if test -n "$cf_try_cflags"
6441         then
6442 cat > conftest.$ac_ext <<EOF
6443 #line 6443 "${as_me:-configure}"
6444 #include <stdio.h>
6445 int main(int argc, char *argv[])
6446 {
6447         printf("hello\n");
6448         return (argv[argc-1] == 0) ;
6449 }
6450 EOF
6451                 cf_save_CFLAGS="$CFLAGS"
6452                 for cf_opt in $cf_try_cflags
6453                 do
6454                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6455                         echo "$as_me:6455: checking if CFLAGS option -$cf_opt works" >&5
6456 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6457                         if { (eval echo "$as_me:6457: \"$ac_compile\"") >&5
6458   (eval $ac_compile) 2>&5
6459   ac_status=$?
6460   echo "$as_me:6460: \$? = $ac_status" >&5
6461   (exit $ac_status); }; then
6462                                 echo "$as_me:6462: result: yes" >&5
6463 echo "${ECHO_T}yes" >&6
6464                                 cf_save_CFLAGS="$CFLAGS"
6465                         else
6466                                 echo "$as_me:6466: result: no" >&5
6467 echo "${ECHO_T}no" >&6
6468                         fi
6469                 done
6470                 CFLAGS="$cf_save_CFLAGS"
6471         fi
6472
6473         # RPATH_LIST is a colon-separated list of directories
6474         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6475         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6476
6477         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6478
6479         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6480
6481 echo "${as_me:-configure}:6481: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6482
6483         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6484
6485 echo "${as_me:-configure}:6485: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6486
6487 for model in $cf_list_models; do
6488         case $model in
6489         (libtool)
6490
6491 echo "$as_me:6491: checking for additional libtool options" >&5
6492 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6493
6494 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6495 if test "${with_libtool_opts+set}" = set; then
6496   withval="$with_libtool_opts"
6497   with_libtool_opts=$withval
6498 else
6499   with_libtool_opts=no
6500 fi;
6501 echo "$as_me:6501: result: $with_libtool_opts" >&5
6502 echo "${ECHO_T}$with_libtool_opts" >&6
6503
6504 case .$with_libtool_opts in
6505 (.yes|.no|.)
6506         ;;
6507 (*)
6508         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6509         ;;
6510 esac
6511
6512 echo "$as_me:6512: checking if exported-symbols file should be used" >&5
6513 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6514
6515 # Check whether --with-export-syms or --without-export-syms was given.
6516 if test "${with_export_syms+set}" = set; then
6517   withval="$with_export_syms"
6518   with_export_syms=$withval
6519 else
6520   with_export_syms=no
6521 fi;
6522 if test "x$with_export_syms" = xyes
6523 then
6524         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6525
6526 fi
6527 echo "$as_me:6527: result: $with_export_syms" >&5
6528 echo "${ECHO_T}$with_export_syms" >&6
6529 if test "x$with_export_syms" != xno
6530 then
6531         EXPORT_SYMS="-export-symbols $with_export_syms"
6532
6533 fi
6534
6535                 ;;
6536         (shared)
6537                 if test "$CC_SHARED_OPTS" = "unknown"; then
6538                         { { echo "$as_me:6538: error: Shared libraries are not supported in this version" >&5
6539 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6540    { (exit 1); exit 1; }; }
6541                 fi
6542
6543 echo "$as_me:6543: checking if versioned-symbols file should be used" >&5
6544 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6545
6546 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6547 if test "${with_versioned_syms+set}" = set; then
6548   withval="$with_versioned_syms"
6549   with_versioned_syms=$withval
6550 else
6551   with_versioned_syms=no
6552 fi;
6553 if test "x$with_versioned_syms" = xyes
6554 then
6555         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6556
6557 fi
6558 echo "$as_me:6558: result: $with_versioned_syms" >&5
6559 echo "${ECHO_T}$with_versioned_syms" >&6
6560
6561 RESULTING_SYMS=
6562 VERSIONED_SYMS=
6563 WILDCARD_SYMS=
6564
6565 if test "x$with_versioned_syms" != xno
6566 then
6567         RESULTING_SYMS=$with_versioned_syms
6568         case "x$MK_SHARED_LIB" in
6569         (*-Wl,*)
6570                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6571                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6572                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6573
6574 echo "${as_me:-configure}:6574: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6575
6576                 ;;
6577         (*-dy\ *)
6578                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6579                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6580                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6581
6582 echo "${as_me:-configure}:6582: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6583
6584                 ;;
6585         (*)
6586                 { echo "$as_me:6586: WARNING: this system does not support versioned-symbols" >&5
6587 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6588                 ;;
6589         esac
6590
6591         # Linux ld can selectively override scope, e.g., of symbols beginning with
6592         # "_" by first declaring some as global, and then using a wildcard to
6593         # declare the others as local.  Some other loaders cannot do this.  Check
6594         # by constructing a (very) simple shared library and inspecting its
6595         # symbols.
6596         if test "x$VERSIONED_SYMS" != "x"
6597         then
6598                 echo "$as_me:6598: checking if wildcards can be used to selectively omit symbols" >&5
6599 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6600                 WILDCARD_SYMS=no
6601
6602                 # make sources
6603                 rm -f conftest.*
6604
6605                 cat >conftest.ver <<EOF
6606 module_1.0 {
6607 global:
6608         globalf1;
6609 local:
6610         localf1;
6611 };
6612 module_2.0 {
6613 global:
6614         globalf2;
6615 local:
6616         localf2;
6617         _*;
6618 } module_1.0;
6619 submodule_1.0 {
6620 global:
6621         subglobalf1;
6622         _ismissing;
6623 local:
6624         sublocalf1;
6625 };
6626 submodule_2.0 {
6627 global:
6628         subglobalf2;
6629 local:
6630         sublocalf2;
6631         _*;
6632 } submodule_1.0;
6633 EOF
6634                 cat >conftest.$ac_ext <<EOF
6635 #line 6635 "configure"
6636 int     _ismissing(void) { return 1; }
6637 int     _localf1(void) { return 1; }
6638 int     _localf2(void) { return 2; }
6639 int     globalf1(void) { return 1; }
6640 int     globalf2(void) { return 2; }
6641 int     _sublocalf1(void) { return 1; }
6642 int     _sublocalf2(void) { return 2; }
6643 int     subglobalf1(void) { return 1; }
6644 int     subglobalf2(void) { return 2; }
6645 EOF
6646                 cat >conftest.mk <<EOF
6647 CC=${CC}
6648 CFLAGS=${CFLAGS}
6649 CPPFLAGS=${CPPFLAGS}
6650 LDFLAGS=${LDFLAGS}
6651 LIBS=${LIBS}
6652 VERSIONED_SYMS=${VERSIONED_SYMS}
6653 RESULTING_SYMS=conftest.ver
6654 MK_SHARED_LIB=${MK_SHARED_LIB}
6655 conftest.so: conftest.$ac_cv_objext
6656                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6657 EOF
6658
6659                 # compile source, make library
6660                 if make -f conftest.mk 2>&5 >/dev/null
6661                 then
6662                         # test for missing symbol
6663                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6664                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6665                 fi
6666                 echo "$as_me:6666: result: $WILDCARD_SYMS" >&5
6667 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6668                 rm -f conftest.*
6669         fi
6670 fi
6671
6672                 ;;
6673         esac
6674 done
6675
6676 # pretend that ncurses==ncursesw==ncursest
6677 echo "$as_me:6677: checking if you want to disable library suffixes" >&5
6678 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6679
6680 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6681 if test "${enable_lib_suffixes+set}" = set; then
6682   enableval="$enable_lib_suffixes"
6683   test "$enableval" != no && enableval=yes
6684         if test "$enableval" != "yes" ; then
6685     disable_lib_suffixes=yes
6686         else
6687                 disable_lib_suffixes=no
6688         fi
6689 else
6690   enableval=yes
6691         disable_lib_suffixes=no
6692
6693 fi;
6694 echo "$as_me:6694: result: $disable_lib_suffixes" >&5
6695 echo "${ECHO_T}$disable_lib_suffixes" >&6
6696
6697 ### If we're building with rpath, try to link non-standard libs that way too.
6698 if test "$DFT_LWR_MODEL" = "shared"; then
6699
6700 echo "$as_me:6700: checking if rpath-hack should be disabled" >&5
6701 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6702
6703 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6704 if test "${enable_rpath_hack+set}" = set; then
6705   enableval="$enable_rpath_hack"
6706   test "$enableval" != no && enableval=yes
6707         if test "$enableval" != "yes" ; then
6708     cf_disable_rpath_hack=yes
6709         else
6710                 cf_disable_rpath_hack=no
6711         fi
6712 else
6713   enableval=yes
6714         cf_disable_rpath_hack=no
6715
6716 fi;
6717 echo "$as_me:6717: result: $cf_disable_rpath_hack" >&5
6718 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6719 if test "$cf_disable_rpath_hack" = no ; then
6720
6721 echo "$as_me:6721: checking for updated LDFLAGS" >&5
6722 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6723 if test -n "$LD_RPATH_OPT" ; then
6724         echo "$as_me:6724: result: maybe" >&5
6725 echo "${ECHO_T}maybe" >&6
6726
6727         for ac_prog in ldd
6728 do
6729   # Extract the first word of "$ac_prog", so it can be a program name with args.
6730 set dummy $ac_prog; ac_word=$2
6731 echo "$as_me:6731: checking for $ac_word" >&5
6732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6733 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6734   echo $ECHO_N "(cached) $ECHO_C" >&6
6735 else
6736   if test -n "$cf_ldd_prog"; then
6737   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6738 else
6739   ac_save_IFS=$IFS; IFS=$ac_path_separator
6740 ac_dummy="$PATH"
6741 for ac_dir in $ac_dummy; do
6742   IFS=$ac_save_IFS
6743   test -z "$ac_dir" && ac_dir=.
6744   $as_executable_p "$ac_dir/$ac_word" || continue
6745 ac_cv_prog_cf_ldd_prog="$ac_prog"
6746 echo "$as_me:6746: found $ac_dir/$ac_word" >&5
6747 break
6748 done
6749
6750 fi
6751 fi
6752 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6753 if test -n "$cf_ldd_prog"; then
6754   echo "$as_me:6754: result: $cf_ldd_prog" >&5
6755 echo "${ECHO_T}$cf_ldd_prog" >&6
6756 else
6757   echo "$as_me:6757: result: no" >&5
6758 echo "${ECHO_T}no" >&6
6759 fi
6760
6761   test -n "$cf_ldd_prog" && break
6762 done
6763 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6764
6765         cf_rpath_list="/usr/lib /lib"
6766         if test "$cf_ldd_prog" != no
6767         then
6768                 cf_rpath_oops=
6769
6770 cat >conftest.$ac_ext <<_ACEOF
6771 #line 6771 "configure"
6772 #include "confdefs.h"
6773 #include <stdio.h>
6774 int
6775 main ()
6776 {
6777 printf("Hello");
6778   ;
6779   return 0;
6780 }
6781 _ACEOF
6782 rm -f conftest.$ac_objext conftest$ac_exeext
6783 if { (eval echo "$as_me:6783: \"$ac_link\"") >&5
6784   (eval $ac_link) 2>&5
6785   ac_status=$?
6786   echo "$as_me:6786: \$? = $ac_status" >&5
6787   (exit $ac_status); } &&
6788          { ac_try='test -s conftest$ac_exeext'
6789   { (eval echo "$as_me:6789: \"$ac_try\"") >&5
6790   (eval $ac_try) 2>&5
6791   ac_status=$?
6792   echo "$as_me:6792: \$? = $ac_status" >&5
6793   (exit $ac_status); }; }; then
6794   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6795                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6796 else
6797   echo "$as_me: failed program was:" >&5
6798 cat conftest.$ac_ext >&5
6799 fi
6800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6801
6802                 # If we passed the link-test, but get a "not found" on a given library,
6803                 # this could be due to inept reconfiguration of gcc to make it only
6804                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6805                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6806                 # /usr/local libraries.
6807                 if test -n "$cf_rpath_oops"
6808                 then
6809                         for cf_rpath_src in $cf_rpath_oops
6810                         do
6811                                 for cf_rpath_dir in \
6812                                         /usr/local \
6813                                         /usr/pkg \
6814                                         /opt/sfw
6815                                 do
6816                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6817                                         then
6818                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6819
6820 echo "${as_me:-configure}:6820: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6821
6822                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6823                                                 break
6824                                         fi
6825                                 done
6826                         done
6827                 fi
6828         fi
6829
6830         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6831
6832 echo "${as_me:-configure}:6832: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6833
6834 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6835
6836 echo "${as_me:-configure}:6836: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6837
6838 cf_rpath_dst=
6839 for cf_rpath_src in $LDFLAGS
6840 do
6841         case $cf_rpath_src in
6842         (-L*)
6843
6844                 # check if this refers to a directory which we will ignore
6845                 cf_rpath_skip=no
6846                 if test -n "$cf_rpath_list"
6847                 then
6848                         for cf_rpath_item in $cf_rpath_list
6849                         do
6850                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6851                                 then
6852                                         cf_rpath_skip=yes
6853                                         break
6854                                 fi
6855                         done
6856                 fi
6857
6858                 if test "$cf_rpath_skip" = no
6859                 then
6860                         # transform the option
6861                         if test "$LD_RPATH_OPT" = "-R " ; then
6862                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6863                         else
6864                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6865                         fi
6866
6867                         # if we have not already added this, add it now
6868                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6869                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6870                         then
6871                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6872
6873 echo "${as_me:-configure}:6873: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6874
6875                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6876                         fi
6877                 fi
6878                 ;;
6879         esac
6880         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6881 done
6882 LDFLAGS=$cf_rpath_dst
6883
6884 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6885
6886 echo "${as_me:-configure}:6886: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6887
6888 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6889
6890 echo "${as_me:-configure}:6890: testing ...checking LIBS $LIBS ..." 1>&5
6891
6892 cf_rpath_dst=
6893 for cf_rpath_src in $LIBS
6894 do
6895         case $cf_rpath_src in
6896         (-L*)
6897
6898                 # check if this refers to a directory which we will ignore
6899                 cf_rpath_skip=no
6900                 if test -n "$cf_rpath_list"
6901                 then
6902                         for cf_rpath_item in $cf_rpath_list
6903                         do
6904                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6905                                 then
6906                                         cf_rpath_skip=yes
6907                                         break
6908                                 fi
6909                         done
6910                 fi
6911
6912                 if test "$cf_rpath_skip" = no
6913                 then
6914                         # transform the option
6915                         if test "$LD_RPATH_OPT" = "-R " ; then
6916                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6917                         else
6918                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6919                         fi
6920
6921                         # if we have not already added this, add it now
6922                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6923                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6924                         then
6925                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6926
6927 echo "${as_me:-configure}:6927: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6928
6929                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6930                         fi
6931                 fi
6932                 ;;
6933         esac
6934         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6935 done
6936 LIBS=$cf_rpath_dst
6937
6938 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6939
6940 echo "${as_me:-configure}:6940: testing ...checked LIBS $LIBS ..." 1>&5
6941
6942         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6943
6944 echo "${as_me:-configure}:6944: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6945
6946 else
6947         echo "$as_me:6947: result: no" >&5
6948 echo "${ECHO_T}no" >&6
6949 fi
6950
6951 fi
6952
6953 fi
6954
6955 ###############################################################################
6956
6957 ###     use option --with-extra-suffix to append suffix to headers and libraries
6958 echo "$as_me:6958: checking if you wish to append extra suffix to header/library paths" >&5
6959 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6960 EXTRA_SUFFIX=
6961
6962 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6963 if test "${with_extra_suffix+set}" = set; then
6964   withval="$with_extra_suffix"
6965   case x$withval in
6966         (no)
6967                 ;;
6968         (xyes|x)
6969                 EXTRA_SUFFIX=$cf_cv_abi_version
6970                 ;;
6971         (*)
6972                 EXTRA_SUFFIX=$withval
6973                 ;;
6974         esac
6975
6976 fi;
6977 echo "$as_me:6977: result: $EXTRA_SUFFIX" >&5
6978 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6979
6980 ###     use option --disable-overwrite to leave out the link to -lcurses
6981 echo "$as_me:6981: checking if you wish to install ncurses overwriting curses" >&5
6982 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6983
6984 # Check whether --enable-overwrite or --disable-overwrite was given.
6985 if test "${enable_overwrite+set}" = set; then
6986   enableval="$enable_overwrite"
6987   with_overwrite=$enableval
6988 else
6989   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6990 fi;
6991 echo "$as_me:6991: result: $with_overwrite" >&5
6992 echo "${ECHO_T}$with_overwrite" >&6
6993
6994 echo "$as_me:6994: checking if external terminfo-database is used" >&5
6995 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6996
6997 # Check whether --enable-database or --disable-database was given.
6998 if test "${enable_database+set}" = set; then
6999   enableval="$enable_database"
7000   use_database=$enableval
7001 else
7002   use_database=yes
7003 fi;
7004 echo "$as_me:7004: result: $use_database" >&5
7005 echo "${ECHO_T}$use_database" >&6
7006
7007 case $host_os in
7008 (os2*)
7009         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7010         ;;
7011 (*)
7012         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7013         ;;
7014 esac
7015
7016 NCURSES_USE_DATABASE=0
7017 if test "$use_database" != no ; then
7018         NCURSES_USE_DATABASE=1
7019
7020         echo "$as_me:7020: checking which terminfo source-file will be installed" >&5
7021 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7022
7023 # Check whether --with-database or --without-database was given.
7024 if test "${with_database+set}" = set; then
7025   withval="$with_database"
7026   TERMINFO_SRC=$withval
7027 fi;
7028         echo "$as_me:7028: result: $TERMINFO_SRC" >&5
7029 echo "${ECHO_T}$TERMINFO_SRC" >&6
7030
7031         echo "$as_me:7031: checking whether to use hashed database instead of directory/tree" >&5
7032 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7033
7034 # Check whether --with-hashed-db or --without-hashed-db was given.
7035 if test "${with_hashed_db+set}" = set; then
7036   withval="$with_hashed_db"
7037
7038 else
7039   with_hashed_db=no
7040 fi;
7041         echo "$as_me:7041: result: $with_hashed_db" >&5
7042 echo "${ECHO_T}$with_hashed_db" >&6
7043 else
7044         with_hashed_db=no
7045 fi
7046
7047 echo "$as_me:7047: checking for list of fallback descriptions" >&5
7048 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7049
7050 # Check whether --with-fallbacks or --without-fallbacks was given.
7051 if test "${with_fallbacks+set}" = set; then
7052   withval="$with_fallbacks"
7053   with_fallback=$withval
7054 else
7055   with_fallback=
7056 fi;
7057 echo "$as_me:7057: result: $with_fallback" >&5
7058 echo "${ECHO_T}$with_fallback" >&6
7059 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7060
7061 echo "$as_me:7061: checking if you want modern xterm or antique" >&5
7062 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7063
7064 # Check whether --with-xterm-new or --without-xterm-new was given.
7065 if test "${with_xterm_new+set}" = set; then
7066   withval="$with_xterm_new"
7067   with_xterm_new=$withval
7068 else
7069   with_xterm_new=yes
7070 fi;
7071 case $with_xterm_new in
7072 (no) with_xterm_new=xterm-old;;
7073 (*)      with_xterm_new=xterm-new;;
7074 esac
7075 echo "$as_me:7075: result: $with_xterm_new" >&5
7076 echo "${ECHO_T}$with_xterm_new" >&6
7077 WHICH_XTERM=$with_xterm_new
7078
7079 echo "$as_me:7079: checking if xterm backspace sends BS or DEL" >&5
7080 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7081
7082 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7083 if test "${with_xterm_kbs+set}" = set; then
7084   withval="$with_xterm_kbs"
7085   with_xterm_kbs=$withval
7086 else
7087   with_xterm_kbs=BS
7088 fi;
7089 case x$with_xterm_kbs in
7090 (xyes|xno|xBS|xbs|x8)
7091         with_xterm_kbs=BS
7092         ;;
7093 (xDEL|xdel|x127)
7094         with_xterm_kbs=DEL
7095         ;;
7096 (*)
7097         with_xterm_kbs=$withval
7098         ;;
7099 esac
7100 echo "$as_me:7100: result: $with_xterm_kbs" >&5
7101 echo "${ECHO_T}$with_xterm_kbs" >&6
7102 XTERM_KBS=$with_xterm_kbs
7103
7104 MAKE_TERMINFO=
7105 if test "$use_database" = no ; then
7106         TERMINFO="${datadir}/terminfo"
7107         MAKE_TERMINFO="#"
7108 else
7109
7110 echo "$as_me:7110: checking for list of terminfo directories" >&5
7111 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7112
7113 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7114 if test "${with_terminfo_dirs+set}" = set; then
7115   withval="$with_terminfo_dirs"
7116
7117 else
7118   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7119 fi;
7120 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7121 cf_dst_path=
7122 for cf_src_path in $withval
7123 do
7124
7125 if test "x$prefix" != xNONE; then
7126         cf_path_syntax="$prefix"
7127 else
7128         cf_path_syntax="$ac_default_prefix"
7129 fi
7130
7131 case ".$cf_src_path" in
7132 (.\$\(*\)*|.\'*\'*)
7133         ;;
7134 (..|./*|.\\*)
7135         ;;
7136 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7137         ;;
7138 (.\${*prefix}*|.\${*dir}*)
7139         eval cf_src_path="$cf_src_path"
7140         case ".$cf_src_path" in
7141         (.NONE/*)
7142                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7143                 ;;
7144         esac
7145         ;;
7146 (.no|.NONE/*)
7147         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7148         ;;
7149 (*)
7150         { { echo "$as_me:7150: error: expected a pathname, not \"$cf_src_path\"" >&5
7151 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7152    { (exit 1); exit 1; }; }
7153         ;;
7154 esac
7155
7156   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7157   cf_dst_path="${cf_dst_path}${cf_src_path}"
7158 done
7159 IFS="$ac_save_ifs"
7160
7161 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7162 # so we have to check/work around.  We do prefer the result of "eval"...
7163 eval cf_dst_eval="$cf_dst_path"
7164 case "x$cf_dst_eval" in
7165 (xNONE*)
7166         TERMINFO_DIRS=$cf_dst_path
7167         ;;
7168 (*)
7169         TERMINFO_DIRS="$cf_dst_eval"
7170         ;;
7171 esac
7172
7173 echo "$as_me:7173: result: $TERMINFO_DIRS" >&5
7174 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7175 test -n "$TERMINFO_DIRS" &&
7176 cat >>confdefs.h <<EOF
7177 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7178 EOF
7179
7180 echo "$as_me:7180: checking for default terminfo directory" >&5
7181 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7182
7183 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7184 if test "${with_default_terminfo_dir+set}" = set; then
7185   withval="$with_default_terminfo_dir"
7186
7187 else
7188   withval="${TERMINFO:-${datadir}/terminfo}"
7189 fi; if test -n "${datadir}/terminfo" ; then
7190
7191 if test "x$prefix" != xNONE; then
7192         cf_path_syntax="$prefix"
7193 else
7194         cf_path_syntax="$ac_default_prefix"
7195 fi
7196
7197 case ".$withval" in
7198 (.\$\(*\)*|.\'*\'*)
7199         ;;
7200 (..|./*|.\\*)
7201         ;;
7202 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7203         ;;
7204 (.\${*prefix}*|.\${*dir}*)
7205         eval withval="$withval"
7206         case ".$withval" in
7207         (.NONE/*)
7208                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7209                 ;;
7210         esac
7211         ;;
7212 (.no|.NONE/*)
7213         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7214         ;;
7215 (*)
7216         { { echo "$as_me:7216: error: expected a pathname, not \"$withval\"" >&5
7217 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7218    { (exit 1); exit 1; }; }
7219         ;;
7220 esac
7221
7222 fi
7223 eval TERMINFO="$withval"
7224
7225 echo "$as_me:7225: result: $TERMINFO" >&5
7226 echo "${ECHO_T}$TERMINFO" >&6
7227
7228 cat >>confdefs.h <<EOF
7229 #define TERMINFO "$TERMINFO"
7230 EOF
7231
7232 fi
7233
7234 ###     use option --disable-big-core to make tic run on small machines
7235 ###     We need 4Mb, check if we can allocate 50% more than that.
7236 echo "$as_me:7236: checking if big-core option selected" >&5
7237 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7238
7239 # Check whether --enable-big-core or --disable-big-core was given.
7240 if test "${enable_big_core+set}" = set; then
7241   enableval="$enable_big_core"
7242   with_big_core=$enableval
7243 else
7244   if test "$cross_compiling" = yes; then
7245   with_big_core=no
7246 else
7247   cat >conftest.$ac_ext <<_ACEOF
7248 #line 7248 "configure"
7249 #include "confdefs.h"
7250
7251 #include <stdlib.h>
7252 #include <string.h>
7253 int main() {
7254         unsigned long n = 6000000L;
7255         char *s = malloc(n);
7256         if (s != 0)
7257                 s[0] = s[n-1] = 0;
7258         ${cf_cv_main_return:-return}(s == 0);
7259 }
7260 _ACEOF
7261 rm -f conftest$ac_exeext
7262 if { (eval echo "$as_me:7262: \"$ac_link\"") >&5
7263   (eval $ac_link) 2>&5
7264   ac_status=$?
7265   echo "$as_me:7265: \$? = $ac_status" >&5
7266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7267   { (eval echo "$as_me:7267: \"$ac_try\"") >&5
7268   (eval $ac_try) 2>&5
7269   ac_status=$?
7270   echo "$as_me:7270: \$? = $ac_status" >&5
7271   (exit $ac_status); }; }; then
7272   with_big_core=yes
7273 else
7274   echo "$as_me: program exited with status $ac_status" >&5
7275 echo "$as_me: failed program was:" >&5
7276 cat conftest.$ac_ext >&5
7277 with_big_core=no
7278 fi
7279 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7280 fi
7281 fi;
7282 echo "$as_me:7282: result: $with_big_core" >&5
7283 echo "${ECHO_T}$with_big_core" >&6
7284 test "x$with_big_core" = "xyes" &&
7285 cat >>confdefs.h <<\EOF
7286 #define HAVE_BIG_CORE 1
7287 EOF
7288
7289 ### ISO C only guarantees 512-char strings, we have tables which load faster
7290 ### when constructed using "big" strings.  More than the C compiler, the awk
7291 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7292 echo "$as_me:7292: checking if big-strings option selected" >&5
7293 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7294
7295 # Check whether --enable-big-strings or --disable-big-strings was given.
7296 if test "${enable_big_strings+set}" = set; then
7297   enableval="$enable_big_strings"
7298   with_big_strings=$enableval
7299 else
7300
7301         case x$AWK in
7302         (x)
7303                 eval with_big_strings=no
7304                 ;;
7305         (*)
7306                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7307                         | $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
7308                         eval with_big_strings=yes
7309                 else
7310                         eval with_big_strings=no
7311                 fi
7312                 ;;
7313         esac
7314
7315 fi;
7316 echo "$as_me:7316: result: $with_big_strings" >&5
7317 echo "${ECHO_T}$with_big_strings" >&6
7318
7319 USE_BIG_STRINGS=0
7320 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7321
7322 ###     use option --enable-termcap to compile in the termcap fallback support
7323 echo "$as_me:7323: checking if you want termcap-fallback support" >&5
7324 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7325
7326 # Check whether --enable-termcap or --disable-termcap was given.
7327 if test "${enable_termcap+set}" = set; then
7328   enableval="$enable_termcap"
7329   with_termcap=$enableval
7330 else
7331   with_termcap=no
7332 fi;
7333 echo "$as_me:7333: result: $with_termcap" >&5
7334 echo "${ECHO_T}$with_termcap" >&6
7335
7336 NCURSES_USE_TERMCAP=0
7337 if test "x$with_termcap" != "xyes" ; then
7338         if test "$use_database" = no ; then
7339                 if test -z "$with_fallback" ; then
7340                         { { echo "$as_me:7340: error: You have disabled the database w/o specifying fallbacks" >&5
7341 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7342    { (exit 1); exit 1; }; }
7343                 fi
7344         fi
7345
7346 cat >>confdefs.h <<\EOF
7347 #define PURE_TERMINFO 1
7348 EOF
7349
7350 else
7351
7352         if test "$with_ticlib" != no ; then
7353                 { { echo "$as_me:7353: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7354 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7355    { (exit 1); exit 1; }; }
7356         fi
7357
7358         NCURSES_USE_TERMCAP=1
7359         echo "$as_me:7359: checking for list of termcap files" >&5
7360 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7361
7362 # Check whether --with-termpath or --without-termpath was given.
7363 if test "${with_termpath+set}" = set; then
7364   withval="$with_termpath"
7365
7366 else
7367   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7368 fi;
7369 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7370 cf_dst_path=
7371 for cf_src_path in $withval
7372 do
7373
7374 if test "x$prefix" != xNONE; then
7375         cf_path_syntax="$prefix"
7376 else
7377         cf_path_syntax="$ac_default_prefix"
7378 fi
7379
7380 case ".$cf_src_path" in
7381 (.\$\(*\)*|.\'*\'*)
7382         ;;
7383 (..|./*|.\\*)
7384         ;;
7385 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7386         ;;
7387 (.\${*prefix}*|.\${*dir}*)
7388         eval cf_src_path="$cf_src_path"
7389         case ".$cf_src_path" in
7390         (.NONE/*)
7391                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7392                 ;;
7393         esac
7394         ;;
7395 (.no|.NONE/*)
7396         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7397         ;;
7398 (*)
7399         { { echo "$as_me:7399: error: expected a pathname, not \"$cf_src_path\"" >&5
7400 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7401    { (exit 1); exit 1; }; }
7402         ;;
7403 esac
7404
7405   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7406   cf_dst_path="${cf_dst_path}${cf_src_path}"
7407 done
7408 IFS="$ac_save_ifs"
7409
7410 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7411 # so we have to check/work around.  We do prefer the result of "eval"...
7412 eval cf_dst_eval="$cf_dst_path"
7413 case "x$cf_dst_eval" in
7414 (xNONE*)
7415         TERMPATH=$cf_dst_path
7416         ;;
7417 (*)
7418         TERMPATH="$cf_dst_eval"
7419         ;;
7420 esac
7421
7422         echo "$as_me:7422: result: $TERMPATH" >&5
7423 echo "${ECHO_T}$TERMPATH" >&6
7424         test -n "$TERMPATH" &&
7425 cat >>confdefs.h <<EOF
7426 #define TERMPATH "$TERMPATH"
7427 EOF
7428
7429         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7430         echo "$as_me:7430: checking if fast termcap-loader is needed" >&5
7431 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7432
7433 # Check whether --enable-getcap or --disable-getcap was given.
7434 if test "${enable_getcap+set}" = set; then
7435   enableval="$enable_getcap"
7436   with_getcap=$enableval
7437 else
7438   with_getcap=no
7439 fi;
7440         echo "$as_me:7440: result: $with_getcap" >&5
7441 echo "${ECHO_T}$with_getcap" >&6
7442         test "x$with_getcap" = "xyes" &&
7443 cat >>confdefs.h <<\EOF
7444 #define USE_GETCAP 1
7445 EOF
7446
7447         echo "$as_me:7447: checking if translated termcaps will be cached in ~/.terminfo" >&5
7448 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7449
7450 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7451 if test "${enable_getcap_cache+set}" = set; then
7452   enableval="$enable_getcap_cache"
7453   with_getcap_cache=$enableval
7454 else
7455   with_getcap_cache=no
7456 fi;
7457         echo "$as_me:7457: result: $with_getcap_cache" >&5
7458 echo "${ECHO_T}$with_getcap_cache" >&6
7459         test "x$with_getcap_cache" = "xyes" &&
7460 cat >>confdefs.h <<\EOF
7461 #define USE_GETCAP_CACHE 1
7462 EOF
7463
7464 fi
7465
7466 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7467 echo "$as_me:7467: checking if ~/.terminfo is wanted" >&5
7468 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7469
7470 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7471 if test "${enable_home_terminfo+set}" = set; then
7472   enableval="$enable_home_terminfo"
7473   with_home_terminfo=$enableval
7474 else
7475   with_home_terminfo=yes
7476 fi;
7477 echo "$as_me:7477: result: $with_home_terminfo" >&5
7478 echo "${ECHO_T}$with_home_terminfo" >&6
7479 test "x$with_home_terminfo" = "xyes" &&
7480 cat >>confdefs.h <<\EOF
7481 #define USE_HOME_TERMINFO 1
7482 EOF
7483
7484 echo "$as_me:7484: checking if you want to use restricted environment when running as root" >&5
7485 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7486
7487 # Check whether --enable-root-environ or --disable-root-environ was given.
7488 if test "${enable_root_environ+set}" = set; then
7489   enableval="$enable_root_environ"
7490   with_root_environ=$enableval
7491 else
7492   with_root_environ=yes
7493 fi;
7494 echo "$as_me:7494: result: $with_root_environ" >&5
7495 echo "${ECHO_T}$with_root_environ" >&6
7496 test "x$with_root_environ" = xyes &&
7497 cat >>confdefs.h <<\EOF
7498 #define USE_ROOT_ENVIRON 1
7499 EOF
7500
7501 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7502 ###   to reduce storage requirements for the terminfo database.
7503
7504 for ac_func in \
7505         remove \
7506         unlink
7507 do
7508 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7509 echo "$as_me:7509: checking for $ac_func" >&5
7510 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7511 if eval "test \"\${$as_ac_var+set}\" = set"; then
7512   echo $ECHO_N "(cached) $ECHO_C" >&6
7513 else
7514   cat >conftest.$ac_ext <<_ACEOF
7515 #line 7515 "configure"
7516 #include "confdefs.h"
7517 /* System header to define __stub macros and hopefully few prototypes,
7518     which can conflict with char $ac_func (); below.  */
7519 #include <assert.h>
7520 /* Override any gcc2 internal prototype to avoid an error.  */
7521 #ifdef __cplusplus
7522 extern "C"
7523 #endif
7524 /* We use char because int might match the return type of a gcc2
7525    builtin and then its argument prototype would still apply.  */
7526 char $ac_func ();
7527 char (*f) ();
7528
7529 int
7530 main ()
7531 {
7532 /* The GNU C library defines this for functions which it implements
7533     to always fail with ENOSYS.  Some functions are actually named
7534     something starting with __ and the normal name is an alias.  */
7535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7536 choke me
7537 #else
7538 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7539 #endif
7540
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f conftest.$ac_objext conftest$ac_exeext
7546 if { (eval echo "$as_me:7546: \"$ac_link\"") >&5
7547   (eval $ac_link) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest$ac_exeext'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   eval "$as_ac_var=yes"
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 eval "$as_ac_var=no"
7562 fi
7563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7564 fi
7565 echo "$as_me:7565: result: `eval echo '${'$as_ac_var'}'`" >&5
7566 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7567 if test `eval echo '${'$as_ac_var'}'` = yes; then
7568   cat >>confdefs.h <<EOF
7569 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7570 EOF
7571
7572 fi
7573 done
7574
7575 if test "$cross_compiling" = yes ; then
7576
7577 for ac_func in \
7578                 link \
7579                 symlink
7580 do
7581 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7582 echo "$as_me:7582: checking for $ac_func" >&5
7583 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7584 if eval "test \"\${$as_ac_var+set}\" = set"; then
7585   echo $ECHO_N "(cached) $ECHO_C" >&6
7586 else
7587   cat >conftest.$ac_ext <<_ACEOF
7588 #line 7588 "configure"
7589 #include "confdefs.h"
7590 /* System header to define __stub macros and hopefully few prototypes,
7591     which can conflict with char $ac_func (); below.  */
7592 #include <assert.h>
7593 /* Override any gcc2 internal prototype to avoid an error.  */
7594 #ifdef __cplusplus
7595 extern "C"
7596 #endif
7597 /* We use char because int might match the return type of a gcc2
7598    builtin and then its argument prototype would still apply.  */
7599 char $ac_func ();
7600 char (*f) ();
7601
7602 int
7603 main ()
7604 {
7605 /* The GNU C library defines this for functions which it implements
7606     to always fail with ENOSYS.  Some functions are actually named
7607     something starting with __ and the normal name is an alias.  */
7608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7609 choke me
7610 #else
7611 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7612 #endif
7613
7614   ;
7615   return 0;
7616 }
7617 _ACEOF
7618 rm -f conftest.$ac_objext conftest$ac_exeext
7619 if { (eval echo "$as_me:7619: \"$ac_link\"") >&5
7620   (eval $ac_link) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); } &&
7624          { ac_try='test -s conftest$ac_exeext'
7625   { (eval echo "$as_me:7625: \"$ac_try\"") >&5
7626   (eval $ac_try) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); }; }; then
7630   eval "$as_ac_var=yes"
7631 else
7632   echo "$as_me: failed program was:" >&5
7633 cat conftest.$ac_ext >&5
7634 eval "$as_ac_var=no"
7635 fi
7636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7637 fi
7638 echo "$as_me:7638: result: `eval echo '${'$as_ac_var'}'`" >&5
7639 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7640 if test `eval echo '${'$as_ac_var'}'` = yes; then
7641   cat >>confdefs.h <<EOF
7642 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7643 EOF
7644
7645 fi
7646 done
7647
7648 else
7649         echo "$as_me:7649: checking if link/symlink functions work" >&5
7650 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7651 if test "${cf_cv_link_funcs+set}" = set; then
7652   echo $ECHO_N "(cached) $ECHO_C" >&6
7653 else
7654
7655                 cf_cv_link_funcs=
7656                 for cf_func in link symlink ; do
7657                         if test "$cross_compiling" = yes; then
7658
7659                         eval 'ac_cv_func_'$cf_func'=error'
7660 else
7661   cat >conftest.$ac_ext <<_ACEOF
7662 #line 7662 "configure"
7663 #include "confdefs.h"
7664
7665 #include <sys/types.h>
7666 #include <sys/stat.h>
7667 #ifdef HAVE_UNISTD_H
7668 #include <unistd.h>
7669 #endif
7670 int main()
7671 {
7672         int fail = 0;
7673         char *src = "config.log";
7674         char *dst = "conftest.chk";
7675         struct stat src_sb;
7676         struct stat dst_sb;
7677
7678         stat(src, &src_sb);
7679         fail = ($cf_func("config.log", "conftest.chk") < 0)
7680             || (stat(dst, &dst_sb) < 0)
7681             || (dst_sb.st_mtime != src_sb.st_mtime);
7682 #ifdef HAVE_UNLINK
7683         unlink(dst);
7684 #else
7685         remove(dst);
7686 #endif
7687         ${cf_cv_main_return:-return} (fail);
7688 }
7689
7690 _ACEOF
7691 rm -f conftest$ac_exeext
7692 if { (eval echo "$as_me:7692: \"$ac_link\"") >&5
7693   (eval $ac_link) 2>&5
7694   ac_status=$?
7695   echo "$as_me:7695: \$? = $ac_status" >&5
7696   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7697   { (eval echo "$as_me:7697: \"$ac_try\"") >&5
7698   (eval $ac_try) 2>&5
7699   ac_status=$?
7700   echo "$as_me:7700: \$? = $ac_status" >&5
7701   (exit $ac_status); }; }; then
7702
7703                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7704                         eval 'ac_cv_func_'$cf_func'=yes'
7705 else
7706   echo "$as_me: program exited with status $ac_status" >&5
7707 echo "$as_me: failed program was:" >&5
7708 cat conftest.$ac_ext >&5
7709
7710                         eval 'ac_cv_func_'$cf_func'=no'
7711 fi
7712 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7713 fi
7714                 done
7715                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7716
7717 fi
7718 echo "$as_me:7718: result: $cf_cv_link_funcs" >&5
7719 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7720         test "$ac_cv_func_link"    = yes &&
7721 cat >>confdefs.h <<\EOF
7722 #define HAVE_LINK 1
7723 EOF
7724
7725         test "$ac_cv_func_symlink" = yes &&
7726 cat >>confdefs.h <<\EOF
7727 #define HAVE_SYMLINK 1
7728 EOF
7729
7730 fi
7731
7732 with_links=no
7733 with_symlinks=no
7734
7735 # soft links (symbolic links) are useful for some systems where hard links do
7736 # not work, or to make it simpler to copy terminfo trees around.
7737 if test "x$ac_cv_func_symlink" = xyes ; then
7738         echo "$as_me:7738: checking if tic should use symbolic links" >&5
7739 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7740
7741 # Check whether --enable-symlinks or --disable-symlinks was given.
7742 if test "${enable_symlinks+set}" = set; then
7743   enableval="$enable_symlinks"
7744   with_symlinks=$enableval
7745 else
7746   with_symlinks=no
7747 fi;
7748         echo "$as_me:7748: result: $with_symlinks" >&5
7749 echo "${ECHO_T}$with_symlinks" >&6
7750 fi
7751
7752 # If we have hard links and did not choose to use soft links instead, there is
7753 # no reason to make this choice optional - use the hard links.
7754 if test "$with_symlinks" = no ; then
7755         echo "$as_me:7755: checking if tic should use hard links" >&5
7756 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7757         if test "x$ac_cv_func_link" = xyes ; then
7758                 with_links=yes
7759         else
7760                 with_links=no
7761         fi
7762         echo "$as_me:7762: result: $with_links" >&5
7763 echo "${ECHO_T}$with_links" >&6
7764 fi
7765
7766 test "x$with_links" = xyes &&
7767 cat >>confdefs.h <<\EOF
7768 #define USE_LINKS 1
7769 EOF
7770
7771 test "x$with_symlinks" = xyes &&
7772 cat >>confdefs.h <<\EOF
7773 #define USE_SYMLINKS 1
7774 EOF
7775
7776 ###   use option --enable-broken-linker to force on use of broken-linker support
7777 echo "$as_me:7777: checking if you want broken-linker support code" >&5
7778 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7779
7780 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7781 if test "${enable_broken_linker+set}" = set; then
7782   enableval="$enable_broken_linker"
7783   with_broken_linker=$enableval
7784 else
7785   with_broken_linker=${BROKEN_LINKER:-no}
7786 fi;
7787 echo "$as_me:7787: result: $with_broken_linker" >&5
7788 echo "${ECHO_T}$with_broken_linker" >&6
7789
7790 BROKEN_LINKER=0
7791 if test "x$with_broken_linker" = xyes ; then
7792
7793 cat >>confdefs.h <<\EOF
7794 #define BROKEN_LINKER 1
7795 EOF
7796
7797         BROKEN_LINKER=1
7798 elif test "$DFT_LWR_MODEL" = shared ; then
7799         case $cf_cv_system_name in
7800         (cygwin*)
7801
7802 cat >>confdefs.h <<\EOF
7803 #define BROKEN_LINKER 1
7804 EOF
7805
7806                 BROKEN_LINKER=1
7807                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7808
7809 echo "${as_me:-configure}:7809: testing cygwin linker is broken anyway ..." 1>&5
7810
7811                 ;;
7812         esac
7813 fi
7814
7815 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7816 echo "$as_me:7816: checking if tputs should process BSD-style prefix padding" >&5
7817 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7818
7819 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7820 if test "${enable_bsdpad+set}" = set; then
7821   enableval="$enable_bsdpad"
7822   with_bsdpad=$enableval
7823 else
7824   with_bsdpad=no
7825 fi;
7826 echo "$as_me:7826: result: $with_bsdpad" >&5
7827 echo "${ECHO_T}$with_bsdpad" >&6
7828 test "x$with_bsdpad" = xyes &&
7829 cat >>confdefs.h <<\EOF
7830 #define BSD_TPUTS 1
7831 EOF
7832
7833 ###   use option --enable-widec to turn on use of wide-character support
7834 NCURSES_CH_T=chtype
7835 NCURSES_LIBUTF8=0
7836
7837 NEED_WCHAR_H=0
7838 NCURSES_MBSTATE_T=0
7839 NCURSES_WCHAR_T=0
7840 NCURSES_WINT_T=0
7841
7842 # Check to define _XOPEN_SOURCE "automatically"
7843 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7844
7845 cf_XOPEN_SOURCE=500
7846 cf_POSIX_C_SOURCE=199506L
7847 cf_xopen_source=
7848
7849 case $host_os in
7850 (aix[4-7]*)
7851         cf_xopen_source="-D_ALL_SOURCE"
7852         ;;
7853 (cygwin|msys)
7854         cf_XOPEN_SOURCE=600
7855         ;;
7856 (darwin[0-8].*)
7857         cf_xopen_source="-D_APPLE_C_SOURCE"
7858         ;;
7859 (darwin*)
7860         cf_xopen_source="-D_DARWIN_C_SOURCE"
7861         cf_XOPEN_SOURCE=
7862         ;;
7863 (freebsd*|dragonfly*)
7864         # 5.x headers associate
7865         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7866         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7867         cf_POSIX_C_SOURCE=200112L
7868         cf_XOPEN_SOURCE=600
7869         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7870         ;;
7871 (hpux11*)
7872         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7873         ;;
7874 (hpux*)
7875         cf_xopen_source="-D_HPUX_SOURCE"
7876         ;;
7877 (irix[56].*)
7878         cf_xopen_source="-D_SGI_SOURCE"
7879         cf_XOPEN_SOURCE=
7880         ;;
7881 (linux*|gnu*|mint*|k*bsd*-gnu)
7882
7883 echo "$as_me:7883: checking if we must define _GNU_SOURCE" >&5
7884 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7885 if test "${cf_cv_gnu_source+set}" = set; then
7886   echo $ECHO_N "(cached) $ECHO_C" >&6
7887 else
7888
7889 cat >conftest.$ac_ext <<_ACEOF
7890 #line 7890 "configure"
7891 #include "confdefs.h"
7892 #include <sys/types.h>
7893 int
7894 main ()
7895 {
7896
7897 #ifndef _XOPEN_SOURCE
7898 make an error
7899 #endif
7900   ;
7901   return 0;
7902 }
7903 _ACEOF
7904 rm -f conftest.$ac_objext
7905 if { (eval echo "$as_me:7905: \"$ac_compile\"") >&5
7906   (eval $ac_compile) 2>&5
7907   ac_status=$?
7908   echo "$as_me:7908: \$? = $ac_status" >&5
7909   (exit $ac_status); } &&
7910          { ac_try='test -s conftest.$ac_objext'
7911   { (eval echo "$as_me:7911: \"$ac_try\"") >&5
7912   (eval $ac_try) 2>&5
7913   ac_status=$?
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit $ac_status); }; }; then
7916   cf_cv_gnu_source=no
7917 else
7918   echo "$as_me: failed program was:" >&5
7919 cat conftest.$ac_ext >&5
7920 cf_save="$CPPFLAGS"
7921          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7922          cat >conftest.$ac_ext <<_ACEOF
7923 #line 7923 "configure"
7924 #include "confdefs.h"
7925 #include <sys/types.h>
7926 int
7927 main ()
7928 {
7929
7930 #ifdef _XOPEN_SOURCE
7931 make an error
7932 #endif
7933   ;
7934   return 0;
7935 }
7936 _ACEOF
7937 rm -f conftest.$ac_objext
7938 if { (eval echo "$as_me:7938: \"$ac_compile\"") >&5
7939   (eval $ac_compile) 2>&5
7940   ac_status=$?
7941   echo "$as_me:7941: \$? = $ac_status" >&5
7942   (exit $ac_status); } &&
7943          { ac_try='test -s conftest.$ac_objext'
7944   { (eval echo "$as_me:7944: \"$ac_try\"") >&5
7945   (eval $ac_try) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit $ac_status); }; }; then
7949   cf_cv_gnu_source=no
7950 else
7951   echo "$as_me: failed program was:" >&5
7952 cat conftest.$ac_ext >&5
7953 cf_cv_gnu_source=yes
7954 fi
7955 rm -f conftest.$ac_objext conftest.$ac_ext
7956         CPPFLAGS="$cf_save"
7957
7958 fi
7959 rm -f conftest.$ac_objext conftest.$ac_ext
7960
7961 fi
7962 echo "$as_me:7962: result: $cf_cv_gnu_source" >&5
7963 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7964 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7965
7966         ;;
7967 (minix*)
7968         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7969         ;;
7970 (mirbsd*)
7971         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7972         cf_XOPEN_SOURCE=
7973
7974 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7975
7976 cf_save_CFLAGS="$CFLAGS"
7977 cf_save_CPPFLAGS="$CPPFLAGS"
7978
7979 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7980         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7981                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7982
7983 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7984         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7985                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7986
7987 echo "$as_me:7987: checking if we should define _POSIX_C_SOURCE" >&5
7988 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7989 if test "${cf_cv_posix_c_source+set}" = set; then
7990   echo $ECHO_N "(cached) $ECHO_C" >&6
7991 else
7992
7993 echo "${as_me:-configure}:7993: testing if the symbol is already defined go no further ..." 1>&5
7994
7995         cat >conftest.$ac_ext <<_ACEOF
7996 #line 7996 "configure"
7997 #include "confdefs.h"
7998 #include <sys/types.h>
7999 int
8000 main ()
8001 {
8002
8003 #ifndef _POSIX_C_SOURCE
8004 make an error
8005 #endif
8006   ;
8007   return 0;
8008 }
8009 _ACEOF
8010 rm -f conftest.$ac_objext
8011 if { (eval echo "$as_me:8011: \"$ac_compile\"") >&5
8012   (eval $ac_compile) 2>&5
8013   ac_status=$?
8014   echo "$as_me:8014: \$? = $ac_status" >&5
8015   (exit $ac_status); } &&
8016          { ac_try='test -s conftest.$ac_objext'
8017   { (eval echo "$as_me:8017: \"$ac_try\"") >&5
8018   (eval $ac_try) 2>&5
8019   ac_status=$?
8020   echo "$as_me:8020: \$? = $ac_status" >&5
8021   (exit $ac_status); }; }; then
8022   cf_cv_posix_c_source=no
8023 else
8024   echo "$as_me: failed program was:" >&5
8025 cat conftest.$ac_ext >&5
8026 cf_want_posix_source=no
8027          case .$cf_POSIX_C_SOURCE in
8028          (.[12]??*)
8029                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8030                 ;;
8031          (.2)
8032                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8033                 cf_want_posix_source=yes
8034                 ;;
8035          (.*)
8036                 cf_want_posix_source=yes
8037                 ;;
8038          esac
8039          if test "$cf_want_posix_source" = yes ; then
8040                 cat >conftest.$ac_ext <<_ACEOF
8041 #line 8041 "configure"
8042 #include "confdefs.h"
8043 #include <sys/types.h>
8044 int
8045 main ()
8046 {
8047
8048 #ifdef _POSIX_SOURCE
8049 make an error
8050 #endif
8051   ;
8052   return 0;
8053 }
8054 _ACEOF
8055 rm -f conftest.$ac_objext
8056 if { (eval echo "$as_me:8056: \"$ac_compile\"") >&5
8057   (eval $ac_compile) 2>&5
8058   ac_status=$?
8059   echo "$as_me:8059: \$? = $ac_status" >&5
8060   (exit $ac_status); } &&
8061          { ac_try='test -s conftest.$ac_objext'
8062   { (eval echo "$as_me:8062: \"$ac_try\"") >&5
8063   (eval $ac_try) 2>&5
8064   ac_status=$?
8065   echo "$as_me:8065: \$? = $ac_status" >&5
8066   (exit $ac_status); }; }; then
8067   :
8068 else
8069   echo "$as_me: failed program was:" >&5
8070 cat conftest.$ac_ext >&5
8071 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8072 fi
8073 rm -f conftest.$ac_objext conftest.$ac_ext
8074          fi
8075
8076 echo "${as_me:-configure}:8076: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8077
8078          CFLAGS="$cf_trim_CFLAGS"
8079          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8080
8081 echo "${as_me:-configure}:8081: testing if the second compile does not leave our definition intact error ..." 1>&5
8082
8083          cat >conftest.$ac_ext <<_ACEOF
8084 #line 8084 "configure"
8085 #include "confdefs.h"
8086 #include <sys/types.h>
8087 int
8088 main ()
8089 {
8090
8091 #ifndef _POSIX_C_SOURCE
8092 make an error
8093 #endif
8094   ;
8095   return 0;
8096 }
8097 _ACEOF
8098 rm -f conftest.$ac_objext
8099 if { (eval echo "$as_me:8099: \"$ac_compile\"") >&5
8100   (eval $ac_compile) 2>&5
8101   ac_status=$?
8102   echo "$as_me:8102: \$? = $ac_status" >&5
8103   (exit $ac_status); } &&
8104          { ac_try='test -s conftest.$ac_objext'
8105   { (eval echo "$as_me:8105: \"$ac_try\"") >&5
8106   (eval $ac_try) 2>&5
8107   ac_status=$?
8108   echo "$as_me:8108: \$? = $ac_status" >&5
8109   (exit $ac_status); }; }; then
8110   :
8111 else
8112   echo "$as_me: failed program was:" >&5
8113 cat conftest.$ac_ext >&5
8114 cf_cv_posix_c_source=no
8115 fi
8116 rm -f conftest.$ac_objext conftest.$ac_ext
8117          CFLAGS="$cf_save_CFLAGS"
8118          CPPFLAGS="$cf_save_CPPFLAGS"
8119
8120 fi
8121 rm -f conftest.$ac_objext conftest.$ac_ext
8122
8123 fi
8124 echo "$as_me:8124: result: $cf_cv_posix_c_source" >&5
8125 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8126
8127 if test "$cf_cv_posix_c_source" != no ; then
8128         CFLAGS="$cf_trim_CFLAGS"
8129         CPPFLAGS="$cf_trim_CPPFLAGS"
8130
8131 cf_fix_cppflags=no
8132 cf_new_cflags=
8133 cf_new_cppflags=
8134 cf_new_extra_cppflags=
8135
8136 for cf_add_cflags in $cf_cv_posix_c_source
8137 do
8138 case $cf_fix_cppflags in
8139 (no)
8140         case $cf_add_cflags in
8141         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8142                 case $cf_add_cflags in
8143                 (-D*)
8144                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8145
8146                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8147                                 && test -z "${cf_tst_cflags}" \
8148                                 && cf_fix_cppflags=yes
8149
8150                         if test $cf_fix_cppflags = yes ; then
8151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8152                                 continue
8153                         elif test "${cf_tst_cflags}" = "\"'" ; then
8154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8155                                 continue
8156                         fi
8157                         ;;
8158                 esac
8159                 case "$CPPFLAGS" in
8160                 (*$cf_add_cflags)
8161                         ;;
8162                 (*)
8163                         case $cf_add_cflags in
8164                         (-D*)
8165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8166
8167 CPPFLAGS=`echo "$CPPFLAGS" | \
8168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8170
8171                                 ;;
8172                         esac
8173                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8174                         ;;
8175                 esac
8176                 ;;
8177         (*)
8178                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8179                 ;;
8180         esac
8181         ;;
8182 (yes)
8183         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8184
8185         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8186
8187         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8188                 && test -z "${cf_tst_cflags}" \
8189                 && cf_fix_cppflags=no
8190         ;;
8191 esac
8192 done
8193
8194 if test -n "$cf_new_cflags" ; then
8195
8196         CFLAGS="$CFLAGS $cf_new_cflags"
8197 fi
8198
8199 if test -n "$cf_new_cppflags" ; then
8200
8201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8202 fi
8203
8204 if test -n "$cf_new_extra_cppflags" ; then
8205
8206         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8207 fi
8208
8209 fi
8210
8211         ;;
8212 (netbsd*)
8213         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8214         ;;
8215 (openbsd[4-9]*)
8216         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8217         cf_xopen_source="-D_BSD_SOURCE"
8218         cf_XOPEN_SOURCE=600
8219         ;;
8220 (openbsd*)
8221         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8222         ;;
8223 (osf[45]*)
8224         cf_xopen_source="-D_OSF_SOURCE"
8225         ;;
8226 (nto-qnx*)
8227         cf_xopen_source="-D_QNX_SOURCE"
8228         ;;
8229 (sco*)
8230         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8231         ;;
8232 (solaris2.*)
8233         cf_xopen_source="-D__EXTENSIONS__"
8234         cf_cv_xopen_source=broken
8235         ;;
8236 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8237         cf_XOPEN_SOURCE=
8238         cf_POSIX_C_SOURCE=
8239         ;;
8240 (*)
8241
8242 echo "$as_me:8242: checking if we should define _XOPEN_SOURCE" >&5
8243 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8244 if test "${cf_cv_xopen_source+set}" = set; then
8245   echo $ECHO_N "(cached) $ECHO_C" >&6
8246 else
8247
8248         cat >conftest.$ac_ext <<_ACEOF
8249 #line 8249 "configure"
8250 #include "confdefs.h"
8251
8252 #include <stdlib.h>
8253 #include <string.h>
8254 #include <sys/types.h>
8255
8256 int
8257 main ()
8258 {
8259
8260 #ifndef _XOPEN_SOURCE
8261 make an error
8262 #endif
8263   ;
8264   return 0;
8265 }
8266 _ACEOF
8267 rm -f conftest.$ac_objext
8268 if { (eval echo "$as_me:8268: \"$ac_compile\"") >&5
8269   (eval $ac_compile) 2>&5
8270   ac_status=$?
8271   echo "$as_me:8271: \$? = $ac_status" >&5
8272   (exit $ac_status); } &&
8273          { ac_try='test -s conftest.$ac_objext'
8274   { (eval echo "$as_me:8274: \"$ac_try\"") >&5
8275   (eval $ac_try) 2>&5
8276   ac_status=$?
8277   echo "$as_me:8277: \$? = $ac_status" >&5
8278   (exit $ac_status); }; }; then
8279   cf_cv_xopen_source=no
8280 else
8281   echo "$as_me: failed program was:" >&5
8282 cat conftest.$ac_ext >&5
8283 cf_save="$CPPFLAGS"
8284          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8285          cat >conftest.$ac_ext <<_ACEOF
8286 #line 8286 "configure"
8287 #include "confdefs.h"
8288
8289 #include <stdlib.h>
8290 #include <string.h>
8291 #include <sys/types.h>
8292
8293 int
8294 main ()
8295 {
8296
8297 #ifdef _XOPEN_SOURCE
8298 make an error
8299 #endif
8300   ;
8301   return 0;
8302 }
8303 _ACEOF
8304 rm -f conftest.$ac_objext
8305 if { (eval echo "$as_me:8305: \"$ac_compile\"") >&5
8306   (eval $ac_compile) 2>&5
8307   ac_status=$?
8308   echo "$as_me:8308: \$? = $ac_status" >&5
8309   (exit $ac_status); } &&
8310          { ac_try='test -s conftest.$ac_objext'
8311   { (eval echo "$as_me:8311: \"$ac_try\"") >&5
8312   (eval $ac_try) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); }; }; then
8316   cf_cv_xopen_source=no
8317 else
8318   echo "$as_me: failed program was:" >&5
8319 cat conftest.$ac_ext >&5
8320 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8321 fi
8322 rm -f conftest.$ac_objext conftest.$ac_ext
8323         CPPFLAGS="$cf_save"
8324
8325 fi
8326 rm -f conftest.$ac_objext conftest.$ac_ext
8327
8328 fi
8329 echo "$as_me:8329: result: $cf_cv_xopen_source" >&5
8330 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8331
8332 if test "$cf_cv_xopen_source" != no ; then
8333
8334 CFLAGS=`echo "$CFLAGS" | \
8335         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8336                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8337
8338 CPPFLAGS=`echo "$CPPFLAGS" | \
8339         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8340                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8341
8342         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8343
8344 cf_fix_cppflags=no
8345 cf_new_cflags=
8346 cf_new_cppflags=
8347 cf_new_extra_cppflags=
8348
8349 for cf_add_cflags in $cf_temp_xopen_source
8350 do
8351 case $cf_fix_cppflags in
8352 (no)
8353         case $cf_add_cflags in
8354         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8355                 case $cf_add_cflags in
8356                 (-D*)
8357                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8358
8359                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8360                                 && test -z "${cf_tst_cflags}" \
8361                                 && cf_fix_cppflags=yes
8362
8363                         if test $cf_fix_cppflags = yes ; then
8364                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8365                                 continue
8366                         elif test "${cf_tst_cflags}" = "\"'" ; then
8367                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8368                                 continue
8369                         fi
8370                         ;;
8371                 esac
8372                 case "$CPPFLAGS" in
8373                 (*$cf_add_cflags)
8374                         ;;
8375                 (*)
8376                         case $cf_add_cflags in
8377                         (-D*)
8378                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8379
8380 CPPFLAGS=`echo "$CPPFLAGS" | \
8381         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8382                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8383
8384                                 ;;
8385                         esac
8386                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8387                         ;;
8388                 esac
8389                 ;;
8390         (*)
8391                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8392                 ;;
8393         esac
8394         ;;
8395 (yes)
8396         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8397
8398         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8399
8400         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8401                 && test -z "${cf_tst_cflags}" \
8402                 && cf_fix_cppflags=no
8403         ;;
8404 esac
8405 done
8406
8407 if test -n "$cf_new_cflags" ; then
8408
8409         CFLAGS="$CFLAGS $cf_new_cflags"
8410 fi
8411
8412 if test -n "$cf_new_cppflags" ; then
8413
8414         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8415 fi
8416
8417 if test -n "$cf_new_extra_cppflags" ; then
8418
8419         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8420 fi
8421
8422 fi
8423
8424 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8425
8426 cf_save_CFLAGS="$CFLAGS"
8427 cf_save_CPPFLAGS="$CPPFLAGS"
8428
8429 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8430         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8431                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8432
8433 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8434         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8435                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8436
8437 echo "$as_me:8437: checking if we should define _POSIX_C_SOURCE" >&5
8438 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8439 if test "${cf_cv_posix_c_source+set}" = set; then
8440   echo $ECHO_N "(cached) $ECHO_C" >&6
8441 else
8442
8443 echo "${as_me:-configure}:8443: testing if the symbol is already defined go no further ..." 1>&5
8444
8445         cat >conftest.$ac_ext <<_ACEOF
8446 #line 8446 "configure"
8447 #include "confdefs.h"
8448 #include <sys/types.h>
8449 int
8450 main ()
8451 {
8452
8453 #ifndef _POSIX_C_SOURCE
8454 make an error
8455 #endif
8456   ;
8457   return 0;
8458 }
8459 _ACEOF
8460 rm -f conftest.$ac_objext
8461 if { (eval echo "$as_me:8461: \"$ac_compile\"") >&5
8462   (eval $ac_compile) 2>&5
8463   ac_status=$?
8464   echo "$as_me:8464: \$? = $ac_status" >&5
8465   (exit $ac_status); } &&
8466          { ac_try='test -s conftest.$ac_objext'
8467   { (eval echo "$as_me:8467: \"$ac_try\"") >&5
8468   (eval $ac_try) 2>&5
8469   ac_status=$?
8470   echo "$as_me:8470: \$? = $ac_status" >&5
8471   (exit $ac_status); }; }; then
8472   cf_cv_posix_c_source=no
8473 else
8474   echo "$as_me: failed program was:" >&5
8475 cat conftest.$ac_ext >&5
8476 cf_want_posix_source=no
8477          case .$cf_POSIX_C_SOURCE in
8478          (.[12]??*)
8479                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8480                 ;;
8481          (.2)
8482                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8483                 cf_want_posix_source=yes
8484                 ;;
8485          (.*)
8486                 cf_want_posix_source=yes
8487                 ;;
8488          esac
8489          if test "$cf_want_posix_source" = yes ; then
8490                 cat >conftest.$ac_ext <<_ACEOF
8491 #line 8491 "configure"
8492 #include "confdefs.h"
8493 #include <sys/types.h>
8494 int
8495 main ()
8496 {
8497
8498 #ifdef _POSIX_SOURCE
8499 make an error
8500 #endif
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505 rm -f conftest.$ac_objext
8506 if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
8507   (eval $ac_compile) 2>&5
8508   ac_status=$?
8509   echo "$as_me:8509: \$? = $ac_status" >&5
8510   (exit $ac_status); } &&
8511          { ac_try='test -s conftest.$ac_objext'
8512   { (eval echo "$as_me:8512: \"$ac_try\"") >&5
8513   (eval $ac_try) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit $ac_status); }; }; then
8517   :
8518 else
8519   echo "$as_me: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8522 fi
8523 rm -f conftest.$ac_objext conftest.$ac_ext
8524          fi
8525
8526 echo "${as_me:-configure}:8526: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8527
8528          CFLAGS="$cf_trim_CFLAGS"
8529          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8530
8531 echo "${as_me:-configure}:8531: testing if the second compile does not leave our definition intact error ..." 1>&5
8532
8533          cat >conftest.$ac_ext <<_ACEOF
8534 #line 8534 "configure"
8535 #include "confdefs.h"
8536 #include <sys/types.h>
8537 int
8538 main ()
8539 {
8540
8541 #ifndef _POSIX_C_SOURCE
8542 make an error
8543 #endif
8544   ;
8545   return 0;
8546 }
8547 _ACEOF
8548 rm -f conftest.$ac_objext
8549 if { (eval echo "$as_me:8549: \"$ac_compile\"") >&5
8550   (eval $ac_compile) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); } &&
8554          { ac_try='test -s conftest.$ac_objext'
8555   { (eval echo "$as_me:8555: \"$ac_try\"") >&5
8556   (eval $ac_try) 2>&5
8557   ac_status=$?
8558   echo "$as_me:8558: \$? = $ac_status" >&5
8559   (exit $ac_status); }; }; then
8560   :
8561 else
8562   echo "$as_me: failed program was:" >&5
8563 cat conftest.$ac_ext >&5
8564 cf_cv_posix_c_source=no
8565 fi
8566 rm -f conftest.$ac_objext conftest.$ac_ext
8567          CFLAGS="$cf_save_CFLAGS"
8568          CPPFLAGS="$cf_save_CPPFLAGS"
8569
8570 fi
8571 rm -f conftest.$ac_objext conftest.$ac_ext
8572
8573 fi
8574 echo "$as_me:8574: result: $cf_cv_posix_c_source" >&5
8575 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8576
8577 if test "$cf_cv_posix_c_source" != no ; then
8578         CFLAGS="$cf_trim_CFLAGS"
8579         CPPFLAGS="$cf_trim_CPPFLAGS"
8580
8581 cf_fix_cppflags=no
8582 cf_new_cflags=
8583 cf_new_cppflags=
8584 cf_new_extra_cppflags=
8585
8586 for cf_add_cflags in $cf_cv_posix_c_source
8587 do
8588 case $cf_fix_cppflags in
8589 (no)
8590         case $cf_add_cflags in
8591         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8592                 case $cf_add_cflags in
8593                 (-D*)
8594                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8595
8596                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8597                                 && test -z "${cf_tst_cflags}" \
8598                                 && cf_fix_cppflags=yes
8599
8600                         if test $cf_fix_cppflags = yes ; then
8601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8602                                 continue
8603                         elif test "${cf_tst_cflags}" = "\"'" ; then
8604                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8605                                 continue
8606                         fi
8607                         ;;
8608                 esac
8609                 case "$CPPFLAGS" in
8610                 (*$cf_add_cflags)
8611                         ;;
8612                 (*)
8613                         case $cf_add_cflags in
8614                         (-D*)
8615                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8616
8617 CPPFLAGS=`echo "$CPPFLAGS" | \
8618         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8619                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8620
8621                                 ;;
8622                         esac
8623                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8624                         ;;
8625                 esac
8626                 ;;
8627         (*)
8628                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8629                 ;;
8630         esac
8631         ;;
8632 (yes)
8633         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8634
8635         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8636
8637         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8638                 && test -z "${cf_tst_cflags}" \
8639                 && cf_fix_cppflags=no
8640         ;;
8641 esac
8642 done
8643
8644 if test -n "$cf_new_cflags" ; then
8645
8646         CFLAGS="$CFLAGS $cf_new_cflags"
8647 fi
8648
8649 if test -n "$cf_new_cppflags" ; then
8650
8651         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8652 fi
8653
8654 if test -n "$cf_new_extra_cppflags" ; then
8655
8656         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8657 fi
8658
8659 fi
8660
8661         ;;
8662 esac
8663
8664 if test -n "$cf_xopen_source" ; then
8665
8666 cf_fix_cppflags=no
8667 cf_new_cflags=
8668 cf_new_cppflags=
8669 cf_new_extra_cppflags=
8670
8671 for cf_add_cflags in $cf_xopen_source
8672 do
8673 case $cf_fix_cppflags in
8674 (no)
8675         case $cf_add_cflags in
8676         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8677                 case $cf_add_cflags in
8678                 (-D*)
8679                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8680
8681                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8682                                 && test -z "${cf_tst_cflags}" \
8683                                 && cf_fix_cppflags=yes
8684
8685                         if test $cf_fix_cppflags = yes ; then
8686                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8687                                 continue
8688                         elif test "${cf_tst_cflags}" = "\"'" ; then
8689                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8690                                 continue
8691                         fi
8692                         ;;
8693                 esac
8694                 case "$CPPFLAGS" in
8695                 (*$cf_add_cflags)
8696                         ;;
8697                 (*)
8698                         case $cf_add_cflags in
8699                         (-D*)
8700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8701
8702 CPPFLAGS=`echo "$CPPFLAGS" | \
8703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8705
8706                                 ;;
8707                         esac
8708                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8709                         ;;
8710                 esac
8711                 ;;
8712         (*)
8713                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8714                 ;;
8715         esac
8716         ;;
8717 (yes)
8718         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8719
8720         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8721
8722         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8723                 && test -z "${cf_tst_cflags}" \
8724                 && cf_fix_cppflags=no
8725         ;;
8726 esac
8727 done
8728
8729 if test -n "$cf_new_cflags" ; then
8730         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8731
8732 echo "${as_me:-configure}:8732: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8733
8734         CFLAGS="$CFLAGS $cf_new_cflags"
8735 fi
8736
8737 if test -n "$cf_new_cppflags" ; then
8738         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8739
8740 echo "${as_me:-configure}:8740: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8741
8742         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8743 fi
8744
8745 if test -n "$cf_new_extra_cppflags" ; then
8746         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8747
8748 echo "${as_me:-configure}:8748: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8749
8750         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8751 fi
8752
8753 fi
8754
8755 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8756         echo "$as_me:8756: checking if _XOPEN_SOURCE really is set" >&5
8757 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8758         cat >conftest.$ac_ext <<_ACEOF
8759 #line 8759 "configure"
8760 #include "confdefs.h"
8761 #include <stdlib.h>
8762 int
8763 main ()
8764 {
8765
8766 #ifndef _XOPEN_SOURCE
8767 make an error
8768 #endif
8769   ;
8770   return 0;
8771 }
8772 _ACEOF
8773 rm -f conftest.$ac_objext
8774 if { (eval echo "$as_me:8774: \"$ac_compile\"") >&5
8775   (eval $ac_compile) 2>&5
8776   ac_status=$?
8777   echo "$as_me:8777: \$? = $ac_status" >&5
8778   (exit $ac_status); } &&
8779          { ac_try='test -s conftest.$ac_objext'
8780   { (eval echo "$as_me:8780: \"$ac_try\"") >&5
8781   (eval $ac_try) 2>&5
8782   ac_status=$?
8783   echo "$as_me:8783: \$? = $ac_status" >&5
8784   (exit $ac_status); }; }; then
8785   cf_XOPEN_SOURCE_set=yes
8786 else
8787   echo "$as_me: failed program was:" >&5
8788 cat conftest.$ac_ext >&5
8789 cf_XOPEN_SOURCE_set=no
8790 fi
8791 rm -f conftest.$ac_objext conftest.$ac_ext
8792         echo "$as_me:8792: result: $cf_XOPEN_SOURCE_set" >&5
8793 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8794         if test $cf_XOPEN_SOURCE_set = yes
8795         then
8796                 cat >conftest.$ac_ext <<_ACEOF
8797 #line 8797 "configure"
8798 #include "confdefs.h"
8799 #include <stdlib.h>
8800 int
8801 main ()
8802 {
8803
8804 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8805 make an error
8806 #endif
8807   ;
8808   return 0;
8809 }
8810 _ACEOF
8811 rm -f conftest.$ac_objext
8812 if { (eval echo "$as_me:8812: \"$ac_compile\"") >&5
8813   (eval $ac_compile) 2>&5
8814   ac_status=$?
8815   echo "$as_me:8815: \$? = $ac_status" >&5
8816   (exit $ac_status); } &&
8817          { ac_try='test -s conftest.$ac_objext'
8818   { (eval echo "$as_me:8818: \"$ac_try\"") >&5
8819   (eval $ac_try) 2>&5
8820   ac_status=$?
8821   echo "$as_me:8821: \$? = $ac_status" >&5
8822   (exit $ac_status); }; }; then
8823   cf_XOPEN_SOURCE_set_ok=yes
8824 else
8825   echo "$as_me: failed program was:" >&5
8826 cat conftest.$ac_ext >&5
8827 cf_XOPEN_SOURCE_set_ok=no
8828 fi
8829 rm -f conftest.$ac_objext conftest.$ac_ext
8830                 if test $cf_XOPEN_SOURCE_set_ok = no
8831                 then
8832                         { echo "$as_me:8832: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8833 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8834                 fi
8835         else
8836
8837 echo "$as_me:8837: checking if we should define _XOPEN_SOURCE" >&5
8838 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8839 if test "${cf_cv_xopen_source+set}" = set; then
8840   echo $ECHO_N "(cached) $ECHO_C" >&6
8841 else
8842
8843         cat >conftest.$ac_ext <<_ACEOF
8844 #line 8844 "configure"
8845 #include "confdefs.h"
8846
8847 #include <stdlib.h>
8848 #include <string.h>
8849 #include <sys/types.h>
8850
8851 int
8852 main ()
8853 {
8854
8855 #ifndef _XOPEN_SOURCE
8856 make an error
8857 #endif
8858   ;
8859   return 0;
8860 }
8861 _ACEOF
8862 rm -f conftest.$ac_objext
8863 if { (eval echo "$as_me:8863: \"$ac_compile\"") >&5
8864   (eval $ac_compile) 2>&5
8865   ac_status=$?
8866   echo "$as_me:8866: \$? = $ac_status" >&5
8867   (exit $ac_status); } &&
8868          { ac_try='test -s conftest.$ac_objext'
8869   { (eval echo "$as_me:8869: \"$ac_try\"") >&5
8870   (eval $ac_try) 2>&5
8871   ac_status=$?
8872   echo "$as_me:8872: \$? = $ac_status" >&5
8873   (exit $ac_status); }; }; then
8874   cf_cv_xopen_source=no
8875 else
8876   echo "$as_me: failed program was:" >&5
8877 cat conftest.$ac_ext >&5
8878 cf_save="$CPPFLAGS"
8879          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8880          cat >conftest.$ac_ext <<_ACEOF
8881 #line 8881 "configure"
8882 #include "confdefs.h"
8883
8884 #include <stdlib.h>
8885 #include <string.h>
8886 #include <sys/types.h>
8887
8888 int
8889 main ()
8890 {
8891
8892 #ifdef _XOPEN_SOURCE
8893 make an error
8894 #endif
8895   ;
8896   return 0;
8897 }
8898 _ACEOF
8899 rm -f conftest.$ac_objext
8900 if { (eval echo "$as_me:8900: \"$ac_compile\"") >&5
8901   (eval $ac_compile) 2>&5
8902   ac_status=$?
8903   echo "$as_me:8903: \$? = $ac_status" >&5
8904   (exit $ac_status); } &&
8905          { ac_try='test -s conftest.$ac_objext'
8906   { (eval echo "$as_me:8906: \"$ac_try\"") >&5
8907   (eval $ac_try) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); }; }; then
8911   cf_cv_xopen_source=no
8912 else
8913   echo "$as_me: failed program was:" >&5
8914 cat conftest.$ac_ext >&5
8915 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8916 fi
8917 rm -f conftest.$ac_objext conftest.$ac_ext
8918         CPPFLAGS="$cf_save"
8919
8920 fi
8921 rm -f conftest.$ac_objext conftest.$ac_ext
8922
8923 fi
8924 echo "$as_me:8924: result: $cf_cv_xopen_source" >&5
8925 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8926
8927 if test "$cf_cv_xopen_source" != no ; then
8928
8929 CFLAGS=`echo "$CFLAGS" | \
8930         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8931                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8932
8933 CPPFLAGS=`echo "$CPPFLAGS" | \
8934         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8935                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8936
8937         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8938
8939 cf_fix_cppflags=no
8940 cf_new_cflags=
8941 cf_new_cppflags=
8942 cf_new_extra_cppflags=
8943
8944 for cf_add_cflags in $cf_temp_xopen_source
8945 do
8946 case $cf_fix_cppflags in
8947 (no)
8948         case $cf_add_cflags in
8949         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8950                 case $cf_add_cflags in
8951                 (-D*)
8952                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8953
8954                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8955                                 && test -z "${cf_tst_cflags}" \
8956                                 && cf_fix_cppflags=yes
8957
8958                         if test $cf_fix_cppflags = yes ; then
8959                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8960                                 continue
8961                         elif test "${cf_tst_cflags}" = "\"'" ; then
8962                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8963                                 continue
8964                         fi
8965                         ;;
8966                 esac
8967                 case "$CPPFLAGS" in
8968                 (*$cf_add_cflags)
8969                         ;;
8970                 (*)
8971                         case $cf_add_cflags in
8972                         (-D*)
8973                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8974
8975 CPPFLAGS=`echo "$CPPFLAGS" | \
8976         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8977                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8978
8979                                 ;;
8980                         esac
8981                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8982                         ;;
8983                 esac
8984                 ;;
8985         (*)
8986                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8987                 ;;
8988         esac
8989         ;;
8990 (yes)
8991         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8992
8993         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8994
8995         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8996                 && test -z "${cf_tst_cflags}" \
8997                 && cf_fix_cppflags=no
8998         ;;
8999 esac
9000 done
9001
9002 if test -n "$cf_new_cflags" ; then
9003
9004         CFLAGS="$CFLAGS $cf_new_cflags"
9005 fi
9006
9007 if test -n "$cf_new_cppflags" ; then
9008
9009         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9010 fi
9011
9012 if test -n "$cf_new_extra_cppflags" ; then
9013
9014         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9015 fi
9016
9017 fi
9018
9019         fi
9020 fi
9021
9022 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9023
9024 # Work around breakage on OS X
9025
9026 echo "$as_me:9026: checking if SIGWINCH is defined" >&5
9027 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9028 if test "${cf_cv_define_sigwinch+set}" = set; then
9029   echo $ECHO_N "(cached) $ECHO_C" >&6
9030 else
9031
9032         cat >conftest.$ac_ext <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035
9036 #include <sys/types.h>
9037 #include <sys/signal.h>
9038
9039 int
9040 main ()
9041 {
9042 int x = SIGWINCH
9043   ;
9044   return 0;
9045 }
9046 _ACEOF
9047 rm -f conftest.$ac_objext
9048 if { (eval echo "$as_me:9048: \"$ac_compile\"") >&5
9049   (eval $ac_compile) 2>&5
9050   ac_status=$?
9051   echo "$as_me:9051: \$? = $ac_status" >&5
9052   (exit $ac_status); } &&
9053          { ac_try='test -s conftest.$ac_objext'
9054   { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9055   (eval $ac_try) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); }; }; then
9059   cf_cv_define_sigwinch=yes
9060 else
9061   echo "$as_me: failed program was:" >&5
9062 cat conftest.$ac_ext >&5
9063 cat >conftest.$ac_ext <<_ACEOF
9064 #line 9064 "configure"
9065 #include "confdefs.h"
9066
9067 #undef _XOPEN_SOURCE
9068 #undef _POSIX_SOURCE
9069 #undef _POSIX_C_SOURCE
9070 #include <sys/types.h>
9071 #include <sys/signal.h>
9072
9073 int
9074 main ()
9075 {
9076 int x = SIGWINCH
9077   ;
9078   return 0;
9079 }
9080 _ACEOF
9081 rm -f conftest.$ac_objext
9082 if { (eval echo "$as_me:9082: \"$ac_compile\"") >&5
9083   (eval $ac_compile) 2>&5
9084   ac_status=$?
9085   echo "$as_me:9085: \$? = $ac_status" >&5
9086   (exit $ac_status); } &&
9087          { ac_try='test -s conftest.$ac_objext'
9088   { (eval echo "$as_me:9088: \"$ac_try\"") >&5
9089   (eval $ac_try) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); }; }; then
9093   cf_cv_define_sigwinch=maybe
9094 else
9095   echo "$as_me: failed program was:" >&5
9096 cat conftest.$ac_ext >&5
9097 cf_cv_define_sigwinch=no
9098 fi
9099 rm -f conftest.$ac_objext conftest.$ac_ext
9100
9101 fi
9102 rm -f conftest.$ac_objext conftest.$ac_ext
9103
9104 fi
9105 echo "$as_me:9105: result: $cf_cv_define_sigwinch" >&5
9106 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9107
9108 if test "$cf_cv_define_sigwinch" = maybe ; then
9109 echo "$as_me:9109: checking for actual SIGWINCH definition" >&5
9110 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9111 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9112   echo $ECHO_N "(cached) $ECHO_C" >&6
9113 else
9114
9115 cf_cv_fixup_sigwinch=unknown
9116 cf_sigwinch=32
9117 while test $cf_sigwinch != 1
9118 do
9119         cat >conftest.$ac_ext <<_ACEOF
9120 #line 9120 "configure"
9121 #include "confdefs.h"
9122
9123 #undef _XOPEN_SOURCE
9124 #undef _POSIX_SOURCE
9125 #undef _POSIX_C_SOURCE
9126 #include <sys/types.h>
9127 #include <sys/signal.h>
9128
9129 int
9130 main ()
9131 {
9132
9133 #if SIGWINCH != $cf_sigwinch
9134 make an error
9135 #endif
9136 int x = SIGWINCH
9137   ;
9138   return 0;
9139 }
9140 _ACEOF
9141 rm -f conftest.$ac_objext
9142 if { (eval echo "$as_me:9142: \"$ac_compile\"") >&5
9143   (eval $ac_compile) 2>&5
9144   ac_status=$?
9145   echo "$as_me:9145: \$? = $ac_status" >&5
9146   (exit $ac_status); } &&
9147          { ac_try='test -s conftest.$ac_objext'
9148   { (eval echo "$as_me:9148: \"$ac_try\"") >&5
9149   (eval $ac_try) 2>&5
9150   ac_status=$?
9151   echo "$as_me:9151: \$? = $ac_status" >&5
9152   (exit $ac_status); }; }; then
9153   cf_cv_fixup_sigwinch=$cf_sigwinch
9154          break
9155 else
9156   echo "$as_me: failed program was:" >&5
9157 cat conftest.$ac_ext >&5
9158 fi
9159 rm -f conftest.$ac_objext conftest.$ac_ext
9160
9161 cf_sigwinch=`expr $cf_sigwinch - 1`
9162 done
9163
9164 fi
9165 echo "$as_me:9165: result: $cf_cv_fixup_sigwinch" >&5
9166 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9167
9168         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9169                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9170         fi
9171 fi
9172
9173 # Checks for CODESET support.
9174
9175 echo "$as_me:9175: checking for nl_langinfo and CODESET" >&5
9176 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9177 if test "${am_cv_langinfo_codeset+set}" = set; then
9178   echo $ECHO_N "(cached) $ECHO_C" >&6
9179 else
9180   cat >conftest.$ac_ext <<_ACEOF
9181 #line 9181 "configure"
9182 #include "confdefs.h"
9183 #include <langinfo.h>
9184 int
9185 main ()
9186 {
9187 char* cs = nl_langinfo(CODESET);
9188   ;
9189   return 0;
9190 }
9191 _ACEOF
9192 rm -f conftest.$ac_objext conftest$ac_exeext
9193 if { (eval echo "$as_me:9193: \"$ac_link\"") >&5
9194   (eval $ac_link) 2>&5
9195   ac_status=$?
9196   echo "$as_me:9196: \$? = $ac_status" >&5
9197   (exit $ac_status); } &&
9198          { ac_try='test -s conftest$ac_exeext'
9199   { (eval echo "$as_me:9199: \"$ac_try\"") >&5
9200   (eval $ac_try) 2>&5
9201   ac_status=$?
9202   echo "$as_me:9202: \$? = $ac_status" >&5
9203   (exit $ac_status); }; }; then
9204   am_cv_langinfo_codeset=yes
9205 else
9206   echo "$as_me: failed program was:" >&5
9207 cat conftest.$ac_ext >&5
9208 am_cv_langinfo_codeset=no
9209 fi
9210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9211
9212 fi
9213 echo "$as_me:9213: result: $am_cv_langinfo_codeset" >&5
9214 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9215         if test $am_cv_langinfo_codeset = yes; then
9216
9217 cat >>confdefs.h <<\EOF
9218 #define HAVE_LANGINFO_CODESET 1
9219 EOF
9220
9221         fi
9222
9223 # use these variables to work around a defect in gcc's fixincludes.
9224 NCURSES_OK_WCHAR_T=
9225 NCURSES_OK_WINT_T=
9226
9227 echo "$as_me:9227: checking if you want wide-character code" >&5
9228 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9229
9230 # Check whether --enable-widec or --disable-widec was given.
9231 if test "${enable_widec+set}" = set; then
9232   enableval="$enable_widec"
9233   with_widec=$enableval
9234 else
9235   with_widec=no
9236 fi;
9237 echo "$as_me:9237: result: $with_widec" >&5
9238 echo "${ECHO_T}$with_widec" >&6
9239 if test "x$with_widec" = xyes ; then
9240         if test "x$disable_lib_suffixes" = xno ; then
9241                 LIB_SUFFIX="w${LIB_SUFFIX}"
9242         fi
9243
9244 cat >>confdefs.h <<\EOF
9245 #define USE_WIDEC_SUPPORT 1
9246 EOF
9247
9248 cat >>confdefs.h <<\EOF
9249 #define NCURSES_WIDECHAR 1
9250 EOF
9251
9252 echo "$as_me:9252: checking if wchar.h can be used as is" >&5
9253 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9254 if test "${cf_cv_wchar_h_okay+set}" = set; then
9255   echo $ECHO_N "(cached) $ECHO_C" >&6
9256 else
9257
9258 cat >conftest.$ac_ext <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261
9262 #include <stdlib.h>
9263 #include <wchar.h>
9264
9265 int
9266 main ()
9267 {
9268
9269         wint_t foo = 0;
9270         int bar = iswpunct(foo)
9271   ;
9272   return 0;
9273 }
9274 _ACEOF
9275 rm -f conftest.$ac_objext
9276 if { (eval echo "$as_me:9276: \"$ac_compile\"") >&5
9277   (eval $ac_compile) 2>&5
9278   ac_status=$?
9279   echo "$as_me:9279: \$? = $ac_status" >&5
9280   (exit $ac_status); } &&
9281          { ac_try='test -s conftest.$ac_objext'
9282   { (eval echo "$as_me:9282: \"$ac_try\"") >&5
9283   (eval $ac_try) 2>&5
9284   ac_status=$?
9285   echo "$as_me:9285: \$? = $ac_status" >&5
9286   (exit $ac_status); }; }; then
9287   cf_cv_wchar_h_okay=yes
9288 else
9289   echo "$as_me: failed program was:" >&5
9290 cat conftest.$ac_ext >&5
9291 cf_cv_wchar_h_okay=no
9292 fi
9293 rm -f conftest.$ac_objext conftest.$ac_ext
9294 fi
9295 echo "$as_me:9295: result: $cf_cv_wchar_h_okay" >&5
9296 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9297
9298 if test $cf_cv_wchar_h_okay = no
9299 then
9300
9301 echo "$as_me:9301: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9302 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9303 cat >conftest.$ac_ext <<_ACEOF
9304 #line 9304 "configure"
9305 #include "confdefs.h"
9306 #include <sys/types.h>
9307
9308 int
9309 main ()
9310 {
9311
9312 #ifndef _XOPEN_SOURCE_EXTENDED
9313 make an error
9314 #endif
9315   ;
9316   return 0;
9317 }
9318 _ACEOF
9319 rm -f conftest.$ac_objext
9320 if { (eval echo "$as_me:9320: \"$ac_compile\"") >&5
9321   (eval $ac_compile) 2>&5
9322   ac_status=$?
9323   echo "$as_me:9323: \$? = $ac_status" >&5
9324   (exit $ac_status); } &&
9325          { ac_try='test -s conftest.$ac_objext'
9326   { (eval echo "$as_me:9326: \"$ac_try\"") >&5
9327   (eval $ac_try) 2>&5
9328   ac_status=$?
9329   echo "$as_me:9329: \$? = $ac_status" >&5
9330   (exit $ac_status); }; }; then
9331   cf_result=no
9332 else
9333   echo "$as_me: failed program was:" >&5
9334 cat conftest.$ac_ext >&5
9335 cf_result=yes
9336 fi
9337 rm -f conftest.$ac_objext conftest.$ac_ext
9338 echo "$as_me:9338: result: $cf_result" >&5
9339 echo "${ECHO_T}$cf_result" >&6
9340
9341 if test "$cf_result" = yes ; then
9342         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9343 elif test "x" != "x" ; then
9344         echo "$as_me:9344: checking checking for compatible value versus " >&5
9345 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9346         cat >conftest.$ac_ext <<_ACEOF
9347 #line 9347 "configure"
9348 #include "confdefs.h"
9349 #include <sys/types.h>
9350
9351 int
9352 main ()
9353 {
9354
9355 #if _XOPEN_SOURCE_EXTENDED- < 0
9356 make an error
9357 #endif
9358   ;
9359   return 0;
9360 }
9361 _ACEOF
9362 rm -f conftest.$ac_objext
9363 if { (eval echo "$as_me:9363: \"$ac_compile\"") >&5
9364   (eval $ac_compile) 2>&5
9365   ac_status=$?
9366   echo "$as_me:9366: \$? = $ac_status" >&5
9367   (exit $ac_status); } &&
9368          { ac_try='test -s conftest.$ac_objext'
9369   { (eval echo "$as_me:9369: \"$ac_try\"") >&5
9370   (eval $ac_try) 2>&5
9371   ac_status=$?
9372   echo "$as_me:9372: \$? = $ac_status" >&5
9373   (exit $ac_status); }; }; then
9374   cf_result=yes
9375 else
9376   echo "$as_me: failed program was:" >&5
9377 cat conftest.$ac_ext >&5
9378 cf_result=no
9379 fi
9380 rm -f conftest.$ac_objext conftest.$ac_ext
9381         echo "$as_me:9381: result: $cf_result" >&5
9382 echo "${ECHO_T}$cf_result" >&6
9383         if test "$cf_result" = no ; then
9384                 # perhaps we can override it - try...
9385                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9386         fi
9387 fi
9388
9389 fi
9390
9391         # with_overwrite=no
9392         NCURSES_CH_T=cchar_t
9393
9394 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9395 do
9396 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9397 echo "$as_me:9397: checking for $ac_func" >&5
9398 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9399 if eval "test \"\${$as_ac_var+set}\" = set"; then
9400   echo $ECHO_N "(cached) $ECHO_C" >&6
9401 else
9402   cat >conftest.$ac_ext <<_ACEOF
9403 #line 9403 "configure"
9404 #include "confdefs.h"
9405 /* System header to define __stub macros and hopefully few prototypes,
9406     which can conflict with char $ac_func (); below.  */
9407 #include <assert.h>
9408 /* Override any gcc2 internal prototype to avoid an error.  */
9409 #ifdef __cplusplus
9410 extern "C"
9411 #endif
9412 /* We use char because int might match the return type of a gcc2
9413    builtin and then its argument prototype would still apply.  */
9414 char $ac_func ();
9415 char (*f) ();
9416
9417 int
9418 main ()
9419 {
9420 /* The GNU C library defines this for functions which it implements
9421     to always fail with ENOSYS.  Some functions are actually named
9422     something starting with __ and the normal name is an alias.  */
9423 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9424 choke me
9425 #else
9426 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9427 #endif
9428
9429   ;
9430   return 0;
9431 }
9432 _ACEOF
9433 rm -f conftest.$ac_objext conftest$ac_exeext
9434 if { (eval echo "$as_me:9434: \"$ac_link\"") >&5
9435   (eval $ac_link) 2>&5
9436   ac_status=$?
9437   echo "$as_me:9437: \$? = $ac_status" >&5
9438   (exit $ac_status); } &&
9439          { ac_try='test -s conftest$ac_exeext'
9440   { (eval echo "$as_me:9440: \"$ac_try\"") >&5
9441   (eval $ac_try) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); }; }; then
9445   eval "$as_ac_var=yes"
9446 else
9447   echo "$as_me: failed program was:" >&5
9448 cat conftest.$ac_ext >&5
9449 eval "$as_ac_var=no"
9450 fi
9451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9452 fi
9453 echo "$as_me:9453: result: `eval echo '${'$as_ac_var'}'`" >&5
9454 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9455 if test `eval echo '${'$as_ac_var'}'` = yes; then
9456   cat >>confdefs.h <<EOF
9457 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9458 EOF
9459
9460 fi
9461 done
9462
9463         if test "x$ac_cv_func_putwc" != xyes ; then
9464
9465 echo "$as_me:9465: checking for multibyte character support" >&5
9466 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9467 if test "${cf_cv_utf8_lib+set}" = set; then
9468   echo $ECHO_N "(cached) $ECHO_C" >&6
9469 else
9470
9471         cf_save_LIBS="$LIBS"
9472         cat >conftest.$ac_ext <<_ACEOF
9473 #line 9473 "configure"
9474 #include "confdefs.h"
9475
9476 #include <stdlib.h>
9477 int
9478 main ()
9479 {
9480 putwc(0,0);
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 rm -f conftest.$ac_objext conftest$ac_exeext
9486 if { (eval echo "$as_me:9486: \"$ac_link\"") >&5
9487   (eval $ac_link) 2>&5
9488   ac_status=$?
9489   echo "$as_me:9489: \$? = $ac_status" >&5
9490   (exit $ac_status); } &&
9491          { ac_try='test -s conftest$ac_exeext'
9492   { (eval echo "$as_me:9492: \"$ac_try\"") >&5
9493   (eval $ac_try) 2>&5
9494   ac_status=$?
9495   echo "$as_me:9495: \$? = $ac_status" >&5
9496   (exit $ac_status); }; }; then
9497   cf_cv_utf8_lib=yes
9498 else
9499   echo "$as_me: failed program was:" >&5
9500 cat conftest.$ac_ext >&5
9501
9502 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9503 # will be set on completion of the AC_TRY_LINK below.
9504 cf_cv_header_path_utf8=
9505 cf_cv_library_path_utf8=
9506
9507 echo "${as_me:-configure}:9507: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9508
9509 cf_save_LIBS="$LIBS"
9510
9511 cat >conftest.$ac_ext <<_ACEOF
9512 #line 9512 "configure"
9513 #include "confdefs.h"
9514
9515 #include <libutf8.h>
9516 int
9517 main ()
9518 {
9519 putwc(0,0);
9520   ;
9521   return 0;
9522 }
9523 _ACEOF
9524 rm -f conftest.$ac_objext conftest$ac_exeext
9525 if { (eval echo "$as_me:9525: \"$ac_link\"") >&5
9526   (eval $ac_link) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); } &&
9530          { ac_try='test -s conftest$ac_exeext'
9531   { (eval echo "$as_me:9531: \"$ac_try\"") >&5
9532   (eval $ac_try) 2>&5
9533   ac_status=$?
9534   echo "$as_me:9534: \$? = $ac_status" >&5
9535   (exit $ac_status); }; }; then
9536
9537         cf_cv_find_linkage_utf8=yes
9538         cf_cv_header_path_utf8=/usr/include
9539         cf_cv_library_path_utf8=/usr/lib
9540
9541 else
9542   echo "$as_me: failed program was:" >&5
9543 cat conftest.$ac_ext >&5
9544
9545 LIBS="-lutf8  $cf_save_LIBS"
9546
9547 cat >conftest.$ac_ext <<_ACEOF
9548 #line 9548 "configure"
9549 #include "confdefs.h"
9550
9551 #include <libutf8.h>
9552 int
9553 main ()
9554 {
9555 putwc(0,0);
9556   ;
9557   return 0;
9558 }
9559 _ACEOF
9560 rm -f conftest.$ac_objext conftest$ac_exeext
9561 if { (eval echo "$as_me:9561: \"$ac_link\"") >&5
9562   (eval $ac_link) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit $ac_status); } &&
9566          { ac_try='test -s conftest$ac_exeext'
9567   { (eval echo "$as_me:9567: \"$ac_try\"") >&5
9568   (eval $ac_try) 2>&5
9569   ac_status=$?
9570   echo "$as_me:9570: \$? = $ac_status" >&5
9571   (exit $ac_status); }; }; then
9572
9573         cf_cv_find_linkage_utf8=yes
9574         cf_cv_header_path_utf8=/usr/include
9575         cf_cv_library_path_utf8=/usr/lib
9576         cf_cv_library_file_utf8="-lutf8"
9577
9578 else
9579   echo "$as_me: failed program was:" >&5
9580 cat conftest.$ac_ext >&5
9581
9582         cf_cv_find_linkage_utf8=no
9583         LIBS="$cf_save_LIBS"
9584
9585         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9586
9587 echo "${as_me:-configure}:9587: testing find linkage for utf8 library ..." 1>&5
9588
9589 echo "${as_me:-configure}:9589: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9590
9591         cf_save_CPPFLAGS="$CPPFLAGS"
9592         cf_test_CPPFLAGS="$CPPFLAGS"
9593
9594 cf_search=
9595
9596 # collect the current set of include-directories from compiler flags
9597 cf_header_path_list=""
9598 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9599         for cf_header_path in $CPPFLAGS $CFLAGS
9600         do
9601                 case $cf_header_path in
9602                 (-I*)
9603                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9604
9605 test "x$cf_header_path" != "xNONE" && \
9606 test -d "$cf_header_path" && \
9607  {
9608         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9609         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9610         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9611         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9612         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9613         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9614 }
9615
9616                         cf_header_path_list="$cf_header_path_list $cf_search"
9617                         ;;
9618                 esac
9619         done
9620 fi
9621
9622 # add the variations for the package we are looking for
9623
9624 cf_search=
9625
9626 test "x$prefix" != "xNONE" && \
9627 test -d "$prefix" && \
9628  {
9629         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9630         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9631         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9632         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9633         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9634         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9635 }
9636
9637 for cf_subdir_prefix in \
9638         /usr \
9639         /usr/local \
9640         /usr/pkg \
9641         /opt \
9642         /opt/local \
9643         $HOME
9644 do
9645
9646 test "x$cf_subdir_prefix" != "x$prefix" && \
9647 test -d "$cf_subdir_prefix" && \
9648 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9649         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9650         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9651         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9652         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9653         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9654         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9655 }
9656
9657 done
9658
9659 test "$includedir" != NONE && \
9660 test "$includedir" != "/usr/include" && \
9661 test -d "$includedir" && {
9662         test -d $includedir &&    cf_search="$cf_search $includedir"
9663         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9664 }
9665
9666 test "$oldincludedir" != NONE && \
9667 test "$oldincludedir" != "/usr/include" && \
9668 test -d "$oldincludedir" && {
9669         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9670         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9671 }
9672
9673 cf_search="$cf_search $cf_header_path_list"
9674
9675         for cf_cv_header_path_utf8 in $cf_search
9676         do
9677                 if test -d $cf_cv_header_path_utf8 ; then
9678                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9679
9680 echo "${as_me:-configure}:9680: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9681
9682                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9683                         cat >conftest.$ac_ext <<_ACEOF
9684 #line 9684 "configure"
9685 #include "confdefs.h"
9686
9687 #include <libutf8.h>
9688 int
9689 main ()
9690 {
9691 putwc(0,0);
9692   ;
9693   return 0;
9694 }
9695 _ACEOF
9696 rm -f conftest.$ac_objext
9697 if { (eval echo "$as_me:9697: \"$ac_compile\"") >&5
9698   (eval $ac_compile) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); } &&
9702          { ac_try='test -s conftest.$ac_objext'
9703   { (eval echo "$as_me:9703: \"$ac_try\"") >&5
9704   (eval $ac_try) 2>&5
9705   ac_status=$?
9706   echo "$as_me:9706: \$? = $ac_status" >&5
9707   (exit $ac_status); }; }; then
9708
9709                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9710
9711 echo "${as_me:-configure}:9711: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9712
9713                                 cf_cv_find_linkage_utf8=maybe
9714                                 cf_test_CPPFLAGS="$CPPFLAGS"
9715                                 break
9716 else
9717   echo "$as_me: failed program was:" >&5
9718 cat conftest.$ac_ext >&5
9719
9720                                 CPPFLAGS="$cf_save_CPPFLAGS"
9721
9722 fi
9723 rm -f conftest.$ac_objext conftest.$ac_ext
9724                 fi
9725         done
9726
9727         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9728
9729 echo "${as_me:-configure}:9729: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9730
9731                 cf_save_LIBS="$LIBS"
9732                 cf_save_LDFLAGS="$LDFLAGS"
9733
9734                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9735
9736 cf_search=
9737 cf_library_path_list=""
9738 if test -n "${LDFLAGS}${LIBS}" ; then
9739         for cf_library_path in $LDFLAGS $LIBS
9740         do
9741                 case $cf_library_path in
9742                 (-L*)
9743                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9744
9745 test "x$cf_library_path" != "xNONE" && \
9746 test -d "$cf_library_path" && \
9747  {
9748         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9749         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9750         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9751         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9752         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9753         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9754 }
9755
9756                         cf_library_path_list="$cf_library_path_list $cf_search"
9757                         ;;
9758                 esac
9759         done
9760 fi
9761
9762 cf_search=
9763
9764 test "x$prefix" != "xNONE" && \
9765 test -d "$prefix" && \
9766  {
9767         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9768         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9769         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9770         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9771         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9772         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9773 }
9774
9775 for cf_subdir_prefix in \
9776         /usr \
9777         /usr/local \
9778         /usr/pkg \
9779         /opt \
9780         /opt/local \
9781         $HOME
9782 do
9783
9784 test "x$cf_subdir_prefix" != "x$prefix" && \
9785 test -d "$cf_subdir_prefix" && \
9786 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9787         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9788         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9789         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9790         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9791         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9792         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9793 }
9794
9795 done
9796
9797 cf_search="$cf_library_path_list $cf_search"
9798
9799                         for cf_cv_library_path_utf8 in $cf_search
9800                         do
9801                                 if test -d $cf_cv_library_path_utf8 ; then
9802                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9803
9804 echo "${as_me:-configure}:9804: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9805
9806                                         CPPFLAGS="$cf_test_CPPFLAGS"
9807                                         LIBS="-lutf8  $cf_save_LIBS"
9808                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9809                                         cat >conftest.$ac_ext <<_ACEOF
9810 #line 9810 "configure"
9811 #include "confdefs.h"
9812
9813 #include <libutf8.h>
9814 int
9815 main ()
9816 {
9817 putwc(0,0);
9818   ;
9819   return 0;
9820 }
9821 _ACEOF
9822 rm -f conftest.$ac_objext conftest$ac_exeext
9823 if { (eval echo "$as_me:9823: \"$ac_link\"") >&5
9824   (eval $ac_link) 2>&5
9825   ac_status=$?
9826   echo "$as_me:9826: \$? = $ac_status" >&5
9827   (exit $ac_status); } &&
9828          { ac_try='test -s conftest$ac_exeext'
9829   { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9830   (eval $ac_try) 2>&5
9831   ac_status=$?
9832   echo "$as_me:9832: \$? = $ac_status" >&5
9833   (exit $ac_status); }; }; then
9834
9835                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9836
9837 echo "${as_me:-configure}:9837: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9838
9839                                         cf_cv_find_linkage_utf8=yes
9840                                         cf_cv_library_file_utf8="-lutf8"
9841                                         break
9842 else
9843   echo "$as_me: failed program was:" >&5
9844 cat conftest.$ac_ext >&5
9845
9846                                         CPPFLAGS="$cf_save_CPPFLAGS"
9847                                         LIBS="$cf_save_LIBS"
9848                                         LDFLAGS="$cf_save_LDFLAGS"
9849
9850 fi
9851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9852                                 fi
9853                         done
9854                         CPPFLAGS="$cf_save_CPPFLAGS"
9855                         LDFLAGS="$cf_save_LDFLAGS"
9856                 fi
9857
9858         else
9859                 cf_cv_find_linkage_utf8=no
9860         fi
9861
9862 fi
9863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9864
9865 fi
9866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9867
9868 LIBS="$cf_save_LIBS"
9869
9870 if test "$cf_cv_find_linkage_utf8" = yes ; then
9871 cf_cv_utf8_lib=add-on
9872 else
9873 cf_cv_utf8_lib=no
9874 fi
9875
9876 fi
9877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9878 fi
9879 echo "$as_me:9879: result: $cf_cv_utf8_lib" >&5
9880 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9881
9882 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9883 # ncurses/ncursesw:
9884 if test "$cf_cv_utf8_lib" = "add-on" ; then
9885
9886 cat >>confdefs.h <<\EOF
9887 #define HAVE_LIBUTF8_H 1
9888 EOF
9889
9890 if test -n "$cf_cv_header_path_utf8" ; then
9891   for cf_add_incdir in $cf_cv_header_path_utf8
9892   do
9893         while test $cf_add_incdir != /usr/include
9894         do
9895           if test -d $cf_add_incdir
9896           then
9897                 cf_have_incdir=no
9898                 if test -n "$CFLAGS$CPPFLAGS" ; then
9899                   # a loop is needed to ensure we can add subdirs of existing dirs
9900                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9901                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9902                           cf_have_incdir=yes; break
9903                         fi
9904                   done
9905                 fi
9906
9907                 if test "$cf_have_incdir" = no ; then
9908                   if test "$cf_add_incdir" = /usr/local/include ; then
9909                         if test "$GCC" = yes
9910                         then
9911                           cf_save_CPPFLAGS=$CPPFLAGS
9912                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9913                           cat >conftest.$ac_ext <<_ACEOF
9914 #line 9914 "configure"
9915 #include "confdefs.h"
9916 #include <stdio.h>
9917 int
9918 main ()
9919 {
9920 printf("Hello")
9921   ;
9922   return 0;
9923 }
9924 _ACEOF
9925 rm -f conftest.$ac_objext
9926 if { (eval echo "$as_me:9926: \"$ac_compile\"") >&5
9927   (eval $ac_compile) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } &&
9931          { ac_try='test -s conftest.$ac_objext'
9932   { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   :
9938 else
9939   echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 cf_have_incdir=yes
9942 fi
9943 rm -f conftest.$ac_objext conftest.$ac_ext
9944                           CPPFLAGS=$cf_save_CPPFLAGS
9945                         fi
9946                   fi
9947                 fi
9948
9949                 if test "$cf_have_incdir" = no ; then
9950                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9951
9952 echo "${as_me:-configure}:9952: testing adding $cf_add_incdir to include-path ..." 1>&5
9953
9954                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9955
9956                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9957                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9958                   cf_add_incdir="$cf_top_incdir"
9959                 else
9960                   break
9961                 fi
9962           else
9963                 break
9964           fi
9965         done
9966   done
9967 fi
9968
9969 if test -n "$cf_cv_library_path_utf8" ; then
9970         for cf_add_libdir in $cf_cv_library_path_utf8
9971         do
9972                 if test $cf_add_libdir = /usr/lib ; then
9973                         :
9974                 elif test -d $cf_add_libdir
9975                 then
9976                         cf_have_libdir=no
9977                         if test -n "$LDFLAGS$LIBS" ; then
9978                                 # a loop is needed to ensure we can add subdirs of existing dirs
9979                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9980                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9981                                                 cf_have_libdir=yes; break
9982                                         fi
9983                                 done
9984                         fi
9985                         if test "$cf_have_libdir" = no ; then
9986                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9987
9988 echo "${as_me:-configure}:9988: testing adding $cf_add_libdir to library-path ..." 1>&5
9989
9990                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9991                         fi
9992                 fi
9993         done
9994 fi
9995
9996 cf_add_libs="$cf_cv_library_file_utf8"
9997 # Filter out duplicates - this happens with badly-designed ".pc" files...
9998 for cf_add_1lib in $LIBS
9999 do
10000         for cf_add_2lib in $cf_add_libs
10001         do
10002                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10003                 then
10004                         cf_add_1lib=
10005                         break
10006                 fi
10007         done
10008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10009 done
10010 LIBS="$cf_add_libs"
10011
10012 fi
10013
10014                 if test "$cf_cv_utf8_lib" != no ; then
10015                         NCURSES_LIBUTF8=1
10016                 fi
10017         fi
10018
10019 # This is needed on Tru64 5.0 to declare mbstate_t
10020 echo "$as_me:10020: checking if we must include wchar.h to declare mbstate_t" >&5
10021 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10022 if test "${cf_cv_mbstate_t+set}" = set; then
10023   echo $ECHO_N "(cached) $ECHO_C" >&6
10024 else
10025
10026 cat >conftest.$ac_ext <<_ACEOF
10027 #line 10027 "configure"
10028 #include "confdefs.h"
10029
10030 #include <stdlib.h>
10031 #include <stdarg.h>
10032 #include <stdio.h>
10033 #ifdef HAVE_LIBUTF8_H
10034 #include <libutf8.h>
10035 #endif
10036 int
10037 main ()
10038 {
10039 mbstate_t state
10040   ;
10041   return 0;
10042 }
10043 _ACEOF
10044 rm -f conftest.$ac_objext
10045 if { (eval echo "$as_me:10045: \"$ac_compile\"") >&5
10046   (eval $ac_compile) 2>&5
10047   ac_status=$?
10048   echo "$as_me:10048: \$? = $ac_status" >&5
10049   (exit $ac_status); } &&
10050          { ac_try='test -s conftest.$ac_objext'
10051   { (eval echo "$as_me:10051: \"$ac_try\"") >&5
10052   (eval $ac_try) 2>&5
10053   ac_status=$?
10054   echo "$as_me:10054: \$? = $ac_status" >&5
10055   (exit $ac_status); }; }; then
10056   cf_cv_mbstate_t=no
10057 else
10058   echo "$as_me: failed program was:" >&5
10059 cat conftest.$ac_ext >&5
10060 cat >conftest.$ac_ext <<_ACEOF
10061 #line 10061 "configure"
10062 #include "confdefs.h"
10063
10064 #include <stdlib.h>
10065 #include <stdarg.h>
10066 #include <stdio.h>
10067 #include <wchar.h>
10068 #ifdef HAVE_LIBUTF8_H
10069 #include <libutf8.h>
10070 #endif
10071 int
10072 main ()
10073 {
10074 mbstate_t value
10075   ;
10076   return 0;
10077 }
10078 _ACEOF
10079 rm -f conftest.$ac_objext
10080 if { (eval echo "$as_me:10080: \"$ac_compile\"") >&5
10081   (eval $ac_compile) 2>&5
10082   ac_status=$?
10083   echo "$as_me:10083: \$? = $ac_status" >&5
10084   (exit $ac_status); } &&
10085          { ac_try='test -s conftest.$ac_objext'
10086   { (eval echo "$as_me:10086: \"$ac_try\"") >&5
10087   (eval $ac_try) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); }; }; then
10091   cf_cv_mbstate_t=yes
10092 else
10093   echo "$as_me: failed program was:" >&5
10094 cat conftest.$ac_ext >&5
10095 cf_cv_mbstate_t=unknown
10096 fi
10097 rm -f conftest.$ac_objext conftest.$ac_ext
10098 fi
10099 rm -f conftest.$ac_objext conftest.$ac_ext
10100 fi
10101 echo "$as_me:10101: result: $cf_cv_mbstate_t" >&5
10102 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10103
10104 if test "$cf_cv_mbstate_t" = yes ; then
10105
10106 cat >>confdefs.h <<\EOF
10107 #define NEED_WCHAR_H 1
10108 EOF
10109
10110         NEED_WCHAR_H=1
10111 fi
10112
10113 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10114 if test "$cf_cv_mbstate_t" = unknown ; then
10115         NCURSES_MBSTATE_T=1
10116 fi
10117
10118 # This is needed on Tru64 5.0 to declare wchar_t
10119 echo "$as_me:10119: checking if we must include wchar.h to declare wchar_t" >&5
10120 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10121 if test "${cf_cv_wchar_t+set}" = set; then
10122   echo $ECHO_N "(cached) $ECHO_C" >&6
10123 else
10124
10125 cat >conftest.$ac_ext <<_ACEOF
10126 #line 10126 "configure"
10127 #include "confdefs.h"
10128
10129 #include <stdlib.h>
10130 #include <stdarg.h>
10131 #include <stdio.h>
10132 #ifdef HAVE_LIBUTF8_H
10133 #include <libutf8.h>
10134 #endif
10135 int
10136 main ()
10137 {
10138 wchar_t state
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 rm -f conftest.$ac_objext
10144 if { (eval echo "$as_me:10144: \"$ac_compile\"") >&5
10145   (eval $ac_compile) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -s conftest.$ac_objext'
10150   { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151   (eval $ac_try) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); }; }; then
10155   cf_cv_wchar_t=no
10156 else
10157   echo "$as_me: failed program was:" >&5
10158 cat conftest.$ac_ext >&5
10159 cat >conftest.$ac_ext <<_ACEOF
10160 #line 10160 "configure"
10161 #include "confdefs.h"
10162
10163 #include <stdlib.h>
10164 #include <stdarg.h>
10165 #include <stdio.h>
10166 #include <wchar.h>
10167 #ifdef HAVE_LIBUTF8_H
10168 #include <libutf8.h>
10169 #endif
10170 int
10171 main ()
10172 {
10173 wchar_t value
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 rm -f conftest.$ac_objext
10179 if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
10180   (eval $ac_compile) 2>&5
10181   ac_status=$?
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } &&
10184          { ac_try='test -s conftest.$ac_objext'
10185   { (eval echo "$as_me:10185: \"$ac_try\"") >&5
10186   (eval $ac_try) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); }; }; then
10190   cf_cv_wchar_t=yes
10191 else
10192   echo "$as_me: failed program was:" >&5
10193 cat conftest.$ac_ext >&5
10194 cf_cv_wchar_t=unknown
10195 fi
10196 rm -f conftest.$ac_objext conftest.$ac_ext
10197 fi
10198 rm -f conftest.$ac_objext conftest.$ac_ext
10199 fi
10200 echo "$as_me:10200: result: $cf_cv_wchar_t" >&5
10201 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10202
10203 if test "$cf_cv_wchar_t" = yes ; then
10204
10205 cat >>confdefs.h <<\EOF
10206 #define NEED_WCHAR_H 1
10207 EOF
10208
10209         NEED_WCHAR_H=1
10210 fi
10211
10212 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10213 if test "$cf_cv_wchar_t" = unknown ; then
10214         NCURSES_WCHAR_T=1
10215 fi
10216
10217 # if we find wchar_t in either place, use substitution to provide a fallback.
10218 if test "$cf_cv_wchar_t" != unknown ; then
10219         NCURSES_OK_WCHAR_T=1
10220 fi
10221
10222 # This is needed on Tru64 5.0 to declare wint_t
10223 echo "$as_me:10223: checking if we must include wchar.h to declare wint_t" >&5
10224 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10225 if test "${cf_cv_wint_t+set}" = set; then
10226   echo $ECHO_N "(cached) $ECHO_C" >&6
10227 else
10228
10229 cat >conftest.$ac_ext <<_ACEOF
10230 #line 10230 "configure"
10231 #include "confdefs.h"
10232
10233 #include <stdlib.h>
10234 #include <stdarg.h>
10235 #include <stdio.h>
10236 #ifdef HAVE_LIBUTF8_H
10237 #include <libutf8.h>
10238 #endif
10239 int
10240 main ()
10241 {
10242 wint_t state
10243   ;
10244   return 0;
10245 }
10246 _ACEOF
10247 rm -f conftest.$ac_objext
10248 if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10249   (eval $ac_compile) 2>&5
10250   ac_status=$?
10251   echo "$as_me:10251: \$? = $ac_status" >&5
10252   (exit $ac_status); } &&
10253          { ac_try='test -s conftest.$ac_objext'
10254   { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255   (eval $ac_try) 2>&5
10256   ac_status=$?
10257   echo "$as_me:10257: \$? = $ac_status" >&5
10258   (exit $ac_status); }; }; then
10259   cf_cv_wint_t=no
10260 else
10261   echo "$as_me: failed program was:" >&5
10262 cat conftest.$ac_ext >&5
10263 cat >conftest.$ac_ext <<_ACEOF
10264 #line 10264 "configure"
10265 #include "confdefs.h"
10266
10267 #include <stdlib.h>
10268 #include <stdarg.h>
10269 #include <stdio.h>
10270 #include <wchar.h>
10271 #ifdef HAVE_LIBUTF8_H
10272 #include <libutf8.h>
10273 #endif
10274 int
10275 main ()
10276 {
10277 wint_t value
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f conftest.$ac_objext
10283 if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit $ac_status); } &&
10288          { ac_try='test -s conftest.$ac_objext'
10289   { (eval echo "$as_me:10289: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit $ac_status); }; }; then
10294   cf_cv_wint_t=yes
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat conftest.$ac_ext >&5
10298 cf_cv_wint_t=unknown
10299 fi
10300 rm -f conftest.$ac_objext conftest.$ac_ext
10301 fi
10302 rm -f conftest.$ac_objext conftest.$ac_ext
10303 fi
10304 echo "$as_me:10304: result: $cf_cv_wint_t" >&5
10305 echo "${ECHO_T}$cf_cv_wint_t" >&6
10306
10307 if test "$cf_cv_wint_t" = yes ; then
10308
10309 cat >>confdefs.h <<\EOF
10310 #define NEED_WCHAR_H 1
10311 EOF
10312
10313         NEED_WCHAR_H=1
10314 fi
10315
10316 # if we do not find wint_t in either place, use substitution to provide a fallback.
10317 if test "$cf_cv_wint_t" = unknown ; then
10318         NCURSES_WINT_T=1
10319 fi
10320
10321 # if we find wint_t in either place, use substitution to provide a fallback.
10322 if test "$cf_cv_wint_t" != unknown ; then
10323         NCURSES_OK_WINT_T=1
10324 fi
10325
10326         if test "$NCURSES_MBSTATE_T" != 0; then
10327
10328 cat >>confdefs.h <<\EOF
10329 #define NEED_MBSTATE_T_DEF 1
10330 EOF
10331
10332         fi
10333 fi
10334
10335 ###   use option --disable-lp64 to allow long chtype
10336 echo "$as_me:10336: checking whether to enable _LP64 definition in curses.h" >&5
10337 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10338
10339 # Check whether --enable-lp64 or --disable-lp64 was given.
10340 if test "${enable_lp64+set}" = set; then
10341   enableval="$enable_lp64"
10342   with_lp64=$enableval
10343 else
10344   with_lp64=$cf_dft_with_lp64
10345 fi;
10346 echo "$as_me:10346: result: $with_lp64" >&5
10347 echo "${ECHO_T}$with_lp64" >&6
10348
10349 if test "x$with_lp64" = xyes ; then
10350         cf_cv_enable_lp64=1
10351 else
10352         cf_cv_enable_lp64=0
10353 fi
10354
10355 # Check whether --enable-largefile or --disable-largefile was given.
10356 if test "${enable_largefile+set}" = set; then
10357   enableval="$enable_largefile"
10358
10359 fi;
10360 if test "$enable_largefile" != no; then
10361
10362   echo "$as_me:10362: checking for special C compiler options needed for large files" >&5
10363 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10364 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10365   echo $ECHO_N "(cached) $ECHO_C" >&6
10366 else
10367   ac_cv_sys_largefile_CC=no
10368      if test "$GCC" != yes; then
10369        ac_save_CC=$CC
10370        while :; do
10371          # IRIX 6.2 and later do not support large files by default,
10372          # so use the C compiler's -n32 option if that helps.
10373          cat >conftest.$ac_ext <<_ACEOF
10374 #line 10374 "configure"
10375 #include "confdefs.h"
10376 #include <sys/types.h>
10377  /* Check that off_t can represent 2**63 - 1 correctly.
10378     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10379     since some C++ compilers masquerading as C compilers
10380     incorrectly reject 9223372036854775807.  */
10381 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10382   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10383                        && LARGE_OFF_T % 2147483647 == 1)
10384                       ? 1 : -1];
10385 int
10386 main ()
10387 {
10388
10389   ;
10390   return 0;
10391 }
10392 _ACEOF
10393          rm -f conftest.$ac_objext
10394 if { (eval echo "$as_me:10394: \"$ac_compile\"") >&5
10395   (eval $ac_compile) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); } &&
10399          { ac_try='test -s conftest.$ac_objext'
10400   { (eval echo "$as_me:10400: \"$ac_try\"") >&5
10401   (eval $ac_try) 2>&5
10402   ac_status=$?
10403   echo "$as_me:10403: \$? = $ac_status" >&5
10404   (exit $ac_status); }; }; then
10405   break
10406 else
10407   echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10409 fi
10410 rm -f conftest.$ac_objext
10411          CC="$CC -n32"
10412          rm -f conftest.$ac_objext
10413 if { (eval echo "$as_me:10413: \"$ac_compile\"") >&5
10414   (eval $ac_compile) 2>&5
10415   ac_status=$?
10416   echo "$as_me:10416: \$? = $ac_status" >&5
10417   (exit $ac_status); } &&
10418          { ac_try='test -s conftest.$ac_objext'
10419   { (eval echo "$as_me:10419: \"$ac_try\"") >&5
10420   (eval $ac_try) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); }; }; then
10424   ac_cv_sys_largefile_CC=' -n32'; break
10425 else
10426   echo "$as_me: failed program was:" >&5
10427 cat conftest.$ac_ext >&5
10428 fi
10429 rm -f conftest.$ac_objext
10430          break
10431        done
10432        CC=$ac_save_CC
10433        rm -f conftest.$ac_ext
10434     fi
10435 fi
10436 echo "$as_me:10436: result: $ac_cv_sys_largefile_CC" >&5
10437 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10438   if test "$ac_cv_sys_largefile_CC" != no; then
10439     CC=$CC$ac_cv_sys_largefile_CC
10440   fi
10441
10442   echo "$as_me:10442: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10443 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10444 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10445   echo $ECHO_N "(cached) $ECHO_C" >&6
10446 else
10447   while :; do
10448   ac_cv_sys_file_offset_bits=no
10449   cat >conftest.$ac_ext <<_ACEOF
10450 #line 10450 "configure"
10451 #include "confdefs.h"
10452 #include <sys/types.h>
10453  /* Check that off_t can represent 2**63 - 1 correctly.
10454     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10455     since some C++ compilers masquerading as C compilers
10456     incorrectly reject 9223372036854775807.  */
10457 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10458   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10459                        && LARGE_OFF_T % 2147483647 == 1)
10460                       ? 1 : -1];
10461 int
10462 main ()
10463 {
10464
10465   ;
10466   return 0;
10467 }
10468 _ACEOF
10469 rm -f conftest.$ac_objext
10470 if { (eval echo "$as_me:10470: \"$ac_compile\"") >&5
10471   (eval $ac_compile) 2>&5
10472   ac_status=$?
10473   echo "$as_me:10473: \$? = $ac_status" >&5
10474   (exit $ac_status); } &&
10475          { ac_try='test -s conftest.$ac_objext'
10476   { (eval echo "$as_me:10476: \"$ac_try\"") >&5
10477   (eval $ac_try) 2>&5
10478   ac_status=$?
10479   echo "$as_me:10479: \$? = $ac_status" >&5
10480   (exit $ac_status); }; }; then
10481   break
10482 else
10483   echo "$as_me: failed program was:" >&5
10484 cat conftest.$ac_ext >&5
10485 fi
10486 rm -f conftest.$ac_objext conftest.$ac_ext
10487   cat >conftest.$ac_ext <<_ACEOF
10488 #line 10488 "configure"
10489 #include "confdefs.h"
10490 #define _FILE_OFFSET_BITS 64
10491 #include <sys/types.h>
10492  /* Check that off_t can represent 2**63 - 1 correctly.
10493     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10494     since some C++ compilers masquerading as C compilers
10495     incorrectly reject 9223372036854775807.  */
10496 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10497   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10498                        && LARGE_OFF_T % 2147483647 == 1)
10499                       ? 1 : -1];
10500 int
10501 main ()
10502 {
10503
10504   ;
10505   return 0;
10506 }
10507 _ACEOF
10508 rm -f conftest.$ac_objext
10509 if { (eval echo "$as_me:10509: \"$ac_compile\"") >&5
10510   (eval $ac_compile) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit $ac_status); } &&
10514          { ac_try='test -s conftest.$ac_objext'
10515   { (eval echo "$as_me:10515: \"$ac_try\"") >&5
10516   (eval $ac_try) 2>&5
10517   ac_status=$?
10518   echo "$as_me:10518: \$? = $ac_status" >&5
10519   (exit $ac_status); }; }; then
10520   ac_cv_sys_file_offset_bits=64; break
10521 else
10522   echo "$as_me: failed program was:" >&5
10523 cat conftest.$ac_ext >&5
10524 fi
10525 rm -f conftest.$ac_objext conftest.$ac_ext
10526   break
10527 done
10528 fi
10529 echo "$as_me:10529: result: $ac_cv_sys_file_offset_bits" >&5
10530 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10531 if test "$ac_cv_sys_file_offset_bits" != no; then
10532
10533 cat >>confdefs.h <<EOF
10534 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10535 EOF
10536
10537 fi
10538 rm -rf conftest*
10539   echo "$as_me:10539: checking for _LARGE_FILES value needed for large files" >&5
10540 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10541 if test "${ac_cv_sys_large_files+set}" = set; then
10542   echo $ECHO_N "(cached) $ECHO_C" >&6
10543 else
10544   while :; do
10545   ac_cv_sys_large_files=no
10546   cat >conftest.$ac_ext <<_ACEOF
10547 #line 10547 "configure"
10548 #include "confdefs.h"
10549 #include <sys/types.h>
10550  /* Check that off_t can represent 2**63 - 1 correctly.
10551     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10552     since some C++ compilers masquerading as C compilers
10553     incorrectly reject 9223372036854775807.  */
10554 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10555   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10556                        && LARGE_OFF_T % 2147483647 == 1)
10557                       ? 1 : -1];
10558 int
10559 main ()
10560 {
10561
10562   ;
10563   return 0;
10564 }
10565 _ACEOF
10566 rm -f conftest.$ac_objext
10567 if { (eval echo "$as_me:10567: \"$ac_compile\"") >&5
10568   (eval $ac_compile) 2>&5
10569   ac_status=$?
10570   echo "$as_me:10570: \$? = $ac_status" >&5
10571   (exit $ac_status); } &&
10572          { ac_try='test -s conftest.$ac_objext'
10573   { (eval echo "$as_me:10573: \"$ac_try\"") >&5
10574   (eval $ac_try) 2>&5
10575   ac_status=$?
10576   echo "$as_me:10576: \$? = $ac_status" >&5
10577   (exit $ac_status); }; }; then
10578   break
10579 else
10580   echo "$as_me: failed program was:" >&5
10581 cat conftest.$ac_ext >&5
10582 fi
10583 rm -f conftest.$ac_objext conftest.$ac_ext
10584   cat >conftest.$ac_ext <<_ACEOF
10585 #line 10585 "configure"
10586 #include "confdefs.h"
10587 #define _LARGE_FILES 1
10588 #include <sys/types.h>
10589  /* Check that off_t can represent 2**63 - 1 correctly.
10590     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10591     since some C++ compilers masquerading as C compilers
10592     incorrectly reject 9223372036854775807.  */
10593 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10594   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10595                        && LARGE_OFF_T % 2147483647 == 1)
10596                       ? 1 : -1];
10597 int
10598 main ()
10599 {
10600
10601   ;
10602   return 0;
10603 }
10604 _ACEOF
10605 rm -f conftest.$ac_objext
10606 if { (eval echo "$as_me:10606: \"$ac_compile\"") >&5
10607   (eval $ac_compile) 2>&5
10608   ac_status=$?
10609   echo "$as_me:10609: \$? = $ac_status" >&5
10610   (exit $ac_status); } &&
10611          { ac_try='test -s conftest.$ac_objext'
10612   { (eval echo "$as_me:10612: \"$ac_try\"") >&5
10613   (eval $ac_try) 2>&5
10614   ac_status=$?
10615   echo "$as_me:10615: \$? = $ac_status" >&5
10616   (exit $ac_status); }; }; then
10617   ac_cv_sys_large_files=1; break
10618 else
10619   echo "$as_me: failed program was:" >&5
10620 cat conftest.$ac_ext >&5
10621 fi
10622 rm -f conftest.$ac_objext conftest.$ac_ext
10623   break
10624 done
10625 fi
10626 echo "$as_me:10626: result: $ac_cv_sys_large_files" >&5
10627 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10628 if test "$ac_cv_sys_large_files" != no; then
10629
10630 cat >>confdefs.h <<EOF
10631 #define _LARGE_FILES $ac_cv_sys_large_files
10632 EOF
10633
10634 fi
10635 rm -rf conftest*
10636 fi
10637
10638         if test "$enable_largefile" != no ; then
10639         echo "$as_me:10639: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10640 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10641 if test "${ac_cv_sys_largefile_source+set}" = set; then
10642   echo $ECHO_N "(cached) $ECHO_C" >&6
10643 else
10644   while :; do
10645   ac_cv_sys_largefile_source=no
10646   cat >conftest.$ac_ext <<_ACEOF
10647 #line 10647 "configure"
10648 #include "confdefs.h"
10649 #include <stdio.h>
10650 int
10651 main ()
10652 {
10653 return !fseeko;
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 rm -f conftest.$ac_objext
10659 if { (eval echo "$as_me:10659: \"$ac_compile\"") >&5
10660   (eval $ac_compile) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit $ac_status); } &&
10664          { ac_try='test -s conftest.$ac_objext'
10665   { (eval echo "$as_me:10665: \"$ac_try\"") >&5
10666   (eval $ac_try) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); }; }; then
10670   break
10671 else
10672   echo "$as_me: failed program was:" >&5
10673 cat conftest.$ac_ext >&5
10674 fi
10675 rm -f conftest.$ac_objext conftest.$ac_ext
10676   cat >conftest.$ac_ext <<_ACEOF
10677 #line 10677 "configure"
10678 #include "confdefs.h"
10679 #define _LARGEFILE_SOURCE 1
10680 #include <stdio.h>
10681 int
10682 main ()
10683 {
10684 return !fseeko;
10685   ;
10686   return 0;
10687 }
10688 _ACEOF
10689 rm -f conftest.$ac_objext
10690 if { (eval echo "$as_me:10690: \"$ac_compile\"") >&5
10691   (eval $ac_compile) 2>&5
10692   ac_status=$?
10693   echo "$as_me:10693: \$? = $ac_status" >&5
10694   (exit $ac_status); } &&
10695          { ac_try='test -s conftest.$ac_objext'
10696   { (eval echo "$as_me:10696: \"$ac_try\"") >&5
10697   (eval $ac_try) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); }; }; then
10701   ac_cv_sys_largefile_source=1; break
10702 else
10703   echo "$as_me: failed program was:" >&5
10704 cat conftest.$ac_ext >&5
10705 fi
10706 rm -f conftest.$ac_objext conftest.$ac_ext
10707   break
10708 done
10709 fi
10710 echo "$as_me:10710: result: $ac_cv_sys_largefile_source" >&5
10711 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10712 if test "$ac_cv_sys_largefile_source" != no; then
10713
10714 cat >>confdefs.h <<EOF
10715 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10716 EOF
10717
10718 fi
10719 rm -rf conftest*
10720
10721 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10722 # in glibc 2.1.3, but that breaks too many other things.
10723 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10724 echo "$as_me:10724: checking for fseeko" >&5
10725 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10726 if test "${ac_cv_func_fseeko+set}" = set; then
10727   echo $ECHO_N "(cached) $ECHO_C" >&6
10728 else
10729   cat >conftest.$ac_ext <<_ACEOF
10730 #line 10730 "configure"
10731 #include "confdefs.h"
10732 #include <stdio.h>
10733 int
10734 main ()
10735 {
10736 return fseeko && fseeko (stdin, 0, 0);
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 rm -f conftest.$ac_objext conftest$ac_exeext
10742 if { (eval echo "$as_me:10742: \"$ac_link\"") >&5
10743   (eval $ac_link) 2>&5
10744   ac_status=$?
10745   echo "$as_me:10745: \$? = $ac_status" >&5
10746   (exit $ac_status); } &&
10747          { ac_try='test -s conftest$ac_exeext'
10748   { (eval echo "$as_me:10748: \"$ac_try\"") >&5
10749   (eval $ac_try) 2>&5
10750   ac_status=$?
10751   echo "$as_me:10751: \$? = $ac_status" >&5
10752   (exit $ac_status); }; }; then
10753   ac_cv_func_fseeko=yes
10754 else
10755   echo "$as_me: failed program was:" >&5
10756 cat conftest.$ac_ext >&5
10757 ac_cv_func_fseeko=no
10758 fi
10759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10760 fi
10761 echo "$as_me:10761: result: $ac_cv_func_fseeko" >&5
10762 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10763 if test $ac_cv_func_fseeko = yes; then
10764
10765 cat >>confdefs.h <<\EOF
10766 #define HAVE_FSEEKO 1
10767 EOF
10768
10769 fi
10770
10771         # Normally we would collect these definitions in the config.h,
10772         # but (like _XOPEN_SOURCE), some environments rely on having these
10773         # defined before any of the system headers are included.  Another
10774         # case comes up with C++, e.g., on AIX the compiler compiles the
10775         # header files by themselves before looking at the body files it is
10776         # told to compile.  For ncurses, those header files do not include
10777         # the config.h
10778         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10779         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10780         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10781
10782         echo "$as_me:10782: checking whether to use struct dirent64" >&5
10783 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10784 if test "${cf_cv_struct_dirent64+set}" = set; then
10785   echo $ECHO_N "(cached) $ECHO_C" >&6
10786 else
10787
10788                 cat >conftest.$ac_ext <<_ACEOF
10789 #line 10789 "configure"
10790 #include "confdefs.h"
10791
10792 #include <sys/types.h>
10793 #include <dirent.h>
10794
10795 int
10796 main ()
10797 {
10798
10799                 /* if transitional largefile support is setup, this is true */
10800                 extern struct dirent64 * readdir(DIR *);
10801                 struct dirent64 *x = readdir((DIR *)0);
10802                 struct dirent *y = readdir((DIR *)0);
10803                 int z = x - y;
10804
10805   ;
10806   return 0;
10807 }
10808 _ACEOF
10809 rm -f conftest.$ac_objext
10810 if { (eval echo "$as_me:10810: \"$ac_compile\"") >&5
10811   (eval $ac_compile) 2>&5
10812   ac_status=$?
10813   echo "$as_me:10813: \$? = $ac_status" >&5
10814   (exit $ac_status); } &&
10815          { ac_try='test -s conftest.$ac_objext'
10816   { (eval echo "$as_me:10816: \"$ac_try\"") >&5
10817   (eval $ac_try) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit $ac_status); }; }; then
10821   cf_cv_struct_dirent64=yes
10822 else
10823   echo "$as_me: failed program was:" >&5
10824 cat conftest.$ac_ext >&5
10825 cf_cv_struct_dirent64=no
10826 fi
10827 rm -f conftest.$ac_objext conftest.$ac_ext
10828
10829 fi
10830 echo "$as_me:10830: result: $cf_cv_struct_dirent64" >&5
10831 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10832         test "$cf_cv_struct_dirent64" = yes &&
10833 cat >>confdefs.h <<\EOF
10834 #define HAVE_STRUCT_DIRENT64 1
10835 EOF
10836
10837         fi
10838
10839 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10840 echo "$as_me:10840: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10841 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10842
10843 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10844 if test "${enable_tparm_varargs+set}" = set; then
10845   enableval="$enable_tparm_varargs"
10846   with_tparm_varargs=$enableval
10847 else
10848   with_tparm_varargs=yes
10849 fi;
10850 echo "$as_me:10850: result: $with_tparm_varargs" >&5
10851 echo "${ECHO_T}$with_tparm_varargs" >&6
10852 NCURSES_TPARM_VARARGS=0
10853 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10854
10855 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10856 if test "$with_ticlib" != no ; then
10857 echo "$as_me:10857: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10858 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10859
10860 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10861 if test "${enable_tic_depends+set}" = set; then
10862   enableval="$enable_tic_depends"
10863   with_tic_depends=$enableval
10864 else
10865   with_tic_depends=yes
10866 fi;
10867 echo "$as_me:10867: result: $with_tic_depends" >&5
10868 echo "${ECHO_T}$with_tic_depends" >&6
10869 else
10870         with_tic_depends=no
10871 fi
10872
10873 ###   use option --with-bool to override bool's type
10874 echo "$as_me:10874: checking for type of bool" >&5
10875 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10876
10877 # Check whether --with-bool or --without-bool was given.
10878 if test "${with_bool+set}" = set; then
10879   withval="$with_bool"
10880   NCURSES_BOOL="$withval"
10881 else
10882   NCURSES_BOOL=auto
10883 fi;
10884 echo "$as_me:10884: result: $NCURSES_BOOL" >&5
10885 echo "${ECHO_T}$NCURSES_BOOL" >&6
10886
10887 echo "$as_me:10887: checking for alternate terminal capabilities file" >&5
10888 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10889
10890 # Check whether --with-caps or --without-caps was given.
10891 if test "${with_caps+set}" = set; then
10892   withval="$with_caps"
10893   TERMINFO_CAPS=Caps.$withval
10894 else
10895   TERMINFO_CAPS=Caps
10896 fi;
10897 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10898 echo "$as_me:10898: result: $TERMINFO_CAPS" >&5
10899 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10900
10901 ###   use option --with-chtype to override chtype's type
10902 echo "$as_me:10902: checking for type of chtype" >&5
10903 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10904
10905 # Check whether --with-chtype or --without-chtype was given.
10906 if test "${with_chtype+set}" = set; then
10907   withval="$with_chtype"
10908   NCURSES_CHTYPE="$withval"
10909 else
10910   NCURSES_CHTYPE=$cf_dft_chtype
10911 fi;
10912 echo "$as_me:10912: result: $NCURSES_CHTYPE" >&5
10913 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10914
10915 ###   use option --with-ospeed to override ospeed's type
10916 echo "$as_me:10916: checking for type of ospeed" >&5
10917 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10918
10919 # Check whether --with-ospeed or --without-ospeed was given.
10920 if test "${with_ospeed+set}" = set; then
10921   withval="$with_ospeed"
10922   NCURSES_OSPEED="$withval"
10923 else
10924   NCURSES_OSPEED=short
10925 fi;
10926 echo "$as_me:10926: result: $NCURSES_OSPEED" >&5
10927 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10928
10929 ###   use option --with-mmask-t to override mmask_t's type
10930 echo "$as_me:10930: checking for type of mmask_t" >&5
10931 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10932
10933 # Check whether --with-mmask-t or --without-mmask-t was given.
10934 if test "${with_mmask_t+set}" = set; then
10935   withval="$with_mmask_t"
10936   NCURSES_MMASK_T="$withval"
10937 else
10938   NCURSES_MMASK_T=$cf_dft_mmask_t
10939 fi;
10940 echo "$as_me:10940: result: $NCURSES_MMASK_T" >&5
10941 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10942
10943 ###   use option --with-ccharw-max to override CCHARW_MAX size
10944 echo "$as_me:10944: checking for size CCHARW_MAX" >&5
10945 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10946
10947 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10948 if test "${with_ccharw_max+set}" = set; then
10949   withval="$with_ccharw_max"
10950   NCURSES_CCHARW_MAX="$withval"
10951 else
10952   NCURSES_CCHARW_MAX=5
10953 fi;
10954 echo "$as_me:10954: result: $NCURSES_CCHARW_MAX" >&5
10955 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10956
10957 ###   use option --with-tparm-arg to override tparm's argument type
10958 echo "$as_me:10958: checking for type of tparm args" >&5
10959 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10960
10961 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10962 if test "${with_tparm_arg+set}" = set; then
10963   withval="$with_tparm_arg"
10964   NCURSES_TPARM_ARG="$withval"
10965 else
10966   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10967 fi;
10968 echo "$as_me:10968: result: $NCURSES_TPARM_ARG" >&5
10969 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10970
10971 ### Enable compiling-in rcs id's
10972 echo "$as_me:10972: checking if RCS identifiers should be compiled-in" >&5
10973 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10974
10975 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10976 if test "${with_rcs_ids+set}" = set; then
10977   withval="$with_rcs_ids"
10978   with_rcs_ids=$withval
10979 else
10980   with_rcs_ids=no
10981 fi;
10982 echo "$as_me:10982: result: $with_rcs_ids" >&5
10983 echo "${ECHO_T}$with_rcs_ids" >&6
10984 test "x$with_rcs_ids" = xyes &&
10985 cat >>confdefs.h <<\EOF
10986 #define USE_RCS_IDS 1
10987 EOF
10988
10989 ###############################################################################
10990
10991 echo "$as_me:10991: checking format of man-pages" >&5
10992 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10993
10994 # Check whether --with-manpage-format or --without-manpage-format was given.
10995 if test "${with_manpage_format+set}" = set; then
10996   withval="$with_manpage_format"
10997   MANPAGE_FORMAT=$withval
10998 else
10999   MANPAGE_FORMAT=unknown
11000 fi;
11001
11002 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11003 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11004
11005 cf_unknown=
11006
11007 case $MANPAGE_FORMAT in
11008 (unknown)
11009         if test -z "$MANPATH" ; then
11010                 MANPATH="/usr/man:/usr/share/man"
11011         fi
11012
11013         # look for the 'date' man-page (it's most likely to be installed!)
11014         MANPAGE_FORMAT=
11015         cf_preform=no
11016         cf_catonly=yes
11017         cf_example=date
11018
11019         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11020         for cf_dir in $MANPATH; do
11021                 test -z "$cf_dir" && cf_dir=/usr/man
11022                 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
11023                 do
11024                         cf_test=`echo $cf_name | sed -e 's/*//'`
11025                         if test "x$cf_test" = "x$cf_name" ; then
11026
11027                                 case "$cf_name" in
11028                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11029                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11030                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11031                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11032                                 esac
11033
11034                                 case "$cf_name" in
11035                                 ($cf_dir/man*)
11036                                         cf_catonly=no
11037                                         ;;
11038                                 ($cf_dir/cat*)
11039                                         cf_preform=yes
11040                                         ;;
11041                                 esac
11042                                 break
11043                         fi
11044
11045                         # if we found a match in either man* or cat*, stop looking
11046                         if test -n "$MANPAGE_FORMAT" ; then
11047                                 cf_found=no
11048                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11049                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11050                                 case "$cf_name" in
11051                                 ($cf_dir/cat*)
11052                                         cf_found=yes
11053                                         ;;
11054                                 esac
11055                                 test $cf_found=yes && break
11056                         fi
11057                 done
11058                 # only check the first directory in $MANPATH where we find manpages
11059                 if test -n "$MANPAGE_FORMAT" ; then
11060                         break
11061                 fi
11062         done
11063         # if we did not find the example, just assume it is normal
11064         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11065         IFS="$ac_save_ifs"
11066         ;;
11067 (*)
11068         for cf_option in $MANPAGE_FORMAT; do
11069         case $cf_option in
11070         (gzip|compress|BSDI|normal|formatted|catonly)
11071                 ;;
11072         (*)
11073                 cf_unknown="$cf_unknown $cf_option"
11074                 ;;
11075         esac
11076         done
11077         ;;
11078 esac
11079
11080 echo "$as_me:11080: result: $MANPAGE_FORMAT" >&5
11081 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11082 if test -n "$cf_unknown" ; then
11083         { echo "$as_me:11083: WARNING: Unexpected manpage-format $cf_unknown" >&5
11084 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11085 fi
11086
11087 echo "$as_me:11087: checking for manpage renaming" >&5
11088 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11089
11090 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11091 if test "${with_manpage_renames+set}" = set; then
11092   withval="$with_manpage_renames"
11093   MANPAGE_RENAMES=$withval
11094 else
11095   MANPAGE_RENAMES=yes
11096 fi;
11097
11098 case ".$MANPAGE_RENAMES" in
11099 (.no)
11100         ;;
11101 (.|.yes)
11102         # Debian 'man' program?
11103         if test -f /etc/debian_version ; then
11104                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11105         else
11106                 MANPAGE_RENAMES=no
11107         fi
11108         ;;
11109 esac
11110
11111 if test "$MANPAGE_RENAMES" != no ; then
11112         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11113                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11114         elif test ! -f $MANPAGE_RENAMES ; then
11115                 { { echo "$as_me:11115: error: not a filename: $MANPAGE_RENAMES" >&5
11116 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11117    { (exit 1); exit 1; }; }
11118         fi
11119
11120         test ! -d man && mkdir man
11121
11122         # Construct a sed-script to perform renaming within man-pages
11123         if test -n "$MANPAGE_RENAMES" ; then
11124                 test ! -d man && mkdir man
11125                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11126         fi
11127 fi
11128
11129 echo "$as_me:11129: result: $MANPAGE_RENAMES" >&5
11130 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11131
11132 echo "$as_me:11132: checking if manpage aliases will be installed" >&5
11133 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11134
11135 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11136 if test "${with_manpage_aliases+set}" = set; then
11137   withval="$with_manpage_aliases"
11138   MANPAGE_ALIASES=$withval
11139 else
11140   MANPAGE_ALIASES=yes
11141 fi;
11142
11143 echo "$as_me:11143: result: $MANPAGE_ALIASES" >&5
11144 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11145
11146 case "x$LN_S" in
11147 (xln*)
11148         cf_use_symlinks=yes
11149         ;;
11150 (*)
11151         cf_use_symlinks=no
11152         ;;
11153 esac
11154
11155 MANPAGE_SYMLINKS=no
11156 if test "$MANPAGE_ALIASES" = yes ; then
11157 echo "$as_me:11157: checking if manpage symlinks should be used" >&5
11158 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11159
11160 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11161 if test "${with_manpage_symlinks+set}" = set; then
11162   withval="$with_manpage_symlinks"
11163   MANPAGE_SYMLINKS=$withval
11164 else
11165   MANPAGE_SYMLINKS=$cf_use_symlinks
11166 fi;
11167
11168 if test "$$cf_use_symlinks" = no; then
11169 if test "$MANPAGE_SYMLINKS" = yes ; then
11170         { echo "$as_me:11170: WARNING: cannot make symlinks" >&5
11171 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11172         MANPAGE_SYMLINKS=no
11173 fi
11174 fi
11175
11176 echo "$as_me:11176: result: $MANPAGE_SYMLINKS" >&5
11177 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11178 fi
11179
11180 echo "$as_me:11180: checking for manpage tbl" >&5
11181 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11182
11183 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11184 if test "${with_manpage_tbl+set}" = set; then
11185   withval="$with_manpage_tbl"
11186   MANPAGE_TBL=$withval
11187 else
11188   MANPAGE_TBL=no
11189 fi;
11190
11191 echo "$as_me:11191: result: $MANPAGE_TBL" >&5
11192 echo "${ECHO_T}$MANPAGE_TBL" >&6
11193
11194 if test "$prefix" = "NONE" ; then
11195         cf_prefix="$ac_default_prefix"
11196 else
11197         cf_prefix="$prefix"
11198 fi
11199
11200 case "$MANPAGE_FORMAT" in
11201 (*catonly*)
11202         cf_format=yes
11203         cf_inboth=no
11204         ;;
11205 (*formatted*)
11206         cf_format=yes
11207         cf_inboth=yes
11208         ;;
11209 (*)
11210         cf_format=no
11211         cf_inboth=no
11212         ;;
11213 esac
11214
11215 test ! -d man && mkdir man
11216
11217 cf_so_strip=
11218 cf_compress=
11219 case "$MANPAGE_FORMAT" in
11220 (*compress*)
11221         cf_so_strip="Z"
11222         cf_compress=compress
11223         ;;
11224 (*gzip*)
11225         cf_so_strip="gz"
11226         cf_compress=gzip
11227         ;;
11228 esac
11229
11230 cf_edit_man=./edit_man.sh
11231 cf_man_alias=`pwd`/man_alias.sed
11232
11233 cat >$cf_edit_man <<CF_EOF
11234 #! $SHELL
11235 # this script is generated by the configure-script CF_MAN_PAGES macro.
11236
11237 prefix="$cf_prefix"
11238 datarootdir="$datarootdir"
11239 datadir="$datadir"
11240
11241 NCURSES_MAJOR="$NCURSES_MAJOR"
11242 NCURSES_MINOR="$NCURSES_MINOR"
11243 NCURSES_PATCH="$NCURSES_PATCH"
11244
11245 NCURSES_OSPEED="$NCURSES_OSPEED"
11246 TERMINFO="$TERMINFO"
11247
11248 INSTALL="$INSTALL"
11249 INSTALL_DATA="$INSTALL_DATA"
11250
11251 transform="$program_transform_name"
11252
11253 TMP=\${TMPDIR:=/tmp}/man\$\$
11254 trap "rm -f \$TMP" 0 1 2 5 15
11255
11256 form=\$1
11257 shift || exit 1
11258
11259 verb=\$1
11260 shift || exit 1
11261
11262 mandir=\$1
11263 shift || exit 1
11264
11265 srcdir=\$1
11266 top_srcdir=\$srcdir/..
11267 shift || exit 1
11268
11269 if test "\$form" = normal ; then
11270         if test "$cf_format" = yes ; then
11271         if test "$cf_inboth" = no ; then
11272                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11273                 exit $?
11274         fi
11275         fi
11276         cf_subdir=\$mandir/man
11277         cf_tables=$MANPAGE_TBL
11278 else
11279         cf_subdir=\$mandir/cat
11280         cf_tables=yes
11281 fi
11282
11283 # process the list of source-files
11284 for i in \$* ; do
11285 case \$i in
11286 (*.orig|*.rej) ;;
11287 (*.[0-9]*)
11288         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11289         if test \$verb = installing ; then
11290         if test ! -d \$cf_subdir\${section} ; then
11291                 mkdir -p \$cf_subdir\$section
11292         fi
11293         fi
11294
11295         # replace variables in man page
11296         if test ! -f $cf_man_alias ; then
11297 cat >>$cf_man_alias <<-CF_EOF2
11298                 s,@DATADIR@,\$datadir,g
11299                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11300                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11301                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11302                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11303                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11304                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11305 CF_EOF
11306
11307         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11308         do
11309                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11310                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11311 cat >>$cf_edit_man <<-CF_EOF
11312                 s,@$cf_NAME@,$cf_name,g
11313 CF_EOF
11314         done
11315
11316 cat >>$cf_edit_man <<CF_EOF
11317 CF_EOF2
11318                 echo "...made $cf_man_alias"
11319         fi
11320
11321         aliases=
11322         cf_source=\`basename \$i\`
11323         inalias=\$cf_source
11324         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11325         if test ! -f \$inalias ; then
11326                 echo .. skipped \$cf_source
11327                 continue
11328         fi
11329 CF_EOF
11330
11331 if test "$MANPAGE_ALIASES" != no ; then
11332 cat >>$cf_edit_man <<CF_EOF
11333         nCurses=ignore.3x
11334         test $with_curses_h = yes && nCurses=ncurses.3x
11335         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11336 CF_EOF
11337 fi
11338
11339 if test "$MANPAGE_RENAMES" = no ; then
11340 cat >>$cf_edit_man <<CF_EOF
11341         # perform program transformations for section 1 man pages
11342         if test \$section = 1 ; then
11343                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11344         else
11345                 cf_target=\$cf_subdir\${section}/\$cf_source
11346         fi
11347 CF_EOF
11348 else
11349 cat >>$cf_edit_man <<CF_EOF
11350         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11351         if test -z "\$cf_target" ; then
11352                 echo '? missing rename for '\$cf_source
11353                 cf_target="\$cf_source"
11354         fi
11355         cf_target="\$cf_subdir\${section}/\${cf_target}"
11356
11357 CF_EOF
11358 fi
11359
11360 cat >>$cf_edit_man <<CF_EOF
11361         sed     -f $cf_man_alias \\
11362 CF_EOF
11363
11364 if test -f $MANPAGE_RENAMES ; then
11365 cat >>$cf_edit_man <<CF_EOF
11366                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11367 CF_EOF
11368 else
11369 cat >>$cf_edit_man <<CF_EOF
11370                 < \$i >\$TMP
11371 CF_EOF
11372 fi
11373
11374 cat >>$cf_edit_man <<CF_EOF
11375 if test \$cf_tables = yes ; then
11376         tbl \$TMP >\$TMP.out
11377         mv \$TMP.out \$TMP
11378 fi
11379 CF_EOF
11380
11381 if test $with_overwrite != yes ; then
11382 cat >>$cf_edit_man <<CF_EOF
11383         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11384         mv \$TMP.out \$TMP
11385 CF_EOF
11386 fi
11387
11388 if test $with_curses_h != yes ; then
11389 cat >>$cf_edit_man <<CF_EOF
11390         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11391         mv \$TMP.out \$TMP
11392 CF_EOF
11393 fi
11394
11395 cat >>$cf_edit_man <<CF_EOF
11396         if test \$form = format ; then
11397                 nroff -man \$TMP >\$TMP.out
11398                 mv \$TMP.out \$TMP
11399         fi
11400 CF_EOF
11401
11402 if test -n "$cf_compress" ; then
11403 cat >>$cf_edit_man <<CF_EOF
11404         if test \$verb = installing ; then
11405         if ( $cf_compress -f \$TMP )
11406         then
11407                 mv \$TMP.$cf_so_strip \$TMP
11408         fi
11409         fi
11410         cf_target="\$cf_target.$cf_so_strip"
11411 CF_EOF
11412 fi
11413
11414 case "$MANPAGE_FORMAT" in
11415 (*BSDI*)
11416 cat >>$cf_edit_man <<CF_EOF
11417         if test \$form = format ; then
11418                 # BSDI installs only .0 suffixes in the cat directories
11419                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11420         fi
11421 CF_EOF
11422   ;;
11423 esac
11424
11425 cat >>$cf_edit_man <<CF_EOF
11426         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11427         if test \$verb = installing ; then
11428                 echo \$verb \$cf_target
11429                 \$INSTALL_DATA \$TMP \$cf_target
11430                 test -d \$cf_subdir\${section} &&
11431                 test -n "\$aliases" && (
11432                         cd \$cf_subdir\${section} && (
11433                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11434                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11435                                 cf_target=\`basename \$cf_target\`
11436                                 for cf_alias in \$aliases
11437                                 do
11438                                         if test \$section = 1 ; then
11439                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11440                                         fi
11441
11442                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11443                                                 if test -f \$cf_alias\${suffix} ; then
11444                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11445                                                         then
11446                                                                 continue
11447                                                         fi
11448                                                 fi
11449                                                 echo .. \$verb alias \$cf_alias\${suffix}
11450 CF_EOF
11451 case "x$LN_S" in
11452 (*-f)
11453 cat >>$cf_edit_man <<CF_EOF
11454                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11455 CF_EOF
11456         ;;
11457 (*)
11458 cat >>$cf_edit_man <<CF_EOF
11459                                                 rm -f \$cf_alias\${suffix}
11460                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11461 CF_EOF
11462         ;;
11463 esac
11464 cat >>$cf_edit_man <<CF_EOF
11465                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11466                                                 echo ".so \$cf_source" >\$TMP
11467 CF_EOF
11468 if test -n "$cf_compress" ; then
11469 cat >>$cf_edit_man <<CF_EOF
11470                                                 if test -n "$cf_so_strip" ; then
11471                                                         $cf_compress -f \$TMP
11472                                                         mv \$TMP.$cf_so_strip \$TMP
11473                                                 fi
11474 CF_EOF
11475 fi
11476 cat >>$cf_edit_man <<CF_EOF
11477                                                 echo .. \$verb alias \$cf_alias\${suffix}
11478                                                 rm -f \$cf_alias\${suffix}
11479                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11480                                         fi
11481                                 done
11482                         )
11483                 )
11484         elif test \$verb = removing ; then
11485                 test -f \$cf_target && (
11486                         echo \$verb \$cf_target
11487                         rm -f \$cf_target
11488                 )
11489                 test -d \$cf_subdir\${section} &&
11490                 test -n "\$aliases" && (
11491                         cd \$cf_subdir\${section} && (
11492                                 for cf_alias in \$aliases
11493                                 do
11494                                         if test \$section = 1 ; then
11495                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11496                                         fi
11497
11498                                         echo .. \$verb alias \$cf_alias\${suffix}
11499                                         rm -f \$cf_alias\${suffix}
11500                                 done
11501                         )
11502                 )
11503         else
11504 #               echo ".hy 0"
11505                 cat \$TMP
11506         fi
11507         ;;
11508 esac
11509 done
11510
11511 if test $cf_inboth = yes ; then
11512 if test \$form != format ; then
11513         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11514 fi
11515 fi
11516
11517 exit 0
11518 CF_EOF
11519 chmod 755 $cf_edit_man
11520
11521 ###############################################################################
11522
11523 ### Note that some functions (such as const) are normally disabled anyway.
11524 echo "$as_me:11524: checking if you want to build with function extensions" >&5
11525 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11526
11527 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11528 if test "${enable_ext_funcs+set}" = set; then
11529   enableval="$enable_ext_funcs"
11530   with_ext_funcs=$enableval
11531 else
11532   with_ext_funcs=yes
11533 fi;
11534 echo "$as_me:11534: result: $with_ext_funcs" >&5
11535 echo "${ECHO_T}$with_ext_funcs" >&6
11536 if test "x$with_ext_funcs" = xyes ; then
11537         NCURSES_EXT_FUNCS=1
11538
11539 cat >>confdefs.h <<\EOF
11540 #define HAVE_ASSUME_DEFAULT_COLORS 1
11541 EOF
11542
11543 cat >>confdefs.h <<\EOF
11544 #define HAVE_CURSES_VERSION 1
11545 EOF
11546
11547 cat >>confdefs.h <<\EOF
11548 #define HAVE_HAS_KEY 1
11549 EOF
11550
11551 cat >>confdefs.h <<\EOF
11552 #define HAVE_RESIZETERM 1
11553 EOF
11554
11555 cat >>confdefs.h <<\EOF
11556 #define HAVE_RESIZE_TERM 1
11557 EOF
11558
11559 cat >>confdefs.h <<\EOF
11560 #define HAVE_TERM_ENTRY_H 1
11561 EOF
11562
11563 cat >>confdefs.h <<\EOF
11564 #define HAVE_USE_DEFAULT_COLORS 1
11565 EOF
11566
11567 cat >>confdefs.h <<\EOF
11568 #define HAVE_USE_SCREEN 1
11569 EOF
11570
11571 cat >>confdefs.h <<\EOF
11572 #define HAVE_USE_WINDOW 1
11573 EOF
11574
11575 cat >>confdefs.h <<\EOF
11576 #define HAVE_WRESIZE 1
11577 EOF
11578
11579 cat >>confdefs.h <<\EOF
11580 #define NCURSES_EXT_FUNCS 1
11581 EOF
11582
11583         GENERATED_EXT_FUNCS=generated
11584 else
11585         NCURSES_EXT_FUNCS=0
11586         GENERATED_EXT_FUNCS=
11587 fi
11588
11589 echo "$as_me:11589: checking if you want to build with SCREEN extensions" >&5
11590 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11591
11592 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11593 if test "${enable_sp_funcs+set}" = set; then
11594   enableval="$enable_sp_funcs"
11595   with_sp_funcs=$enableval
11596 else
11597   with_sp_funcs=$cf_dft_ext_spfuncs
11598 fi;
11599 echo "$as_me:11599: result: $with_sp_funcs" >&5
11600 echo "${ECHO_T}$with_sp_funcs" >&6
11601 if test "x$with_sp_funcs" = xyes ; then
11602         NCURSES_SP_FUNCS=1
11603
11604 cat >>confdefs.h <<\EOF
11605 #define NCURSES_SP_FUNCS 1
11606 EOF
11607
11608         GENERATED_SP_FUNCS=generated
11609 else
11610         NCURSES_SP_FUNCS=0
11611         GENERATED_SP_FUNCS=
11612 fi
11613
11614 echo "$as_me:11614: checking if you want to build with terminal-driver" >&5
11615 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11616
11617 # Check whether --enable-term-driver or --disable-term-driver was given.
11618 if test "${enable_term_driver+set}" = set; then
11619   enableval="$enable_term_driver"
11620   with_term_driver=$enableval
11621 else
11622   with_term_driver=no
11623 fi;
11624 echo "$as_me:11624: result: $with_term_driver" >&5
11625 echo "${ECHO_T}$with_term_driver" >&6
11626 if test "x$with_term_driver" = xyes ; then
11627
11628 cat >>confdefs.h <<\EOF
11629 #define USE_TERM_DRIVER 1
11630 EOF
11631
11632         if test "x$with_termlib" != xno ; then
11633                 { { echo "$as_me:11633: error: The term-driver option conflicts with the termlib option" >&5
11634 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11635    { (exit 1); exit 1; }; }
11636         fi
11637         if test "x$with_sp_funcs" != xyes ; then
11638                 { { echo "$as_me:11638: error: The term-driver option relies upon sp-funcs" >&5
11639 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11640    { (exit 1); exit 1; }; }
11641         fi
11642 fi
11643
11644 ###   use option --enable-const to turn on use of const beyond that in XSI.
11645 echo "$as_me:11645: checking for extended use of const keyword" >&5
11646 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11647
11648 # Check whether --enable-const or --disable-const was given.
11649 if test "${enable_const+set}" = set; then
11650   enableval="$enable_const"
11651   with_ext_const=$enableval
11652 else
11653   with_ext_const=$cf_dft_ext_const
11654 fi;
11655 echo "$as_me:11655: result: $with_ext_const" >&5
11656 echo "${ECHO_T}$with_ext_const" >&6
11657 NCURSES_CONST='/*nothing*/'
11658 if test "x$with_ext_const" = xyes ; then
11659         NCURSES_CONST=const
11660 fi
11661
11662 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11663 echo "$as_me:11663: checking if you want to use extended colors" >&5
11664 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11665
11666 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11667 if test "${enable_ext_colors+set}" = set; then
11668   enableval="$enable_ext_colors"
11669   with_ext_colors=$enableval
11670 else
11671   with_ext_colors=$cf_dft_ext_colors
11672 fi;
11673 echo "$as_me:11673: result: $with_ext_colors" >&5
11674 echo "${ECHO_T}$with_ext_colors" >&6
11675 NCURSES_EXT_COLORS=0
11676 if test "x$with_ext_colors" = xyes ; then
11677         if test "x$with_widec" != xyes ; then
11678                 { echo "$as_me:11678: WARNING: This option applies only to wide-character library" >&5
11679 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11680         else
11681                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11682
11683 if test "${with_abi_version+set}" != set; then
11684         case $cf_cv_rel_version in
11685         (5.*)
11686                 cf_cv_rel_version=6.0
11687                 cf_cv_abi_version=6
11688                 { echo "$as_me:11688: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11689 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11690                 ;;
11691         esac
11692 fi
11693
11694                 NCURSES_EXT_COLORS=1
11695
11696 cat >>confdefs.h <<\EOF
11697 #define NCURSES_EXT_COLORS 1
11698 EOF
11699
11700         fi
11701 fi
11702
11703 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11704 echo "$as_me:11704: checking if you want to use extended mouse encoding" >&5
11705 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11706
11707 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11708 if test "${enable_ext_mouse+set}" = set; then
11709   enableval="$enable_ext_mouse"
11710   with_ext_mouse=$enableval
11711 else
11712   with_ext_mouse=$cf_dft_ext_mouse
11713 fi;
11714 echo "$as_me:11714: result: $with_ext_mouse" >&5
11715 echo "${ECHO_T}$with_ext_mouse" >&6
11716 NCURSES_MOUSE_VERSION=1
11717 if test "x$with_ext_mouse" = xyes ; then
11718         NCURSES_MOUSE_VERSION=2
11719
11720 if test "${with_abi_version+set}" != set; then
11721         case $cf_cv_rel_version in
11722         (5.*)
11723                 cf_cv_rel_version=6.0
11724                 cf_cv_abi_version=6
11725                 { echo "$as_me:11725: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11726 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11727                 ;;
11728         esac
11729 fi
11730
11731 fi
11732
11733 ###   use option --enable-ext-putwin to turn on extended screendumps
11734 echo "$as_me:11734: checking if you want to use extended putwin/screendump" >&5
11735 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11736
11737 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11738 if test "${enable_ext_putwin+set}" = set; then
11739   enableval="$enable_ext_putwin"
11740   with_ext_putwin=$enableval
11741 else
11742   with_ext_putwin=$cf_dft_ext_putwin
11743 fi;
11744 echo "$as_me:11744: result: $with_ext_putwin" >&5
11745 echo "${ECHO_T}$with_ext_putwin" >&6
11746 if test "x$with_ext_putwin" = xyes ; then
11747
11748 cat >>confdefs.h <<\EOF
11749 #define NCURSES_EXT_PUTWIN 1
11750 EOF
11751
11752 fi
11753
11754 echo "$as_me:11754: checking if you want \$NCURSES_NO_PADDING code" >&5
11755 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11756
11757 # Check whether --enable-no-padding or --disable-no-padding was given.
11758 if test "${enable_no_padding+set}" = set; then
11759   enableval="$enable_no_padding"
11760   with_no_padding=$enableval
11761 else
11762   with_no_padding=$with_ext_funcs
11763 fi;
11764 echo "$as_me:11764: result: $with_no_padding" >&5
11765 echo "${ECHO_T}$with_no_padding" >&6
11766 test "x$with_no_padding" = xyes &&
11767 cat >>confdefs.h <<\EOF
11768 #define NCURSES_NO_PADDING 1
11769 EOF
11770
11771 echo "$as_me:11771: checking for ANSI C header files" >&5
11772 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11773 if test "${ac_cv_header_stdc+set}" = set; then
11774   echo $ECHO_N "(cached) $ECHO_C" >&6
11775 else
11776   cat >conftest.$ac_ext <<_ACEOF
11777 #line 11777 "configure"
11778 #include "confdefs.h"
11779 #include <stdlib.h>
11780 #include <stdarg.h>
11781 #include <string.h>
11782 #include <float.h>
11783
11784 _ACEOF
11785 if { (eval echo "$as_me:11785: \"$ac_cpp conftest.$ac_ext\"") >&5
11786   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11787   ac_status=$?
11788   egrep -v '^ *\+' conftest.er1 >conftest.err
11789   rm -f conftest.er1
11790   cat conftest.err >&5
11791   echo "$as_me:11791: \$? = $ac_status" >&5
11792   (exit $ac_status); } >/dev/null; then
11793   if test -s conftest.err; then
11794     ac_cpp_err=$ac_c_preproc_warn_flag
11795   else
11796     ac_cpp_err=
11797   fi
11798 else
11799   ac_cpp_err=yes
11800 fi
11801 if test -z "$ac_cpp_err"; then
11802   ac_cv_header_stdc=yes
11803 else
11804   echo "$as_me: failed program was:" >&5
11805   cat conftest.$ac_ext >&5
11806   ac_cv_header_stdc=no
11807 fi
11808 rm -f conftest.err conftest.$ac_ext
11809
11810 if test $ac_cv_header_stdc = yes; then
11811   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11812   cat >conftest.$ac_ext <<_ACEOF
11813 #line 11813 "configure"
11814 #include "confdefs.h"
11815 #include <string.h>
11816
11817 _ACEOF
11818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11819   egrep "memchr" >/dev/null 2>&1; then
11820   :
11821 else
11822   ac_cv_header_stdc=no
11823 fi
11824 rm -rf conftest*
11825
11826 fi
11827
11828 if test $ac_cv_header_stdc = yes; then
11829   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11830   cat >conftest.$ac_ext <<_ACEOF
11831 #line 11831 "configure"
11832 #include "confdefs.h"
11833 #include <stdlib.h>
11834
11835 _ACEOF
11836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11837   egrep "free" >/dev/null 2>&1; then
11838   :
11839 else
11840   ac_cv_header_stdc=no
11841 fi
11842 rm -rf conftest*
11843
11844 fi
11845
11846 if test $ac_cv_header_stdc = yes; then
11847   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11848   if test "$cross_compiling" = yes; then
11849   :
11850 else
11851   cat >conftest.$ac_ext <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11854 #include <ctype.h>
11855 #if ((' ' & 0x0FF) == 0x020)
11856 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11857 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11858 #else
11859 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11860                      || ('j' <= (c) && (c) <= 'r') \
11861                      || ('s' <= (c) && (c) <= 'z'))
11862 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11863 #endif
11864
11865 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11866 int
11867 main ()
11868 {
11869   int i;
11870   for (i = 0; i < 256; i++)
11871     if (XOR (islower (i), ISLOWER (i))
11872         || toupper (i) != TOUPPER (i))
11873       $ac_main_return(2);
11874   $ac_main_return (0);
11875 }
11876 _ACEOF
11877 rm -f conftest$ac_exeext
11878 if { (eval echo "$as_me:11878: \"$ac_link\"") >&5
11879   (eval $ac_link) 2>&5
11880   ac_status=$?
11881   echo "$as_me:11881: \$? = $ac_status" >&5
11882   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11883   { (eval echo "$as_me:11883: \"$ac_try\"") >&5
11884   (eval $ac_try) 2>&5
11885   ac_status=$?
11886   echo "$as_me:11886: \$? = $ac_status" >&5
11887   (exit $ac_status); }; }; then
11888   :
11889 else
11890   echo "$as_me: program exited with status $ac_status" >&5
11891 echo "$as_me: failed program was:" >&5
11892 cat conftest.$ac_ext >&5
11893 ac_cv_header_stdc=no
11894 fi
11895 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11896 fi
11897 fi
11898 fi
11899 echo "$as_me:11899: result: $ac_cv_header_stdc" >&5
11900 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11901 if test $ac_cv_header_stdc = yes; then
11902
11903 cat >>confdefs.h <<\EOF
11904 #define STDC_HEADERS 1
11905 EOF
11906
11907 fi
11908
11909 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11910
11911 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11912                   inttypes.h stdint.h unistd.h
11913 do
11914 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11915 echo "$as_me:11915: checking for $ac_header" >&5
11916 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11918   echo $ECHO_N "(cached) $ECHO_C" >&6
11919 else
11920   cat >conftest.$ac_ext <<_ACEOF
11921 #line 11921 "configure"
11922 #include "confdefs.h"
11923 $ac_includes_default
11924 #include <$ac_header>
11925 _ACEOF
11926 rm -f conftest.$ac_objext
11927 if { (eval echo "$as_me:11927: \"$ac_compile\"") >&5
11928   (eval $ac_compile) 2>&5
11929   ac_status=$?
11930   echo "$as_me:11930: \$? = $ac_status" >&5
11931   (exit $ac_status); } &&
11932          { ac_try='test -s conftest.$ac_objext'
11933   { (eval echo "$as_me:11933: \"$ac_try\"") >&5
11934   (eval $ac_try) 2>&5
11935   ac_status=$?
11936   echo "$as_me:11936: \$? = $ac_status" >&5
11937   (exit $ac_status); }; }; then
11938   eval "$as_ac_Header=yes"
11939 else
11940   echo "$as_me: failed program was:" >&5
11941 cat conftest.$ac_ext >&5
11942 eval "$as_ac_Header=no"
11943 fi
11944 rm -f conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 echo "$as_me:11946: result: `eval echo '${'$as_ac_Header'}'`" >&5
11947 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11948 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11949   cat >>confdefs.h <<EOF
11950 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11951 EOF
11952
11953 fi
11954 done
11955
11956 echo "$as_me:11956: checking for signed char" >&5
11957 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11958 if test "${ac_cv_type_signed_char+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961   cat >conftest.$ac_ext <<_ACEOF
11962 #line 11962 "configure"
11963 #include "confdefs.h"
11964 $ac_includes_default
11965 int
11966 main ()
11967 {
11968 if ((signed char *) 0)
11969   return 0;
11970 if (sizeof (signed char))
11971   return 0;
11972   ;
11973   return 0;
11974 }
11975 _ACEOF
11976 rm -f conftest.$ac_objext
11977 if { (eval echo "$as_me:11977: \"$ac_compile\"") >&5
11978   (eval $ac_compile) 2>&5
11979   ac_status=$?
11980   echo "$as_me:11980: \$? = $ac_status" >&5
11981   (exit $ac_status); } &&
11982          { ac_try='test -s conftest.$ac_objext'
11983   { (eval echo "$as_me:11983: \"$ac_try\"") >&5
11984   (eval $ac_try) 2>&5
11985   ac_status=$?
11986   echo "$as_me:11986: \$? = $ac_status" >&5
11987   (exit $ac_status); }; }; then
11988   ac_cv_type_signed_char=yes
11989 else
11990   echo "$as_me: failed program was:" >&5
11991 cat conftest.$ac_ext >&5
11992 ac_cv_type_signed_char=no
11993 fi
11994 rm -f conftest.$ac_objext conftest.$ac_ext
11995 fi
11996 echo "$as_me:11996: result: $ac_cv_type_signed_char" >&5
11997 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11998
11999 echo "$as_me:11999: checking size of signed char" >&5
12000 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12001 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12002   echo $ECHO_N "(cached) $ECHO_C" >&6
12003 else
12004   if test "$ac_cv_type_signed_char" = yes; then
12005   if test "$cross_compiling" = yes; then
12006   # Depending upon the size, compute the lo and hi bounds.
12007 cat >conftest.$ac_ext <<_ACEOF
12008 #line 12008 "configure"
12009 #include "confdefs.h"
12010 $ac_includes_default
12011 int
12012 main ()
12013 {
12014 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 rm -f conftest.$ac_objext
12020 if { (eval echo "$as_me:12020: \"$ac_compile\"") >&5
12021   (eval $ac_compile) 2>&5
12022   ac_status=$?
12023   echo "$as_me:12023: \$? = $ac_status" >&5
12024   (exit $ac_status); } &&
12025          { ac_try='test -s conftest.$ac_objext'
12026   { (eval echo "$as_me:12026: \"$ac_try\"") >&5
12027   (eval $ac_try) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); }; }; then
12031   ac_lo=0 ac_mid=0
12032   while :; do
12033     cat >conftest.$ac_ext <<_ACEOF
12034 #line 12034 "configure"
12035 #include "confdefs.h"
12036 $ac_includes_default
12037 int
12038 main ()
12039 {
12040 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12041   ;
12042   return 0;
12043 }
12044 _ACEOF
12045 rm -f conftest.$ac_objext
12046 if { (eval echo "$as_me:12046: \"$ac_compile\"") >&5
12047   (eval $ac_compile) 2>&5
12048   ac_status=$?
12049   echo "$as_me:12049: \$? = $ac_status" >&5
12050   (exit $ac_status); } &&
12051          { ac_try='test -s conftest.$ac_objext'
12052   { (eval echo "$as_me:12052: \"$ac_try\"") >&5
12053   (eval $ac_try) 2>&5
12054   ac_status=$?
12055   echo "$as_me:12055: \$? = $ac_status" >&5
12056   (exit $ac_status); }; }; then
12057   ac_hi=$ac_mid; break
12058 else
12059   echo "$as_me: failed program was:" >&5
12060 cat conftest.$ac_ext >&5
12061 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12062 fi
12063 rm -f conftest.$ac_objext conftest.$ac_ext
12064   done
12065 else
12066   echo "$as_me: failed program was:" >&5
12067 cat conftest.$ac_ext >&5
12068 ac_hi=-1 ac_mid=-1
12069   while :; do
12070     cat >conftest.$ac_ext <<_ACEOF
12071 #line 12071 "configure"
12072 #include "confdefs.h"
12073 $ac_includes_default
12074 int
12075 main ()
12076 {
12077 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12078   ;
12079   return 0;
12080 }
12081 _ACEOF
12082 rm -f conftest.$ac_objext
12083 if { (eval echo "$as_me:12083: \"$ac_compile\"") >&5
12084   (eval $ac_compile) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit $ac_status); } &&
12088          { ac_try='test -s conftest.$ac_objext'
12089   { (eval echo "$as_me:12089: \"$ac_try\"") >&5
12090   (eval $ac_try) 2>&5
12091   ac_status=$?
12092   echo "$as_me:12092: \$? = $ac_status" >&5
12093   (exit $ac_status); }; }; then
12094   ac_lo=$ac_mid; break
12095 else
12096   echo "$as_me: failed program was:" >&5
12097 cat conftest.$ac_ext >&5
12098 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12099 fi
12100 rm -f conftest.$ac_objext conftest.$ac_ext
12101   done
12102 fi
12103 rm -f conftest.$ac_objext conftest.$ac_ext
12104 # Binary search between lo and hi bounds.
12105 while test "x$ac_lo" != "x$ac_hi"; do
12106   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12107   cat >conftest.$ac_ext <<_ACEOF
12108 #line 12108 "configure"
12109 #include "confdefs.h"
12110 $ac_includes_default
12111 int
12112 main ()
12113 {
12114 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12115   ;
12116   return 0;
12117 }
12118 _ACEOF
12119 rm -f conftest.$ac_objext
12120 if { (eval echo "$as_me:12120: \"$ac_compile\"") >&5
12121   (eval $ac_compile) 2>&5
12122   ac_status=$?
12123   echo "$as_me:12123: \$? = $ac_status" >&5
12124   (exit $ac_status); } &&
12125          { ac_try='test -s conftest.$ac_objext'
12126   { (eval echo "$as_me:12126: \"$ac_try\"") >&5
12127   (eval $ac_try) 2>&5
12128   ac_status=$?
12129   echo "$as_me:12129: \$? = $ac_status" >&5
12130   (exit $ac_status); }; }; then
12131   ac_hi=$ac_mid
12132 else
12133   echo "$as_me: failed program was:" >&5
12134 cat conftest.$ac_ext >&5
12135 ac_lo=`expr $ac_mid + 1`
12136 fi
12137 rm -f conftest.$ac_objext conftest.$ac_ext
12138 done
12139 ac_cv_sizeof_signed_char=$ac_lo
12140 else
12141   if test "$cross_compiling" = yes; then
12142   { { echo "$as_me:12142: error: cannot run test program while cross compiling" >&5
12143 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12144    { (exit 1); exit 1; }; }
12145 else
12146   cat >conftest.$ac_ext <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12149 $ac_includes_default
12150 int
12151 main ()
12152 {
12153 FILE *f = fopen ("conftest.val", "w");
12154 if (!f)
12155   $ac_main_return (1);
12156 fprintf (f, "%d", (sizeof (signed char)));
12157 fclose (f);
12158   ;
12159   return 0;
12160 }
12161 _ACEOF
12162 rm -f conftest$ac_exeext
12163 if { (eval echo "$as_me:12163: \"$ac_link\"") >&5
12164   (eval $ac_link) 2>&5
12165   ac_status=$?
12166   echo "$as_me:12166: \$? = $ac_status" >&5
12167   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12168   { (eval echo "$as_me:12168: \"$ac_try\"") >&5
12169   (eval $ac_try) 2>&5
12170   ac_status=$?
12171   echo "$as_me:12171: \$? = $ac_status" >&5
12172   (exit $ac_status); }; }; then
12173   ac_cv_sizeof_signed_char=`cat conftest.val`
12174 else
12175   echo "$as_me: program exited with status $ac_status" >&5
12176 echo "$as_me: failed program was:" >&5
12177 cat conftest.$ac_ext >&5
12178 fi
12179 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12180 fi
12181 fi
12182 rm -f conftest.val
12183 else
12184   ac_cv_sizeof_signed_char=0
12185 fi
12186 fi
12187 echo "$as_me:12187: result: $ac_cv_sizeof_signed_char" >&5
12188 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12189 cat >>confdefs.h <<EOF
12190 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12191 EOF
12192
12193 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12194         NCURSES_SBOOL="signed char"
12195 else
12196         NCURSES_SBOOL="char"
12197 fi
12198 echo "$as_me:12198: checking if you want to use signed Boolean array in term.h" >&5
12199 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12200
12201 # Check whether --enable-signed-char or --disable-signed-char was given.
12202 if test "${enable_signed_char+set}" = set; then
12203   enableval="$enable_signed_char"
12204   with_signed_char=$enableval
12205 else
12206   with_signed_char=no
12207 fi;
12208 echo "$as_me:12208: result: $with_signed_char" >&5
12209 echo "${ECHO_T}$with_signed_char" >&6
12210 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12211
12212 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12213 echo "$as_me:12213: checking if you want SIGWINCH handler" >&5
12214 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12215
12216 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12217 if test "${enable_sigwinch+set}" = set; then
12218   enableval="$enable_sigwinch"
12219   with_sigwinch=$enableval
12220 else
12221   with_sigwinch=$with_ext_funcs
12222 fi;
12223 echo "$as_me:12223: result: $with_sigwinch" >&5
12224 echo "${ECHO_T}$with_sigwinch" >&6
12225 test "x$with_sigwinch" = xyes &&
12226 cat >>confdefs.h <<\EOF
12227 #define USE_SIGWINCH 1
12228 EOF
12229
12230 ###   use option --enable-tcap-names to allow user to define new capabilities
12231 echo "$as_me:12231: checking if you want user-definable terminal capabilities like termcap" >&5
12232 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12233
12234 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12235 if test "${enable_tcap_names+set}" = set; then
12236   enableval="$enable_tcap_names"
12237   with_tcap_names=$enableval
12238 else
12239   with_tcap_names=$with_ext_funcs
12240 fi;
12241 echo "$as_me:12241: result: $with_tcap_names" >&5
12242 echo "${ECHO_T}$with_tcap_names" >&6
12243 NCURSES_XNAMES=0
12244 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12245
12246 ###############################################################################
12247 # These options are relatively safe to experiment with.
12248
12249 echo "$as_me:12249: checking if you want all development code" >&5
12250 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12251
12252 # Check whether --with-develop or --without-develop was given.
12253 if test "${with_develop+set}" = set; then
12254   withval="$with_develop"
12255   with_develop=$withval
12256 else
12257   with_develop=no
12258 fi;
12259 echo "$as_me:12259: result: $with_develop" >&5
12260 echo "${ECHO_T}$with_develop" >&6
12261
12262 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12263 echo "$as_me:12263: checking if you want hard-tabs code" >&5
12264 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12265
12266 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12267 if test "${enable_hard_tabs+set}" = set; then
12268   enableval="$enable_hard_tabs"
12269
12270 else
12271   enable_hard_tabs=$with_develop
12272 fi;
12273 echo "$as_me:12273: result: $enable_hard_tabs" >&5
12274 echo "${ECHO_T}$enable_hard_tabs" >&6
12275 test "x$enable_hard_tabs" = xyes &&
12276 cat >>confdefs.h <<\EOF
12277 #define USE_HARD_TABS 1
12278 EOF
12279
12280 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12281 echo "$as_me:12281: checking if you want limited support for xmc" >&5
12282 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12283
12284 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12285 if test "${enable_xmc_glitch+set}" = set; then
12286   enableval="$enable_xmc_glitch"
12287
12288 else
12289   enable_xmc_glitch=$with_develop
12290 fi;
12291 echo "$as_me:12291: result: $enable_xmc_glitch" >&5
12292 echo "${ECHO_T}$enable_xmc_glitch" >&6
12293 test "x$enable_xmc_glitch" = xyes &&
12294 cat >>confdefs.h <<\EOF
12295 #define USE_XMC_SUPPORT 1
12296 EOF
12297
12298 ###############################################################################
12299 # These are just experimental, probably should not be in a package:
12300
12301 echo "$as_me:12301: checking if you do not want to assume colors are white-on-black" >&5
12302 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12303
12304 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12305 if test "${enable_assumed_color+set}" = set; then
12306   enableval="$enable_assumed_color"
12307   with_assumed_color=$enableval
12308 else
12309   with_assumed_color=yes
12310 fi;
12311 echo "$as_me:12311: result: $with_assumed_color" >&5
12312 echo "${ECHO_T}$with_assumed_color" >&6
12313 test "x$with_assumed_color" = xyes &&
12314 cat >>confdefs.h <<\EOF
12315 #define USE_ASSUMED_COLOR 1
12316 EOF
12317
12318 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12319 echo "$as_me:12319: checking if you want hashmap scrolling-optimization code" >&5
12320 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12321
12322 # Check whether --enable-hashmap or --disable-hashmap was given.
12323 if test "${enable_hashmap+set}" = set; then
12324   enableval="$enable_hashmap"
12325   with_hashmap=$enableval
12326 else
12327   with_hashmap=yes
12328 fi;
12329 echo "$as_me:12329: result: $with_hashmap" >&5
12330 echo "${ECHO_T}$with_hashmap" >&6
12331 test "x$with_hashmap" = xyes &&
12332 cat >>confdefs.h <<\EOF
12333 #define USE_HASHMAP 1
12334 EOF
12335
12336 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12337 echo "$as_me:12337: checking if you want colorfgbg code" >&5
12338 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12339
12340 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12341 if test "${enable_colorfgbg+set}" = set; then
12342   enableval="$enable_colorfgbg"
12343   with_colorfgbg=$enableval
12344 else
12345   with_colorfgbg=no
12346 fi;
12347 echo "$as_me:12347: result: $with_colorfgbg" >&5
12348 echo "${ECHO_T}$with_colorfgbg" >&6
12349 test "x$with_colorfgbg" = xyes &&
12350 cat >>confdefs.h <<\EOF
12351 #define USE_COLORFGBG 1
12352 EOF
12353
12354 ###   use option --enable-interop to turn on use of bindings used for interop
12355 echo "$as_me:12355: checking if you want interop bindings" >&5
12356 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12357
12358 # Check whether --enable-interop or --disable-interop was given.
12359 if test "${enable_interop+set}" = set; then
12360   enableval="$enable_interop"
12361   with_exp_interop=$enableval
12362 else
12363   with_exp_interop=$cf_dft_interop
12364 fi;
12365 echo "$as_me:12365: result: $with_exp_interop" >&5
12366 echo "${ECHO_T}$with_exp_interop" >&6
12367
12368 NCURSES_INTEROP_FUNCS=0
12369 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12370
12371 # This is still experimental (20080329), but should ultimately be moved to
12372 # the script-block --with-normal, etc.
12373
12374 echo "$as_me:12374: checking if you want to link with the pthread library" >&5
12375 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12376
12377 # Check whether --with-pthread or --without-pthread was given.
12378 if test "${with_pthread+set}" = set; then
12379   withval="$with_pthread"
12380   with_pthread=$withval
12381 else
12382   with_pthread=no
12383 fi;
12384 echo "$as_me:12384: result: $with_pthread" >&5
12385 echo "${ECHO_T}$with_pthread" >&6
12386
12387 if test "$with_pthread" != no ; then
12388         echo "$as_me:12388: checking for pthread.h" >&5
12389 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12390 if test "${ac_cv_header_pthread_h+set}" = set; then
12391   echo $ECHO_N "(cached) $ECHO_C" >&6
12392 else
12393   cat >conftest.$ac_ext <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396 #include <pthread.h>
12397 _ACEOF
12398 if { (eval echo "$as_me:12398: \"$ac_cpp conftest.$ac_ext\"") >&5
12399   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12400   ac_status=$?
12401   egrep -v '^ *\+' conftest.er1 >conftest.err
12402   rm -f conftest.er1
12403   cat conftest.err >&5
12404   echo "$as_me:12404: \$? = $ac_status" >&5
12405   (exit $ac_status); } >/dev/null; then
12406   if test -s conftest.err; then
12407     ac_cpp_err=$ac_c_preproc_warn_flag
12408   else
12409     ac_cpp_err=
12410   fi
12411 else
12412   ac_cpp_err=yes
12413 fi
12414 if test -z "$ac_cpp_err"; then
12415   ac_cv_header_pthread_h=yes
12416 else
12417   echo "$as_me: failed program was:" >&5
12418   cat conftest.$ac_ext >&5
12419   ac_cv_header_pthread_h=no
12420 fi
12421 rm -f conftest.err conftest.$ac_ext
12422 fi
12423 echo "$as_me:12423: result: $ac_cv_header_pthread_h" >&5
12424 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12425 if test $ac_cv_header_pthread_h = yes; then
12426
12427 cat >>confdefs.h <<\EOF
12428 #define HAVE_PTHREADS_H 1
12429 EOF
12430
12431         for cf_lib_pthread in pthread c_r
12432         do
12433             echo "$as_me:12433: checking if we can link with the $cf_lib_pthread library" >&5
12434 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12435             cf_save_LIBS="$LIBS"
12436
12437 cf_add_libs="-l$cf_lib_pthread"
12438 # Filter out duplicates - this happens with badly-designed ".pc" files...
12439 for cf_add_1lib in $LIBS
12440 do
12441         for cf_add_2lib in $cf_add_libs
12442         do
12443                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12444                 then
12445                         cf_add_1lib=
12446                         break
12447                 fi
12448         done
12449         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12450 done
12451 LIBS="$cf_add_libs"
12452
12453             cat >conftest.$ac_ext <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456
12457 #include <pthread.h>
12458
12459 int
12460 main ()
12461 {
12462
12463                 int rc = pthread_create(0,0,0,0);
12464                 int r2 = pthread_mutexattr_settype(0, 0);
12465
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 rm -f conftest.$ac_objext conftest$ac_exeext
12471 if { (eval echo "$as_me:12471: \"$ac_link\"") >&5
12472   (eval $ac_link) 2>&5
12473   ac_status=$?
12474   echo "$as_me:12474: \$? = $ac_status" >&5
12475   (exit $ac_status); } &&
12476          { ac_try='test -s conftest$ac_exeext'
12477   { (eval echo "$as_me:12477: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:12480: \$? = $ac_status" >&5
12481   (exit $ac_status); }; }; then
12482   with_pthread=yes
12483 else
12484   echo "$as_me: failed program was:" >&5
12485 cat conftest.$ac_ext >&5
12486 with_pthread=no
12487 fi
12488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12489             LIBS="$cf_save_LIBS"
12490             echo "$as_me:12490: result: $with_pthread" >&5
12491 echo "${ECHO_T}$with_pthread" >&6
12492             test "$with_pthread" = yes && break
12493         done
12494
12495         if test "$with_pthread" = yes ; then
12496
12497 cf_add_libs="-l$cf_lib_pthread"
12498 # Filter out duplicates - this happens with badly-designed ".pc" files...
12499 for cf_add_1lib in $LIBS
12500 do
12501         for cf_add_2lib in $cf_add_libs
12502         do
12503                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12504                 then
12505                         cf_add_1lib=
12506                         break
12507                 fi
12508         done
12509         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12510 done
12511 LIBS="$cf_add_libs"
12512
12513 cat >>confdefs.h <<\EOF
12514 #define HAVE_LIBPTHREADS 1
12515 EOF
12516
12517         else
12518             { { echo "$as_me:12518: error: Cannot link with pthread library" >&5
12519 echo "$as_me: error: Cannot link with pthread library" >&2;}
12520    { (exit 1); exit 1; }; }
12521         fi
12522
12523 fi
12524
12525 fi
12526
12527 if test "x$with_pthread" != xno; then
12528         echo "$as_me:12528: checking for pthread_kill" >&5
12529 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12530 if test "${ac_cv_func_pthread_kill+set}" = set; then
12531   echo $ECHO_N "(cached) $ECHO_C" >&6
12532 else
12533   cat >conftest.$ac_ext <<_ACEOF
12534 #line 12534 "configure"
12535 #include "confdefs.h"
12536 /* System header to define __stub macros and hopefully few prototypes,
12537     which can conflict with char pthread_kill (); below.  */
12538 #include <assert.h>
12539 /* Override any gcc2 internal prototype to avoid an error.  */
12540 #ifdef __cplusplus
12541 extern "C"
12542 #endif
12543 /* We use char because int might match the return type of a gcc2
12544    builtin and then its argument prototype would still apply.  */
12545 char pthread_kill ();
12546 char (*f) ();
12547
12548 int
12549 main ()
12550 {
12551 /* The GNU C library defines this for functions which it implements
12552     to always fail with ENOSYS.  Some functions are actually named
12553     something starting with __ and the normal name is an alias.  */
12554 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12555 choke me
12556 #else
12557 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12558 #endif
12559
12560   ;
12561   return 0;
12562 }
12563 _ACEOF
12564 rm -f conftest.$ac_objext conftest$ac_exeext
12565 if { (eval echo "$as_me:12565: \"$ac_link\"") >&5
12566   (eval $ac_link) 2>&5
12567   ac_status=$?
12568   echo "$as_me:12568: \$? = $ac_status" >&5
12569   (exit $ac_status); } &&
12570          { ac_try='test -s conftest$ac_exeext'
12571   { (eval echo "$as_me:12571: \"$ac_try\"") >&5
12572   (eval $ac_try) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); }; }; then
12576   ac_cv_func_pthread_kill=yes
12577 else
12578   echo "$as_me: failed program was:" >&5
12579 cat conftest.$ac_ext >&5
12580 ac_cv_func_pthread_kill=no
12581 fi
12582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12583 fi
12584 echo "$as_me:12584: result: $ac_cv_func_pthread_kill" >&5
12585 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12586 if test $ac_cv_func_pthread_kill = yes; then
12587
12588                 echo "$as_me:12588: checking if you want to allow EINTR in wgetch with pthreads" >&5
12589 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12590
12591 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12592 if test "${enable_pthreads_eintr+set}" = set; then
12593   enableval="$enable_pthreads_eintr"
12594   use_pthreads_eintr=$enableval
12595 else
12596   use_pthreads_eintr=no
12597 fi;
12598                 echo "$as_me:12598: result: $use_pthreads_eintr" >&5
12599 echo "${ECHO_T}$use_pthreads_eintr" >&6
12600                 if test "x$use_pthreads_eintr" = xyes ; then
12601
12602 cat >>confdefs.h <<\EOF
12603 #define USE_PTHREADS_EINTR 1
12604 EOF
12605
12606                 fi
12607 fi
12608
12609         echo "$as_me:12609: checking if you want to use weak-symbols for pthreads" >&5
12610 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12611
12612 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12613 if test "${enable_weak_symbols+set}" = set; then
12614   enableval="$enable_weak_symbols"
12615   use_weak_symbols=$enableval
12616 else
12617   use_weak_symbols=no
12618 fi;
12619         echo "$as_me:12619: result: $use_weak_symbols" >&5
12620 echo "${ECHO_T}$use_weak_symbols" >&6
12621         if test "x$use_weak_symbols" = xyes ; then
12622
12623 echo "$as_me:12623: checking if $CC supports weak symbols" >&5
12624 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12625 if test "${cf_cv_weak_symbols+set}" = set; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628
12629 cat >conftest.$ac_ext <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632
12633 #include <stdio.h>
12634 int
12635 main ()
12636 {
12637
12638 #if defined(__GNUC__)
12639 #  if defined __USE_ISOC99
12640 #    define _cat_pragma(exp)    _Pragma(#exp)
12641 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12642 #  else
12643 #    define _weak_pragma(exp)
12644 #  endif
12645 #  define _declare(name)        __extension__ extern __typeof__(name) name
12646 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12647 #endif
12648
12649 weak_symbol(fopen);
12650
12651   ;
12652   return 0;
12653 }
12654 _ACEOF
12655 rm -f conftest.$ac_objext
12656 if { (eval echo "$as_me:12656: \"$ac_compile\"") >&5
12657   (eval $ac_compile) 2>&5
12658   ac_status=$?
12659   echo "$as_me:12659: \$? = $ac_status" >&5
12660   (exit $ac_status); } &&
12661          { ac_try='test -s conftest.$ac_objext'
12662   { (eval echo "$as_me:12662: \"$ac_try\"") >&5
12663   (eval $ac_try) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit $ac_status); }; }; then
12667   cf_cv_weak_symbols=yes
12668 else
12669   echo "$as_me: failed program was:" >&5
12670 cat conftest.$ac_ext >&5
12671 cf_cv_weak_symbols=no
12672 fi
12673 rm -f conftest.$ac_objext conftest.$ac_ext
12674
12675 fi
12676 echo "$as_me:12676: result: $cf_cv_weak_symbols" >&5
12677 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12678
12679         else
12680                 cf_cv_weak_symbols=no
12681         fi
12682
12683         if test "x$cf_cv_weak_symbols" = xyes ; then
12684
12685 cat >>confdefs.h <<\EOF
12686 #define USE_WEAK_SYMBOLS 1
12687 EOF
12688
12689         fi
12690 fi
12691
12692 PTHREAD=
12693 if test "x$with_pthread" = "xyes" ; then
12694
12695 cat >>confdefs.h <<\EOF
12696 #define USE_PTHREADS 1
12697 EOF
12698
12699         enable_reentrant=yes
12700         if test "x$cf_cv_weak_symbols" = xyes ; then
12701                 PTHREAD=-lpthread
12702         fi
12703 fi
12704
12705 # Reentrant code has to be opaque; there's little advantage to making ncurses
12706 # opaque outside of that, so there is no --enable-opaque option.  We can use
12707 # this option without --with-pthreads, but this will be always set for
12708 # pthreads.
12709 echo "$as_me:12709: checking if you want reentrant code" >&5
12710 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12711
12712 # Check whether --enable-reentrant or --disable-reentrant was given.
12713 if test "${enable_reentrant+set}" = set; then
12714   enableval="$enable_reentrant"
12715   with_reentrant=$enableval
12716 else
12717   with_reentrant=no
12718 fi;
12719 echo "$as_me:12719: result: $with_reentrant" >&5
12720 echo "${ECHO_T}$with_reentrant" >&6
12721 if test "x$with_reentrant" = xyes ; then
12722         cf_cv_enable_reentrant=1
12723         cf_cv_enable_opaque="NCURSES_INTERNALS"
12724         NCURSES_OPAQUE=1
12725         NCURSES_SIZE_T=int
12726         if test "x$cf_cv_weak_symbols" = xyes ; then
12727
12728 # remove pthread library from $LIBS
12729 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12730
12731 cf_add_libs="-lpthread"
12732 # Filter out duplicates - this happens with badly-designed ".pc" files...
12733 for cf_add_1lib in $TEST_LIBS
12734 do
12735         for cf_add_2lib in $cf_add_libs
12736         do
12737                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12738                 then
12739                         cf_add_1lib=
12740                         break
12741                 fi
12742         done
12743         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12744 done
12745 TEST_LIBS="$cf_add_libs"
12746
12747 cf_add_libs="-lpthread"
12748 # Filter out duplicates - this happens with badly-designed ".pc" files...
12749 for cf_add_1lib in $TEST_LIBS2
12750 do
12751         for cf_add_2lib in $cf_add_libs
12752         do
12753                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12754                 then
12755                         cf_add_1lib=
12756                         break
12757                 fi
12758         done
12759         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12760 done
12761 TEST_LIBS2="$cf_add_libs"
12762
12763         else
12764                 # when not using weak symbols but with_reentrant,
12765                 # add 't' to the library suffix on all platforms
12766                 # except cygwin, where we only do that if ALSO
12767                 # compiling with full thread support.
12768                 case "$host" in
12769                 (*cygwin* | *msys*)
12770                         if test "$with_pthread" = "yes" ; then
12771                                 if test "x$disable_lib_suffixes" = "xno" ; then
12772                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12773                                 fi
12774                         fi ;;
12775                 (*)
12776                         if test "x$disable_lib_suffixes" = "xno" ; then
12777                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12778                         fi
12779                         ;;
12780                 esac
12781         fi
12782
12783 cat >>confdefs.h <<\EOF
12784 #define USE_REENTRANT 1
12785 EOF
12786
12787 if test "${with_abi_version+set}" != set; then
12788         case $cf_cv_rel_version in
12789         (5.*)
12790                 cf_cv_rel_version=6.0
12791                 cf_cv_abi_version=6
12792                 { echo "$as_me:12792: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12793 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12794                 ;;
12795         esac
12796 fi
12797
12798 else
12799         cf_cv_enable_reentrant=0
12800         cf_cv_enable_opaque="NCURSES_OPAQUE"
12801         NCURSES_OPAQUE=0
12802         NCURSES_SIZE_T=short
12803 fi
12804
12805 ### Allow using a different wrap-prefix
12806 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12807         echo "$as_me:12807: checking for prefix used to wrap public variables" >&5
12808 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12809
12810 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12811 if test "${with_wrap_prefix+set}" = set; then
12812   withval="$with_wrap_prefix"
12813   NCURSES_WRAP_PREFIX=$withval
12814 else
12815   NCURSES_WRAP_PREFIX=_nc_
12816 fi;
12817         echo "$as_me:12817: result: $NCURSES_WRAP_PREFIX" >&5
12818 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12819 else
12820         NCURSES_WRAP_PREFIX=_nc_
12821 fi
12822
12823 cat >>confdefs.h <<EOF
12824 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12825 EOF
12826
12827 echo "$as_me:12827: checking if you want experimental safe-sprintf code" >&5
12828 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12829
12830 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12831 if test "${enable_safe_sprintf+set}" = set; then
12832   enableval="$enable_safe_sprintf"
12833   with_safe_sprintf=$enableval
12834 else
12835   with_safe_sprintf=no
12836 fi;
12837 echo "$as_me:12837: result: $with_safe_sprintf" >&5
12838 echo "${ECHO_T}$with_safe_sprintf" >&6
12839 test "x$with_safe_sprintf" = xyes &&
12840 cat >>confdefs.h <<\EOF
12841 #define USE_SAFE_SPRINTF 1
12842 EOF
12843
12844 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12845 # when hashmap is used scroll hints are useless
12846 if test "$with_hashmap" = no ; then
12847 echo "$as_me:12847: checking if you want to experiment without scrolling-hints code" >&5
12848 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12849
12850 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12851 if test "${enable_scroll_hints+set}" = set; then
12852   enableval="$enable_scroll_hints"
12853   with_scroll_hints=$enableval
12854 else
12855   with_scroll_hints=yes
12856 fi;
12857 echo "$as_me:12857: result: $with_scroll_hints" >&5
12858 echo "${ECHO_T}$with_scroll_hints" >&6
12859 test "x$with_scroll_hints" = xyes &&
12860 cat >>confdefs.h <<\EOF
12861 #define USE_SCROLL_HINTS 1
12862 EOF
12863
12864 fi
12865
12866 echo "$as_me:12866: checking if you want wgetch-events code" >&5
12867 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12868
12869 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12870 if test "${enable_wgetch_events+set}" = set; then
12871   enableval="$enable_wgetch_events"
12872   with_wgetch_events=$enableval
12873 else
12874   with_wgetch_events=no
12875 fi;
12876 echo "$as_me:12876: result: $with_wgetch_events" >&5
12877 echo "${ECHO_T}$with_wgetch_events" >&6
12878 test "x$with_wgetch_events" = xyes &&
12879 cat >>confdefs.h <<\EOF
12880 #define NCURSES_WGETCH_EVENTS 1
12881 EOF
12882
12883 ###############################################################################
12884
12885 ###     use option --disable-echo to suppress full display compiling commands
12886
12887 echo "$as_me:12887: checking if you want to see long compiling messages" >&5
12888 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12889
12890 # Check whether --enable-echo or --disable-echo was given.
12891 if test "${enable_echo+set}" = set; then
12892   enableval="$enable_echo"
12893   test "$enableval" != no && enableval=yes
12894         if test "$enableval" != "yes" ; then
12895
12896         ECHO_LT='--silent'
12897         ECHO_LD='@echo linking $@;'
12898         RULE_CC='@echo compiling $<'
12899         SHOW_CC='@echo compiling $@'
12900         ECHO_CC='@'
12901
12902         else
12903
12904         ECHO_LT=''
12905         ECHO_LD=''
12906         RULE_CC=''
12907         SHOW_CC=''
12908         ECHO_CC=''
12909
12910         fi
12911 else
12912   enableval=yes
12913
12914         ECHO_LT=''
12915         ECHO_LD=''
12916         RULE_CC=''
12917         SHOW_CC=''
12918         ECHO_CC=''
12919
12920 fi;
12921 echo "$as_me:12921: result: $enableval" >&5
12922 echo "${ECHO_T}$enableval" >&6
12923
12924 if test "x$enable_echo" = xyes; then
12925         ECHO_LINK=
12926 else
12927         ECHO_LINK='@ echo linking $@ ... ;'
12928         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12929         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12930 fi
12931
12932 ###     use option --enable-warnings to turn on all gcc warnings
12933 echo "$as_me:12933: checking if you want to see compiler warnings" >&5
12934 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12935
12936 # Check whether --enable-warnings or --disable-warnings was given.
12937 if test "${enable_warnings+set}" = set; then
12938   enableval="$enable_warnings"
12939   with_warnings=$enableval
12940 fi;
12941 echo "$as_me:12941: result: $with_warnings" >&5
12942 echo "${ECHO_T}$with_warnings" >&6
12943
12944 if test "x$with_warnings" = "xyes"; then
12945
12946         ADAFLAGS="$ADAFLAGS -gnatg"
12947
12948 INTEL_COMPILER=no
12949
12950 if test "$GCC" = yes ; then
12951         case $host_os in
12952         (linux*|gnu*)
12953                 echo "$as_me:12953: checking if this is really Intel C compiler" >&5
12954 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12955                 cf_save_CFLAGS="$CFLAGS"
12956                 CFLAGS="$CFLAGS -no-gcc"
12957                 cat >conftest.$ac_ext <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960
12961 int
12962 main ()
12963 {
12964
12965 #ifdef __INTEL_COMPILER
12966 #else
12967 make an error
12968 #endif
12969
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f conftest.$ac_objext
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); } &&
12980          { ac_try='test -s conftest.$ac_objext'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); }; }; then
12986   INTEL_COMPILER=yes
12987 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12988
12989 else
12990   echo "$as_me: failed program was:" >&5
12991 cat conftest.$ac_ext >&5
12992 fi
12993 rm -f conftest.$ac_objext conftest.$ac_ext
12994                 CFLAGS="$cf_save_CFLAGS"
12995                 echo "$as_me:12995: result: $INTEL_COMPILER" >&5
12996 echo "${ECHO_T}$INTEL_COMPILER" >&6
12997                 ;;
12998         esac
12999 fi
13000
13001 CLANG_COMPILER=no
13002
13003 if test "$GCC" = yes ; then
13004         echo "$as_me:13004: checking if this is really Clang C compiler" >&5
13005 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13006         cf_save_CFLAGS="$CFLAGS"
13007         CFLAGS="$CFLAGS -Qunused-arguments"
13008         cat >conftest.$ac_ext <<_ACEOF
13009 #line 13009 "configure"
13010 #include "confdefs.h"
13011
13012 int
13013 main ()
13014 {
13015
13016 #ifdef __clang__
13017 #else
13018 make an error
13019 #endif
13020
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext
13026 if { (eval echo "$as_me:13026: \"$ac_compile\"") >&5
13027   (eval $ac_compile) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); } &&
13031          { ac_try='test -s conftest.$ac_objext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   CLANG_COMPILER=yes
13038 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13039
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 fi
13044 rm -f conftest.$ac_objext conftest.$ac_ext
13045         CFLAGS="$cf_save_CFLAGS"
13046         echo "$as_me:13046: result: $CLANG_COMPILER" >&5
13047 echo "${ECHO_T}$CLANG_COMPILER" >&6
13048 fi
13049
13050 cat > conftest.$ac_ext <<EOF
13051 #line 13051 "${as_me:-configure}"
13052 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13053 EOF
13054
13055 if test "$INTEL_COMPILER" = yes
13056 then
13057 # The "-wdXXX" options suppress warnings:
13058 # remark #1419: external declaration in primary source file
13059 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13060 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13061 # remark #193: zero used for undefined preprocessing identifier
13062 # remark #593: variable "curs_sb_left_arrow" was set but never used
13063 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13064 # remark #869: parameter "tw" was never referenced
13065 # remark #981: operands are evaluated in unspecified order
13066 # warning #279: controlling expression is constant
13067
13068         { echo "$as_me:13068: checking for $CC warning options..." >&5
13069 echo "$as_me: checking for $CC warning options..." >&6;}
13070         cf_save_CFLAGS="$CFLAGS"
13071         EXTRA_CFLAGS="-Wall"
13072         for cf_opt in \
13073                 wd1419 \
13074                 wd1683 \
13075                 wd1684 \
13076                 wd193 \
13077                 wd593 \
13078                 wd279 \
13079                 wd810 \
13080                 wd869 \
13081                 wd981
13082         do
13083                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13084                 if { (eval echo "$as_me:13084: \"$ac_compile\"") >&5
13085   (eval $ac_compile) 2>&5
13086   ac_status=$?
13087   echo "$as_me:13087: \$? = $ac_status" >&5
13088   (exit $ac_status); }; then
13089                         test -n "$verbose" && echo "$as_me:13089: result: ... -$cf_opt" >&5
13090 echo "${ECHO_T}... -$cf_opt" >&6
13091                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13092                 fi
13093         done
13094         CFLAGS="$cf_save_CFLAGS"
13095
13096 elif test "$GCC" = yes
13097 then
13098         { echo "$as_me:13098: checking for $CC warning options..." >&5
13099 echo "$as_me: checking for $CC warning options..." >&6;}
13100         cf_save_CFLAGS="$CFLAGS"
13101         EXTRA_CFLAGS=
13102         cf_warn_CONST=""
13103         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13104         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13105         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13106         for cf_opt in W Wall \
13107                 Wbad-function-cast \
13108                 Wcast-align \
13109                 Wcast-qual \
13110                 Wdeclaration-after-statement \
13111                 Wextra \
13112                 Winline \
13113                 Wmissing-declarations \
13114                 Wmissing-prototypes \
13115                 Wnested-externs \
13116                 Wpointer-arith \
13117                 Wshadow \
13118                 Wstrict-prototypes \
13119                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13120         do
13121                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13122                 if { (eval echo "$as_me:13122: \"$ac_compile\"") >&5
13123   (eval $ac_compile) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit $ac_status); }; then
13127                         test -n "$verbose" && echo "$as_me:13127: result: ... -$cf_opt" >&5
13128 echo "${ECHO_T}... -$cf_opt" >&6
13129                         case $cf_opt in
13130                         (Wcast-qual)
13131                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13132                                 ;;
13133                         (Winline)
13134                                 case $GCC_VERSION in
13135                                 ([34].*)
13136                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13137
13138 echo "${as_me:-configure}:13138: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13139
13140                                         continue;;
13141                                 esac
13142                                 ;;
13143                         (Wpointer-arith)
13144                                 case $GCC_VERSION in
13145                                 ([12].*)
13146                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13147
13148 echo "${as_me:-configure}:13148: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13149
13150                                         continue;;
13151                                 esac
13152                                 ;;
13153                         esac
13154                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13155                 fi
13156         done
13157         CFLAGS="$cf_save_CFLAGS"
13158 fi
13159 rm -rf conftest*
13160
13161         if test "x$cf_with_cxx" = xyes ; then
13162
13163 INTEL_CPLUSPLUS=no
13164
13165 if test "$GCC" = yes ; then
13166         case $host_os in
13167         (linux*|gnu*)
13168                 echo "$as_me:13168: checking if this is really Intel C++ compiler" >&5
13169 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13170                 cf_save_CFLAGS="$CXXFLAGS"
13171                 CXXFLAGS="$CXXFLAGS -no-gcc"
13172                 cat >conftest.$ac_ext <<_ACEOF
13173 #line 13173 "configure"
13174 #include "confdefs.h"
13175
13176 int
13177 main ()
13178 {
13179
13180 #ifdef __INTEL_COMPILER
13181 #else
13182 make an error
13183 #endif
13184
13185   ;
13186   return 0;
13187 }
13188 _ACEOF
13189 rm -f conftest.$ac_objext
13190 if { (eval echo "$as_me:13190: \"$ac_compile\"") >&5
13191   (eval $ac_compile) 2>&5
13192   ac_status=$?
13193   echo "$as_me:13193: \$? = $ac_status" >&5
13194   (exit $ac_status); } &&
13195          { ac_try='test -s conftest.$ac_objext'
13196   { (eval echo "$as_me:13196: \"$ac_try\"") >&5
13197   (eval $ac_try) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit $ac_status); }; }; then
13201   INTEL_CPLUSPLUS=yes
13202 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13203
13204 else
13205   echo "$as_me: failed program was:" >&5
13206 cat conftest.$ac_ext >&5
13207 fi
13208 rm -f conftest.$ac_objext conftest.$ac_ext
13209                 CXXFLAGS="$cf_save_CFLAGS"
13210                 echo "$as_me:13210: result: $INTEL_CPLUSPLUS" >&5
13211 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13212                 ;;
13213         esac
13214 fi
13215
13216 CLANG_CPLUSPLUS=no
13217
13218 if test "$GCC" = yes ; then
13219         echo "$as_me:13219: checking if this is really Clang C++ compiler" >&5
13220 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13221         cf_save_CFLAGS="$CXXFLAGS"
13222         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13223         cat >conftest.$ac_ext <<_ACEOF
13224 #line 13224 "configure"
13225 #include "confdefs.h"
13226
13227 int
13228 main ()
13229 {
13230
13231 #ifdef __clang__
13232 #else
13233 make an error
13234 #endif
13235
13236   ;
13237   return 0;
13238 }
13239 _ACEOF
13240 rm -f conftest.$ac_objext
13241 if { (eval echo "$as_me:13241: \"$ac_compile\"") >&5
13242   (eval $ac_compile) 2>&5
13243   ac_status=$?
13244   echo "$as_me:13244: \$? = $ac_status" >&5
13245   (exit $ac_status); } &&
13246          { ac_try='test -s conftest.$ac_objext'
13247   { (eval echo "$as_me:13247: \"$ac_try\"") >&5
13248   (eval $ac_try) 2>&5
13249   ac_status=$?
13250   echo "$as_me:13250: \$? = $ac_status" >&5
13251   (exit $ac_status); }; }; then
13252   CLANG_CPLUSPLUS=yes
13253 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13254
13255 else
13256   echo "$as_me: failed program was:" >&5
13257 cat conftest.$ac_ext >&5
13258 fi
13259 rm -f conftest.$ac_objext conftest.$ac_ext
13260         CXXFLAGS="$cf_save_CFLAGS"
13261         echo "$as_me:13261: result: $CLANG_CPLUSPLUS" >&5
13262 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13263 fi
13264
13265 ac_ext=cc
13266 ac_cpp='$CXXCPP $CPPFLAGS'
13267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13270 ac_main_return=return
13271
13272 cat > conftest.$ac_ext <<EOF
13273 #line 13273 "configure"
13274 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13275 EOF
13276
13277 if test "$INTEL_CPLUSPLUS" = yes
13278 then
13279 # The "-wdXXX" options suppress warnings:
13280 # remark #1419: external declaration in primary source file
13281 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13282 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13283 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13284 # remark #193: zero used for undefined preprocessing identifier
13285 # remark #593: variable "curs_sb_left_arrow" was set but never used
13286 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13287 # remark #869: parameter "tw" was never referenced
13288 # remark #981: operands are evaluated in unspecified order
13289 # warning #269: invalid format string conversion
13290
13291         { echo "$as_me:13291: checking for $CC warning options..." >&5
13292 echo "$as_me: checking for $CC warning options..." >&6;}
13293         cf_save_CXXFLAGS="$CXXFLAGS"
13294         EXTRA_CXXFLAGS="-Wall"
13295         for cf_opt in \
13296                 wd1419 \
13297                 wd1682 \
13298                 wd1683 \
13299                 wd1684 \
13300                 wd193 \
13301                 wd279 \
13302                 wd593 \
13303                 wd810 \
13304                 wd869 \
13305                 wd981
13306         do
13307                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13308                 if { (eval echo "$as_me:13308: \"$ac_compile\"") >&5
13309   (eval $ac_compile) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); }; then
13313                         test -n "$verbose" && echo "$as_me:13313: result: ... -$cf_opt" >&5
13314 echo "${ECHO_T}... -$cf_opt" >&6
13315                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13316                 fi
13317         done
13318         CXXFLAGS="$cf_save_CXXFLAGS"
13319
13320 elif test "$GXX" = yes
13321 then
13322         { echo "$as_me:13322: checking for $CXX warning options..." >&5
13323 echo "$as_me: checking for $CXX warning options..." >&6;}
13324         cf_save_CXXFLAGS="$CXXFLAGS"
13325         EXTRA_CXXFLAGS="-W -Wall"
13326         cf_gxx_extra_warnings=""
13327         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13328         case "$GCC_VERSION" in
13329         ([1-2].*)
13330                 ;;
13331         (*)
13332                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13333                 ;;
13334         esac
13335         for cf_opt in \
13336                 Wabi \
13337                 fabi-version=0 \
13338                 Wextra \
13339                 Wignored-qualifiers \
13340                 Wlogical-op \
13341                 Woverloaded-virtual \
13342                 Wsign-promo \
13343                 Wsynth \
13344                 Wold-style-cast \
13345                 Wcast-align \
13346                 Wcast-qual \
13347                 Wpointer-arith \
13348                 Wshadow \
13349                 Wundef $cf_gxx_extra_warnings Wno-unused
13350         do
13351                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13352                 if { (eval echo "$as_me:13352: \"$ac_compile\"") >&5
13353   (eval $ac_compile) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit $ac_status); }; then
13357                         test -n "$verbose" && echo "$as_me:13357: result: ... -$cf_opt" >&5
13358 echo "${ECHO_T}... -$cf_opt" >&6
13359                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13360                 else
13361                         test -n "$verbose" && echo "$as_me:13361: result: ... no -$cf_opt" >&5
13362 echo "${ECHO_T}... no -$cf_opt" >&6
13363                 fi
13364         done
13365         CXXFLAGS="$cf_save_CXXFLAGS"
13366 fi
13367
13368 rm -rf conftest*
13369 ac_ext=c
13370 ac_cpp='$CPP $CPPFLAGS'
13371 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13372 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13373 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13374 ac_main_return=return
13375
13376         fi
13377 fi
13378
13379 if test "$GCC" = yes
13380 then
13381 cat > conftest.i <<EOF
13382 #ifndef GCC_PRINTF
13383 #define GCC_PRINTF 0
13384 #endif
13385 #ifndef GCC_SCANF
13386 #define GCC_SCANF 0
13387 #endif
13388 #ifndef GCC_NORETURN
13389 #define GCC_NORETURN /* nothing */
13390 #endif
13391 #ifndef GCC_UNUSED
13392 #define GCC_UNUSED /* nothing */
13393 #endif
13394 EOF
13395 if test "$GCC" = yes
13396 then
13397         { echo "$as_me:13397: checking for $CC __attribute__ directives..." >&5
13398 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13399 cat > conftest.$ac_ext <<EOF
13400 #line 13400 "${as_me:-configure}"
13401 #include "confdefs.h"
13402 #include "conftest.h"
13403 #include "conftest.i"
13404 #if     GCC_PRINTF
13405 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13406 #else
13407 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13408 #endif
13409 #if     GCC_SCANF
13410 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13411 #else
13412 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13413 #endif
13414 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13415 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13416 extern void foo(void) GCC_NORETURN;
13417 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13418 EOF
13419         cf_printf_attribute=no
13420         cf_scanf_attribute=no
13421         for cf_attribute in scanf printf unused noreturn
13422         do
13423
13424 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13425
13426                 cf_directive="__attribute__(($cf_attribute))"
13427                 echo "checking for $CC $cf_directive" 1>&5
13428
13429                 case $cf_attribute in
13430                 (printf)
13431                         cf_printf_attribute=yes
13432                         cat >conftest.h <<EOF
13433 #define GCC_$cf_ATTRIBUTE 1
13434 EOF
13435                         ;;
13436                 (scanf)
13437                         cf_scanf_attribute=yes
13438                         cat >conftest.h <<EOF
13439 #define GCC_$cf_ATTRIBUTE 1
13440 EOF
13441                         ;;
13442                 (*)
13443                         cat >conftest.h <<EOF
13444 #define GCC_$cf_ATTRIBUTE $cf_directive
13445 EOF
13446                         ;;
13447                 esac
13448
13449                 if { (eval echo "$as_me:13449: \"$ac_compile\"") >&5
13450   (eval $ac_compile) 2>&5
13451   ac_status=$?
13452   echo "$as_me:13452: \$? = $ac_status" >&5
13453   (exit $ac_status); }; then
13454                         test -n "$verbose" && echo "$as_me:13454: result: ... $cf_attribute" >&5
13455 echo "${ECHO_T}... $cf_attribute" >&6
13456                         cat conftest.h >>confdefs.h
13457                         case $cf_attribute in
13458                         (noreturn)
13459
13460 cat >>confdefs.h <<EOF
13461 #define GCC_NORETURN $cf_directive
13462 EOF
13463
13464                                 ;;
13465                         (printf)
13466                                 cf_value='/* nothing */'
13467                                 if test "$cf_printf_attribute" != no ; then
13468                                         cf_value='__attribute__((format(printf,fmt,var)))'
13469
13470 cat >>confdefs.h <<\EOF
13471 #define GCC_PRINTF 1
13472 EOF
13473
13474                                 fi
13475
13476 cat >>confdefs.h <<EOF
13477 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13478 EOF
13479
13480                                 ;;
13481                         (scanf)
13482                                 cf_value='/* nothing */'
13483                                 if test "$cf_scanf_attribute" != no ; then
13484                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13485
13486 cat >>confdefs.h <<\EOF
13487 #define GCC_SCANF 1
13488 EOF
13489
13490                                 fi
13491
13492 cat >>confdefs.h <<EOF
13493 #define GCC_SCANFLIKE(fmt,var) $cf_value
13494 EOF
13495
13496                                 ;;
13497                         (unused)
13498
13499 cat >>confdefs.h <<EOF
13500 #define GCC_UNUSED $cf_directive
13501 EOF
13502
13503                                 ;;
13504                         esac
13505                 fi
13506         done
13507 else
13508         fgrep define conftest.i >>confdefs.h
13509 fi
13510 rm -rf conftest*
13511 fi
13512
13513 echo "$as_me:13513: checking if you want to work around bogus compiler/loader warnings" >&5
13514 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13515
13516 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13517 if test "${enable_string_hacks+set}" = set; then
13518   enableval="$enable_string_hacks"
13519   with_string_hacks=$enableval
13520 else
13521   with_string_hacks=no
13522 fi;
13523 echo "$as_me:13523: result: $with_string_hacks" >&5
13524 echo "${ECHO_T}$with_string_hacks" >&6
13525
13526 if test "x$with_string_hacks" = "xyes"; then
13527
13528 cat >>confdefs.h <<\EOF
13529 #define USE_STRING_HACKS 1
13530 EOF
13531
13532         { echo "$as_me:13532: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13533 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13534
13535 for ac_func in strlcat strlcpy snprintf
13536 do
13537 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13538 echo "$as_me:13538: checking for $ac_func" >&5
13539 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13540 if eval "test \"\${$as_ac_var+set}\" = set"; then
13541   echo $ECHO_N "(cached) $ECHO_C" >&6
13542 else
13543   cat >conftest.$ac_ext <<_ACEOF
13544 #line 13544 "configure"
13545 #include "confdefs.h"
13546 /* System header to define __stub macros and hopefully few prototypes,
13547     which can conflict with char $ac_func (); below.  */
13548 #include <assert.h>
13549 /* Override any gcc2 internal prototype to avoid an error.  */
13550 #ifdef __cplusplus
13551 extern "C"
13552 #endif
13553 /* We use char because int might match the return type of a gcc2
13554    builtin and then its argument prototype would still apply.  */
13555 char $ac_func ();
13556 char (*f) ();
13557
13558 int
13559 main ()
13560 {
13561 /* The GNU C library defines this for functions which it implements
13562     to always fail with ENOSYS.  Some functions are actually named
13563     something starting with __ and the normal name is an alias.  */
13564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13565 choke me
13566 #else
13567 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13568 #endif
13569
13570   ;
13571   return 0;
13572 }
13573 _ACEOF
13574 rm -f conftest.$ac_objext conftest$ac_exeext
13575 if { (eval echo "$as_me:13575: \"$ac_link\"") >&5
13576   (eval $ac_link) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit $ac_status); } &&
13580          { ac_try='test -s conftest$ac_exeext'
13581   { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); }; }; then
13586   eval "$as_ac_var=yes"
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 cat conftest.$ac_ext >&5
13590 eval "$as_ac_var=no"
13591 fi
13592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13593 fi
13594 echo "$as_me:13594: result: `eval echo '${'$as_ac_var'}'`" >&5
13595 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13596 if test `eval echo '${'$as_ac_var'}'` = yes; then
13597   cat >>confdefs.h <<EOF
13598 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13599 EOF
13600
13601 fi
13602 done
13603
13604 fi
13605
13606 ###     use option --enable-assertions to turn on generation of assertion code
13607 echo "$as_me:13607: checking if you want to enable runtime assertions" >&5
13608 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13609
13610 # Check whether --enable-assertions or --disable-assertions was given.
13611 if test "${enable_assertions+set}" = set; then
13612   enableval="$enable_assertions"
13613   with_assertions=$enableval
13614 else
13615   with_assertions=no
13616 fi;
13617 echo "$as_me:13617: result: $with_assertions" >&5
13618 echo "${ECHO_T}$with_assertions" >&6
13619 if test -n "$GCC"
13620 then
13621         if test "$with_assertions" = no
13622         then
13623                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13624         else
13625
13626         ADAFLAGS="$ADAFLAGS -gnata"
13627
13628         fi
13629 fi
13630
13631 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13632
13633 echo "$as_me:13633: checking if you want to use dmalloc for testing" >&5
13634 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13635
13636 # Check whether --with-dmalloc or --without-dmalloc was given.
13637 if test "${with_dmalloc+set}" = set; then
13638   withval="$with_dmalloc"
13639
13640 cat >>confdefs.h <<EOF
13641 #define USE_DMALLOC 1
13642 EOF
13643
13644         : ${with_cflags:=-g}
13645         : ${with_no_leaks:=yes}
13646          with_dmalloc=yes
13647 else
13648   with_dmalloc=
13649 fi;
13650 echo "$as_me:13650: result: ${with_dmalloc:-no}" >&5
13651 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13652
13653 case .$with_cflags in
13654 (.*-g*)
13655         case .$CFLAGS in
13656         (.*-g*)
13657                 ;;
13658         (*)
13659
13660 cf_fix_cppflags=no
13661 cf_new_cflags=
13662 cf_new_cppflags=
13663 cf_new_extra_cppflags=
13664
13665 for cf_add_cflags in -g
13666 do
13667 case $cf_fix_cppflags in
13668 (no)
13669         case $cf_add_cflags in
13670         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13671                 case $cf_add_cflags in
13672                 (-D*)
13673                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13674
13675                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13676                                 && test -z "${cf_tst_cflags}" \
13677                                 && cf_fix_cppflags=yes
13678
13679                         if test $cf_fix_cppflags = yes ; then
13680                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13681                                 continue
13682                         elif test "${cf_tst_cflags}" = "\"'" ; then
13683                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13684                                 continue
13685                         fi
13686                         ;;
13687                 esac
13688                 case "$CPPFLAGS" in
13689                 (*$cf_add_cflags)
13690                         ;;
13691                 (*)
13692                         case $cf_add_cflags in
13693                         (-D*)
13694                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13695
13696 CPPFLAGS=`echo "$CPPFLAGS" | \
13697         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13698                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13699
13700                                 ;;
13701                         esac
13702                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13703                         ;;
13704                 esac
13705                 ;;
13706         (*)
13707                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13708                 ;;
13709         esac
13710         ;;
13711 (yes)
13712         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13713
13714         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13715
13716         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13717                 && test -z "${cf_tst_cflags}" \
13718                 && cf_fix_cppflags=no
13719         ;;
13720 esac
13721 done
13722
13723 if test -n "$cf_new_cflags" ; then
13724
13725         CFLAGS="$CFLAGS $cf_new_cflags"
13726 fi
13727
13728 if test -n "$cf_new_cppflags" ; then
13729
13730         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13731 fi
13732
13733 if test -n "$cf_new_extra_cppflags" ; then
13734
13735         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13736 fi
13737
13738                 ;;
13739         esac
13740         ;;
13741 esac
13742
13743 if test "$with_dmalloc" = yes ; then
13744         echo "$as_me:13744: checking for dmalloc.h" >&5
13745 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13746 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13747   echo $ECHO_N "(cached) $ECHO_C" >&6
13748 else
13749   cat >conftest.$ac_ext <<_ACEOF
13750 #line 13750 "configure"
13751 #include "confdefs.h"
13752 #include <dmalloc.h>
13753 _ACEOF
13754 if { (eval echo "$as_me:13754: \"$ac_cpp conftest.$ac_ext\"") >&5
13755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13756   ac_status=$?
13757   egrep -v '^ *\+' conftest.er1 >conftest.err
13758   rm -f conftest.er1
13759   cat conftest.err >&5
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); } >/dev/null; then
13762   if test -s conftest.err; then
13763     ac_cpp_err=$ac_c_preproc_warn_flag
13764   else
13765     ac_cpp_err=
13766   fi
13767 else
13768   ac_cpp_err=yes
13769 fi
13770 if test -z "$ac_cpp_err"; then
13771   ac_cv_header_dmalloc_h=yes
13772 else
13773   echo "$as_me: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   ac_cv_header_dmalloc_h=no
13776 fi
13777 rm -f conftest.err conftest.$ac_ext
13778 fi
13779 echo "$as_me:13779: result: $ac_cv_header_dmalloc_h" >&5
13780 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13781 if test $ac_cv_header_dmalloc_h = yes; then
13782
13783 echo "$as_me:13783: checking for dmalloc_debug in -ldmalloc" >&5
13784 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13785 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13786   echo $ECHO_N "(cached) $ECHO_C" >&6
13787 else
13788   ac_check_lib_save_LIBS=$LIBS
13789 LIBS="-ldmalloc  $LIBS"
13790 cat >conftest.$ac_ext <<_ACEOF
13791 #line 13791 "configure"
13792 #include "confdefs.h"
13793
13794 /* Override any gcc2 internal prototype to avoid an error.  */
13795 #ifdef __cplusplus
13796 extern "C"
13797 #endif
13798 /* We use char because int might match the return type of a gcc2
13799    builtin and then its argument prototype would still apply.  */
13800 char dmalloc_debug ();
13801 int
13802 main ()
13803 {
13804 dmalloc_debug ();
13805   ;
13806   return 0;
13807 }
13808 _ACEOF
13809 rm -f conftest.$ac_objext conftest$ac_exeext
13810 if { (eval echo "$as_me:13810: \"$ac_link\"") >&5
13811   (eval $ac_link) 2>&5
13812   ac_status=$?
13813   echo "$as_me:13813: \$? = $ac_status" >&5
13814   (exit $ac_status); } &&
13815          { ac_try='test -s conftest$ac_exeext'
13816   { (eval echo "$as_me:13816: \"$ac_try\"") >&5
13817   (eval $ac_try) 2>&5
13818   ac_status=$?
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit $ac_status); }; }; then
13821   ac_cv_lib_dmalloc_dmalloc_debug=yes
13822 else
13823   echo "$as_me: failed program was:" >&5
13824 cat conftest.$ac_ext >&5
13825 ac_cv_lib_dmalloc_dmalloc_debug=no
13826 fi
13827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13828 LIBS=$ac_check_lib_save_LIBS
13829 fi
13830 echo "$as_me:13830: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13831 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13832 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13833   cat >>confdefs.h <<EOF
13834 #define HAVE_LIBDMALLOC 1
13835 EOF
13836
13837   LIBS="-ldmalloc $LIBS"
13838
13839 fi
13840
13841 fi
13842
13843 fi
13844
13845 echo "$as_me:13845: checking if you want to use dbmalloc for testing" >&5
13846 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13847
13848 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13849 if test "${with_dbmalloc+set}" = set; then
13850   withval="$with_dbmalloc"
13851
13852 cat >>confdefs.h <<EOF
13853 #define USE_DBMALLOC 1
13854 EOF
13855
13856         : ${with_cflags:=-g}
13857         : ${with_no_leaks:=yes}
13858          with_dbmalloc=yes
13859 else
13860   with_dbmalloc=
13861 fi;
13862 echo "$as_me:13862: result: ${with_dbmalloc:-no}" >&5
13863 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13864
13865 case .$with_cflags in
13866 (.*-g*)
13867         case .$CFLAGS in
13868         (.*-g*)
13869                 ;;
13870         (*)
13871
13872 cf_fix_cppflags=no
13873 cf_new_cflags=
13874 cf_new_cppflags=
13875 cf_new_extra_cppflags=
13876
13877 for cf_add_cflags in -g
13878 do
13879 case $cf_fix_cppflags in
13880 (no)
13881         case $cf_add_cflags in
13882         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13883                 case $cf_add_cflags in
13884                 (-D*)
13885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13886
13887                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13888                                 && test -z "${cf_tst_cflags}" \
13889                                 && cf_fix_cppflags=yes
13890
13891                         if test $cf_fix_cppflags = yes ; then
13892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13893                                 continue
13894                         elif test "${cf_tst_cflags}" = "\"'" ; then
13895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13896                                 continue
13897                         fi
13898                         ;;
13899                 esac
13900                 case "$CPPFLAGS" in
13901                 (*$cf_add_cflags)
13902                         ;;
13903                 (*)
13904                         case $cf_add_cflags in
13905                         (-D*)
13906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13907
13908 CPPFLAGS=`echo "$CPPFLAGS" | \
13909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13911
13912                                 ;;
13913                         esac
13914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13915                         ;;
13916                 esac
13917                 ;;
13918         (*)
13919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13920                 ;;
13921         esac
13922         ;;
13923 (yes)
13924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13925
13926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13927
13928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13929                 && test -z "${cf_tst_cflags}" \
13930                 && cf_fix_cppflags=no
13931         ;;
13932 esac
13933 done
13934
13935 if test -n "$cf_new_cflags" ; then
13936
13937         CFLAGS="$CFLAGS $cf_new_cflags"
13938 fi
13939
13940 if test -n "$cf_new_cppflags" ; then
13941
13942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13943 fi
13944
13945 if test -n "$cf_new_extra_cppflags" ; then
13946
13947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13948 fi
13949
13950                 ;;
13951         esac
13952         ;;
13953 esac
13954
13955 if test "$with_dbmalloc" = yes ; then
13956         echo "$as_me:13956: checking for dbmalloc.h" >&5
13957 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13958 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13959   echo $ECHO_N "(cached) $ECHO_C" >&6
13960 else
13961   cat >conftest.$ac_ext <<_ACEOF
13962 #line 13962 "configure"
13963 #include "confdefs.h"
13964 #include <dbmalloc.h>
13965 _ACEOF
13966 if { (eval echo "$as_me:13966: \"$ac_cpp conftest.$ac_ext\"") >&5
13967   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13968   ac_status=$?
13969   egrep -v '^ *\+' conftest.er1 >conftest.err
13970   rm -f conftest.er1
13971   cat conftest.err >&5
13972   echo "$as_me:13972: \$? = $ac_status" >&5
13973   (exit $ac_status); } >/dev/null; then
13974   if test -s conftest.err; then
13975     ac_cpp_err=$ac_c_preproc_warn_flag
13976   else
13977     ac_cpp_err=
13978   fi
13979 else
13980   ac_cpp_err=yes
13981 fi
13982 if test -z "$ac_cpp_err"; then
13983   ac_cv_header_dbmalloc_h=yes
13984 else
13985   echo "$as_me: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   ac_cv_header_dbmalloc_h=no
13988 fi
13989 rm -f conftest.err conftest.$ac_ext
13990 fi
13991 echo "$as_me:13991: result: $ac_cv_header_dbmalloc_h" >&5
13992 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13993 if test $ac_cv_header_dbmalloc_h = yes; then
13994
13995 echo "$as_me:13995: checking for debug_malloc in -ldbmalloc" >&5
13996 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13997 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13998   echo $ECHO_N "(cached) $ECHO_C" >&6
13999 else
14000   ac_check_lib_save_LIBS=$LIBS
14001 LIBS="-ldbmalloc  $LIBS"
14002 cat >conftest.$ac_ext <<_ACEOF
14003 #line 14003 "configure"
14004 #include "confdefs.h"
14005
14006 /* Override any gcc2 internal prototype to avoid an error.  */
14007 #ifdef __cplusplus
14008 extern "C"
14009 #endif
14010 /* We use char because int might match the return type of a gcc2
14011    builtin and then its argument prototype would still apply.  */
14012 char debug_malloc ();
14013 int
14014 main ()
14015 {
14016 debug_malloc ();
14017   ;
14018   return 0;
14019 }
14020 _ACEOF
14021 rm -f conftest.$ac_objext conftest$ac_exeext
14022 if { (eval echo "$as_me:14022: \"$ac_link\"") >&5
14023   (eval $ac_link) 2>&5
14024   ac_status=$?
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit $ac_status); } &&
14027          { ac_try='test -s conftest$ac_exeext'
14028   { (eval echo "$as_me:14028: \"$ac_try\"") >&5
14029   (eval $ac_try) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); }; }; then
14033   ac_cv_lib_dbmalloc_debug_malloc=yes
14034 else
14035   echo "$as_me: failed program was:" >&5
14036 cat conftest.$ac_ext >&5
14037 ac_cv_lib_dbmalloc_debug_malloc=no
14038 fi
14039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14040 LIBS=$ac_check_lib_save_LIBS
14041 fi
14042 echo "$as_me:14042: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14043 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14044 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14045   cat >>confdefs.h <<EOF
14046 #define HAVE_LIBDBMALLOC 1
14047 EOF
14048
14049   LIBS="-ldbmalloc $LIBS"
14050
14051 fi
14052
14053 fi
14054
14055 fi
14056
14057 echo "$as_me:14057: checking if you want to use valgrind for testing" >&5
14058 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14059
14060 # Check whether --with-valgrind or --without-valgrind was given.
14061 if test "${with_valgrind+set}" = set; then
14062   withval="$with_valgrind"
14063
14064 cat >>confdefs.h <<EOF
14065 #define USE_VALGRIND 1
14066 EOF
14067
14068         : ${with_cflags:=-g}
14069         : ${with_no_leaks:=yes}
14070          with_valgrind=yes
14071 else
14072   with_valgrind=
14073 fi;
14074 echo "$as_me:14074: result: ${with_valgrind:-no}" >&5
14075 echo "${ECHO_T}${with_valgrind:-no}" >&6
14076
14077 case .$with_cflags in
14078 (.*-g*)
14079         case .$CFLAGS in
14080         (.*-g*)
14081                 ;;
14082         (*)
14083
14084 cf_fix_cppflags=no
14085 cf_new_cflags=
14086 cf_new_cppflags=
14087 cf_new_extra_cppflags=
14088
14089 for cf_add_cflags in -g
14090 do
14091 case $cf_fix_cppflags in
14092 (no)
14093         case $cf_add_cflags in
14094         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14095                 case $cf_add_cflags in
14096                 (-D*)
14097                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14098
14099                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14100                                 && test -z "${cf_tst_cflags}" \
14101                                 && cf_fix_cppflags=yes
14102
14103                         if test $cf_fix_cppflags = yes ; then
14104                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14105                                 continue
14106                         elif test "${cf_tst_cflags}" = "\"'" ; then
14107                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14108                                 continue
14109                         fi
14110                         ;;
14111                 esac
14112                 case "$CPPFLAGS" in
14113                 (*$cf_add_cflags)
14114                         ;;
14115                 (*)
14116                         case $cf_add_cflags in
14117                         (-D*)
14118                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14119
14120 CPPFLAGS=`echo "$CPPFLAGS" | \
14121         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14122                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14123
14124                                 ;;
14125                         esac
14126                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14127                         ;;
14128                 esac
14129                 ;;
14130         (*)
14131                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14132                 ;;
14133         esac
14134         ;;
14135 (yes)
14136         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14137
14138         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14139
14140         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14141                 && test -z "${cf_tst_cflags}" \
14142                 && cf_fix_cppflags=no
14143         ;;
14144 esac
14145 done
14146
14147 if test -n "$cf_new_cflags" ; then
14148
14149         CFLAGS="$CFLAGS $cf_new_cflags"
14150 fi
14151
14152 if test -n "$cf_new_cppflags" ; then
14153
14154         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14155 fi
14156
14157 if test -n "$cf_new_extra_cppflags" ; then
14158
14159         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14160 fi
14161
14162                 ;;
14163         esac
14164         ;;
14165 esac
14166
14167 echo "$as_me:14167: checking if you want to perform memory-leak testing" >&5
14168 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14169
14170 # Check whether --enable-leaks or --disable-leaks was given.
14171 if test "${enable_leaks+set}" = set; then
14172   enableval="$enable_leaks"
14173   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14174 else
14175   : ${with_no_leaks:=no}
14176 fi;
14177 echo "$as_me:14177: result: $with_no_leaks" >&5
14178 echo "${ECHO_T}$with_no_leaks" >&6
14179
14180 if test "$with_no_leaks" = yes ; then
14181
14182 cat >>confdefs.h <<\EOF
14183 #define NO_LEAKS 1
14184 EOF
14185
14186 cat >>confdefs.h <<\EOF
14187 #define YY_NO_LEAKS 1
14188 EOF
14189
14190 fi
14191
14192 cat >>confdefs.h <<\EOF
14193 #define HAVE_NC_ALLOC_H 1
14194 EOF
14195
14196 ###     use option --enable-expanded to generate certain macros as functions
14197
14198 # Check whether --enable-expanded or --disable-expanded was given.
14199 if test "${enable_expanded+set}" = set; then
14200   enableval="$enable_expanded"
14201   test "x$enableval" = xyes &&
14202 cat >>confdefs.h <<\EOF
14203 #define NCURSES_EXPANDED 1
14204 EOF
14205
14206 fi;
14207
14208 ###     use option --disable-macros to suppress macros in favor of functions
14209
14210 # Check whether --enable-macros or --disable-macros was given.
14211 if test "${enable_macros+set}" = set; then
14212   enableval="$enable_macros"
14213   test "$enableval" = no &&
14214 cat >>confdefs.h <<\EOF
14215 #define NCURSES_NOMACROS 1
14216 EOF
14217
14218 fi;
14219
14220 # Normally we only add trace() to the debug-library.  Allow this to be
14221 # extended to all models of the ncurses library:
14222 cf_all_traces=no
14223 case "$CFLAGS $CPPFLAGS" in
14224 (*-DTRACE*)
14225         cf_all_traces=yes
14226         ;;
14227 esac
14228
14229 echo "$as_me:14229: checking whether to add trace feature to all models" >&5
14230 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14231
14232 # Check whether --with-trace or --without-trace was given.
14233 if test "${with_trace+set}" = set; then
14234   withval="$with_trace"
14235   cf_with_trace=$withval
14236 else
14237   cf_with_trace=$cf_all_traces
14238 fi;
14239 echo "$as_me:14239: result: $cf_with_trace" >&5
14240 echo "${ECHO_T}$cf_with_trace" >&6
14241
14242 if test "x$cf_with_trace" = xyes ; then
14243         LIB_TRACING=all
14244         ADA_TRACE=TRUE
14245
14246 cf_fix_cppflags=no
14247 cf_new_cflags=
14248 cf_new_cppflags=
14249 cf_new_extra_cppflags=
14250
14251 for cf_add_cflags in -DTRACE
14252 do
14253 case $cf_fix_cppflags in
14254 (no)
14255         case $cf_add_cflags in
14256         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14257                 case $cf_add_cflags in
14258                 (-D*)
14259                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14260
14261                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14262                                 && test -z "${cf_tst_cflags}" \
14263                                 && cf_fix_cppflags=yes
14264
14265                         if test $cf_fix_cppflags = yes ; then
14266                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14267                                 continue
14268                         elif test "${cf_tst_cflags}" = "\"'" ; then
14269                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14270                                 continue
14271                         fi
14272                         ;;
14273                 esac
14274                 case "$CPPFLAGS" in
14275                 (*$cf_add_cflags)
14276                         ;;
14277                 (*)
14278                         case $cf_add_cflags in
14279                         (-D*)
14280                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14281
14282 CPPFLAGS=`echo "$CPPFLAGS" | \
14283         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14284                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14285
14286                                 ;;
14287                         esac
14288                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14289                         ;;
14290                 esac
14291                 ;;
14292         (*)
14293                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14294                 ;;
14295         esac
14296         ;;
14297 (yes)
14298         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14299
14300         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14301
14302         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14303                 && test -z "${cf_tst_cflags}" \
14304                 && cf_fix_cppflags=no
14305         ;;
14306 esac
14307 done
14308
14309 if test -n "$cf_new_cflags" ; then
14310
14311         CFLAGS="$CFLAGS $cf_new_cflags"
14312 fi
14313
14314 if test -n "$cf_new_cppflags" ; then
14315
14316         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14317 fi
14318
14319 if test -n "$cf_new_extra_cppflags" ; then
14320
14321         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14322 fi
14323
14324 else
14325         LIB_TRACING=DEBUG
14326         ADA_TRACE=FALSE
14327 fi
14328
14329 echo "$as_me:14329: checking if we want to use GNAT projects" >&5
14330 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14331
14332 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14333 if test "${enable_gnat_projects+set}" = set; then
14334   enableval="$enable_gnat_projects"
14335   test "$enableval" != no && enableval=yes
14336         if test "$enableval" != "yes" ; then
14337     enable_gnat_projects=no
14338         else
14339                 enable_gnat_projects=yes
14340         fi
14341 else
14342   enableval=yes
14343         enable_gnat_projects=yes
14344
14345 fi;
14346 echo "$as_me:14346: result: $enable_gnat_projects" >&5
14347 echo "${ECHO_T}$enable_gnat_projects" >&6
14348
14349 ###     Checks for libraries.
14350 case $cf_cv_system_name in
14351 (*mingw32*|*mingw64*)
14352         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14353         LIBS=" -lpsapi $LIBS"
14354         ;;
14355 (*)
14356 echo "$as_me:14356: checking for gettimeofday" >&5
14357 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14358 if test "${ac_cv_func_gettimeofday+set}" = set; then
14359   echo $ECHO_N "(cached) $ECHO_C" >&6
14360 else
14361   cat >conftest.$ac_ext <<_ACEOF
14362 #line 14362 "configure"
14363 #include "confdefs.h"
14364 /* System header to define __stub macros and hopefully few prototypes,
14365     which can conflict with char gettimeofday (); below.  */
14366 #include <assert.h>
14367 /* Override any gcc2 internal prototype to avoid an error.  */
14368 #ifdef __cplusplus
14369 extern "C"
14370 #endif
14371 /* We use char because int might match the return type of a gcc2
14372    builtin and then its argument prototype would still apply.  */
14373 char gettimeofday ();
14374 char (*f) ();
14375
14376 int
14377 main ()
14378 {
14379 /* The GNU C library defines this for functions which it implements
14380     to always fail with ENOSYS.  Some functions are actually named
14381     something starting with __ and the normal name is an alias.  */
14382 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14383 choke me
14384 #else
14385 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14386 #endif
14387
14388   ;
14389   return 0;
14390 }
14391 _ACEOF
14392 rm -f conftest.$ac_objext conftest$ac_exeext
14393 if { (eval echo "$as_me:14393: \"$ac_link\"") >&5
14394   (eval $ac_link) 2>&5
14395   ac_status=$?
14396   echo "$as_me:14396: \$? = $ac_status" >&5
14397   (exit $ac_status); } &&
14398          { ac_try='test -s conftest$ac_exeext'
14399   { (eval echo "$as_me:14399: \"$ac_try\"") >&5
14400   (eval $ac_try) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); }; }; then
14404   ac_cv_func_gettimeofday=yes
14405 else
14406   echo "$as_me: failed program was:" >&5
14407 cat conftest.$ac_ext >&5
14408 ac_cv_func_gettimeofday=no
14409 fi
14410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14411 fi
14412 echo "$as_me:14412: result: $ac_cv_func_gettimeofday" >&5
14413 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14414 if test $ac_cv_func_gettimeofday = yes; then
14415
14416 cat >>confdefs.h <<\EOF
14417 #define HAVE_GETTIMEOFDAY 1
14418 EOF
14419
14420 else
14421
14422 echo "$as_me:14422: checking for gettimeofday in -lbsd" >&5
14423 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14424 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14425   echo $ECHO_N "(cached) $ECHO_C" >&6
14426 else
14427   ac_check_lib_save_LIBS=$LIBS
14428 LIBS="-lbsd  $LIBS"
14429 cat >conftest.$ac_ext <<_ACEOF
14430 #line 14430 "configure"
14431 #include "confdefs.h"
14432
14433 /* Override any gcc2 internal prototype to avoid an error.  */
14434 #ifdef __cplusplus
14435 extern "C"
14436 #endif
14437 /* We use char because int might match the return type of a gcc2
14438    builtin and then its argument prototype would still apply.  */
14439 char gettimeofday ();
14440 int
14441 main ()
14442 {
14443 gettimeofday ();
14444   ;
14445   return 0;
14446 }
14447 _ACEOF
14448 rm -f conftest.$ac_objext conftest$ac_exeext
14449 if { (eval echo "$as_me:14449: \"$ac_link\"") >&5
14450   (eval $ac_link) 2>&5
14451   ac_status=$?
14452   echo "$as_me:14452: \$? = $ac_status" >&5
14453   (exit $ac_status); } &&
14454          { ac_try='test -s conftest$ac_exeext'
14455   { (eval echo "$as_me:14455: \"$ac_try\"") >&5
14456   (eval $ac_try) 2>&5
14457   ac_status=$?
14458   echo "$as_me:14458: \$? = $ac_status" >&5
14459   (exit $ac_status); }; }; then
14460   ac_cv_lib_bsd_gettimeofday=yes
14461 else
14462   echo "$as_me: failed program was:" >&5
14463 cat conftest.$ac_ext >&5
14464 ac_cv_lib_bsd_gettimeofday=no
14465 fi
14466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14467 LIBS=$ac_check_lib_save_LIBS
14468 fi
14469 echo "$as_me:14469: result: $ac_cv_lib_bsd_gettimeofday" >&5
14470 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14471 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14472
14473 cat >>confdefs.h <<\EOF
14474 #define HAVE_GETTIMEOFDAY 1
14475 EOF
14476
14477 cf_add_libs="-lbsd"
14478 # Filter out duplicates - this happens with badly-designed ".pc" files...
14479 for cf_add_1lib in $LIBS
14480 do
14481         for cf_add_2lib in $cf_add_libs
14482         do
14483                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14484                 then
14485                         cf_add_1lib=
14486                         break
14487                 fi
14488         done
14489         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14490 done
14491 LIBS="$cf_add_libs"
14492
14493 fi
14494
14495 fi
14496         ;;
14497 esac
14498
14499 echo "$as_me:14499: checking if -lm needed for math functions" >&5
14500 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14501 if test "${cf_cv_need_libm+set}" = set; then
14502   echo $ECHO_N "(cached) $ECHO_C" >&6
14503 else
14504
14505         cat >conftest.$ac_ext <<_ACEOF
14506 #line 14506 "configure"
14507 #include "confdefs.h"
14508
14509         #include <stdio.h>
14510         #include <math.h>
14511
14512 int
14513 main ()
14514 {
14515 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14516   ;
14517   return 0;
14518 }
14519 _ACEOF
14520 rm -f conftest.$ac_objext conftest$ac_exeext
14521 if { (eval echo "$as_me:14521: \"$ac_link\"") >&5
14522   (eval $ac_link) 2>&5
14523   ac_status=$?
14524   echo "$as_me:14524: \$? = $ac_status" >&5
14525   (exit $ac_status); } &&
14526          { ac_try='test -s conftest$ac_exeext'
14527   { (eval echo "$as_me:14527: \"$ac_try\"") >&5
14528   (eval $ac_try) 2>&5
14529   ac_status=$?
14530   echo "$as_me:14530: \$? = $ac_status" >&5
14531   (exit $ac_status); }; }; then
14532   cf_cv_need_libm=no
14533 else
14534   echo "$as_me: failed program was:" >&5
14535 cat conftest.$ac_ext >&5
14536 cf_cv_need_libm=yes
14537 fi
14538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14539 fi
14540 echo "$as_me:14540: result: $cf_cv_need_libm" >&5
14541 echo "${ECHO_T}$cf_cv_need_libm" >&6
14542 if test "$cf_cv_need_libm" = yes
14543 then
14544 MATH_LIB=-lm
14545 fi
14546
14547 ###     Checks for header files.
14548 echo "$as_me:14548: checking for ANSI C header files" >&5
14549 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14550 if test "${ac_cv_header_stdc+set}" = set; then
14551   echo $ECHO_N "(cached) $ECHO_C" >&6
14552 else
14553   cat >conftest.$ac_ext <<_ACEOF
14554 #line 14554 "configure"
14555 #include "confdefs.h"
14556 #include <stdlib.h>
14557 #include <stdarg.h>
14558 #include <string.h>
14559 #include <float.h>
14560
14561 _ACEOF
14562 if { (eval echo "$as_me:14562: \"$ac_cpp conftest.$ac_ext\"") >&5
14563   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14564   ac_status=$?
14565   egrep -v '^ *\+' conftest.er1 >conftest.err
14566   rm -f conftest.er1
14567   cat conftest.err >&5
14568   echo "$as_me:14568: \$? = $ac_status" >&5
14569   (exit $ac_status); } >/dev/null; then
14570   if test -s conftest.err; then
14571     ac_cpp_err=$ac_c_preproc_warn_flag
14572   else
14573     ac_cpp_err=
14574   fi
14575 else
14576   ac_cpp_err=yes
14577 fi
14578 if test -z "$ac_cpp_err"; then
14579   ac_cv_header_stdc=yes
14580 else
14581   echo "$as_me: failed program was:" >&5
14582   cat conftest.$ac_ext >&5
14583   ac_cv_header_stdc=no
14584 fi
14585 rm -f conftest.err conftest.$ac_ext
14586
14587 if test $ac_cv_header_stdc = yes; then
14588   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14589   cat >conftest.$ac_ext <<_ACEOF
14590 #line 14590 "configure"
14591 #include "confdefs.h"
14592 #include <string.h>
14593
14594 _ACEOF
14595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14596   egrep "memchr" >/dev/null 2>&1; then
14597   :
14598 else
14599   ac_cv_header_stdc=no
14600 fi
14601 rm -rf conftest*
14602
14603 fi
14604
14605 if test $ac_cv_header_stdc = yes; then
14606   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14607   cat >conftest.$ac_ext <<_ACEOF
14608 #line 14608 "configure"
14609 #include "confdefs.h"
14610 #include <stdlib.h>
14611
14612 _ACEOF
14613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14614   egrep "free" >/dev/null 2>&1; then
14615   :
14616 else
14617   ac_cv_header_stdc=no
14618 fi
14619 rm -rf conftest*
14620
14621 fi
14622
14623 if test $ac_cv_header_stdc = yes; then
14624   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14625   if test "$cross_compiling" = yes; then
14626   :
14627 else
14628   cat >conftest.$ac_ext <<_ACEOF
14629 #line 14629 "configure"
14630 #include "confdefs.h"
14631 #include <ctype.h>
14632 #if ((' ' & 0x0FF) == 0x020)
14633 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14634 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14635 #else
14636 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14637                      || ('j' <= (c) && (c) <= 'r') \
14638                      || ('s' <= (c) && (c) <= 'z'))
14639 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14640 #endif
14641
14642 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14643 int
14644 main ()
14645 {
14646   int i;
14647   for (i = 0; i < 256; i++)
14648     if (XOR (islower (i), ISLOWER (i))
14649         || toupper (i) != TOUPPER (i))
14650       $ac_main_return(2);
14651   $ac_main_return (0);
14652 }
14653 _ACEOF
14654 rm -f conftest$ac_exeext
14655 if { (eval echo "$as_me:14655: \"$ac_link\"") >&5
14656   (eval $ac_link) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14660   { (eval echo "$as_me:14660: \"$ac_try\"") >&5
14661   (eval $ac_try) 2>&5
14662   ac_status=$?
14663   echo "$as_me:14663: \$? = $ac_status" >&5
14664   (exit $ac_status); }; }; then
14665   :
14666 else
14667   echo "$as_me: program exited with status $ac_status" >&5
14668 echo "$as_me: failed program was:" >&5
14669 cat conftest.$ac_ext >&5
14670 ac_cv_header_stdc=no
14671 fi
14672 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14673 fi
14674 fi
14675 fi
14676 echo "$as_me:14676: result: $ac_cv_header_stdc" >&5
14677 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14678 if test $ac_cv_header_stdc = yes; then
14679
14680 cat >>confdefs.h <<\EOF
14681 #define STDC_HEADERS 1
14682 EOF
14683
14684 fi
14685
14686 ac_header_dirent=no
14687 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14688   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14689 echo "$as_me:14689: checking for $ac_hdr that defines DIR" >&5
14690 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14691 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14692   echo $ECHO_N "(cached) $ECHO_C" >&6
14693 else
14694   cat >conftest.$ac_ext <<_ACEOF
14695 #line 14695 "configure"
14696 #include "confdefs.h"
14697 #include <sys/types.h>
14698 #include <$ac_hdr>
14699
14700 int
14701 main ()
14702 {
14703 if ((DIR *) 0)
14704 return 0;
14705   ;
14706   return 0;
14707 }
14708 _ACEOF
14709 rm -f conftest.$ac_objext
14710 if { (eval echo "$as_me:14710: \"$ac_compile\"") >&5
14711   (eval $ac_compile) 2>&5
14712   ac_status=$?
14713   echo "$as_me:14713: \$? = $ac_status" >&5
14714   (exit $ac_status); } &&
14715          { ac_try='test -s conftest.$ac_objext'
14716   { (eval echo "$as_me:14716: \"$ac_try\"") >&5
14717   (eval $ac_try) 2>&5
14718   ac_status=$?
14719   echo "$as_me:14719: \$? = $ac_status" >&5
14720   (exit $ac_status); }; }; then
14721   eval "$as_ac_Header=yes"
14722 else
14723   echo "$as_me: failed program was:" >&5
14724 cat conftest.$ac_ext >&5
14725 eval "$as_ac_Header=no"
14726 fi
14727 rm -f conftest.$ac_objext conftest.$ac_ext
14728 fi
14729 echo "$as_me:14729: result: `eval echo '${'$as_ac_Header'}'`" >&5
14730 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14732   cat >>confdefs.h <<EOF
14733 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14734 EOF
14735
14736 ac_header_dirent=$ac_hdr; break
14737 fi
14738
14739 done
14740 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14741 if test $ac_header_dirent = dirent.h; then
14742   echo "$as_me:14742: checking for opendir in -ldir" >&5
14743 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14744 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14745   echo $ECHO_N "(cached) $ECHO_C" >&6
14746 else
14747   ac_check_lib_save_LIBS=$LIBS
14748 LIBS="-ldir  $LIBS"
14749 cat >conftest.$ac_ext <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752
14753 /* Override any gcc2 internal prototype to avoid an error.  */
14754 #ifdef __cplusplus
14755 extern "C"
14756 #endif
14757 /* We use char because int might match the return type of a gcc2
14758    builtin and then its argument prototype would still apply.  */
14759 char opendir ();
14760 int
14761 main ()
14762 {
14763 opendir ();
14764   ;
14765   return 0;
14766 }
14767 _ACEOF
14768 rm -f conftest.$ac_objext conftest$ac_exeext
14769 if { (eval echo "$as_me:14769: \"$ac_link\"") >&5
14770   (eval $ac_link) 2>&5
14771   ac_status=$?
14772   echo "$as_me:14772: \$? = $ac_status" >&5
14773   (exit $ac_status); } &&
14774          { ac_try='test -s conftest$ac_exeext'
14775   { (eval echo "$as_me:14775: \"$ac_try\"") >&5
14776   (eval $ac_try) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); }; }; then
14780   ac_cv_lib_dir_opendir=yes
14781 else
14782   echo "$as_me: failed program was:" >&5
14783 cat conftest.$ac_ext >&5
14784 ac_cv_lib_dir_opendir=no
14785 fi
14786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14787 LIBS=$ac_check_lib_save_LIBS
14788 fi
14789 echo "$as_me:14789: result: $ac_cv_lib_dir_opendir" >&5
14790 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14791 if test $ac_cv_lib_dir_opendir = yes; then
14792   LIBS="$LIBS -ldir"
14793 fi
14794
14795 else
14796   echo "$as_me:14796: checking for opendir in -lx" >&5
14797 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14798 if test "${ac_cv_lib_x_opendir+set}" = set; then
14799   echo $ECHO_N "(cached) $ECHO_C" >&6
14800 else
14801   ac_check_lib_save_LIBS=$LIBS
14802 LIBS="-lx  $LIBS"
14803 cat >conftest.$ac_ext <<_ACEOF
14804 #line 14804 "configure"
14805 #include "confdefs.h"
14806
14807 /* Override any gcc2 internal prototype to avoid an error.  */
14808 #ifdef __cplusplus
14809 extern "C"
14810 #endif
14811 /* We use char because int might match the return type of a gcc2
14812    builtin and then its argument prototype would still apply.  */
14813 char opendir ();
14814 int
14815 main ()
14816 {
14817 opendir ();
14818   ;
14819   return 0;
14820 }
14821 _ACEOF
14822 rm -f conftest.$ac_objext conftest$ac_exeext
14823 if { (eval echo "$as_me:14823: \"$ac_link\"") >&5
14824   (eval $ac_link) 2>&5
14825   ac_status=$?
14826   echo "$as_me:14826: \$? = $ac_status" >&5
14827   (exit $ac_status); } &&
14828          { ac_try='test -s conftest$ac_exeext'
14829   { (eval echo "$as_me:14829: \"$ac_try\"") >&5
14830   (eval $ac_try) 2>&5
14831   ac_status=$?
14832   echo "$as_me:14832: \$? = $ac_status" >&5
14833   (exit $ac_status); }; }; then
14834   ac_cv_lib_x_opendir=yes
14835 else
14836   echo "$as_me: failed program was:" >&5
14837 cat conftest.$ac_ext >&5
14838 ac_cv_lib_x_opendir=no
14839 fi
14840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14841 LIBS=$ac_check_lib_save_LIBS
14842 fi
14843 echo "$as_me:14843: result: $ac_cv_lib_x_opendir" >&5
14844 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14845 if test $ac_cv_lib_x_opendir = yes; then
14846   LIBS="$LIBS -lx"
14847 fi
14848
14849 fi
14850
14851 echo "$as_me:14851: checking whether time.h and sys/time.h may both be included" >&5
14852 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14853 if test "${ac_cv_header_time+set}" = set; then
14854   echo $ECHO_N "(cached) $ECHO_C" >&6
14855 else
14856   cat >conftest.$ac_ext <<_ACEOF
14857 #line 14857 "configure"
14858 #include "confdefs.h"
14859 #include <sys/types.h>
14860 #include <sys/time.h>
14861 #include <time.h>
14862
14863 int
14864 main ()
14865 {
14866 if ((struct tm *) 0)
14867 return 0;
14868   ;
14869   return 0;
14870 }
14871 _ACEOF
14872 rm -f conftest.$ac_objext
14873 if { (eval echo "$as_me:14873: \"$ac_compile\"") >&5
14874   (eval $ac_compile) 2>&5
14875   ac_status=$?
14876   echo "$as_me:14876: \$? = $ac_status" >&5
14877   (exit $ac_status); } &&
14878          { ac_try='test -s conftest.$ac_objext'
14879   { (eval echo "$as_me:14879: \"$ac_try\"") >&5
14880   (eval $ac_try) 2>&5
14881   ac_status=$?
14882   echo "$as_me:14882: \$? = $ac_status" >&5
14883   (exit $ac_status); }; }; then
14884   ac_cv_header_time=yes
14885 else
14886   echo "$as_me: failed program was:" >&5
14887 cat conftest.$ac_ext >&5
14888 ac_cv_header_time=no
14889 fi
14890 rm -f conftest.$ac_objext conftest.$ac_ext
14891 fi
14892 echo "$as_me:14892: result: $ac_cv_header_time" >&5
14893 echo "${ECHO_T}$ac_cv_header_time" >&6
14894 if test $ac_cv_header_time = yes; then
14895
14896 cat >>confdefs.h <<\EOF
14897 #define TIME_WITH_SYS_TIME 1
14898 EOF
14899
14900 fi
14901
14902 cf_regex_func=no
14903
14904 cf_regex_libs="regex re"
14905 case $host_os in
14906 (mingw*)
14907         cf_regex_libs="gnurx $cf_regex_libs"
14908         ;;
14909 esac
14910
14911 echo "$as_me:14911: checking for regcomp" >&5
14912 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14913 if test "${ac_cv_func_regcomp+set}" = set; then
14914   echo $ECHO_N "(cached) $ECHO_C" >&6
14915 else
14916   cat >conftest.$ac_ext <<_ACEOF
14917 #line 14917 "configure"
14918 #include "confdefs.h"
14919 /* System header to define __stub macros and hopefully few prototypes,
14920     which can conflict with char regcomp (); below.  */
14921 #include <assert.h>
14922 /* Override any gcc2 internal prototype to avoid an error.  */
14923 #ifdef __cplusplus
14924 extern "C"
14925 #endif
14926 /* We use char because int might match the return type of a gcc2
14927    builtin and then its argument prototype would still apply.  */
14928 char regcomp ();
14929 char (*f) ();
14930
14931 int
14932 main ()
14933 {
14934 /* The GNU C library defines this for functions which it implements
14935     to always fail with ENOSYS.  Some functions are actually named
14936     something starting with __ and the normal name is an alias.  */
14937 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14938 choke me
14939 #else
14940 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14941 #endif
14942
14943   ;
14944   return 0;
14945 }
14946 _ACEOF
14947 rm -f conftest.$ac_objext conftest$ac_exeext
14948 if { (eval echo "$as_me:14948: \"$ac_link\"") >&5
14949   (eval $ac_link) 2>&5
14950   ac_status=$?
14951   echo "$as_me:14951: \$? = $ac_status" >&5
14952   (exit $ac_status); } &&
14953          { ac_try='test -s conftest$ac_exeext'
14954   { (eval echo "$as_me:14954: \"$ac_try\"") >&5
14955   (eval $ac_try) 2>&5
14956   ac_status=$?
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit $ac_status); }; }; then
14959   ac_cv_func_regcomp=yes
14960 else
14961   echo "$as_me: failed program was:" >&5
14962 cat conftest.$ac_ext >&5
14963 ac_cv_func_regcomp=no
14964 fi
14965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14966 fi
14967 echo "$as_me:14967: result: $ac_cv_func_regcomp" >&5
14968 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14969 if test $ac_cv_func_regcomp = yes; then
14970   cf_regex_func=regcomp
14971 else
14972
14973         for cf_regex_lib in $cf_regex_libs
14974         do
14975                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14976 echo "$as_me:14976: checking for regcomp in -l$cf_regex_lib" >&5
14977 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14978 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14979   echo $ECHO_N "(cached) $ECHO_C" >&6
14980 else
14981   ac_check_lib_save_LIBS=$LIBS
14982 LIBS="-l$cf_regex_lib  $LIBS"
14983 cat >conftest.$ac_ext <<_ACEOF
14984 #line 14984 "configure"
14985 #include "confdefs.h"
14986
14987 /* Override any gcc2 internal prototype to avoid an error.  */
14988 #ifdef __cplusplus
14989 extern "C"
14990 #endif
14991 /* We use char because int might match the return type of a gcc2
14992    builtin and then its argument prototype would still apply.  */
14993 char regcomp ();
14994 int
14995 main ()
14996 {
14997 regcomp ();
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 rm -f conftest.$ac_objext conftest$ac_exeext
15003 if { (eval echo "$as_me:15003: \"$ac_link\"") >&5
15004   (eval $ac_link) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit $ac_status); } &&
15008          { ac_try='test -s conftest$ac_exeext'
15009   { (eval echo "$as_me:15009: \"$ac_try\"") >&5
15010   (eval $ac_try) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); }; }; then
15014   eval "$as_ac_Lib=yes"
15015 else
15016   echo "$as_me: failed program was:" >&5
15017 cat conftest.$ac_ext >&5
15018 eval "$as_ac_Lib=no"
15019 fi
15020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15021 LIBS=$ac_check_lib_save_LIBS
15022 fi
15023 echo "$as_me:15023: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15024 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15025 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15026
15027 cf_add_libs="-l$cf_regex_lib"
15028 # Filter out duplicates - this happens with badly-designed ".pc" files...
15029 for cf_add_1lib in $LIBS
15030 do
15031         for cf_add_2lib in $cf_add_libs
15032         do
15033                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15034                 then
15035                         cf_add_1lib=
15036                         break
15037                 fi
15038         done
15039         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15040 done
15041 LIBS="$cf_add_libs"
15042
15043                                 cf_regex_func=regcomp
15044                                 break
15045 fi
15046
15047         done
15048
15049 fi
15050
15051 if test "$cf_regex_func" = no ; then
15052         echo "$as_me:15052: checking for compile" >&5
15053 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15054 if test "${ac_cv_func_compile+set}" = set; then
15055   echo $ECHO_N "(cached) $ECHO_C" >&6
15056 else
15057   cat >conftest.$ac_ext <<_ACEOF
15058 #line 15058 "configure"
15059 #include "confdefs.h"
15060 /* System header to define __stub macros and hopefully few prototypes,
15061     which can conflict with char compile (); below.  */
15062 #include <assert.h>
15063 /* Override any gcc2 internal prototype to avoid an error.  */
15064 #ifdef __cplusplus
15065 extern "C"
15066 #endif
15067 /* We use char because int might match the return type of a gcc2
15068    builtin and then its argument prototype would still apply.  */
15069 char compile ();
15070 char (*f) ();
15071
15072 int
15073 main ()
15074 {
15075 /* The GNU C library defines this for functions which it implements
15076     to always fail with ENOSYS.  Some functions are actually named
15077     something starting with __ and the normal name is an alias.  */
15078 #if defined (__stub_compile) || defined (__stub___compile)
15079 choke me
15080 #else
15081 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15082 #endif
15083
15084   ;
15085   return 0;
15086 }
15087 _ACEOF
15088 rm -f conftest.$ac_objext conftest$ac_exeext
15089 if { (eval echo "$as_me:15089: \"$ac_link\"") >&5
15090   (eval $ac_link) 2>&5
15091   ac_status=$?
15092   echo "$as_me:15092: \$? = $ac_status" >&5
15093   (exit $ac_status); } &&
15094          { ac_try='test -s conftest$ac_exeext'
15095   { (eval echo "$as_me:15095: \"$ac_try\"") >&5
15096   (eval $ac_try) 2>&5
15097   ac_status=$?
15098   echo "$as_me:15098: \$? = $ac_status" >&5
15099   (exit $ac_status); }; }; then
15100   ac_cv_func_compile=yes
15101 else
15102   echo "$as_me: failed program was:" >&5
15103 cat conftest.$ac_ext >&5
15104 ac_cv_func_compile=no
15105 fi
15106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15107 fi
15108 echo "$as_me:15108: result: $ac_cv_func_compile" >&5
15109 echo "${ECHO_T}$ac_cv_func_compile" >&6
15110 if test $ac_cv_func_compile = yes; then
15111   cf_regex_func=compile
15112 else
15113
15114                 echo "$as_me:15114: checking for compile in -lgen" >&5
15115 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15116 if test "${ac_cv_lib_gen_compile+set}" = set; then
15117   echo $ECHO_N "(cached) $ECHO_C" >&6
15118 else
15119   ac_check_lib_save_LIBS=$LIBS
15120 LIBS="-lgen  $LIBS"
15121 cat >conftest.$ac_ext <<_ACEOF
15122 #line 15122 "configure"
15123 #include "confdefs.h"
15124
15125 /* Override any gcc2 internal prototype to avoid an error.  */
15126 #ifdef __cplusplus
15127 extern "C"
15128 #endif
15129 /* We use char because int might match the return type of a gcc2
15130    builtin and then its argument prototype would still apply.  */
15131 char compile ();
15132 int
15133 main ()
15134 {
15135 compile ();
15136   ;
15137   return 0;
15138 }
15139 _ACEOF
15140 rm -f conftest.$ac_objext conftest$ac_exeext
15141 if { (eval echo "$as_me:15141: \"$ac_link\"") >&5
15142   (eval $ac_link) 2>&5
15143   ac_status=$?
15144   echo "$as_me:15144: \$? = $ac_status" >&5
15145   (exit $ac_status); } &&
15146          { ac_try='test -s conftest$ac_exeext'
15147   { (eval echo "$as_me:15147: \"$ac_try\"") >&5
15148   (eval $ac_try) 2>&5
15149   ac_status=$?
15150   echo "$as_me:15150: \$? = $ac_status" >&5
15151   (exit $ac_status); }; }; then
15152   ac_cv_lib_gen_compile=yes
15153 else
15154   echo "$as_me: failed program was:" >&5
15155 cat conftest.$ac_ext >&5
15156 ac_cv_lib_gen_compile=no
15157 fi
15158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15159 LIBS=$ac_check_lib_save_LIBS
15160 fi
15161 echo "$as_me:15161: result: $ac_cv_lib_gen_compile" >&5
15162 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15163 if test $ac_cv_lib_gen_compile = yes; then
15164
15165 cf_add_libs="-lgen"
15166 # Filter out duplicates - this happens with badly-designed ".pc" files...
15167 for cf_add_1lib in $LIBS
15168 do
15169         for cf_add_2lib in $cf_add_libs
15170         do
15171                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15172                 then
15173                         cf_add_1lib=
15174                         break
15175                 fi
15176         done
15177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15178 done
15179 LIBS="$cf_add_libs"
15180
15181                                 cf_regex_func=compile
15182 fi
15183
15184 fi
15185
15186 fi
15187
15188 if test "$cf_regex_func" = no ; then
15189         { echo "$as_me:15189: WARNING: cannot find regular expression library" >&5
15190 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15191 fi
15192
15193 echo "$as_me:15193: checking for regular-expression headers" >&5
15194 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15195 if test "${cf_cv_regex_hdrs+set}" = set; then
15196   echo $ECHO_N "(cached) $ECHO_C" >&6
15197 else
15198
15199 cf_cv_regex_hdrs=no
15200 case $cf_regex_func in
15201 (compile)
15202         for cf_regex_hdr in regexp.h regexpr.h
15203         do
15204                 cat >conftest.$ac_ext <<_ACEOF
15205 #line 15205 "configure"
15206 #include "confdefs.h"
15207 #include <$cf_regex_hdr>
15208 int
15209 main ()
15210 {
15211
15212                         char *p = compile("", "", "", 0);
15213                         int x = step("", "");
15214
15215   ;
15216   return 0;
15217 }
15218 _ACEOF
15219 rm -f conftest.$ac_objext conftest$ac_exeext
15220 if { (eval echo "$as_me:15220: \"$ac_link\"") >&5
15221   (eval $ac_link) 2>&5
15222   ac_status=$?
15223   echo "$as_me:15223: \$? = $ac_status" >&5
15224   (exit $ac_status); } &&
15225          { ac_try='test -s conftest$ac_exeext'
15226   { (eval echo "$as_me:15226: \"$ac_try\"") >&5
15227   (eval $ac_try) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); }; }; then
15231
15232                         cf_cv_regex_hdrs=$cf_regex_hdr
15233                         break
15234
15235 else
15236   echo "$as_me: failed program was:" >&5
15237 cat conftest.$ac_ext >&5
15238 fi
15239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15240         done
15241         ;;
15242 (*)
15243         for cf_regex_hdr in regex.h
15244         do
15245                 cat >conftest.$ac_ext <<_ACEOF
15246 #line 15246 "configure"
15247 #include "confdefs.h"
15248 #include <sys/types.h>
15249 #include <$cf_regex_hdr>
15250 int
15251 main ()
15252 {
15253
15254                         regex_t *p;
15255                         int x = regcomp(p, "", 0);
15256                         int y = regexec(p, "", 0, 0, 0);
15257                         regfree(p);
15258
15259   ;
15260   return 0;
15261 }
15262 _ACEOF
15263 rm -f conftest.$ac_objext conftest$ac_exeext
15264 if { (eval echo "$as_me:15264: \"$ac_link\"") >&5
15265   (eval $ac_link) 2>&5
15266   ac_status=$?
15267   echo "$as_me:15267: \$? = $ac_status" >&5
15268   (exit $ac_status); } &&
15269          { ac_try='test -s conftest$ac_exeext'
15270   { (eval echo "$as_me:15270: \"$ac_try\"") >&5
15271   (eval $ac_try) 2>&5
15272   ac_status=$?
15273   echo "$as_me:15273: \$? = $ac_status" >&5
15274   (exit $ac_status); }; }; then
15275
15276                         cf_cv_regex_hdrs=$cf_regex_hdr
15277                         break
15278
15279 else
15280   echo "$as_me: failed program was:" >&5
15281 cat conftest.$ac_ext >&5
15282 fi
15283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15284         done
15285         ;;
15286 esac
15287
15288 fi
15289 echo "$as_me:15289: result: $cf_cv_regex_hdrs" >&5
15290 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15291
15292 case $cf_cv_regex_hdrs in
15293         (no)            { echo "$as_me:15293: WARNING: no regular expression header found" >&5
15294 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15295         (regex.h)
15296 cat >>confdefs.h <<\EOF
15297 #define HAVE_REGEX_H_FUNCS 1
15298 EOF
15299  ;;
15300         (regexp.h)
15301 cat >>confdefs.h <<\EOF
15302 #define HAVE_REGEXP_H_FUNCS 1
15303 EOF
15304  ;;
15305         (regexpr.h)
15306 cat >>confdefs.h <<\EOF
15307 #define HAVE_REGEXPR_H_FUNCS 1
15308 EOF
15309  ;;
15310 esac
15311
15312 for ac_header in \
15313 fcntl.h \
15314 getopt.h \
15315 limits.h \
15316 locale.h \
15317 math.h \
15318 poll.h \
15319 sys/bsdtypes.h \
15320 sys/ioctl.h \
15321 sys/param.h \
15322 sys/poll.h \
15323 sys/select.h \
15324 sys/time.h \
15325 sys/times.h \
15326 ttyent.h \
15327 unistd.h \
15328 wctype.h \
15329
15330 do
15331 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15332 echo "$as_me:15332: checking for $ac_header" >&5
15333 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15334 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15335   echo $ECHO_N "(cached) $ECHO_C" >&6
15336 else
15337   cat >conftest.$ac_ext <<_ACEOF
15338 #line 15338 "configure"
15339 #include "confdefs.h"
15340 #include <$ac_header>
15341 _ACEOF
15342 if { (eval echo "$as_me:15342: \"$ac_cpp conftest.$ac_ext\"") >&5
15343   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15344   ac_status=$?
15345   egrep -v '^ *\+' conftest.er1 >conftest.err
15346   rm -f conftest.er1
15347   cat conftest.err >&5
15348   echo "$as_me:15348: \$? = $ac_status" >&5
15349   (exit $ac_status); } >/dev/null; then
15350   if test -s conftest.err; then
15351     ac_cpp_err=$ac_c_preproc_warn_flag
15352   else
15353     ac_cpp_err=
15354   fi
15355 else
15356   ac_cpp_err=yes
15357 fi
15358 if test -z "$ac_cpp_err"; then
15359   eval "$as_ac_Header=yes"
15360 else
15361   echo "$as_me: failed program was:" >&5
15362   cat conftest.$ac_ext >&5
15363   eval "$as_ac_Header=no"
15364 fi
15365 rm -f conftest.err conftest.$ac_ext
15366 fi
15367 echo "$as_me:15367: result: `eval echo '${'$as_ac_Header'}'`" >&5
15368 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15369 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15370   cat >>confdefs.h <<EOF
15371 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15372 EOF
15373
15374 fi
15375 done
15376
15377 for ac_header in unistd.h getopt.h
15378 do
15379 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15380 echo "$as_me:15380: checking for $ac_header" >&5
15381 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15382 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385   cat >conftest.$ac_ext <<_ACEOF
15386 #line 15386 "configure"
15387 #include "confdefs.h"
15388 #include <$ac_header>
15389 _ACEOF
15390 if { (eval echo "$as_me:15390: \"$ac_cpp conftest.$ac_ext\"") >&5
15391   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15392   ac_status=$?
15393   egrep -v '^ *\+' conftest.er1 >conftest.err
15394   rm -f conftest.er1
15395   cat conftest.err >&5
15396   echo "$as_me:15396: \$? = $ac_status" >&5
15397   (exit $ac_status); } >/dev/null; then
15398   if test -s conftest.err; then
15399     ac_cpp_err=$ac_c_preproc_warn_flag
15400   else
15401     ac_cpp_err=
15402   fi
15403 else
15404   ac_cpp_err=yes
15405 fi
15406 if test -z "$ac_cpp_err"; then
15407   eval "$as_ac_Header=yes"
15408 else
15409   echo "$as_me: failed program was:" >&5
15410   cat conftest.$ac_ext >&5
15411   eval "$as_ac_Header=no"
15412 fi
15413 rm -f conftest.err conftest.$ac_ext
15414 fi
15415 echo "$as_me:15415: result: `eval echo '${'$as_ac_Header'}'`" >&5
15416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15417 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15418   cat >>confdefs.h <<EOF
15419 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15420 EOF
15421
15422 fi
15423 done
15424
15425 echo "$as_me:15425: checking for header declaring getopt variables" >&5
15426 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15427 if test "${cf_cv_getopt_header+set}" = set; then
15428   echo $ECHO_N "(cached) $ECHO_C" >&6
15429 else
15430
15431 cf_cv_getopt_header=none
15432 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15433 do
15434 cat >conftest.$ac_ext <<_ACEOF
15435 #line 15435 "configure"
15436 #include "confdefs.h"
15437
15438 #include <$cf_header>
15439 int
15440 main ()
15441 {
15442 int x = optind; char *y = optarg
15443   ;
15444   return 0;
15445 }
15446 _ACEOF
15447 rm -f conftest.$ac_objext
15448 if { (eval echo "$as_me:15448: \"$ac_compile\"") >&5
15449   (eval $ac_compile) 2>&5
15450   ac_status=$?
15451   echo "$as_me:15451: \$? = $ac_status" >&5
15452   (exit $ac_status); } &&
15453          { ac_try='test -s conftest.$ac_objext'
15454   { (eval echo "$as_me:15454: \"$ac_try\"") >&5
15455   (eval $ac_try) 2>&5
15456   ac_status=$?
15457   echo "$as_me:15457: \$? = $ac_status" >&5
15458   (exit $ac_status); }; }; then
15459   cf_cv_getopt_header=$cf_header
15460  break
15461 else
15462   echo "$as_me: failed program was:" >&5
15463 cat conftest.$ac_ext >&5
15464 fi
15465 rm -f conftest.$ac_objext conftest.$ac_ext
15466 done
15467
15468 fi
15469 echo "$as_me:15469: result: $cf_cv_getopt_header" >&5
15470 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15471 if test $cf_cv_getopt_header != none ; then
15472
15473 cat >>confdefs.h <<\EOF
15474 #define HAVE_GETOPT_HEADER 1
15475 EOF
15476
15477 fi
15478 if test $cf_cv_getopt_header = getopt.h ; then
15479
15480 cat >>confdefs.h <<\EOF
15481 #define NEED_GETOPT_H 1
15482 EOF
15483
15484 fi
15485
15486 # check for ISC (this may also define _POSIX_SOURCE)
15487 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15488 if test "x$ISC" = xyes ; then
15489
15490 echo "$as_me:15490: checking for main in -lcposix" >&5
15491 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15492 if test "${ac_cv_lib_cposix_main+set}" = set; then
15493   echo $ECHO_N "(cached) $ECHO_C" >&6
15494 else
15495   ac_check_lib_save_LIBS=$LIBS
15496 LIBS="-lcposix  $LIBS"
15497 cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500
15501 int
15502 main ()
15503 {
15504 main ();
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 rm -f conftest.$ac_objext conftest$ac_exeext
15510 if { (eval echo "$as_me:15510: \"$ac_link\"") >&5
15511   (eval $ac_link) 2>&5
15512   ac_status=$?
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit $ac_status); } &&
15515          { ac_try='test -s conftest$ac_exeext'
15516   { (eval echo "$as_me:15516: \"$ac_try\"") >&5
15517   (eval $ac_try) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); }; }; then
15521   ac_cv_lib_cposix_main=yes
15522 else
15523   echo "$as_me: failed program was:" >&5
15524 cat conftest.$ac_ext >&5
15525 ac_cv_lib_cposix_main=no
15526 fi
15527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15528 LIBS=$ac_check_lib_save_LIBS
15529 fi
15530 echo "$as_me:15530: result: $ac_cv_lib_cposix_main" >&5
15531 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15532 if test $ac_cv_lib_cposix_main = yes; then
15533   cat >>confdefs.h <<EOF
15534 #define HAVE_LIBCPOSIX 1
15535 EOF
15536
15537   LIBS="-lcposix $LIBS"
15538
15539 fi
15540
15541         echo "$as_me:15541: checking for bzero in -linet" >&5
15542 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15543 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15544   echo $ECHO_N "(cached) $ECHO_C" >&6
15545 else
15546   ac_check_lib_save_LIBS=$LIBS
15547 LIBS="-linet  $LIBS"
15548 cat >conftest.$ac_ext <<_ACEOF
15549 #line 15549 "configure"
15550 #include "confdefs.h"
15551
15552 /* Override any gcc2 internal prototype to avoid an error.  */
15553 #ifdef __cplusplus
15554 extern "C"
15555 #endif
15556 /* We use char because int might match the return type of a gcc2
15557    builtin and then its argument prototype would still apply.  */
15558 char bzero ();
15559 int
15560 main ()
15561 {
15562 bzero ();
15563   ;
15564   return 0;
15565 }
15566 _ACEOF
15567 rm -f conftest.$ac_objext conftest$ac_exeext
15568 if { (eval echo "$as_me:15568: \"$ac_link\"") >&5
15569   (eval $ac_link) 2>&5
15570   ac_status=$?
15571   echo "$as_me:15571: \$? = $ac_status" >&5
15572   (exit $ac_status); } &&
15573          { ac_try='test -s conftest$ac_exeext'
15574   { (eval echo "$as_me:15574: \"$ac_try\"") >&5
15575   (eval $ac_try) 2>&5
15576   ac_status=$?
15577   echo "$as_me:15577: \$? = $ac_status" >&5
15578   (exit $ac_status); }; }; then
15579   ac_cv_lib_inet_bzero=yes
15580 else
15581   echo "$as_me: failed program was:" >&5
15582 cat conftest.$ac_ext >&5
15583 ac_cv_lib_inet_bzero=no
15584 fi
15585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15586 LIBS=$ac_check_lib_save_LIBS
15587 fi
15588 echo "$as_me:15588: result: $ac_cv_lib_inet_bzero" >&5
15589 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15590 if test $ac_cv_lib_inet_bzero = yes; then
15591
15592 cf_add_libs="-linet"
15593 # Filter out duplicates - this happens with badly-designed ".pc" files...
15594 for cf_add_1lib in $LIBS
15595 do
15596         for cf_add_2lib in $cf_add_libs
15597         do
15598                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15599                 then
15600                         cf_add_1lib=
15601                         break
15602                 fi
15603         done
15604         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15605 done
15606 LIBS="$cf_add_libs"
15607
15608 fi
15609 fi
15610
15611 echo "$as_me:15611: checking if sys/time.h works with sys/select.h" >&5
15612 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15613 if test "${cf_cv_sys_time_select+set}" = set; then
15614   echo $ECHO_N "(cached) $ECHO_C" >&6
15615 else
15616
15617 cat >conftest.$ac_ext <<_ACEOF
15618 #line 15618 "configure"
15619 #include "confdefs.h"
15620
15621 #include <sys/types.h>
15622 #ifdef HAVE_SYS_TIME_H
15623 #include <sys/time.h>
15624 #endif
15625 #ifdef HAVE_SYS_SELECT_H
15626 #include <sys/select.h>
15627 #endif
15628
15629 int
15630 main ()
15631 {
15632
15633   ;
15634   return 0;
15635 }
15636 _ACEOF
15637 rm -f conftest.$ac_objext
15638 if { (eval echo "$as_me:15638: \"$ac_compile\"") >&5
15639   (eval $ac_compile) 2>&5
15640   ac_status=$?
15641   echo "$as_me:15641: \$? = $ac_status" >&5
15642   (exit $ac_status); } &&
15643          { ac_try='test -s conftest.$ac_objext'
15644   { (eval echo "$as_me:15644: \"$ac_try\"") >&5
15645   (eval $ac_try) 2>&5
15646   ac_status=$?
15647   echo "$as_me:15647: \$? = $ac_status" >&5
15648   (exit $ac_status); }; }; then
15649   cf_cv_sys_time_select=yes
15650 else
15651   echo "$as_me: failed program was:" >&5
15652 cat conftest.$ac_ext >&5
15653 cf_cv_sys_time_select=no
15654 fi
15655 rm -f conftest.$ac_objext conftest.$ac_ext
15656
15657 fi
15658
15659 echo "$as_me:15659: result: $cf_cv_sys_time_select" >&5
15660 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15661 test "$cf_cv_sys_time_select" = yes &&
15662 cat >>confdefs.h <<\EOF
15663 #define HAVE_SYS_TIME_SELECT 1
15664 EOF
15665
15666 ###     checks for compiler characteristics
15667 ac_ext=c
15668 ac_cpp='$CPP $CPPFLAGS'
15669 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15670 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15671 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15672 ac_main_return=return
15673
15674 echo "$as_me:15674: checking for an ANSI C-conforming const" >&5
15675 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15676 if test "${ac_cv_c_const+set}" = set; then
15677   echo $ECHO_N "(cached) $ECHO_C" >&6
15678 else
15679   cat >conftest.$ac_ext <<_ACEOF
15680 #line 15680 "configure"
15681 #include "confdefs.h"
15682
15683 int
15684 main ()
15685 {
15686 /* FIXME: Include the comments suggested by Paul. */
15687 #ifndef __cplusplus
15688   /* Ultrix mips cc rejects this.  */
15689   typedef int charset[2];
15690   const charset x;
15691   /* SunOS 4.1.1 cc rejects this.  */
15692   char const *const *ccp;
15693   char **p;
15694   /* NEC SVR4.0.2 mips cc rejects this.  */
15695   struct point {int x, y;};
15696   static struct point const zero = {0,0};
15697   /* AIX XL C 1.02.0.0 rejects this.
15698      It does not let you subtract one const X* pointer from another in
15699      an arm of an if-expression whose if-part is not a constant
15700      expression */
15701   const char *g = "string";
15702   ccp = &g + (g ? g-g : 0);
15703   /* HPUX 7.0 cc rejects these. */
15704   ++ccp;
15705   p = (char**) ccp;
15706   ccp = (char const *const *) p;
15707   { /* SCO 3.2v4 cc rejects this.  */
15708     char *t;
15709     char const *s = 0 ? (char *) 0 : (char const *) 0;
15710
15711     *t++ = 0;
15712   }
15713   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15714     int x[] = {25, 17};
15715     const int *foo = &x[0];
15716     ++foo;
15717   }
15718   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15719     typedef const int *iptr;
15720     iptr p = 0;
15721     ++p;
15722   }
15723   { /* AIX XL C 1.02.0.0 rejects this saying
15724        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15725     struct s { int j; const int *ap[3]; };
15726     struct s *b; b->j = 5;
15727   }
15728   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15729     const int foo = 10;
15730   }
15731 #endif
15732
15733   ;
15734   return 0;
15735 }
15736 _ACEOF
15737 rm -f conftest.$ac_objext
15738 if { (eval echo "$as_me:15738: \"$ac_compile\"") >&5
15739   (eval $ac_compile) 2>&5
15740   ac_status=$?
15741   echo "$as_me:15741: \$? = $ac_status" >&5
15742   (exit $ac_status); } &&
15743          { ac_try='test -s conftest.$ac_objext'
15744   { (eval echo "$as_me:15744: \"$ac_try\"") >&5
15745   (eval $ac_try) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); }; }; then
15749   ac_cv_c_const=yes
15750 else
15751   echo "$as_me: failed program was:" >&5
15752 cat conftest.$ac_ext >&5
15753 ac_cv_c_const=no
15754 fi
15755 rm -f conftest.$ac_objext conftest.$ac_ext
15756 fi
15757 echo "$as_me:15757: result: $ac_cv_c_const" >&5
15758 echo "${ECHO_T}$ac_cv_c_const" >&6
15759 if test $ac_cv_c_const = no; then
15760
15761 cat >>confdefs.h <<\EOF
15762 #define const
15763 EOF
15764
15765 fi
15766
15767 echo "$as_me:15767: checking for inline" >&5
15768 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15769 if test "${ac_cv_c_inline+set}" = set; then
15770   echo $ECHO_N "(cached) $ECHO_C" >&6
15771 else
15772   ac_cv_c_inline=no
15773 for ac_kw in inline __inline__ __inline; do
15774   cat >conftest.$ac_ext <<_ACEOF
15775 #line 15775 "configure"
15776 #include "confdefs.h"
15777 #ifndef __cplusplus
15778 static $ac_kw int static_foo () {return 0; }
15779 $ac_kw int foo () {return 0; }
15780 #endif
15781
15782 _ACEOF
15783 rm -f conftest.$ac_objext
15784 if { (eval echo "$as_me:15784: \"$ac_compile\"") >&5
15785   (eval $ac_compile) 2>&5
15786   ac_status=$?
15787   echo "$as_me:15787: \$? = $ac_status" >&5
15788   (exit $ac_status); } &&
15789          { ac_try='test -s conftest.$ac_objext'
15790   { (eval echo "$as_me:15790: \"$ac_try\"") >&5
15791   (eval $ac_try) 2>&5
15792   ac_status=$?
15793   echo "$as_me:15793: \$? = $ac_status" >&5
15794   (exit $ac_status); }; }; then
15795   ac_cv_c_inline=$ac_kw; break
15796 else
15797   echo "$as_me: failed program was:" >&5
15798 cat conftest.$ac_ext >&5
15799 fi
15800 rm -f conftest.$ac_objext conftest.$ac_ext
15801 done
15802
15803 fi
15804 echo "$as_me:15804: result: $ac_cv_c_inline" >&5
15805 echo "${ECHO_T}$ac_cv_c_inline" >&6
15806 case $ac_cv_c_inline in
15807   inline | yes) ;;
15808   no)
15809 cat >>confdefs.h <<\EOF
15810 #define inline
15811 EOF
15812  ;;
15813   *)  cat >>confdefs.h <<EOF
15814 #define inline $ac_cv_c_inline
15815 EOF
15816  ;;
15817 esac
15818
15819 NCURSES_INLINE=
15820 if test "$ac_cv_c_inline" != no ; then
15821         NCURSES_INLINE=inline
15822         if test "$INTEL_COMPILER" = yes
15823         then
15824                 :
15825         elif test "$CLANG_COMPILER" = yes
15826         then
15827                 :
15828         elif test "$GCC" = yes
15829         then
15830                 echo "$as_me:15830: checking if $CC supports options to tune inlining" >&5
15831 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15832 if test "${cf_cv_gcc_inline+set}" = set; then
15833   echo $ECHO_N "(cached) $ECHO_C" >&6
15834 else
15835
15836                 cf_save_CFLAGS=$CFLAGS
15837                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15838                 cat >conftest.$ac_ext <<_ACEOF
15839 #line 15839 "configure"
15840 #include "confdefs.h"
15841 inline int foo(void) { return 1; }
15842 int
15843 main ()
15844 {
15845 ${cf_cv_main_return:-return} foo()
15846   ;
15847   return 0;
15848 }
15849 _ACEOF
15850 rm -f conftest.$ac_objext
15851 if { (eval echo "$as_me:15851: \"$ac_compile\"") >&5
15852   (eval $ac_compile) 2>&5
15853   ac_status=$?
15854   echo "$as_me:15854: \$? = $ac_status" >&5
15855   (exit $ac_status); } &&
15856          { ac_try='test -s conftest.$ac_objext'
15857   { (eval echo "$as_me:15857: \"$ac_try\"") >&5
15858   (eval $ac_try) 2>&5
15859   ac_status=$?
15860   echo "$as_me:15860: \$? = $ac_status" >&5
15861   (exit $ac_status); }; }; then
15862   cf_cv_gcc_inline=yes
15863 else
15864   echo "$as_me: failed program was:" >&5
15865 cat conftest.$ac_ext >&5
15866 cf_cv_gcc_inline=no
15867 fi
15868 rm -f conftest.$ac_objext conftest.$ac_ext
15869                 CFLAGS=$cf_save_CFLAGS
15870
15871 fi
15872 echo "$as_me:15872: result: $cf_cv_gcc_inline" >&5
15873 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15874                 if test "$cf_cv_gcc_inline" = yes ; then
15875
15876 cf_fix_cppflags=no
15877 cf_new_cflags=
15878 cf_new_cppflags=
15879 cf_new_extra_cppflags=
15880
15881 for cf_add_cflags in --param max-inline-insns-single=1200
15882 do
15883 case $cf_fix_cppflags in
15884 (no)
15885         case $cf_add_cflags in
15886         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15887                 case $cf_add_cflags in
15888                 (-D*)
15889                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15890
15891                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15892                                 && test -z "${cf_tst_cflags}" \
15893                                 && cf_fix_cppflags=yes
15894
15895                         if test $cf_fix_cppflags = yes ; then
15896                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15897                                 continue
15898                         elif test "${cf_tst_cflags}" = "\"'" ; then
15899                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15900                                 continue
15901                         fi
15902                         ;;
15903                 esac
15904                 case "$CPPFLAGS" in
15905                 (*$cf_add_cflags)
15906                         ;;
15907                 (*)
15908                         case $cf_add_cflags in
15909                         (-D*)
15910                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15911
15912 CPPFLAGS=`echo "$CPPFLAGS" | \
15913         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15914                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15915
15916                                 ;;
15917                         esac
15918                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15919                         ;;
15920                 esac
15921                 ;;
15922         (*)
15923                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15924                 ;;
15925         esac
15926         ;;
15927 (yes)
15928         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15929
15930         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15931
15932         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15933                 && test -z "${cf_tst_cflags}" \
15934                 && cf_fix_cppflags=no
15935         ;;
15936 esac
15937 done
15938
15939 if test -n "$cf_new_cflags" ; then
15940
15941         CFLAGS="$CFLAGS $cf_new_cflags"
15942 fi
15943
15944 if test -n "$cf_new_cppflags" ; then
15945
15946         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15947 fi
15948
15949 if test -n "$cf_new_extra_cppflags" ; then
15950
15951         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15952 fi
15953
15954                 fi
15955         fi
15956 fi
15957
15958 echo "$as_me:15958: checking for signal global datatype" >&5
15959 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15960 if test "${cf_cv_sig_atomic_t+set}" = set; then
15961   echo $ECHO_N "(cached) $ECHO_C" >&6
15962 else
15963
15964         for cf_type in \
15965                 "volatile sig_atomic_t" \
15966                 "sig_atomic_t" \
15967                 "int"
15968         do
15969         cat >conftest.$ac_ext <<_ACEOF
15970 #line 15970 "configure"
15971 #include "confdefs.h"
15972
15973 #include <sys/types.h>
15974 #include <signal.h>
15975 #include <stdio.h>
15976
15977 extern $cf_type x;
15978 $cf_type x;
15979 static void handler(int sig)
15980 {
15981         x = 5;
15982 }
15983 int
15984 main ()
15985 {
15986 signal(SIGINT, handler);
15987                  x = 1
15988   ;
15989   return 0;
15990 }
15991 _ACEOF
15992 rm -f conftest.$ac_objext
15993 if { (eval echo "$as_me:15993: \"$ac_compile\"") >&5
15994   (eval $ac_compile) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit $ac_status); } &&
15998          { ac_try='test -s conftest.$ac_objext'
15999   { (eval echo "$as_me:15999: \"$ac_try\"") >&5
16000   (eval $ac_try) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit $ac_status); }; }; then
16004   cf_cv_sig_atomic_t=$cf_type
16005 else
16006   echo "$as_me: failed program was:" >&5
16007 cat conftest.$ac_ext >&5
16008 cf_cv_sig_atomic_t=no
16009 fi
16010 rm -f conftest.$ac_objext conftest.$ac_ext
16011                 test "$cf_cv_sig_atomic_t" != no && break
16012         done
16013
16014 fi
16015
16016 echo "$as_me:16016: result: $cf_cv_sig_atomic_t" >&5
16017 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16018 test "$cf_cv_sig_atomic_t" != no &&
16019 cat >>confdefs.h <<EOF
16020 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16021 EOF
16022
16023 if test $NCURSES_CHTYPE = auto ; then
16024
16025 echo "$as_me:16025: checking for type of chtype" >&5
16026 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16027 if test "${cf_cv_typeof_chtype+set}" = set; then
16028   echo $ECHO_N "(cached) $ECHO_C" >&6
16029 else
16030
16031                 if test "$cross_compiling" = yes; then
16032   cf_cv_typeof_chtype=long
16033 else
16034   cat >conftest.$ac_ext <<_ACEOF
16035 #line 16035 "configure"
16036 #include "confdefs.h"
16037
16038 #define WANT_BITS 31
16039 #include <stdio.h>
16040 int main()
16041 {
16042         FILE *fp = fopen("cf_test.out", "w");
16043         if (fp != 0) {
16044                 char *result = "long";
16045                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16046                         int n;
16047                         unsigned int x, y;
16048                         for (n = 0; n < WANT_BITS; n++) {
16049                                 x = (1 << n);
16050                                 y = (x >> n);
16051                                 if (y != 1 || x == 0) {
16052                                         x = 0;
16053                                         break;
16054                                 }
16055                         }
16056                         /*
16057                          * If x is nonzero, an int is big enough for the bits
16058                          * that we want.
16059                          */
16060                         result = (x != 0) ? "int" : "long";
16061                 }
16062                 fputs(result, fp);
16063                 fclose(fp);
16064         }
16065         ${cf_cv_main_return:-return}(0);
16066 }
16067
16068 _ACEOF
16069 rm -f conftest$ac_exeext
16070 if { (eval echo "$as_me:16070: \"$ac_link\"") >&5
16071   (eval $ac_link) 2>&5
16072   ac_status=$?
16073   echo "$as_me:16073: \$? = $ac_status" >&5
16074   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16075   { (eval echo "$as_me:16075: \"$ac_try\"") >&5
16076   (eval $ac_try) 2>&5
16077   ac_status=$?
16078   echo "$as_me:16078: \$? = $ac_status" >&5
16079   (exit $ac_status); }; }; then
16080   cf_cv_typeof_chtype=`cat cf_test.out`
16081 else
16082   echo "$as_me: program exited with status $ac_status" >&5
16083 echo "$as_me: failed program was:" >&5
16084 cat conftest.$ac_ext >&5
16085 cf_cv_typeof_chtype=long
16086 fi
16087 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16088 fi
16089                 rm -f cf_test.out
16090
16091 fi
16092
16093 echo "$as_me:16093: result: $cf_cv_typeof_chtype" >&5
16094 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16095
16096 cat >>confdefs.h <<EOF
16097 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16098 EOF
16099
16100 else
16101         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16102 fi
16103 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16104
16105 echo "$as_me:16105: checking if unsigned literals are legal" >&5
16106 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16107 if test "${cf_cv_unsigned_literals+set}" = set; then
16108   echo $ECHO_N "(cached) $ECHO_C" >&6
16109 else
16110
16111         cat >conftest.$ac_ext <<_ACEOF
16112 #line 16112 "configure"
16113 #include "confdefs.h"
16114
16115 int
16116 main ()
16117 {
16118 long x = 1L + 1UL + 1U + 1
16119   ;
16120   return 0;
16121 }
16122 _ACEOF
16123 rm -f conftest.$ac_objext
16124 if { (eval echo "$as_me:16124: \"$ac_compile\"") >&5
16125   (eval $ac_compile) 2>&5
16126   ac_status=$?
16127   echo "$as_me:16127: \$? = $ac_status" >&5
16128   (exit $ac_status); } &&
16129          { ac_try='test -s conftest.$ac_objext'
16130   { (eval echo "$as_me:16130: \"$ac_try\"") >&5
16131   (eval $ac_try) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); }; }; then
16135   cf_cv_unsigned_literals=yes
16136 else
16137   echo "$as_me: failed program was:" >&5
16138 cat conftest.$ac_ext >&5
16139 cf_cv_unsigned_literals=no
16140 fi
16141 rm -f conftest.$ac_objext conftest.$ac_ext
16142
16143 fi
16144
16145 echo "$as_me:16145: result: $cf_cv_unsigned_literals" >&5
16146 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16147
16148 cf_cv_1UL="1"
16149 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16150 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16151
16152 if test $NCURSES_MMASK_T = auto ; then
16153         cf_cv_typeof_mmask_t=long
16154 else
16155         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16156 fi
16157 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16158
16159 ###     Checks for external-data
16160
16161 echo "$as_me:16161: checking if external errno is declared" >&5
16162 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16163 if test "${cf_cv_dcl_errno+set}" = set; then
16164   echo $ECHO_N "(cached) $ECHO_C" >&6
16165 else
16166
16167         cat >conftest.$ac_ext <<_ACEOF
16168 #line 16168 "configure"
16169 #include "confdefs.h"
16170
16171 #ifdef HAVE_STDLIB_H
16172 #include <stdlib.h>
16173 #endif
16174 #include <stdio.h>
16175 #include <sys/types.h>
16176 #include <errno.h>
16177 int
16178 main ()
16179 {
16180 int x = (int) errno
16181   ;
16182   return 0;
16183 }
16184 _ACEOF
16185 rm -f conftest.$ac_objext
16186 if { (eval echo "$as_me:16186: \"$ac_compile\"") >&5
16187   (eval $ac_compile) 2>&5
16188   ac_status=$?
16189   echo "$as_me:16189: \$? = $ac_status" >&5
16190   (exit $ac_status); } &&
16191          { ac_try='test -s conftest.$ac_objext'
16192   { (eval echo "$as_me:16192: \"$ac_try\"") >&5
16193   (eval $ac_try) 2>&5
16194   ac_status=$?
16195   echo "$as_me:16195: \$? = $ac_status" >&5
16196   (exit $ac_status); }; }; then
16197   cf_cv_dcl_errno=yes
16198 else
16199   echo "$as_me: failed program was:" >&5
16200 cat conftest.$ac_ext >&5
16201 cf_cv_dcl_errno=no
16202 fi
16203 rm -f conftest.$ac_objext conftest.$ac_ext
16204
16205 fi
16206 echo "$as_me:16206: result: $cf_cv_dcl_errno" >&5
16207 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16208
16209 if test "$cf_cv_dcl_errno" = no ; then
16210
16211 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16212
16213         cat >>confdefs.h <<EOF
16214 #define $cf_result 1
16215 EOF
16216
16217 fi
16218
16219 # It's possible (for near-UNIX clones) that the data doesn't exist
16220
16221 echo "$as_me:16221: checking if external errno exists" >&5
16222 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16223 if test "${cf_cv_have_errno+set}" = set; then
16224   echo $ECHO_N "(cached) $ECHO_C" >&6
16225 else
16226
16227         cat >conftest.$ac_ext <<_ACEOF
16228 #line 16228 "configure"
16229 #include "confdefs.h"
16230
16231 #undef errno
16232 extern int errno;
16233
16234 int
16235 main ()
16236 {
16237 errno = 2
16238   ;
16239   return 0;
16240 }
16241 _ACEOF
16242 rm -f conftest.$ac_objext conftest$ac_exeext
16243 if { (eval echo "$as_me:16243: \"$ac_link\"") >&5
16244   (eval $ac_link) 2>&5
16245   ac_status=$?
16246   echo "$as_me:16246: \$? = $ac_status" >&5
16247   (exit $ac_status); } &&
16248          { ac_try='test -s conftest$ac_exeext'
16249   { (eval echo "$as_me:16249: \"$ac_try\"") >&5
16250   (eval $ac_try) 2>&5
16251   ac_status=$?
16252   echo "$as_me:16252: \$? = $ac_status" >&5
16253   (exit $ac_status); }; }; then
16254   cf_cv_have_errno=yes
16255 else
16256   echo "$as_me: failed program was:" >&5
16257 cat conftest.$ac_ext >&5
16258 cf_cv_have_errno=no
16259 fi
16260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16261
16262 fi
16263 echo "$as_me:16263: result: $cf_cv_have_errno" >&5
16264 echo "${ECHO_T}$cf_cv_have_errno" >&6
16265
16266 if test "$cf_cv_have_errno" = yes ; then
16267
16268 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16269
16270         cat >>confdefs.h <<EOF
16271 #define $cf_result 1
16272 EOF
16273
16274 fi
16275
16276 echo "$as_me:16276: checking if data-only library module links" >&5
16277 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16278 if test "${cf_cv_link_dataonly+set}" = set; then
16279   echo $ECHO_N "(cached) $ECHO_C" >&6
16280 else
16281
16282         rm -f conftest.a
16283         cat >conftest.$ac_ext <<EOF
16284 #line 16284 "configure"
16285 int     testdata[3] = { 123, 456, 789 };
16286 EOF
16287         if { (eval echo "$as_me:16287: \"$ac_compile\"") >&5
16288   (eval $ac_compile) 2>&5
16289   ac_status=$?
16290   echo "$as_me:16290: \$? = $ac_status" >&5
16291   (exit $ac_status); } ; then
16292                 mv conftest.o data.o && \
16293                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16294         fi
16295         rm -f conftest.$ac_ext data.o
16296         cat >conftest.$ac_ext <<EOF
16297 #line 16297 "configure"
16298 int     testfunc()
16299 {
16300 #if defined(NeXT)
16301         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16302 #else
16303         extern int testdata[3];
16304         return testdata[0] == 123
16305            &&  testdata[1] == 456
16306            &&  testdata[2] == 789;
16307 #endif
16308 }
16309 EOF
16310         if { (eval echo "$as_me:16310: \"$ac_compile\"") >&5
16311   (eval $ac_compile) 2>&5
16312   ac_status=$?
16313   echo "$as_me:16313: \$? = $ac_status" >&5
16314   (exit $ac_status); }; then
16315                 mv conftest.o func.o && \
16316                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16317         fi
16318         rm -f conftest.$ac_ext func.o
16319         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16320         cf_saveLIBS="$LIBS"
16321         LIBS="conftest.a $LIBS"
16322         if test "$cross_compiling" = yes; then
16323   cf_cv_link_dataonly=unknown
16324 else
16325   cat >conftest.$ac_ext <<_ACEOF
16326 #line 16326 "configure"
16327 #include "confdefs.h"
16328
16329         int main()
16330         {
16331                 extern int testfunc();
16332                 ${cf_cv_main_return:-return} (!testfunc());
16333         }
16334
16335 _ACEOF
16336 rm -f conftest$ac_exeext
16337 if { (eval echo "$as_me:16337: \"$ac_link\"") >&5
16338   (eval $ac_link) 2>&5
16339   ac_status=$?
16340   echo "$as_me:16340: \$? = $ac_status" >&5
16341   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16342   { (eval echo "$as_me:16342: \"$ac_try\"") >&5
16343   (eval $ac_try) 2>&5
16344   ac_status=$?
16345   echo "$as_me:16345: \$? = $ac_status" >&5
16346   (exit $ac_status); }; }; then
16347   cf_cv_link_dataonly=yes
16348 else
16349   echo "$as_me: program exited with status $ac_status" >&5
16350 echo "$as_me: failed program was:" >&5
16351 cat conftest.$ac_ext >&5
16352 cf_cv_link_dataonly=no
16353 fi
16354 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16355 fi
16356         LIBS="$cf_saveLIBS"
16357
16358 fi
16359
16360 echo "$as_me:16360: result: $cf_cv_link_dataonly" >&5
16361 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16362
16363 if test "$cf_cv_link_dataonly" = no ; then
16364
16365 cat >>confdefs.h <<\EOF
16366 #define BROKEN_LINKER 1
16367 EOF
16368
16369         BROKEN_LINKER=1
16370 fi
16371
16372 ###     Checks for library functions.
16373
16374 for ac_func in \
16375 getcwd \
16376 getegid \
16377 geteuid \
16378 getopt \
16379 getttynam \
16380 issetugid \
16381 poll \
16382 putenv \
16383 remove \
16384 select \
16385 setbuf \
16386 setbuffer \
16387 setenv \
16388 setvbuf \
16389 sigaction \
16390 sigvec \
16391 strdup \
16392 strstr \
16393 tcgetpgrp \
16394 times \
16395 vsnprintf \
16396
16397 do
16398 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16399 echo "$as_me:16399: checking for $ac_func" >&5
16400 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16401 if eval "test \"\${$as_ac_var+set}\" = set"; then
16402   echo $ECHO_N "(cached) $ECHO_C" >&6
16403 else
16404   cat >conftest.$ac_ext <<_ACEOF
16405 #line 16405 "configure"
16406 #include "confdefs.h"
16407 /* System header to define __stub macros and hopefully few prototypes,
16408     which can conflict with char $ac_func (); below.  */
16409 #include <assert.h>
16410 /* Override any gcc2 internal prototype to avoid an error.  */
16411 #ifdef __cplusplus
16412 extern "C"
16413 #endif
16414 /* We use char because int might match the return type of a gcc2
16415    builtin and then its argument prototype would still apply.  */
16416 char $ac_func ();
16417 char (*f) ();
16418
16419 int
16420 main ()
16421 {
16422 /* The GNU C library defines this for functions which it implements
16423     to always fail with ENOSYS.  Some functions are actually named
16424     something starting with __ and the normal name is an alias.  */
16425 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16426 choke me
16427 #else
16428 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16429 #endif
16430
16431   ;
16432   return 0;
16433 }
16434 _ACEOF
16435 rm -f conftest.$ac_objext conftest$ac_exeext
16436 if { (eval echo "$as_me:16436: \"$ac_link\"") >&5
16437   (eval $ac_link) 2>&5
16438   ac_status=$?
16439   echo "$as_me:16439: \$? = $ac_status" >&5
16440   (exit $ac_status); } &&
16441          { ac_try='test -s conftest$ac_exeext'
16442   { (eval echo "$as_me:16442: \"$ac_try\"") >&5
16443   (eval $ac_try) 2>&5
16444   ac_status=$?
16445   echo "$as_me:16445: \$? = $ac_status" >&5
16446   (exit $ac_status); }; }; then
16447   eval "$as_ac_var=yes"
16448 else
16449   echo "$as_me: failed program was:" >&5
16450 cat conftest.$ac_ext >&5
16451 eval "$as_ac_var=no"
16452 fi
16453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16454 fi
16455 echo "$as_me:16455: result: `eval echo '${'$as_ac_var'}'`" >&5
16456 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16457 if test `eval echo '${'$as_ac_var'}'` = yes; then
16458   cat >>confdefs.h <<EOF
16459 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16460 EOF
16461
16462 fi
16463 done
16464
16465 if test "x$ac_cv_func_getopt" = xno &&
16466    test "x$cf_with_progs$cf_with_tests" != xnono; then
16467         { { echo "$as_me:16467: error: getopt is required for building programs" >&5
16468 echo "$as_me: error: getopt is required for building programs" >&2;}
16469    { (exit 1); exit 1; }; }
16470 fi
16471
16472 if test "x$with_getcap" = "xyes" ; then
16473
16474 echo "$as_me:16474: checking for terminal-capability database functions" >&5
16475 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16476 if test "${cf_cv_cgetent+set}" = set; then
16477   echo $ECHO_N "(cached) $ECHO_C" >&6
16478 else
16479
16480 cat >conftest.$ac_ext <<_ACEOF
16481 #line 16481 "configure"
16482 #include "confdefs.h"
16483
16484 #include <stdlib.h>
16485 int
16486 main ()
16487 {
16488
16489         char temp[128];
16490         char *buf = temp;
16491         char *db_array = temp;
16492         cgetent(&buf, &db_array, "vt100");
16493         cgetcap(buf, "tc", '=');
16494         cgetmatch(buf, "tc");
16495
16496   ;
16497   return 0;
16498 }
16499 _ACEOF
16500 rm -f conftest.$ac_objext conftest$ac_exeext
16501 if { (eval echo "$as_me:16501: \"$ac_link\"") >&5
16502   (eval $ac_link) 2>&5
16503   ac_status=$?
16504   echo "$as_me:16504: \$? = $ac_status" >&5
16505   (exit $ac_status); } &&
16506          { ac_try='test -s conftest$ac_exeext'
16507   { (eval echo "$as_me:16507: \"$ac_try\"") >&5
16508   (eval $ac_try) 2>&5
16509   ac_status=$?
16510   echo "$as_me:16510: \$? = $ac_status" >&5
16511   (exit $ac_status); }; }; then
16512   cf_cv_cgetent=yes
16513 else
16514   echo "$as_me: failed program was:" >&5
16515 cat conftest.$ac_ext >&5
16516 cf_cv_cgetent=no
16517 fi
16518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16519
16520 fi
16521 echo "$as_me:16521: result: $cf_cv_cgetent" >&5
16522 echo "${ECHO_T}$cf_cv_cgetent" >&6
16523
16524 if test "$cf_cv_cgetent" = yes
16525 then
16526
16527 cat >>confdefs.h <<\EOF
16528 #define HAVE_BSD_CGETENT 1
16529 EOF
16530
16531 echo "$as_me:16531: checking if cgetent uses const parameter" >&5
16532 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16533 if test "${cf_cv_cgetent_const+set}" = set; then
16534   echo $ECHO_N "(cached) $ECHO_C" >&6
16535 else
16536
16537 cat >conftest.$ac_ext <<_ACEOF
16538 #line 16538 "configure"
16539 #include "confdefs.h"
16540
16541 #include <stdlib.h>
16542 int
16543 main ()
16544 {
16545
16546         char temp[128];
16547         char *buf = temp;
16548 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16549         const char *db_array = temp;
16550         cgetent(&buf, &db_array, "vt100");
16551 #endif
16552         cgetcap(buf, "tc", '=');
16553         cgetmatch(buf, "tc");
16554
16555   ;
16556   return 0;
16557 }
16558 _ACEOF
16559 rm -f conftest.$ac_objext conftest$ac_exeext
16560 if { (eval echo "$as_me:16560: \"$ac_link\"") >&5
16561   (eval $ac_link) 2>&5
16562   ac_status=$?
16563   echo "$as_me:16563: \$? = $ac_status" >&5
16564   (exit $ac_status); } &&
16565          { ac_try='test -s conftest$ac_exeext'
16566   { (eval echo "$as_me:16566: \"$ac_try\"") >&5
16567   (eval $ac_try) 2>&5
16568   ac_status=$?
16569   echo "$as_me:16569: \$? = $ac_status" >&5
16570   (exit $ac_status); }; }; then
16571   cf_cv_cgetent_const=yes
16572 else
16573   echo "$as_me: failed program was:" >&5
16574 cat conftest.$ac_ext >&5
16575 cf_cv_cgetent_const=no
16576 fi
16577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16578
16579 fi
16580 echo "$as_me:16580: result: $cf_cv_cgetent_const" >&5
16581 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16582         if test "$cf_cv_cgetent_const" = yes
16583         then
16584
16585 cat >>confdefs.h <<EOF
16586 #define CGETENT_CONST const
16587 EOF
16588
16589         fi
16590 fi
16591
16592 fi
16593
16594 echo "$as_me:16594: checking for isascii" >&5
16595 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16596 if test "${cf_cv_have_isascii+set}" = set; then
16597   echo $ECHO_N "(cached) $ECHO_C" >&6
16598 else
16599
16600         cat >conftest.$ac_ext <<_ACEOF
16601 #line 16601 "configure"
16602 #include "confdefs.h"
16603 #include <ctype.h>
16604 int
16605 main ()
16606 {
16607 int x = isascii(' ')
16608   ;
16609   return 0;
16610 }
16611 _ACEOF
16612 rm -f conftest.$ac_objext conftest$ac_exeext
16613 if { (eval echo "$as_me:16613: \"$ac_link\"") >&5
16614   (eval $ac_link) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit $ac_status); } &&
16618          { ac_try='test -s conftest$ac_exeext'
16619   { (eval echo "$as_me:16619: \"$ac_try\"") >&5
16620   (eval $ac_try) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); }; }; then
16624   cf_cv_have_isascii=yes
16625 else
16626   echo "$as_me: failed program was:" >&5
16627 cat conftest.$ac_ext >&5
16628 cf_cv_have_isascii=no
16629 fi
16630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16631
16632 fi
16633 echo "$as_me:16633: result: $cf_cv_have_isascii" >&5
16634 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16635 test "$cf_cv_have_isascii" = yes &&
16636 cat >>confdefs.h <<\EOF
16637 #define HAVE_ISASCII 1
16638 EOF
16639
16640 if test "$ac_cv_func_sigaction" = yes; then
16641 echo "$as_me:16641: checking whether sigaction needs _POSIX_SOURCE" >&5
16642 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16643 cat >conftest.$ac_ext <<_ACEOF
16644 #line 16644 "configure"
16645 #include "confdefs.h"
16646
16647 #include <sys/types.h>
16648 #include <signal.h>
16649 int
16650 main ()
16651 {
16652 struct sigaction act
16653   ;
16654   return 0;
16655 }
16656 _ACEOF
16657 rm -f conftest.$ac_objext
16658 if { (eval echo "$as_me:16658: \"$ac_compile\"") >&5
16659   (eval $ac_compile) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); } &&
16663          { ac_try='test -s conftest.$ac_objext'
16664   { (eval echo "$as_me:16664: \"$ac_try\"") >&5
16665   (eval $ac_try) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); }; }; then
16669   sigact_bad=no
16670 else
16671   echo "$as_me: failed program was:" >&5
16672 cat conftest.$ac_ext >&5
16673
16674 cat >conftest.$ac_ext <<_ACEOF
16675 #line 16675 "configure"
16676 #include "confdefs.h"
16677
16678 #define _POSIX_SOURCE
16679 #include <sys/types.h>
16680 #include <signal.h>
16681 int
16682 main ()
16683 {
16684 struct sigaction act
16685   ;
16686   return 0;
16687 }
16688 _ACEOF
16689 rm -f conftest.$ac_objext
16690 if { (eval echo "$as_me:16690: \"$ac_compile\"") >&5
16691   (eval $ac_compile) 2>&5
16692   ac_status=$?
16693   echo "$as_me:16693: \$? = $ac_status" >&5
16694   (exit $ac_status); } &&
16695          { ac_try='test -s conftest.$ac_objext'
16696   { (eval echo "$as_me:16696: \"$ac_try\"") >&5
16697   (eval $ac_try) 2>&5
16698   ac_status=$?
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); }; }; then
16701   sigact_bad=yes
16702
16703 cat >>confdefs.h <<\EOF
16704 #define _POSIX_SOURCE 1
16705 EOF
16706
16707 else
16708   echo "$as_me: failed program was:" >&5
16709 cat conftest.$ac_ext >&5
16710 sigact_bad=unknown
16711 fi
16712 rm -f conftest.$ac_objext conftest.$ac_ext
16713 fi
16714 rm -f conftest.$ac_objext conftest.$ac_ext
16715 echo "$as_me:16715: result: $sigact_bad" >&5
16716 echo "${ECHO_T}$sigact_bad" >&6
16717 fi
16718
16719 echo "$as_me:16719: checking if nanosleep really works" >&5
16720 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16721 if test "${cf_cv_func_nanosleep+set}" = set; then
16722   echo $ECHO_N "(cached) $ECHO_C" >&6
16723 else
16724
16725 if test "$cross_compiling" = yes; then
16726   cf_cv_func_nanosleep=unknown
16727 else
16728   cat >conftest.$ac_ext <<_ACEOF
16729 #line 16729 "configure"
16730 #include "confdefs.h"
16731
16732 #include <stdio.h>
16733 #include <errno.h>
16734 #include <time.h>
16735
16736 #ifdef HAVE_SYS_TIME_H
16737 #include <sys/time.h>
16738 #endif
16739
16740 int main() {
16741         struct timespec ts1, ts2;
16742         int code;
16743         ts1.tv_sec  = 0;
16744         ts1.tv_nsec = 750000000;
16745         ts2.tv_sec  = 0;
16746         ts2.tv_nsec = 0;
16747         errno = 0;
16748         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16749         ${cf_cv_main_return:-return}(code != 0);
16750 }
16751
16752 _ACEOF
16753 rm -f conftest$ac_exeext
16754 if { (eval echo "$as_me:16754: \"$ac_link\"") >&5
16755   (eval $ac_link) 2>&5
16756   ac_status=$?
16757   echo "$as_me:16757: \$? = $ac_status" >&5
16758   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16759   { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760   (eval $ac_try) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); }; }; then
16764   cf_cv_func_nanosleep=yes
16765 else
16766   echo "$as_me: program exited with status $ac_status" >&5
16767 echo "$as_me: failed program was:" >&5
16768 cat conftest.$ac_ext >&5
16769 cf_cv_func_nanosleep=no
16770 fi
16771 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16772 fi
16773 fi
16774 echo "$as_me:16774: result: $cf_cv_func_nanosleep" >&5
16775 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16776
16777 test "$cf_cv_func_nanosleep" = "yes" &&
16778 cat >>confdefs.h <<\EOF
16779 #define HAVE_NANOSLEEP 1
16780 EOF
16781
16782 for ac_header in \
16783 termio.h \
16784 termios.h \
16785 unistd.h \
16786
16787 do
16788 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16789 echo "$as_me:16789: checking for $ac_header" >&5
16790 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16792   echo $ECHO_N "(cached) $ECHO_C" >&6
16793 else
16794   cat >conftest.$ac_ext <<_ACEOF
16795 #line 16795 "configure"
16796 #include "confdefs.h"
16797 #include <$ac_header>
16798 _ACEOF
16799 if { (eval echo "$as_me:16799: \"$ac_cpp conftest.$ac_ext\"") >&5
16800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16801   ac_status=$?
16802   egrep -v '^ *\+' conftest.er1 >conftest.err
16803   rm -f conftest.er1
16804   cat conftest.err >&5
16805   echo "$as_me:16805: \$? = $ac_status" >&5
16806   (exit $ac_status); } >/dev/null; then
16807   if test -s conftest.err; then
16808     ac_cpp_err=$ac_c_preproc_warn_flag
16809   else
16810     ac_cpp_err=
16811   fi
16812 else
16813   ac_cpp_err=yes
16814 fi
16815 if test -z "$ac_cpp_err"; then
16816   eval "$as_ac_Header=yes"
16817 else
16818   echo "$as_me: failed program was:" >&5
16819   cat conftest.$ac_ext >&5
16820   eval "$as_ac_Header=no"
16821 fi
16822 rm -f conftest.err conftest.$ac_ext
16823 fi
16824 echo "$as_me:16824: result: `eval echo '${'$as_ac_Header'}'`" >&5
16825 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16826 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16827   cat >>confdefs.h <<EOF
16828 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16829 EOF
16830
16831 fi
16832 done
16833
16834 if test "$ISC" = yes ; then
16835
16836 for ac_header in sys/termio.h
16837 do
16838 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16839 echo "$as_me:16839: checking for $ac_header" >&5
16840 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16842   echo $ECHO_N "(cached) $ECHO_C" >&6
16843 else
16844   cat >conftest.$ac_ext <<_ACEOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847 #include <$ac_header>
16848 _ACEOF
16849 if { (eval echo "$as_me:16849: \"$ac_cpp conftest.$ac_ext\"") >&5
16850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16851   ac_status=$?
16852   egrep -v '^ *\+' conftest.er1 >conftest.err
16853   rm -f conftest.er1
16854   cat conftest.err >&5
16855   echo "$as_me:16855: \$? = $ac_status" >&5
16856   (exit $ac_status); } >/dev/null; then
16857   if test -s conftest.err; then
16858     ac_cpp_err=$ac_c_preproc_warn_flag
16859   else
16860     ac_cpp_err=
16861   fi
16862 else
16863   ac_cpp_err=yes
16864 fi
16865 if test -z "$ac_cpp_err"; then
16866   eval "$as_ac_Header=yes"
16867 else
16868   echo "$as_me: failed program was:" >&5
16869   cat conftest.$ac_ext >&5
16870   eval "$as_ac_Header=no"
16871 fi
16872 rm -f conftest.err conftest.$ac_ext
16873 fi
16874 echo "$as_me:16874: result: `eval echo '${'$as_ac_Header'}'`" >&5
16875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16876 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16877   cat >>confdefs.h <<EOF
16878 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16879 EOF
16880
16881 fi
16882 done
16883
16884 fi
16885 if test "$ac_cv_header_termios_h" = yes ; then
16886         case "$CFLAGS $CPPFLAGS" in
16887         (*-D_POSIX_SOURCE*)
16888                 termios_bad=dunno ;;
16889         (*)     termios_bad=maybe ;;
16890         esac
16891         if test "$termios_bad" = maybe ; then
16892         echo "$as_me:16892: checking whether termios.h needs _POSIX_SOURCE" >&5
16893 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16894         cat >conftest.$ac_ext <<_ACEOF
16895 #line 16895 "configure"
16896 #include "confdefs.h"
16897 #include <termios.h>
16898 int
16899 main ()
16900 {
16901 struct termios foo; int x = foo.c_iflag
16902   ;
16903   return 0;
16904 }
16905 _ACEOF
16906 rm -f conftest.$ac_objext
16907 if { (eval echo "$as_me:16907: \"$ac_compile\"") >&5
16908   (eval $ac_compile) 2>&5
16909   ac_status=$?
16910   echo "$as_me:16910: \$? = $ac_status" >&5
16911   (exit $ac_status); } &&
16912          { ac_try='test -s conftest.$ac_objext'
16913   { (eval echo "$as_me:16913: \"$ac_try\"") >&5
16914   (eval $ac_try) 2>&5
16915   ac_status=$?
16916   echo "$as_me:16916: \$? = $ac_status" >&5
16917   (exit $ac_status); }; }; then
16918   termios_bad=no
16919 else
16920   echo "$as_me: failed program was:" >&5
16921 cat conftest.$ac_ext >&5
16922
16923                 cat >conftest.$ac_ext <<_ACEOF
16924 #line 16924 "configure"
16925 #include "confdefs.h"
16926
16927 #define _POSIX_SOURCE
16928 #include <termios.h>
16929 int
16930 main ()
16931 {
16932 struct termios foo; int x = foo.c_iflag
16933   ;
16934   return 0;
16935 }
16936 _ACEOF
16937 rm -f conftest.$ac_objext
16938 if { (eval echo "$as_me:16938: \"$ac_compile\"") >&5
16939   (eval $ac_compile) 2>&5
16940   ac_status=$?
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit $ac_status); } &&
16943          { ac_try='test -s conftest.$ac_objext'
16944   { (eval echo "$as_me:16944: \"$ac_try\"") >&5
16945   (eval $ac_try) 2>&5
16946   ac_status=$?
16947   echo "$as_me:16947: \$? = $ac_status" >&5
16948   (exit $ac_status); }; }; then
16949   termios_bad=unknown
16950 else
16951   echo "$as_me: failed program was:" >&5
16952 cat conftest.$ac_ext >&5
16953 termios_bad=yes
16954 cat >>confdefs.h <<\EOF
16955 #define _POSIX_SOURCE 1
16956 EOF
16957
16958 fi
16959 rm -f conftest.$ac_objext conftest.$ac_ext
16960
16961 fi
16962 rm -f conftest.$ac_objext conftest.$ac_ext
16963         echo "$as_me:16963: result: $termios_bad" >&5
16964 echo "${ECHO_T}$termios_bad" >&6
16965         fi
16966 fi
16967
16968 echo "$as_me:16968: checking for tcgetattr" >&5
16969 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16970 if test "${cf_cv_have_tcgetattr+set}" = set; then
16971   echo $ECHO_N "(cached) $ECHO_C" >&6
16972 else
16973
16974 cat >conftest.$ac_ext <<_ACEOF
16975 #line 16975 "configure"
16976 #include "confdefs.h"
16977
16978 #include <sys/types.h>
16979 #ifdef HAVE_UNISTD_H
16980 #include <unistd.h>
16981 #endif
16982 #ifdef HAVE_TERMIOS_H
16983 #include <termios.h>
16984 #define TTY struct termios
16985 #else
16986 #ifdef HAVE_TERMIO_H
16987 #include <termio.h>
16988 #define TTY struct termio
16989 #endif
16990 #endif
16991
16992 int
16993 main ()
16994 {
16995
16996 TTY foo;
16997 tcgetattr(1, &foo);
16998   ;
16999   return 0;
17000 }
17001 _ACEOF
17002 rm -f conftest.$ac_objext conftest$ac_exeext
17003 if { (eval echo "$as_me:17003: \"$ac_link\"") >&5
17004   (eval $ac_link) 2>&5
17005   ac_status=$?
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); } &&
17008          { ac_try='test -s conftest$ac_exeext'
17009   { (eval echo "$as_me:17009: \"$ac_try\"") >&5
17010   (eval $ac_try) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); }; }; then
17014   cf_cv_have_tcgetattr=yes
17015 else
17016   echo "$as_me: failed program was:" >&5
17017 cat conftest.$ac_ext >&5
17018 cf_cv_have_tcgetattr=no
17019 fi
17020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17021 fi
17022 echo "$as_me:17022: result: $cf_cv_have_tcgetattr" >&5
17023 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17024 test "$cf_cv_have_tcgetattr" = yes &&
17025 cat >>confdefs.h <<\EOF
17026 #define HAVE_TCGETATTR 1
17027 EOF
17028
17029 echo "$as_me:17029: checking for vsscanf function or workaround" >&5
17030 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17031 if test "${cf_cv_func_vsscanf+set}" = set; then
17032   echo $ECHO_N "(cached) $ECHO_C" >&6
17033 else
17034
17035 cat >conftest.$ac_ext <<_ACEOF
17036 #line 17036 "configure"
17037 #include "confdefs.h"
17038
17039 #include <stdarg.h>
17040 #include <stdio.h>
17041 int
17042 main ()
17043 {
17044
17045         va_list ap;
17046         vsscanf("from", "%d", ap)
17047   ;
17048   return 0;
17049 }
17050 _ACEOF
17051 rm -f conftest.$ac_objext conftest$ac_exeext
17052 if { (eval echo "$as_me:17052: \"$ac_link\"") >&5
17053   (eval $ac_link) 2>&5
17054   ac_status=$?
17055   echo "$as_me:17055: \$? = $ac_status" >&5
17056   (exit $ac_status); } &&
17057          { ac_try='test -s conftest$ac_exeext'
17058   { (eval echo "$as_me:17058: \"$ac_try\"") >&5
17059   (eval $ac_try) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); }; }; then
17063   cf_cv_func_vsscanf=vsscanf
17064 else
17065   echo "$as_me: failed program was:" >&5
17066 cat conftest.$ac_ext >&5
17067
17068 cat >conftest.$ac_ext <<_ACEOF
17069 #line 17069 "configure"
17070 #include "confdefs.h"
17071
17072 #include <stdarg.h>
17073 #include <stdio.h>
17074 int
17075 main ()
17076 {
17077
17078         FILE strbuf;
17079         char *str = "from";
17080
17081         strbuf._flag = _IOREAD;
17082         strbuf._ptr = strbuf._base = (unsigned char *) str;
17083         strbuf._cnt = strlen(str);
17084         strbuf._file = _NFILE;
17085         return (vfscanf(&strbuf, "%d", ap))
17086   ;
17087   return 0;
17088 }
17089 _ACEOF
17090 rm -f conftest.$ac_objext conftest$ac_exeext
17091 if { (eval echo "$as_me:17091: \"$ac_link\"") >&5
17092   (eval $ac_link) 2>&5
17093   ac_status=$?
17094   echo "$as_me:17094: \$? = $ac_status" >&5
17095   (exit $ac_status); } &&
17096          { ac_try='test -s conftest$ac_exeext'
17097   { (eval echo "$as_me:17097: \"$ac_try\"") >&5
17098   (eval $ac_try) 2>&5
17099   ac_status=$?
17100   echo "$as_me:17100: \$? = $ac_status" >&5
17101   (exit $ac_status); }; }; then
17102   cf_cv_func_vsscanf=vfscanf
17103 else
17104   echo "$as_me: failed program was:" >&5
17105 cat conftest.$ac_ext >&5
17106
17107 cat >conftest.$ac_ext <<_ACEOF
17108 #line 17108 "configure"
17109 #include "confdefs.h"
17110
17111 #include <stdarg.h>
17112 #include <stdio.h>
17113 int
17114 main ()
17115 {
17116
17117         FILE strbuf;
17118         char *str = "from";
17119
17120         strbuf._flag = _IOREAD;
17121         strbuf._ptr = strbuf._base = (unsigned char *) str;
17122         strbuf._cnt = strlen(str);
17123         strbuf._file = _NFILE;
17124         return (_doscan(&strbuf, "%d", ap))
17125   ;
17126   return 0;
17127 }
17128 _ACEOF
17129 rm -f conftest.$ac_objext conftest$ac_exeext
17130 if { (eval echo "$as_me:17130: \"$ac_link\"") >&5
17131   (eval $ac_link) 2>&5
17132   ac_status=$?
17133   echo "$as_me:17133: \$? = $ac_status" >&5
17134   (exit $ac_status); } &&
17135          { ac_try='test -s conftest$ac_exeext'
17136   { (eval echo "$as_me:17136: \"$ac_try\"") >&5
17137   (eval $ac_try) 2>&5
17138   ac_status=$?
17139   echo "$as_me:17139: \$? = $ac_status" >&5
17140   (exit $ac_status); }; }; then
17141   cf_cv_func_vsscanf=_doscan
17142 else
17143   echo "$as_me: failed program was:" >&5
17144 cat conftest.$ac_ext >&5
17145
17146 cf_cv_func_vsscanf=no
17147 fi
17148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17149 fi
17150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17151 fi
17152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17153 fi
17154 echo "$as_me:17154: result: $cf_cv_func_vsscanf" >&5
17155 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17156
17157 case $cf_cv_func_vsscanf in
17158 (vsscanf)
17159 cat >>confdefs.h <<\EOF
17160 #define HAVE_VSSCANF 1
17161 EOF
17162 ;;
17163 (vfscanf)
17164 cat >>confdefs.h <<\EOF
17165 #define HAVE_VFSCANF 1
17166 EOF
17167 ;;
17168 (_doscan)
17169 cat >>confdefs.h <<\EOF
17170 #define HAVE__DOSCAN 1
17171 EOF
17172 ;;
17173 esac
17174
17175 echo "$as_me:17175: checking for working mkstemp" >&5
17176 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17177 if test "${cf_cv_func_mkstemp+set}" = set; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180
17181 rm -rf conftest*
17182 if test "$cross_compiling" = yes; then
17183   cf_cv_func_mkstemp=maybe
17184 else
17185   cat >conftest.$ac_ext <<_ACEOF
17186 #line 17186 "configure"
17187 #include "confdefs.h"
17188
17189 #include <sys/types.h>
17190 #include <stdlib.h>
17191 #include <stdio.h>
17192 #include <string.h>
17193 #include <sys/stat.h>
17194 int main()
17195 {
17196         char *tmpl = "conftestXXXXXX";
17197         char name[2][80];
17198         int n;
17199         int result = 0;
17200         int fd;
17201         struct stat sb;
17202
17203         umask(077);
17204         for (n = 0; n < 2; ++n) {
17205                 strcpy(name[n], tmpl);
17206                 if ((fd = mkstemp(name[n])) >= 0) {
17207                         if (!strcmp(name[n], tmpl)
17208                          || stat(name[n], &sb) != 0
17209                          || (sb.st_mode & S_IFMT) != S_IFREG
17210                          || (sb.st_mode & 077) != 0) {
17211                                 result = 1;
17212                         }
17213                         close(fd);
17214                 }
17215         }
17216         if (result == 0
17217          && !strcmp(name[0], name[1]))
17218                 result = 1;
17219         ${cf_cv_main_return:-return}(result);
17220 }
17221
17222 _ACEOF
17223 rm -f conftest$ac_exeext
17224 if { (eval echo "$as_me:17224: \"$ac_link\"") >&5
17225   (eval $ac_link) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17229   { (eval echo "$as_me:17229: \"$ac_try\"") >&5
17230   (eval $ac_try) 2>&5
17231   ac_status=$?
17232   echo "$as_me:17232: \$? = $ac_status" >&5
17233   (exit $ac_status); }; }; then
17234   cf_cv_func_mkstemp=yes
17235
17236 else
17237   echo "$as_me: program exited with status $ac_status" >&5
17238 echo "$as_me: failed program was:" >&5
17239 cat conftest.$ac_ext >&5
17240 cf_cv_func_mkstemp=no
17241
17242 fi
17243 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17244 fi
17245
17246 fi
17247 echo "$as_me:17247: result: $cf_cv_func_mkstemp" >&5
17248 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17249 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17250         echo "$as_me:17250: checking for mkstemp" >&5
17251 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17252 if test "${ac_cv_func_mkstemp+set}" = set; then
17253   echo $ECHO_N "(cached) $ECHO_C" >&6
17254 else
17255   cat >conftest.$ac_ext <<_ACEOF
17256 #line 17256 "configure"
17257 #include "confdefs.h"
17258 /* System header to define __stub macros and hopefully few prototypes,
17259     which can conflict with char mkstemp (); below.  */
17260 #include <assert.h>
17261 /* Override any gcc2 internal prototype to avoid an error.  */
17262 #ifdef __cplusplus
17263 extern "C"
17264 #endif
17265 /* We use char because int might match the return type of a gcc2
17266    builtin and then its argument prototype would still apply.  */
17267 char mkstemp ();
17268 char (*f) ();
17269
17270 int
17271 main ()
17272 {
17273 /* The GNU C library defines this for functions which it implements
17274     to always fail with ENOSYS.  Some functions are actually named
17275     something starting with __ and the normal name is an alias.  */
17276 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17277 choke me
17278 #else
17279 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17280 #endif
17281
17282   ;
17283   return 0;
17284 }
17285 _ACEOF
17286 rm -f conftest.$ac_objext conftest$ac_exeext
17287 if { (eval echo "$as_me:17287: \"$ac_link\"") >&5
17288   (eval $ac_link) 2>&5
17289   ac_status=$?
17290   echo "$as_me:17290: \$? = $ac_status" >&5
17291   (exit $ac_status); } &&
17292          { ac_try='test -s conftest$ac_exeext'
17293   { (eval echo "$as_me:17293: \"$ac_try\"") >&5
17294   (eval $ac_try) 2>&5
17295   ac_status=$?
17296   echo "$as_me:17296: \$? = $ac_status" >&5
17297   (exit $ac_status); }; }; then
17298   ac_cv_func_mkstemp=yes
17299 else
17300   echo "$as_me: failed program was:" >&5
17301 cat conftest.$ac_ext >&5
17302 ac_cv_func_mkstemp=no
17303 fi
17304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17305 fi
17306 echo "$as_me:17306: result: $ac_cv_func_mkstemp" >&5
17307 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17308
17309 fi
17310 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17311
17312 cat >>confdefs.h <<\EOF
17313 #define HAVE_MKSTEMP 1
17314 EOF
17315
17316 fi
17317
17318 # setup for prototype of fallback for vsscanf()
17319
17320 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17321         HAVE_VSSCANF=1
17322 else
17323         HAVE_VSSCANF=0
17324 fi
17325
17326 if test "x$cross_compiling" = xyes ; then
17327         { echo "$as_me:17327: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17328 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17329 else
17330         echo "$as_me:17330: checking whether setvbuf arguments are reversed" >&5
17331 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17332 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17333   echo $ECHO_N "(cached) $ECHO_C" >&6
17334 else
17335   if test "$cross_compiling" = yes; then
17336   { { echo "$as_me:17336: error: cannot run test program while cross compiling" >&5
17337 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17338    { (exit 1); exit 1; }; }
17339 else
17340   cat >conftest.$ac_ext <<_ACEOF
17341 #line 17341 "configure"
17342 #include "confdefs.h"
17343 #include <stdio.h>
17344 /* If setvbuf has the reversed format, exit 0. */
17345 int
17346 main ()
17347 {
17348   /* This call has the arguments reversed.
17349      A reversed system may check and see that the address of main
17350      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17351   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17352     $ac_main_return(1);
17353   putc('\r', stdout);
17354   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17355 }
17356 _ACEOF
17357 rm -f conftest$ac_exeext
17358 if { (eval echo "$as_me:17358: \"$ac_link\"") >&5
17359   (eval $ac_link) 2>&5
17360   ac_status=$?
17361   echo "$as_me:17361: \$? = $ac_status" >&5
17362   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17363   { (eval echo "$as_me:17363: \"$ac_try\"") >&5
17364   (eval $ac_try) 2>&5
17365   ac_status=$?
17366   echo "$as_me:17366: \$? = $ac_status" >&5
17367   (exit $ac_status); }; }; then
17368   ac_cv_func_setvbuf_reversed=yes
17369 else
17370   echo "$as_me: program exited with status $ac_status" >&5
17371 echo "$as_me: failed program was:" >&5
17372 cat conftest.$ac_ext >&5
17373 ac_cv_func_setvbuf_reversed=no
17374 fi
17375 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17376 fi
17377 rm -f core core.* *.core
17378 fi
17379 echo "$as_me:17379: result: $ac_cv_func_setvbuf_reversed" >&5
17380 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17381 if test $ac_cv_func_setvbuf_reversed = yes; then
17382
17383 cat >>confdefs.h <<\EOF
17384 #define SETVBUF_REVERSED 1
17385 EOF
17386
17387 fi
17388
17389 fi
17390 echo "$as_me:17390: checking for intptr_t" >&5
17391 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17392 if test "${ac_cv_type_intptr_t+set}" = set; then
17393   echo $ECHO_N "(cached) $ECHO_C" >&6
17394 else
17395   cat >conftest.$ac_ext <<_ACEOF
17396 #line 17396 "configure"
17397 #include "confdefs.h"
17398 $ac_includes_default
17399 int
17400 main ()
17401 {
17402 if ((intptr_t *) 0)
17403   return 0;
17404 if (sizeof (intptr_t))
17405   return 0;
17406   ;
17407   return 0;
17408 }
17409 _ACEOF
17410 rm -f conftest.$ac_objext
17411 if { (eval echo "$as_me:17411: \"$ac_compile\"") >&5
17412   (eval $ac_compile) 2>&5
17413   ac_status=$?
17414   echo "$as_me:17414: \$? = $ac_status" >&5
17415   (exit $ac_status); } &&
17416          { ac_try='test -s conftest.$ac_objext'
17417   { (eval echo "$as_me:17417: \"$ac_try\"") >&5
17418   (eval $ac_try) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit $ac_status); }; }; then
17422   ac_cv_type_intptr_t=yes
17423 else
17424   echo "$as_me: failed program was:" >&5
17425 cat conftest.$ac_ext >&5
17426 ac_cv_type_intptr_t=no
17427 fi
17428 rm -f conftest.$ac_objext conftest.$ac_ext
17429 fi
17430 echo "$as_me:17430: result: $ac_cv_type_intptr_t" >&5
17431 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17432 if test $ac_cv_type_intptr_t = yes; then
17433   :
17434 else
17435
17436 cat >>confdefs.h <<EOF
17437 #define intptr_t long
17438 EOF
17439
17440 fi
17441
17442 echo "$as_me:17442: checking for ssize_t" >&5
17443 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17444 if test "${ac_cv_type_ssize_t+set}" = set; then
17445   echo $ECHO_N "(cached) $ECHO_C" >&6
17446 else
17447   cat >conftest.$ac_ext <<_ACEOF
17448 #line 17448 "configure"
17449 #include "confdefs.h"
17450 $ac_includes_default
17451 int
17452 main ()
17453 {
17454 if ((ssize_t *) 0)
17455   return 0;
17456 if (sizeof (ssize_t))
17457   return 0;
17458   ;
17459   return 0;
17460 }
17461 _ACEOF
17462 rm -f conftest.$ac_objext
17463 if { (eval echo "$as_me:17463: \"$ac_compile\"") >&5
17464   (eval $ac_compile) 2>&5
17465   ac_status=$?
17466   echo "$as_me:17466: \$? = $ac_status" >&5
17467   (exit $ac_status); } &&
17468          { ac_try='test -s conftest.$ac_objext'
17469   { (eval echo "$as_me:17469: \"$ac_try\"") >&5
17470   (eval $ac_try) 2>&5
17471   ac_status=$?
17472   echo "$as_me:17472: \$? = $ac_status" >&5
17473   (exit $ac_status); }; }; then
17474   ac_cv_type_ssize_t=yes
17475 else
17476   echo "$as_me: failed program was:" >&5
17477 cat conftest.$ac_ext >&5
17478 ac_cv_type_ssize_t=no
17479 fi
17480 rm -f conftest.$ac_objext conftest.$ac_ext
17481 fi
17482 echo "$as_me:17482: result: $ac_cv_type_ssize_t" >&5
17483 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17484 if test $ac_cv_type_ssize_t = yes; then
17485   :
17486 else
17487
17488 cat >>confdefs.h <<EOF
17489 #define ssize_t int
17490 EOF
17491
17492 fi
17493
17494 echo "$as_me:17494: checking for type sigaction_t" >&5
17495 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17496 if test "${cf_cv_type_sigaction+set}" = set; then
17497   echo $ECHO_N "(cached) $ECHO_C" >&6
17498 else
17499
17500         cat >conftest.$ac_ext <<_ACEOF
17501 #line 17501 "configure"
17502 #include "confdefs.h"
17503
17504 #include <signal.h>
17505 int
17506 main ()
17507 {
17508 sigaction_t x
17509   ;
17510   return 0;
17511 }
17512 _ACEOF
17513 rm -f conftest.$ac_objext
17514 if { (eval echo "$as_me:17514: \"$ac_compile\"") >&5
17515   (eval $ac_compile) 2>&5
17516   ac_status=$?
17517   echo "$as_me:17517: \$? = $ac_status" >&5
17518   (exit $ac_status); } &&
17519          { ac_try='test -s conftest.$ac_objext'
17520   { (eval echo "$as_me:17520: \"$ac_try\"") >&5
17521   (eval $ac_try) 2>&5
17522   ac_status=$?
17523   echo "$as_me:17523: \$? = $ac_status" >&5
17524   (exit $ac_status); }; }; then
17525   cf_cv_type_sigaction=yes
17526 else
17527   echo "$as_me: failed program was:" >&5
17528 cat conftest.$ac_ext >&5
17529 cf_cv_type_sigaction=no
17530 fi
17531 rm -f conftest.$ac_objext conftest.$ac_ext
17532 fi
17533
17534 echo "$as_me:17534: result: $cf_cv_type_sigaction" >&5
17535 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17536 test "$cf_cv_type_sigaction" = yes &&
17537 cat >>confdefs.h <<\EOF
17538 #define HAVE_TYPE_SIGACTION 1
17539 EOF
17540
17541 echo "$as_me:17541: checking declaration of size-change" >&5
17542 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17543 if test "${cf_cv_sizechange+set}" = set; then
17544   echo $ECHO_N "(cached) $ECHO_C" >&6
17545 else
17546
17547         cf_cv_sizechange=unknown
17548         cf_save_CPPFLAGS="$CPPFLAGS"
17549
17550 for cf_opts in "" "NEED_PTEM_H"
17551 do
17552
17553         CPPFLAGS="$cf_save_CPPFLAGS"
17554         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17555         cat >conftest.$ac_ext <<_ACEOF
17556 #line 17556 "configure"
17557 #include "confdefs.h"
17558 #include <sys/types.h>
17559 #ifdef HAVE_TERMIOS_H
17560 #include <termios.h>
17561 #else
17562 #ifdef HAVE_TERMIO_H
17563 #include <termio.h>
17564 #endif
17565 #endif
17566 #ifdef NEED_PTEM_H
17567 /* This is a workaround for SCO:  they neglected to define struct winsize in
17568  * termios.h -- it's only in termio.h and ptem.h
17569  */
17570 #include        <sys/stream.h>
17571 #include        <sys/ptem.h>
17572 #endif
17573 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17574 #include <sys/ioctl.h>
17575 #endif
17576
17577 int
17578 main ()
17579 {
17580
17581 #ifdef TIOCGSIZE
17582         struct ttysize win;     /* FIXME: what system is this? */
17583         int y = win.ts_lines;
17584         int x = win.ts_cols;
17585 #else
17586 #ifdef TIOCGWINSZ
17587         struct winsize win;
17588         int y = win.ws_row;
17589         int x = win.ws_col;
17590 #else
17591         no TIOCGSIZE or TIOCGWINSZ
17592 #endif /* TIOCGWINSZ */
17593 #endif /* TIOCGSIZE */
17594
17595   ;
17596   return 0;
17597 }
17598 _ACEOF
17599 rm -f conftest.$ac_objext
17600 if { (eval echo "$as_me:17600: \"$ac_compile\"") >&5
17601   (eval $ac_compile) 2>&5
17602   ac_status=$?
17603   echo "$as_me:17603: \$? = $ac_status" >&5
17604   (exit $ac_status); } &&
17605          { ac_try='test -s conftest.$ac_objext'
17606   { (eval echo "$as_me:17606: \"$ac_try\"") >&5
17607   (eval $ac_try) 2>&5
17608   ac_status=$?
17609   echo "$as_me:17609: \$? = $ac_status" >&5
17610   (exit $ac_status); }; }; then
17611   cf_cv_sizechange=yes
17612 else
17613   echo "$as_me: failed program was:" >&5
17614 cat conftest.$ac_ext >&5
17615 cf_cv_sizechange=no
17616 fi
17617 rm -f conftest.$ac_objext conftest.$ac_ext
17618
17619         CPPFLAGS="$cf_save_CPPFLAGS"
17620         if test "$cf_cv_sizechange" = yes ; then
17621                 echo "size-change succeeded ($cf_opts)" >&5
17622                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17623                 break
17624         fi
17625 done
17626
17627 fi
17628 echo "$as_me:17628: result: $cf_cv_sizechange" >&5
17629 echo "${ECHO_T}$cf_cv_sizechange" >&6
17630 if test "$cf_cv_sizechange" != no ; then
17631
17632 cat >>confdefs.h <<\EOF
17633 #define HAVE_SIZECHANGE 1
17634 EOF
17635
17636         case $cf_cv_sizechange in
17637         (NEED*)
17638                 cat >>confdefs.h <<EOF
17639 #define $cf_cv_sizechange  1
17640 EOF
17641
17642                 ;;
17643         esac
17644 fi
17645
17646 echo "$as_me:17646: checking for memmove" >&5
17647 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17648 if test "${ac_cv_func_memmove+set}" = set; then
17649   echo $ECHO_N "(cached) $ECHO_C" >&6
17650 else
17651   cat >conftest.$ac_ext <<_ACEOF
17652 #line 17652 "configure"
17653 #include "confdefs.h"
17654 /* System header to define __stub macros and hopefully few prototypes,
17655     which can conflict with char memmove (); below.  */
17656 #include <assert.h>
17657 /* Override any gcc2 internal prototype to avoid an error.  */
17658 #ifdef __cplusplus
17659 extern "C"
17660 #endif
17661 /* We use char because int might match the return type of a gcc2
17662    builtin and then its argument prototype would still apply.  */
17663 char memmove ();
17664 char (*f) ();
17665
17666 int
17667 main ()
17668 {
17669 /* The GNU C library defines this for functions which it implements
17670     to always fail with ENOSYS.  Some functions are actually named
17671     something starting with __ and the normal name is an alias.  */
17672 #if defined (__stub_memmove) || defined (__stub___memmove)
17673 choke me
17674 #else
17675 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17676 #endif
17677
17678   ;
17679   return 0;
17680 }
17681 _ACEOF
17682 rm -f conftest.$ac_objext conftest$ac_exeext
17683 if { (eval echo "$as_me:17683: \"$ac_link\"") >&5
17684   (eval $ac_link) 2>&5
17685   ac_status=$?
17686   echo "$as_me:17686: \$? = $ac_status" >&5
17687   (exit $ac_status); } &&
17688          { ac_try='test -s conftest$ac_exeext'
17689   { (eval echo "$as_me:17689: \"$ac_try\"") >&5
17690   (eval $ac_try) 2>&5
17691   ac_status=$?
17692   echo "$as_me:17692: \$? = $ac_status" >&5
17693   (exit $ac_status); }; }; then
17694   ac_cv_func_memmove=yes
17695 else
17696   echo "$as_me: failed program was:" >&5
17697 cat conftest.$ac_ext >&5
17698 ac_cv_func_memmove=no
17699 fi
17700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17701 fi
17702 echo "$as_me:17702: result: $ac_cv_func_memmove" >&5
17703 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17704 if test $ac_cv_func_memmove = yes; then
17705   :
17706 else
17707
17708 echo "$as_me:17708: checking for bcopy" >&5
17709 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17710 if test "${ac_cv_func_bcopy+set}" = set; then
17711   echo $ECHO_N "(cached) $ECHO_C" >&6
17712 else
17713   cat >conftest.$ac_ext <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17716 /* System header to define __stub macros and hopefully few prototypes,
17717     which can conflict with char bcopy (); below.  */
17718 #include <assert.h>
17719 /* Override any gcc2 internal prototype to avoid an error.  */
17720 #ifdef __cplusplus
17721 extern "C"
17722 #endif
17723 /* We use char because int might match the return type of a gcc2
17724    builtin and then its argument prototype would still apply.  */
17725 char bcopy ();
17726 char (*f) ();
17727
17728 int
17729 main ()
17730 {
17731 /* The GNU C library defines this for functions which it implements
17732     to always fail with ENOSYS.  Some functions are actually named
17733     something starting with __ and the normal name is an alias.  */
17734 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17735 choke me
17736 #else
17737 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17738 #endif
17739
17740   ;
17741   return 0;
17742 }
17743 _ACEOF
17744 rm -f conftest.$ac_objext conftest$ac_exeext
17745 if { (eval echo "$as_me:17745: \"$ac_link\"") >&5
17746   (eval $ac_link) 2>&5
17747   ac_status=$?
17748   echo "$as_me:17748: \$? = $ac_status" >&5
17749   (exit $ac_status); } &&
17750          { ac_try='test -s conftest$ac_exeext'
17751   { (eval echo "$as_me:17751: \"$ac_try\"") >&5
17752   (eval $ac_try) 2>&5
17753   ac_status=$?
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); }; }; then
17756   ac_cv_func_bcopy=yes
17757 else
17758   echo "$as_me: failed program was:" >&5
17759 cat conftest.$ac_ext >&5
17760 ac_cv_func_bcopy=no
17761 fi
17762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17763 fi
17764 echo "$as_me:17764: result: $ac_cv_func_bcopy" >&5
17765 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17766 if test $ac_cv_func_bcopy = yes; then
17767
17768         echo "$as_me:17768: checking if bcopy does overlapping moves" >&5
17769 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17770 if test "${cf_cv_good_bcopy+set}" = set; then
17771   echo $ECHO_N "(cached) $ECHO_C" >&6
17772 else
17773
17774                 if test "$cross_compiling" = yes; then
17775   cf_cv_good_bcopy=unknown
17776 else
17777   cat >conftest.$ac_ext <<_ACEOF
17778 #line 17778 "configure"
17779 #include "confdefs.h"
17780
17781 int main() {
17782         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17783         char temp[40];
17784         bcopy(data, temp, sizeof(data));
17785         bcopy(temp+10, temp, 15);
17786         bcopy(temp+5, temp+15, 10);
17787         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17788 }
17789
17790 _ACEOF
17791 rm -f conftest$ac_exeext
17792 if { (eval echo "$as_me:17792: \"$ac_link\"") >&5
17793   (eval $ac_link) 2>&5
17794   ac_status=$?
17795   echo "$as_me:17795: \$? = $ac_status" >&5
17796   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17797   { (eval echo "$as_me:17797: \"$ac_try\"") >&5
17798   (eval $ac_try) 2>&5
17799   ac_status=$?
17800   echo "$as_me:17800: \$? = $ac_status" >&5
17801   (exit $ac_status); }; }; then
17802   cf_cv_good_bcopy=yes
17803 else
17804   echo "$as_me: program exited with status $ac_status" >&5
17805 echo "$as_me: failed program was:" >&5
17806 cat conftest.$ac_ext >&5
17807 cf_cv_good_bcopy=no
17808 fi
17809 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17810 fi
17811
17812 fi
17813 echo "$as_me:17813: result: $cf_cv_good_bcopy" >&5
17814 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17815
17816 else
17817   cf_cv_good_bcopy=no
17818 fi
17819
17820         if test "$cf_cv_good_bcopy" = yes ; then
17821
17822 cat >>confdefs.h <<\EOF
17823 #define USE_OK_BCOPY 1
17824 EOF
17825
17826         else
17827
17828 cat >>confdefs.h <<\EOF
17829 #define USE_MY_MEMMOVE 1
17830 EOF
17831
17832         fi
17833
17834 fi
17835
17836 echo "$as_me:17836: checking if poll really works" >&5
17837 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17838 if test "${cf_cv_working_poll+set}" = set; then
17839   echo $ECHO_N "(cached) $ECHO_C" >&6
17840 else
17841
17842 if test "$cross_compiling" = yes; then
17843   cf_cv_working_poll=unknown
17844 else
17845   cat >conftest.$ac_ext <<_ACEOF
17846 #line 17846 "configure"
17847 #include "confdefs.h"
17848
17849 #include <stdlib.h>
17850 #include <stdio.h>
17851 #include <unistd.h>
17852 #include <fcntl.h>
17853 #ifdef HAVE_POLL_H
17854 #include <poll.h>
17855 #else
17856 #include <sys/poll.h>
17857 #endif
17858 int main() {
17859         struct pollfd myfds;
17860         int ret;
17861
17862         /* check for Darwin bug with respect to "devices" */
17863         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17864         if (myfds.fd < 0)
17865                 myfds.fd = 0;
17866         myfds.events = POLLIN;
17867         myfds.revents = 0;
17868
17869         ret = poll(&myfds, 1, 100);
17870
17871         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17872                 ret = -1;
17873         } else {
17874                 int fd = 0;
17875                 if (!isatty(fd)) {
17876                         fd = open("/dev/tty", 2);       /* O_RDWR */
17877                 }
17878
17879                 if (fd >= 0) {
17880                         /* also check with standard input */
17881                         myfds.fd = fd;
17882                         myfds.events = POLLIN;
17883                         myfds.revents = 0;
17884                         ret = poll(&myfds, 1, 100);
17885                 } else {
17886                         ret = -1;
17887                 }
17888         }
17889         ${cf_cv_main_return:-return}(ret < 0);
17890 }
17891 _ACEOF
17892 rm -f conftest$ac_exeext
17893 if { (eval echo "$as_me:17893: \"$ac_link\"") >&5
17894   (eval $ac_link) 2>&5
17895   ac_status=$?
17896   echo "$as_me:17896: \$? = $ac_status" >&5
17897   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17898   { (eval echo "$as_me:17898: \"$ac_try\"") >&5
17899   (eval $ac_try) 2>&5
17900   ac_status=$?
17901   echo "$as_me:17901: \$? = $ac_status" >&5
17902   (exit $ac_status); }; }; then
17903   cf_cv_working_poll=yes
17904 else
17905   echo "$as_me: program exited with status $ac_status" >&5
17906 echo "$as_me: failed program was:" >&5
17907 cat conftest.$ac_ext >&5
17908 cf_cv_working_poll=no
17909 fi
17910 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17911 fi
17912 fi
17913 echo "$as_me:17913: result: $cf_cv_working_poll" >&5
17914 echo "${ECHO_T}$cf_cv_working_poll" >&6
17915 test "$cf_cv_working_poll" = "yes" &&
17916 cat >>confdefs.h <<\EOF
17917 #define HAVE_WORKING_POLL 1
17918 EOF
17919
17920 echo "$as_me:17920: checking for va_copy" >&5
17921 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17922 if test "${cf_cv_have_va_copy+set}" = set; then
17923   echo $ECHO_N "(cached) $ECHO_C" >&6
17924 else
17925
17926 cat >conftest.$ac_ext <<_ACEOF
17927 #line 17927 "configure"
17928 #include "confdefs.h"
17929
17930 #include <stdarg.h>
17931
17932 int
17933 main ()
17934 {
17935
17936         static va_list dst;
17937         static va_list src;
17938         va_copy(dst, src)
17939   ;
17940   return 0;
17941 }
17942 _ACEOF
17943 rm -f conftest.$ac_objext conftest$ac_exeext
17944 if { (eval echo "$as_me:17944: \"$ac_link\"") >&5
17945   (eval $ac_link) 2>&5
17946   ac_status=$?
17947   echo "$as_me:17947: \$? = $ac_status" >&5
17948   (exit $ac_status); } &&
17949          { ac_try='test -s conftest$ac_exeext'
17950   { (eval echo "$as_me:17950: \"$ac_try\"") >&5
17951   (eval $ac_try) 2>&5
17952   ac_status=$?
17953   echo "$as_me:17953: \$? = $ac_status" >&5
17954   (exit $ac_status); }; }; then
17955   cf_cv_have_va_copy=yes
17956 else
17957   echo "$as_me: failed program was:" >&5
17958 cat conftest.$ac_ext >&5
17959 cf_cv_have_va_copy=no
17960 fi
17961 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17962 fi
17963 echo "$as_me:17963: result: $cf_cv_have_va_copy" >&5
17964 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17965
17966 test "$cf_cv_have_va_copy" = yes &&
17967 cat >>confdefs.h <<\EOF
17968 #define HAVE_VA_COPY 1
17969 EOF
17970
17971 echo "$as_me:17971: checking for __va_copy" >&5
17972 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17973 if test "${cf_cv_have___va_copy+set}" = set; then
17974   echo $ECHO_N "(cached) $ECHO_C" >&6
17975 else
17976
17977 cat >conftest.$ac_ext <<_ACEOF
17978 #line 17978 "configure"
17979 #include "confdefs.h"
17980
17981 #include <stdarg.h>
17982
17983 int
17984 main ()
17985 {
17986
17987         static va_list dst;
17988         static va_list src;
17989         __va_copy(dst, src)
17990   ;
17991   return 0;
17992 }
17993 _ACEOF
17994 rm -f conftest.$ac_objext conftest$ac_exeext
17995 if { (eval echo "$as_me:17995: \"$ac_link\"") >&5
17996   (eval $ac_link) 2>&5
17997   ac_status=$?
17998   echo "$as_me:17998: \$? = $ac_status" >&5
17999   (exit $ac_status); } &&
18000          { ac_try='test -s conftest$ac_exeext'
18001   { (eval echo "$as_me:18001: \"$ac_try\"") >&5
18002   (eval $ac_try) 2>&5
18003   ac_status=$?
18004   echo "$as_me:18004: \$? = $ac_status" >&5
18005   (exit $ac_status); }; }; then
18006   cf_cv_have___va_copy=yes
18007 else
18008   echo "$as_me: failed program was:" >&5
18009 cat conftest.$ac_ext >&5
18010 cf_cv_have___va_copy=no
18011 fi
18012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18013 fi
18014 echo "$as_me:18014: result: $cf_cv_have___va_copy" >&5
18015 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18016
18017 test "$cf_cv_have___va_copy" = yes &&
18018 cat >>confdefs.h <<\EOF
18019 #define HAVE___VA_COPY 1
18020 EOF
18021
18022 echo "$as_me:18022: checking for pid_t" >&5
18023 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18024 if test "${ac_cv_type_pid_t+set}" = set; then
18025   echo $ECHO_N "(cached) $ECHO_C" >&6
18026 else
18027   cat >conftest.$ac_ext <<_ACEOF
18028 #line 18028 "configure"
18029 #include "confdefs.h"
18030 $ac_includes_default
18031 int
18032 main ()
18033 {
18034 if ((pid_t *) 0)
18035   return 0;
18036 if (sizeof (pid_t))
18037   return 0;
18038   ;
18039   return 0;
18040 }
18041 _ACEOF
18042 rm -f conftest.$ac_objext
18043 if { (eval echo "$as_me:18043: \"$ac_compile\"") >&5
18044   (eval $ac_compile) 2>&5
18045   ac_status=$?
18046   echo "$as_me:18046: \$? = $ac_status" >&5
18047   (exit $ac_status); } &&
18048          { ac_try='test -s conftest.$ac_objext'
18049   { (eval echo "$as_me:18049: \"$ac_try\"") >&5
18050   (eval $ac_try) 2>&5
18051   ac_status=$?
18052   echo "$as_me:18052: \$? = $ac_status" >&5
18053   (exit $ac_status); }; }; then
18054   ac_cv_type_pid_t=yes
18055 else
18056   echo "$as_me: failed program was:" >&5
18057 cat conftest.$ac_ext >&5
18058 ac_cv_type_pid_t=no
18059 fi
18060 rm -f conftest.$ac_objext conftest.$ac_ext
18061 fi
18062 echo "$as_me:18062: result: $ac_cv_type_pid_t" >&5
18063 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18064 if test $ac_cv_type_pid_t = yes; then
18065   :
18066 else
18067
18068 cat >>confdefs.h <<EOF
18069 #define pid_t int
18070 EOF
18071
18072 fi
18073
18074 for ac_header in unistd.h vfork.h
18075 do
18076 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18077 echo "$as_me:18077: checking for $ac_header" >&5
18078 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18079 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18080   echo $ECHO_N "(cached) $ECHO_C" >&6
18081 else
18082   cat >conftest.$ac_ext <<_ACEOF
18083 #line 18083 "configure"
18084 #include "confdefs.h"
18085 #include <$ac_header>
18086 _ACEOF
18087 if { (eval echo "$as_me:18087: \"$ac_cpp conftest.$ac_ext\"") >&5
18088   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18089   ac_status=$?
18090   egrep -v '^ *\+' conftest.er1 >conftest.err
18091   rm -f conftest.er1
18092   cat conftest.err >&5
18093   echo "$as_me:18093: \$? = $ac_status" >&5
18094   (exit $ac_status); } >/dev/null; then
18095   if test -s conftest.err; then
18096     ac_cpp_err=$ac_c_preproc_warn_flag
18097   else
18098     ac_cpp_err=
18099   fi
18100 else
18101   ac_cpp_err=yes
18102 fi
18103 if test -z "$ac_cpp_err"; then
18104   eval "$as_ac_Header=yes"
18105 else
18106   echo "$as_me: failed program was:" >&5
18107   cat conftest.$ac_ext >&5
18108   eval "$as_ac_Header=no"
18109 fi
18110 rm -f conftest.err conftest.$ac_ext
18111 fi
18112 echo "$as_me:18112: result: `eval echo '${'$as_ac_Header'}'`" >&5
18113 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18114 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18115   cat >>confdefs.h <<EOF
18116 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18117 EOF
18118
18119 fi
18120 done
18121
18122 for ac_func in fork vfork
18123 do
18124 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18125 echo "$as_me:18125: checking for $ac_func" >&5
18126 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18127 if eval "test \"\${$as_ac_var+set}\" = set"; then
18128   echo $ECHO_N "(cached) $ECHO_C" >&6
18129 else
18130   cat >conftest.$ac_ext <<_ACEOF
18131 #line 18131 "configure"
18132 #include "confdefs.h"
18133 /* System header to define __stub macros and hopefully few prototypes,
18134     which can conflict with char $ac_func (); below.  */
18135 #include <assert.h>
18136 /* Override any gcc2 internal prototype to avoid an error.  */
18137 #ifdef __cplusplus
18138 extern "C"
18139 #endif
18140 /* We use char because int might match the return type of a gcc2
18141    builtin and then its argument prototype would still apply.  */
18142 char $ac_func ();
18143 char (*f) ();
18144
18145 int
18146 main ()
18147 {
18148 /* The GNU C library defines this for functions which it implements
18149     to always fail with ENOSYS.  Some functions are actually named
18150     something starting with __ and the normal name is an alias.  */
18151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18152 choke me
18153 #else
18154 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18155 #endif
18156
18157   ;
18158   return 0;
18159 }
18160 _ACEOF
18161 rm -f conftest.$ac_objext conftest$ac_exeext
18162 if { (eval echo "$as_me:18162: \"$ac_link\"") >&5
18163   (eval $ac_link) 2>&5
18164   ac_status=$?
18165   echo "$as_me:18165: \$? = $ac_status" >&5
18166   (exit $ac_status); } &&
18167          { ac_try='test -s conftest$ac_exeext'
18168   { (eval echo "$as_me:18168: \"$ac_try\"") >&5
18169   (eval $ac_try) 2>&5
18170   ac_status=$?
18171   echo "$as_me:18171: \$? = $ac_status" >&5
18172   (exit $ac_status); }; }; then
18173   eval "$as_ac_var=yes"
18174 else
18175   echo "$as_me: failed program was:" >&5
18176 cat conftest.$ac_ext >&5
18177 eval "$as_ac_var=no"
18178 fi
18179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18180 fi
18181 echo "$as_me:18181: result: `eval echo '${'$as_ac_var'}'`" >&5
18182 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18183 if test `eval echo '${'$as_ac_var'}'` = yes; then
18184   cat >>confdefs.h <<EOF
18185 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18186 EOF
18187
18188 fi
18189 done
18190
18191 ac_cv_func_fork_works=$ac_cv_func_fork
18192 if test "x$ac_cv_func_fork" = xyes; then
18193   echo "$as_me:18193: checking for working fork" >&5
18194 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18195 if test "${ac_cv_func_fork_works+set}" = set; then
18196   echo $ECHO_N "(cached) $ECHO_C" >&6
18197 else
18198   if test "$cross_compiling" = yes; then
18199   ac_cv_func_fork_works=cross
18200 else
18201   cat >conftest.$ac_ext <<_ACEOF
18202 /* By Rüdiger Kuhlmann. */
18203       #include <sys/types.h>
18204       #if HAVE_UNISTD_H
18205       # include <unistd.h>
18206       #endif
18207       /* Some systems only have a dummy stub for fork() */
18208       int main ()
18209       {
18210         if (fork() < 0)
18211           $ac_main_return (1);
18212         $ac_main_return (0);
18213       }
18214 _ACEOF
18215 rm -f conftest$ac_exeext
18216 if { (eval echo "$as_me:18216: \"$ac_link\"") >&5
18217   (eval $ac_link) 2>&5
18218   ac_status=$?
18219   echo "$as_me:18219: \$? = $ac_status" >&5
18220   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18221   { (eval echo "$as_me:18221: \"$ac_try\"") >&5
18222   (eval $ac_try) 2>&5
18223   ac_status=$?
18224   echo "$as_me:18224: \$? = $ac_status" >&5
18225   (exit $ac_status); }; }; then
18226   ac_cv_func_fork_works=yes
18227 else
18228   echo "$as_me: program exited with status $ac_status" >&5
18229 echo "$as_me: failed program was:" >&5
18230 cat conftest.$ac_ext >&5
18231 ac_cv_func_fork_works=no
18232 fi
18233 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18234 fi
18235 fi
18236 echo "$as_me:18236: result: $ac_cv_func_fork_works" >&5
18237 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18238
18239 fi
18240 if test "x$ac_cv_func_fork_works" = xcross; then
18241   case $host in
18242     *-*-amigaos* | *-*-msdosdjgpp*)
18243       # Override, as these systems have only a dummy fork() stub
18244       ac_cv_func_fork_works=no
18245       ;;
18246     *)
18247       ac_cv_func_fork_works=yes
18248       ;;
18249   esac
18250   { echo "$as_me:18250: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18251 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18252 fi
18253 ac_cv_func_vfork_works=$ac_cv_func_vfork
18254 if test "x$ac_cv_func_vfork" = xyes; then
18255   echo "$as_me:18255: checking for working vfork" >&5
18256 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18257 if test "${ac_cv_func_vfork_works+set}" = set; then
18258   echo $ECHO_N "(cached) $ECHO_C" >&6
18259 else
18260   if test "$cross_compiling" = yes; then
18261   ac_cv_func_vfork_works=cross
18262 else
18263   cat >conftest.$ac_ext <<_ACEOF
18264 #line 18264 "configure"
18265 #include "confdefs.h"
18266 /* Thanks to Paul Eggert for this test.  */
18267 #include <stdio.h>
18268 #include <sys/types.h>
18269 #include <sys/stat.h>
18270 #if HAVE_UNISTD_H
18271 # include <unistd.h>
18272 #endif
18273 #if HAVE_VFORK_H
18274 # include <vfork.h>
18275 #endif
18276 /* On some sparc systems, changes by the child to local and incoming
18277    argument registers are propagated back to the parent.  The compiler
18278    is told about this with #include <vfork.h>, but some compilers
18279    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18280    static variable whose address is put into a register that is
18281    clobbered by the vfork.  */
18282 static
18283 #ifdef __cplusplus
18284 sparc_address_test (int arg)
18285 # else
18286 sparc_address_test (arg) int arg;
18287 #endif
18288 {
18289   static pid_t child;
18290   if (!child) {
18291     child = vfork ();
18292     if (child < 0) {
18293       perror ("vfork");
18294       _exit(2);
18295     }
18296     if (!child) {
18297       arg = getpid();
18298       write(-1, "", 0);
18299       _exit (arg);
18300     }
18301   }
18302 }
18303
18304 int
18305 main ()
18306 {
18307   pid_t parent = getpid ();
18308   pid_t child;
18309
18310   sparc_address_test ();
18311
18312   child = vfork ();
18313
18314   if (child == 0) {
18315     /* Here is another test for sparc vfork register problems.  This
18316        test uses lots of local variables, at least as many local
18317        variables as main has allocated so far including compiler
18318        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18319        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18320        reuse the register of parent for one of the local variables,
18321        since it will think that parent can't possibly be used any more
18322        in this routine.  Assigning to the local variable will thus
18323        munge parent in the parent process.  */
18324     pid_t
18325       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18326       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18327     /* Convince the compiler that p..p7 are live; otherwise, it might
18328        use the same hardware register for all 8 local variables.  */
18329     if (p != p1 || p != p2 || p != p3 || p != p4
18330         || p != p5 || p != p6 || p != p7)
18331       _exit(1);
18332
18333     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18334        from child file descriptors.  If the child closes a descriptor
18335        before it execs or exits, this munges the parent's descriptor
18336        as well.  Test for this by closing stdout in the child.  */
18337     _exit(close(fileno(stdout)) != 0);
18338   } else {
18339     int status;
18340     struct stat st;
18341
18342     while (wait(&status) != child)
18343       ;
18344     $ac_main_return(
18345          /* Was there some problem with vforking?  */
18346          child < 0
18347
18348          /* Did the child fail?  (This shouldn't happen.)  */
18349          || status
18350
18351          /* Did the vfork/compiler bug occur?  */
18352          || parent != getpid()
18353
18354          /* Did the file descriptor bug occur?  */
18355          || fstat(fileno(stdout), &st) != 0
18356          );
18357   }
18358 }
18359 _ACEOF
18360 rm -f conftest$ac_exeext
18361 if { (eval echo "$as_me:18361: \"$ac_link\"") >&5
18362   (eval $ac_link) 2>&5
18363   ac_status=$?
18364   echo "$as_me:18364: \$? = $ac_status" >&5
18365   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18366   { (eval echo "$as_me:18366: \"$ac_try\"") >&5
18367   (eval $ac_try) 2>&5
18368   ac_status=$?
18369   echo "$as_me:18369: \$? = $ac_status" >&5
18370   (exit $ac_status); }; }; then
18371   ac_cv_func_vfork_works=yes
18372 else
18373   echo "$as_me: program exited with status $ac_status" >&5
18374 echo "$as_me: failed program was:" >&5
18375 cat conftest.$ac_ext >&5
18376 ac_cv_func_vfork_works=no
18377 fi
18378 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18379 fi
18380 fi
18381 echo "$as_me:18381: result: $ac_cv_func_vfork_works" >&5
18382 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18383
18384 fi;
18385 if test "x$ac_cv_func_fork_works" = xcross; then
18386   ac_cv_func_vfork_works=ac_cv_func_vfork
18387   { echo "$as_me:18387: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18388 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18389 fi
18390
18391 if test "x$ac_cv_func_vfork_works" = xyes; then
18392
18393 cat >>confdefs.h <<\EOF
18394 #define HAVE_WORKING_VFORK 1
18395 EOF
18396
18397 else
18398
18399 cat >>confdefs.h <<\EOF
18400 #define vfork fork
18401 EOF
18402
18403 fi
18404 if test "x$ac_cv_func_fork_works" = xyes; then
18405
18406 cat >>confdefs.h <<\EOF
18407 #define HAVE_WORKING_FORK 1
18408 EOF
18409
18410 fi
18411
18412 # special check for test/ditto.c
18413
18414 echo "$as_me:18414: checking for openpty in -lutil" >&5
18415 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18416 if test "${ac_cv_lib_util_openpty+set}" = set; then
18417   echo $ECHO_N "(cached) $ECHO_C" >&6
18418 else
18419   ac_check_lib_save_LIBS=$LIBS
18420 LIBS="-lutil  $LIBS"
18421 cat >conftest.$ac_ext <<_ACEOF
18422 #line 18422 "configure"
18423 #include "confdefs.h"
18424
18425 /* Override any gcc2 internal prototype to avoid an error.  */
18426 #ifdef __cplusplus
18427 extern "C"
18428 #endif
18429 /* We use char because int might match the return type of a gcc2
18430    builtin and then its argument prototype would still apply.  */
18431 char openpty ();
18432 int
18433 main ()
18434 {
18435 openpty ();
18436   ;
18437   return 0;
18438 }
18439 _ACEOF
18440 rm -f conftest.$ac_objext conftest$ac_exeext
18441 if { (eval echo "$as_me:18441: \"$ac_link\"") >&5
18442   (eval $ac_link) 2>&5
18443   ac_status=$?
18444   echo "$as_me:18444: \$? = $ac_status" >&5
18445   (exit $ac_status); } &&
18446          { ac_try='test -s conftest$ac_exeext'
18447   { (eval echo "$as_me:18447: \"$ac_try\"") >&5
18448   (eval $ac_try) 2>&5
18449   ac_status=$?
18450   echo "$as_me:18450: \$? = $ac_status" >&5
18451   (exit $ac_status); }; }; then
18452   ac_cv_lib_util_openpty=yes
18453 else
18454   echo "$as_me: failed program was:" >&5
18455 cat conftest.$ac_ext >&5
18456 ac_cv_lib_util_openpty=no
18457 fi
18458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18459 LIBS=$ac_check_lib_save_LIBS
18460 fi
18461 echo "$as_me:18461: result: $ac_cv_lib_util_openpty" >&5
18462 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18463 if test $ac_cv_lib_util_openpty = yes; then
18464   cf_cv_lib_util=yes
18465 else
18466   cf_cv_lib_util=no
18467 fi
18468
18469 echo "$as_me:18469: checking for openpty header" >&5
18470 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18471 if test "${cf_cv_func_openpty+set}" = set; then
18472   echo $ECHO_N "(cached) $ECHO_C" >&6
18473 else
18474
18475         cf_save_LIBS="$LIBS"
18476         test $cf_cv_lib_util = yes && {
18477 cf_add_libs="-lutil"
18478 # Filter out duplicates - this happens with badly-designed ".pc" files...
18479 for cf_add_1lib in $LIBS
18480 do
18481         for cf_add_2lib in $cf_add_libs
18482         do
18483                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18484                 then
18485                         cf_add_1lib=
18486                         break
18487                 fi
18488         done
18489         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18490 done
18491 LIBS="$cf_add_libs"
18492  }
18493         for cf_header in pty.h libutil.h util.h
18494         do
18495         cat >conftest.$ac_ext <<_ACEOF
18496 #line 18496 "configure"
18497 #include "confdefs.h"
18498
18499 #include <$cf_header>
18500
18501 int
18502 main ()
18503 {
18504
18505         int x = openpty((int *)0, (int *)0, (char *)0,
18506                                    (struct termios *)0, (struct winsize *)0);
18507
18508   ;
18509   return 0;
18510 }
18511 _ACEOF
18512 rm -f conftest.$ac_objext conftest$ac_exeext
18513 if { (eval echo "$as_me:18513: \"$ac_link\"") >&5
18514   (eval $ac_link) 2>&5
18515   ac_status=$?
18516   echo "$as_me:18516: \$? = $ac_status" >&5
18517   (exit $ac_status); } &&
18518          { ac_try='test -s conftest$ac_exeext'
18519   { (eval echo "$as_me:18519: \"$ac_try\"") >&5
18520   (eval $ac_try) 2>&5
18521   ac_status=$?
18522   echo "$as_me:18522: \$? = $ac_status" >&5
18523   (exit $ac_status); }; }; then
18524
18525                 cf_cv_func_openpty=$cf_header
18526                 break
18527
18528 else
18529   echo "$as_me: failed program was:" >&5
18530 cat conftest.$ac_ext >&5
18531
18532                 cf_cv_func_openpty=no
18533
18534 fi
18535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18536         done
18537         LIBS="$cf_save_LIBS"
18538
18539 fi
18540 echo "$as_me:18540: result: $cf_cv_func_openpty" >&5
18541 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18542
18543 if test "$cf_cv_func_openpty" != no ; then
18544
18545 cat >>confdefs.h <<EOF
18546 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18547 EOF
18548
18549 cat >>confdefs.h <<\EOF
18550 #define USE_XTERM_PTY 1
18551 EOF
18552
18553         if test "x$cf_cv_lib_util" = xyes ; then
18554
18555 cf_add_libs="-lutil"
18556 # Filter out duplicates - this happens with badly-designed ".pc" files...
18557 for cf_add_1lib in $TEST_LIBS
18558 do
18559         for cf_add_2lib in $cf_add_libs
18560         do
18561                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18562                 then
18563                         cf_add_1lib=
18564                         break
18565                 fi
18566         done
18567         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18568 done
18569 TEST_LIBS="$cf_add_libs"
18570
18571         fi
18572 fi
18573
18574 if test "$with_hashed_db" != no ; then
18575
18576 cat >>confdefs.h <<\EOF
18577 #define USE_HASHED_DB 1
18578 EOF
18579
18580 case $with_hashed_db in
18581 (yes|*able*)
18582         ;;
18583 (*)
18584         if test -d "$with_hashed_db" ; then
18585
18586 if test -n "$with_hashed_db/include" ; then
18587   for cf_add_incdir in $with_hashed_db/include
18588   do
18589         while test $cf_add_incdir != /usr/include
18590         do
18591           if test -d $cf_add_incdir
18592           then
18593                 cf_have_incdir=no
18594                 if test -n "$CFLAGS$CPPFLAGS" ; then
18595                   # a loop is needed to ensure we can add subdirs of existing dirs
18596                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18597                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18598                           cf_have_incdir=yes; break
18599                         fi
18600                   done
18601                 fi
18602
18603                 if test "$cf_have_incdir" = no ; then
18604                   if test "$cf_add_incdir" = /usr/local/include ; then
18605                         if test "$GCC" = yes
18606                         then
18607                           cf_save_CPPFLAGS=$CPPFLAGS
18608                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18609                           cat >conftest.$ac_ext <<_ACEOF
18610 #line 18610 "configure"
18611 #include "confdefs.h"
18612 #include <stdio.h>
18613 int
18614 main ()
18615 {
18616 printf("Hello")
18617   ;
18618   return 0;
18619 }
18620 _ACEOF
18621 rm -f conftest.$ac_objext
18622 if { (eval echo "$as_me:18622: \"$ac_compile\"") >&5
18623   (eval $ac_compile) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); } &&
18627          { ac_try='test -s conftest.$ac_objext'
18628   { (eval echo "$as_me:18628: \"$ac_try\"") >&5
18629   (eval $ac_try) 2>&5
18630   ac_status=$?
18631   echo "$as_me:18631: \$? = $ac_status" >&5
18632   (exit $ac_status); }; }; then
18633   :
18634 else
18635   echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 cf_have_incdir=yes
18638 fi
18639 rm -f conftest.$ac_objext conftest.$ac_ext
18640                           CPPFLAGS=$cf_save_CPPFLAGS
18641                         fi
18642                   fi
18643                 fi
18644
18645                 if test "$cf_have_incdir" = no ; then
18646                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18647
18648 echo "${as_me:-configure}:18648: testing adding $cf_add_incdir to include-path ..." 1>&5
18649
18650                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18651
18652                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18653                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18654                   cf_add_incdir="$cf_top_incdir"
18655                 else
18656                   break
18657                 fi
18658           else
18659                 break
18660           fi
18661         done
18662   done
18663 fi
18664
18665 if test -n "$with_hashed_db/lib" ; then
18666         for cf_add_libdir in $with_hashed_db/lib
18667         do
18668                 if test $cf_add_libdir = /usr/lib ; then
18669                         :
18670                 elif test -d $cf_add_libdir
18671                 then
18672                         cf_have_libdir=no
18673                         if test -n "$LDFLAGS$LIBS" ; then
18674                                 # a loop is needed to ensure we can add subdirs of existing dirs
18675                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18676                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18677                                                 cf_have_libdir=yes; break
18678                                         fi
18679                                 done
18680                         fi
18681                         if test "$cf_have_libdir" = no ; then
18682                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18683
18684 echo "${as_me:-configure}:18684: testing adding $cf_add_libdir to library-path ..." 1>&5
18685
18686                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18687                         fi
18688                 fi
18689         done
18690 fi
18691
18692         else
18693                 case "$with_hashed_db" in
18694                 (./*|../*|/*)
18695                         { echo "$as_me:18695: WARNING: no such directory $with_hashed_db" >&5
18696 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18697                         ;;
18698                 (*)
18699
18700 cf_search=
18701
18702 test "x$prefix" != "xNONE" && \
18703 test -d "$prefix" && \
18704  {
18705         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18706         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18707         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18708         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18709         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18710         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18711 }
18712
18713 for cf_subdir_prefix in \
18714         /usr \
18715         /usr/local \
18716         /usr/pkg \
18717         /opt \
18718         /opt/local \
18719         $HOME
18720 do
18721
18722 test "x$cf_subdir_prefix" != "x$prefix" && \
18723 test -d "$cf_subdir_prefix" && \
18724 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18725         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18726         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18727         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18728         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18729         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18730         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"
18731 }
18732
18733 done
18734
18735         for cf_item in $cf_search
18736         do
18737                 case $cf_item in
18738                 (*/$with_hashed_db)
18739
18740 if test -n "$cf_item" ; then
18741   for cf_add_incdir in $cf_item
18742   do
18743         while test $cf_add_incdir != /usr/include
18744         do
18745           if test -d $cf_add_incdir
18746           then
18747                 cf_have_incdir=no
18748                 if test -n "$CFLAGS$CPPFLAGS" ; then
18749                   # a loop is needed to ensure we can add subdirs of existing dirs
18750                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18751                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18752                           cf_have_incdir=yes; break
18753                         fi
18754                   done
18755                 fi
18756
18757                 if test "$cf_have_incdir" = no ; then
18758                   if test "$cf_add_incdir" = /usr/local/include ; then
18759                         if test "$GCC" = yes
18760                         then
18761                           cf_save_CPPFLAGS=$CPPFLAGS
18762                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18763                           cat >conftest.$ac_ext <<_ACEOF
18764 #line 18764 "configure"
18765 #include "confdefs.h"
18766 #include <stdio.h>
18767 int
18768 main ()
18769 {
18770 printf("Hello")
18771   ;
18772   return 0;
18773 }
18774 _ACEOF
18775 rm -f conftest.$ac_objext
18776 if { (eval echo "$as_me:18776: \"$ac_compile\"") >&5
18777   (eval $ac_compile) 2>&5
18778   ac_status=$?
18779   echo "$as_me:18779: \$? = $ac_status" >&5
18780   (exit $ac_status); } &&
18781          { ac_try='test -s conftest.$ac_objext'
18782   { (eval echo "$as_me:18782: \"$ac_try\"") >&5
18783   (eval $ac_try) 2>&5
18784   ac_status=$?
18785   echo "$as_me:18785: \$? = $ac_status" >&5
18786   (exit $ac_status); }; }; then
18787   :
18788 else
18789   echo "$as_me: failed program was:" >&5
18790 cat conftest.$ac_ext >&5
18791 cf_have_incdir=yes
18792 fi
18793 rm -f conftest.$ac_objext conftest.$ac_ext
18794                           CPPFLAGS=$cf_save_CPPFLAGS
18795                         fi
18796                   fi
18797                 fi
18798
18799                 if test "$cf_have_incdir" = no ; then
18800                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18801
18802 echo "${as_me:-configure}:18802: testing adding $cf_add_incdir to include-path ..." 1>&5
18803
18804                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18805
18806                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18807                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18808                   cf_add_incdir="$cf_top_incdir"
18809                 else
18810                   break
18811                 fi
18812           else
18813                 break
18814           fi
18815         done
18816   done
18817 fi
18818
18819                         ;;
18820                 esac
18821         done
18822
18823 cf_search=
18824
18825 test "x$prefix" != "xNONE" && \
18826 test -d "$prefix" && \
18827  {
18828         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18829         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18830         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18831         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18832         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18833         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18834 }
18835
18836 for cf_subdir_prefix in \
18837         /usr \
18838         /usr/local \
18839         /usr/pkg \
18840         /opt \
18841         /opt/local \
18842         $HOME
18843 do
18844
18845 test "x$cf_subdir_prefix" != "x$prefix" && \
18846 test -d "$cf_subdir_prefix" && \
18847 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18848         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18849         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18850         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18851         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18852         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18853         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"
18854 }
18855
18856 done
18857
18858         for cf_item in $cf_search
18859         do
18860                 case $cf_item in
18861                 (*/$with_hashed_db)
18862
18863 if test -n "$cf_item" ; then
18864         for cf_add_libdir in $cf_item
18865         do
18866                 if test $cf_add_libdir = /usr/lib ; then
18867                         :
18868                 elif test -d $cf_add_libdir
18869                 then
18870                         cf_have_libdir=no
18871                         if test -n "$LDFLAGS$LIBS" ; then
18872                                 # a loop is needed to ensure we can add subdirs of existing dirs
18873                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18874                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18875                                                 cf_have_libdir=yes; break
18876                                         fi
18877                                 done
18878                         fi
18879                         if test "$cf_have_libdir" = no ; then
18880                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18881
18882 echo "${as_me:-configure}:18882: testing adding $cf_add_libdir to library-path ..." 1>&5
18883
18884                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18885                         fi
18886                 fi
18887         done
18888 fi
18889
18890                         ;;
18891                 esac
18892         done
18893
18894                         ;;
18895                 esac
18896         fi
18897 esac
18898
18899 echo "$as_me:18899: checking for db.h" >&5
18900 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18901 if test "${ac_cv_header_db_h+set}" = set; then
18902   echo $ECHO_N "(cached) $ECHO_C" >&6
18903 else
18904   cat >conftest.$ac_ext <<_ACEOF
18905 #line 18905 "configure"
18906 #include "confdefs.h"
18907 #include <db.h>
18908 _ACEOF
18909 if { (eval echo "$as_me:18909: \"$ac_cpp conftest.$ac_ext\"") >&5
18910   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18911   ac_status=$?
18912   egrep -v '^ *\+' conftest.er1 >conftest.err
18913   rm -f conftest.er1
18914   cat conftest.err >&5
18915   echo "$as_me:18915: \$? = $ac_status" >&5
18916   (exit $ac_status); } >/dev/null; then
18917   if test -s conftest.err; then
18918     ac_cpp_err=$ac_c_preproc_warn_flag
18919   else
18920     ac_cpp_err=
18921   fi
18922 else
18923   ac_cpp_err=yes
18924 fi
18925 if test -z "$ac_cpp_err"; then
18926   ac_cv_header_db_h=yes
18927 else
18928   echo "$as_me: failed program was:" >&5
18929   cat conftest.$ac_ext >&5
18930   ac_cv_header_db_h=no
18931 fi
18932 rm -f conftest.err conftest.$ac_ext
18933 fi
18934 echo "$as_me:18934: result: $ac_cv_header_db_h" >&5
18935 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18936 if test $ac_cv_header_db_h = yes; then
18937
18938 echo "$as_me:18938: checking for version of db" >&5
18939 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18940 if test "${cf_cv_hashed_db_version+set}" = set; then
18941   echo $ECHO_N "(cached) $ECHO_C" >&6
18942 else
18943
18944 cf_cv_hashed_db_version=unknown
18945
18946 for cf_db_version in 1 2 3 4 5 6
18947 do
18948
18949 echo "${as_me:-configure}:18949: testing checking for db version $cf_db_version ..." 1>&5
18950
18951         cat >conftest.$ac_ext <<_ACEOF
18952 #line 18952 "configure"
18953 #include "confdefs.h"
18954
18955 $ac_includes_default
18956 #include <db.h>
18957
18958 #ifdef DB_VERSION_MAJOR
18959         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18960 #if $cf_db_version == DB_VERSION_MAJOR
18961         /* ok */
18962 #else
18963         make an error
18964 #endif
18965 #else
18966 #if $cf_db_version == 1
18967         /* ok: assuming this is DB 1.8.5 */
18968 #else
18969         make an error
18970 #endif
18971 #endif
18972
18973 int
18974 main ()
18975 {
18976 DBT *foo = 0
18977   ;
18978   return 0;
18979 }
18980 _ACEOF
18981 rm -f conftest.$ac_objext
18982 if { (eval echo "$as_me:18982: \"$ac_compile\"") >&5
18983   (eval $ac_compile) 2>&5
18984   ac_status=$?
18985   echo "$as_me:18985: \$? = $ac_status" >&5
18986   (exit $ac_status); } &&
18987          { ac_try='test -s conftest.$ac_objext'
18988   { (eval echo "$as_me:18988: \"$ac_try\"") >&5
18989   (eval $ac_try) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); }; }; then
18993
18994         cf_cv_hashed_db_version=$cf_db_version
18995         break
18996
18997 else
18998   echo "$as_me: failed program was:" >&5
18999 cat conftest.$ac_ext >&5
19000 fi
19001 rm -f conftest.$ac_objext conftest.$ac_ext
19002 done
19003
19004 fi
19005 echo "$as_me:19005: result: $cf_cv_hashed_db_version" >&5
19006 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19007
19008 if test "$cf_cv_hashed_db_version" = unknown ; then
19009         { { echo "$as_me:19009: error: Cannot determine version of db" >&5
19010 echo "$as_me: error: Cannot determine version of db" >&2;}
19011    { (exit 1); exit 1; }; }
19012 else
19013
19014 echo "$as_me:19014: checking for db libraries" >&5
19015 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19016 if test "${cf_cv_hashed_db_libs+set}" = set; then
19017   echo $ECHO_N "(cached) $ECHO_C" >&6
19018 else
19019
19020 cf_cv_hashed_db_libs=unknown
19021 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19022 do
19023         cf_save_libs="$LIBS"
19024         if test -n "$cf_db_libs"; then
19025
19026 cf_add_libs="-l$cf_db_libs"
19027 # Filter out duplicates - this happens with badly-designed ".pc" files...
19028 for cf_add_1lib in $LIBS
19029 do
19030         for cf_add_2lib in $cf_add_libs
19031         do
19032                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19033                 then
19034                         cf_add_1lib=
19035                         break
19036                 fi
19037         done
19038         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19039 done
19040 LIBS="$cf_add_libs"
19041
19042         fi
19043
19044 echo "${as_me:-configure}:19044: testing checking for library "$cf_db_libs" ..." 1>&5
19045
19046         cat >conftest.$ac_ext <<_ACEOF
19047 #line 19047 "configure"
19048 #include "confdefs.h"
19049
19050 $ac_includes_default
19051 #include <db.h>
19052
19053 int
19054 main ()
19055 {
19056
19057         char *path = "/tmp/foo";
19058 #ifdef DB_VERSION_MAJOR
19059 #if DB_VERSION_MAJOR >= 4
19060         DB *result = 0;
19061         db_create(&result, NULL, 0);
19062         result->open(result,
19063                 NULL,
19064                 path,
19065                 path,
19066                 DB_HASH,
19067                 DB_CREATE,
19068                 0644);
19069 #elif DB_VERSION_MAJOR >= 3
19070         DB *result = 0;
19071         db_create(&result, NULL, 0);
19072         result->open(result,
19073                 path,
19074                 path,
19075                 DB_HASH,
19076                 DB_CREATE,
19077                 0644);
19078 #elif DB_VERSION_MAJOR >= 2
19079         DB *result = 0;
19080         db_open(path,
19081                 DB_HASH,
19082                 DB_CREATE,
19083                 0644,
19084                 (DB_ENV *) 0,
19085                 (DB_INFO *) 0,
19086                 &result);
19087 #endif /* DB_VERSION_MAJOR */
19088 #else
19089         DB *result = dbopen(path,
19090                      2,
19091                      0644,
19092                      DB_HASH,
19093                      0);
19094 #endif
19095         ${cf_cv_main_return:-return}(result != 0)
19096
19097   ;
19098   return 0;
19099 }
19100 _ACEOF
19101 rm -f conftest.$ac_objext conftest$ac_exeext
19102 if { (eval echo "$as_me:19102: \"$ac_link\"") >&5
19103   (eval $ac_link) 2>&5
19104   ac_status=$?
19105   echo "$as_me:19105: \$? = $ac_status" >&5
19106   (exit $ac_status); } &&
19107          { ac_try='test -s conftest$ac_exeext'
19108   { (eval echo "$as_me:19108: \"$ac_try\"") >&5
19109   (eval $ac_try) 2>&5
19110   ac_status=$?
19111   echo "$as_me:19111: \$? = $ac_status" >&5
19112   (exit $ac_status); }; }; then
19113
19114         if test -n "$cf_db_libs" ; then
19115                 cf_cv_hashed_db_libs=$cf_db_libs
19116         else
19117                 cf_cv_hashed_db_libs=default
19118         fi
19119         LIBS="$cf_save_libs"
19120         break
19121
19122 else
19123   echo "$as_me: failed program was:" >&5
19124 cat conftest.$ac_ext >&5
19125 fi
19126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19127         LIBS="$cf_save_libs"
19128 done
19129
19130 fi
19131 echo "$as_me:19131: result: $cf_cv_hashed_db_libs" >&5
19132 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19133
19134         if test "$cf_cv_hashed_db_libs" = unknown ; then
19135                 { { echo "$as_me:19135: error: Cannot determine library for db" >&5
19136 echo "$as_me: error: Cannot determine library for db" >&2;}
19137    { (exit 1); exit 1; }; }
19138         elif test "$cf_cv_hashed_db_libs" != default ; then
19139
19140 cf_add_libs="-l$cf_cv_hashed_db_libs"
19141 # Filter out duplicates - this happens with badly-designed ".pc" files...
19142 for cf_add_1lib in $LIBS
19143 do
19144         for cf_add_2lib in $cf_add_libs
19145         do
19146                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19147                 then
19148                         cf_add_1lib=
19149                         break
19150                 fi
19151         done
19152         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19153 done
19154 LIBS="$cf_add_libs"
19155
19156         fi
19157 fi
19158
19159 else
19160
19161         { { echo "$as_me:19161: error: Cannot find db.h" >&5
19162 echo "$as_me: error: Cannot find db.h" >&2;}
19163    { (exit 1); exit 1; }; }
19164
19165 fi
19166
19167 fi
19168
19169 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19170         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19171         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19172 fi
19173
19174 # Just in case, check if the C compiler has a bool type.
19175
19176 echo "$as_me:19176: checking if we should include stdbool.h" >&5
19177 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19178
19179 if test "${cf_cv_header_stdbool_h+set}" = set; then
19180   echo $ECHO_N "(cached) $ECHO_C" >&6
19181 else
19182
19183         cat >conftest.$ac_ext <<_ACEOF
19184 #line 19184 "configure"
19185 #include "confdefs.h"
19186
19187 int
19188 main ()
19189 {
19190 bool foo = false
19191   ;
19192   return 0;
19193 }
19194 _ACEOF
19195 rm -f conftest.$ac_objext
19196 if { (eval echo "$as_me:19196: \"$ac_compile\"") >&5
19197   (eval $ac_compile) 2>&5
19198   ac_status=$?
19199   echo "$as_me:19199: \$? = $ac_status" >&5
19200   (exit $ac_status); } &&
19201          { ac_try='test -s conftest.$ac_objext'
19202   { (eval echo "$as_me:19202: \"$ac_try\"") >&5
19203   (eval $ac_try) 2>&5
19204   ac_status=$?
19205   echo "$as_me:19205: \$? = $ac_status" >&5
19206   (exit $ac_status); }; }; then
19207   cf_cv_header_stdbool_h=0
19208 else
19209   echo "$as_me: failed program was:" >&5
19210 cat conftest.$ac_ext >&5
19211 cat >conftest.$ac_ext <<_ACEOF
19212 #line 19212 "configure"
19213 #include "confdefs.h"
19214
19215 #ifndef __BEOS__
19216 #include <stdbool.h>
19217 #endif
19218
19219 int
19220 main ()
19221 {
19222 bool foo = false
19223   ;
19224   return 0;
19225 }
19226 _ACEOF
19227 rm -f conftest.$ac_objext
19228 if { (eval echo "$as_me:19228: \"$ac_compile\"") >&5
19229   (eval $ac_compile) 2>&5
19230   ac_status=$?
19231   echo "$as_me:19231: \$? = $ac_status" >&5
19232   (exit $ac_status); } &&
19233          { ac_try='test -s conftest.$ac_objext'
19234   { (eval echo "$as_me:19234: \"$ac_try\"") >&5
19235   (eval $ac_try) 2>&5
19236   ac_status=$?
19237   echo "$as_me:19237: \$? = $ac_status" >&5
19238   (exit $ac_status); }; }; then
19239   cf_cv_header_stdbool_h=1
19240 else
19241   echo "$as_me: failed program was:" >&5
19242 cat conftest.$ac_ext >&5
19243 cf_cv_header_stdbool_h=0
19244 fi
19245 rm -f conftest.$ac_objext conftest.$ac_ext
19246 fi
19247 rm -f conftest.$ac_objext conftest.$ac_ext
19248 fi
19249
19250 if test "$cf_cv_header_stdbool_h" = 1
19251 then    echo "$as_me:19251: result: yes" >&5
19252 echo "${ECHO_T}yes" >&6
19253 else    echo "$as_me:19253: result: no" >&5
19254 echo "${ECHO_T}no" >&6
19255 fi
19256
19257 echo "$as_me:19257: checking for builtin bool type" >&5
19258 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19259
19260 if test "${cf_cv_cc_bool_type+set}" = set; then
19261   echo $ECHO_N "(cached) $ECHO_C" >&6
19262 else
19263
19264         cat >conftest.$ac_ext <<_ACEOF
19265 #line 19265 "configure"
19266 #include "confdefs.h"
19267
19268 #include <stdio.h>
19269 #include <sys/types.h>
19270
19271 int
19272 main ()
19273 {
19274 bool x = false
19275   ;
19276   return 0;
19277 }
19278 _ACEOF
19279 rm -f conftest.$ac_objext
19280 if { (eval echo "$as_me:19280: \"$ac_compile\"") >&5
19281   (eval $ac_compile) 2>&5
19282   ac_status=$?
19283   echo "$as_me:19283: \$? = $ac_status" >&5
19284   (exit $ac_status); } &&
19285          { ac_try='test -s conftest.$ac_objext'
19286   { (eval echo "$as_me:19286: \"$ac_try\"") >&5
19287   (eval $ac_try) 2>&5
19288   ac_status=$?
19289   echo "$as_me:19289: \$? = $ac_status" >&5
19290   (exit $ac_status); }; }; then
19291   cf_cv_cc_bool_type=1
19292 else
19293   echo "$as_me: failed program was:" >&5
19294 cat conftest.$ac_ext >&5
19295 cf_cv_cc_bool_type=0
19296 fi
19297 rm -f conftest.$ac_objext conftest.$ac_ext
19298
19299 fi
19300
19301 if test "$cf_cv_cc_bool_type" = 1
19302 then    echo "$as_me:19302: result: yes" >&5
19303 echo "${ECHO_T}yes" >&6
19304 else    echo "$as_me:19304: result: no" >&5
19305 echo "${ECHO_T}no" >&6
19306 fi
19307
19308 # Check for C++ compiler characteristics (and ensure that it's there!)
19309 if test -n "$CXX" ; then
19310         ac_ext=cc
19311 ac_cpp='$CXXCPP $CPPFLAGS'
19312 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19313 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19314 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19315 ac_main_return=return
19316
19317 if test -n "$GXX" ; then
19318
19319         cf_save="$LIBS"
19320         LIBS="$LIBS $CXXLIBS"
19321         echo "$as_me:19321: checking if we already have C++ library" >&5
19322 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19323         cat >conftest.$ac_ext <<_ACEOF
19324 #line 19324 "configure"
19325 #include "confdefs.h"
19326
19327                         #include <iostream>
19328 int
19329 main ()
19330 {
19331
19332                         std::cout << "Hello World!" << std::endl;
19333   ;
19334   return 0;
19335 }
19336 _ACEOF
19337 rm -f conftest.$ac_objext conftest$ac_exeext
19338 if { (eval echo "$as_me:19338: \"$ac_link\"") >&5
19339   (eval $ac_link) 2>&5
19340   ac_status=$?
19341   echo "$as_me:19341: \$? = $ac_status" >&5
19342   (exit $ac_status); } &&
19343          { ac_try='test -s conftest$ac_exeext'
19344   { (eval echo "$as_me:19344: \"$ac_try\"") >&5
19345   (eval $ac_try) 2>&5
19346   ac_status=$?
19347   echo "$as_me:19347: \$? = $ac_status" >&5
19348   (exit $ac_status); }; }; then
19349   cf_have_libstdcpp=yes
19350 else
19351   echo "$as_me: failed program was:" >&5
19352 cat conftest.$ac_ext >&5
19353 cf_have_libstdcpp=no
19354 fi
19355 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19356         echo "$as_me:19356: result: $cf_have_libstdcpp" >&5
19357 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19358         LIBS="$cf_save"
19359
19360         if test $cf_have_libstdcpp != yes
19361         then
19362                 case $cf_cv_system_name in
19363                 (os2*)
19364                         cf_stdcpp_libname=stdcpp
19365                         ;;
19366                 (*)
19367                         cf_stdcpp_libname=stdc++
19368                         ;;
19369                 esac
19370
19371                 echo "$as_me:19371: checking for library $cf_stdcpp_libname" >&5
19372 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19373 if test "${cf_cv_libstdcpp+set}" = set; then
19374   echo $ECHO_N "(cached) $ECHO_C" >&6
19375 else
19376
19377                         cf_save="$LIBS"
19378                         LIBS="$LIBS $CXXLIBS"
19379
19380 cf_add_libs="-l$cf_stdcpp_libname"
19381 # Filter out duplicates - this happens with badly-designed ".pc" files...
19382 for cf_add_1lib in $LIBS
19383 do
19384         for cf_add_2lib in $cf_add_libs
19385         do
19386                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19387                 then
19388                         cf_add_1lib=
19389                         break
19390                 fi
19391         done
19392         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19393 done
19394 LIBS="$cf_add_libs"
19395
19396                 cat >conftest.$ac_ext <<_ACEOF
19397 #line 19397 "configure"
19398 #include "confdefs.h"
19399
19400                                 #include <iostream>
19401 int
19402 main ()
19403 {
19404
19405                                 std::cout << "Hello World!" << std::endl;
19406   ;
19407   return 0;
19408 }
19409 _ACEOF
19410 rm -f conftest.$ac_objext conftest$ac_exeext
19411 if { (eval echo "$as_me:19411: \"$ac_link\"") >&5
19412   (eval $ac_link) 2>&5
19413   ac_status=$?
19414   echo "$as_me:19414: \$? = $ac_status" >&5
19415   (exit $ac_status); } &&
19416          { ac_try='test -s conftest$ac_exeext'
19417   { (eval echo "$as_me:19417: \"$ac_try\"") >&5
19418   (eval $ac_try) 2>&5
19419   ac_status=$?
19420   echo "$as_me:19420: \$? = $ac_status" >&5
19421   (exit $ac_status); }; }; then
19422   cf_cv_libstdcpp=yes
19423 else
19424   echo "$as_me: failed program was:" >&5
19425 cat conftest.$ac_ext >&5
19426 cf_cv_libstdcpp=no
19427 fi
19428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19429                         LIBS="$cf_save"
19430
19431 fi
19432 echo "$as_me:19432: result: $cf_cv_libstdcpp" >&5
19433 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19434                 test "$cf_cv_libstdcpp" = yes && {
19435 cf_add_libs="-l$cf_stdcpp_libname"
19436 # Filter out duplicates - this happens with badly-designed ".pc" files...
19437 for cf_add_1lib in $CXXLIBS
19438 do
19439         for cf_add_2lib in $cf_add_libs
19440         do
19441                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19442                 then
19443                         cf_add_1lib=
19444                         break
19445                 fi
19446         done
19447         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19448 done
19449 CXXLIBS="$cf_add_libs"
19450  }
19451         fi
19452 fi
19453
19454         echo "$as_me:19454: checking whether $CXX understands -c and -o together" >&5
19455 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19456 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19457   echo $ECHO_N "(cached) $ECHO_C" >&6
19458 else
19459
19460 cat > conftest.$ac_ext <<CF_EOF
19461 #include <stdio.h>
19462 int main()
19463 {
19464         ${cf_cv_main_return:-return}(0);
19465 }
19466 CF_EOF
19467 # We do the test twice because some compilers refuse to overwrite an
19468 # existing .o file with -o, though they will create one.
19469 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19470 if { (eval echo "$as_me:19470: \"$ac_try\"") >&5
19471   (eval $ac_try) 2>&5
19472   ac_status=$?
19473   echo "$as_me:19473: \$? = $ac_status" >&5
19474   (exit $ac_status); } &&
19475   test -f conftest2.$ac_objext && { (eval echo "$as_me:19475: \"$ac_try\"") >&5
19476   (eval $ac_try) 2>&5
19477   ac_status=$?
19478   echo "$as_me:19478: \$? = $ac_status" >&5
19479   (exit $ac_status); };
19480 then
19481   eval cf_cv_prog_CXX_c_o=yes
19482 else
19483   eval cf_cv_prog_CXX_c_o=no
19484 fi
19485 rm -rf conftest*
19486
19487 fi
19488 if test $cf_cv_prog_CXX_c_o = yes; then
19489   echo "$as_me:19489: result: yes" >&5
19490 echo "${ECHO_T}yes" >&6
19491 else
19492   echo "$as_me:19492: result: no" >&5
19493 echo "${ECHO_T}no" >&6
19494 fi
19495
19496         case $GXX_VERSION in
19497         (1*|2.0-6*)
19498                 cf_cxx_library=yes
19499                 ;;
19500         (*-2.7*|2.7*)
19501
19502 cf_cxx_library=unknown
19503 case $cf_cv_system_name in
19504 (os2*)
19505         cf_gpp_libname=gpp
19506         ;;
19507 (*)
19508         cf_gpp_libname=g++
19509         ;;
19510 esac
19511 if test "$GXX" = yes; then
19512         echo "$as_me:19512: checking for lib$cf_gpp_libname" >&5
19513 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19514         cf_save="$LIBS"
19515
19516 cf_add_libs="-l$cf_gpp_libname"
19517 # Filter out duplicates - this happens with badly-designed ".pc" files...
19518 for cf_add_1lib in $LIBS
19519 do
19520         for cf_add_2lib in $cf_add_libs
19521         do
19522                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19523                 then
19524                         cf_add_1lib=
19525                         break
19526                 fi
19527         done
19528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19529 done
19530 LIBS="$cf_add_libs"
19531
19532         cat >conftest.$ac_ext <<_ACEOF
19533 #line 19533 "configure"
19534 #include "confdefs.h"
19535
19536 #include <$cf_gpp_libname/builtin.h>
19537
19538 int
19539 main ()
19540 {
19541 two_arg_error_handler_t foo2 = lib_error_handler
19542   ;
19543   return 0;
19544 }
19545 _ACEOF
19546 rm -f conftest.$ac_objext conftest$ac_exeext
19547 if { (eval echo "$as_me:19547: \"$ac_link\"") >&5
19548   (eval $ac_link) 2>&5
19549   ac_status=$?
19550   echo "$as_me:19550: \$? = $ac_status" >&5
19551   (exit $ac_status); } &&
19552          { ac_try='test -s conftest$ac_exeext'
19553   { (eval echo "$as_me:19553: \"$ac_try\"") >&5
19554   (eval $ac_try) 2>&5
19555   ac_status=$?
19556   echo "$as_me:19556: \$? = $ac_status" >&5
19557   (exit $ac_status); }; }; then
19558   cf_cxx_library=yes
19559
19560 cf_add_libs="-l$cf_gpp_libname"
19561 # Filter out duplicates - this happens with badly-designed ".pc" files...
19562 for cf_add_1lib in $CXXLIBS
19563 do
19564         for cf_add_2lib in $cf_add_libs
19565         do
19566                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19567                 then
19568                         cf_add_1lib=
19569                         break
19570                 fi
19571         done
19572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19573 done
19574 CXXLIBS="$cf_add_libs"
19575
19576          if test "$cf_gpp_libname" = cpp ; then
19577
19578 cat >>confdefs.h <<\EOF
19579 #define HAVE_GPP_BUILTIN_H 1
19580 EOF
19581
19582          else
19583
19584 cat >>confdefs.h <<\EOF
19585 #define HAVE_GXX_BUILTIN_H 1
19586 EOF
19587
19588          fi
19589 else
19590   echo "$as_me: failed program was:" >&5
19591 cat conftest.$ac_ext >&5
19592 cat >conftest.$ac_ext <<_ACEOF
19593 #line 19593 "configure"
19594 #include "confdefs.h"
19595
19596 #include <builtin.h>
19597
19598 int
19599 main ()
19600 {
19601 two_arg_error_handler_t foo2 = lib_error_handler
19602   ;
19603   return 0;
19604 }
19605 _ACEOF
19606 rm -f conftest.$ac_objext conftest$ac_exeext
19607 if { (eval echo "$as_me:19607: \"$ac_link\"") >&5
19608   (eval $ac_link) 2>&5
19609   ac_status=$?
19610   echo "$as_me:19610: \$? = $ac_status" >&5
19611   (exit $ac_status); } &&
19612          { ac_try='test -s conftest$ac_exeext'
19613   { (eval echo "$as_me:19613: \"$ac_try\"") >&5
19614   (eval $ac_try) 2>&5
19615   ac_status=$?
19616   echo "$as_me:19616: \$? = $ac_status" >&5
19617   (exit $ac_status); }; }; then
19618   cf_cxx_library=yes
19619
19620 cf_add_libs="-l$cf_gpp_libname"
19621 # Filter out duplicates - this happens with badly-designed ".pc" files...
19622 for cf_add_1lib in $CXXLIBS
19623 do
19624         for cf_add_2lib in $cf_add_libs
19625         do
19626                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19627                 then
19628                         cf_add_1lib=
19629                         break
19630                 fi
19631         done
19632         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19633 done
19634 CXXLIBS="$cf_add_libs"
19635
19636 cat >>confdefs.h <<\EOF
19637 #define HAVE_BUILTIN_H 1
19638 EOF
19639
19640 else
19641   echo "$as_me: failed program was:" >&5
19642 cat conftest.$ac_ext >&5
19643 cf_cxx_library=no
19644 fi
19645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19646 fi
19647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19648         LIBS="$cf_save"
19649         echo "$as_me:19649: result: $cf_cxx_library" >&5
19650 echo "${ECHO_T}$cf_cxx_library" >&6
19651 fi
19652
19653                 ;;
19654         (*)
19655                 cf_cxx_library=no
19656                 ;;
19657         esac
19658
19659         ac_ext=cc
19660 ac_cpp='$CXXCPP $CPPFLAGS'
19661 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19662 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19663 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19664 ac_main_return=return
19665 echo "$as_me:19665: checking how to run the C++ preprocessor" >&5
19666 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19667 if test -z "$CXXCPP"; then
19668   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19669   echo $ECHO_N "(cached) $ECHO_C" >&6
19670 else
19671       # Double quotes because CXXCPP needs to be expanded
19672     for CXXCPP in "$CXX -E" "/lib/cpp"
19673     do
19674       ac_preproc_ok=false
19675 for ac_cxx_preproc_warn_flag in '' yes
19676 do
19677   # Use a header file that comes with gcc, so configuring glibc
19678   # with a fresh cross-compiler works.
19679   # On the NeXT, cc -E runs the code through the compiler's parser,
19680   # not just through cpp. "Syntax error" is here to catch this case.
19681   cat >conftest.$ac_ext <<_ACEOF
19682 #line 19682 "configure"
19683 #include "confdefs.h"
19684 #include <assert.h>
19685                      Syntax error
19686 _ACEOF
19687 if { (eval echo "$as_me:19687: \"$ac_cpp conftest.$ac_ext\"") >&5
19688   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19689   ac_status=$?
19690   egrep -v '^ *\+' conftest.er1 >conftest.err
19691   rm -f conftest.er1
19692   cat conftest.err >&5
19693   echo "$as_me:19693: \$? = $ac_status" >&5
19694   (exit $ac_status); } >/dev/null; then
19695   if test -s conftest.err; then
19696     ac_cpp_err=$ac_cxx_preproc_warn_flag
19697   else
19698     ac_cpp_err=
19699   fi
19700 else
19701   ac_cpp_err=yes
19702 fi
19703 if test -z "$ac_cpp_err"; then
19704   :
19705 else
19706   echo "$as_me: failed program was:" >&5
19707   cat conftest.$ac_ext >&5
19708   # Broken: fails on valid input.
19709 continue
19710 fi
19711 rm -f conftest.err conftest.$ac_ext
19712
19713   # OK, works on sane cases.  Now check whether non-existent headers
19714   # can be detected and how.
19715   cat >conftest.$ac_ext <<_ACEOF
19716 #line 19716 "configure"
19717 #include "confdefs.h"
19718 #include <ac_nonexistent.h>
19719 _ACEOF
19720 if { (eval echo "$as_me:19720: \"$ac_cpp conftest.$ac_ext\"") >&5
19721   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19722   ac_status=$?
19723   egrep -v '^ *\+' conftest.er1 >conftest.err
19724   rm -f conftest.er1
19725   cat conftest.err >&5
19726   echo "$as_me:19726: \$? = $ac_status" >&5
19727   (exit $ac_status); } >/dev/null; then
19728   if test -s conftest.err; then
19729     ac_cpp_err=$ac_cxx_preproc_warn_flag
19730   else
19731     ac_cpp_err=
19732   fi
19733 else
19734   ac_cpp_err=yes
19735 fi
19736 if test -z "$ac_cpp_err"; then
19737   # Broken: success on invalid input.
19738 continue
19739 else
19740   echo "$as_me: failed program was:" >&5
19741   cat conftest.$ac_ext >&5
19742   # Passes both tests.
19743 ac_preproc_ok=:
19744 break
19745 fi
19746 rm -f conftest.err conftest.$ac_ext
19747
19748 done
19749 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19750 rm -f conftest.err conftest.$ac_ext
19751 if $ac_preproc_ok; then
19752   break
19753 fi
19754
19755     done
19756     ac_cv_prog_CXXCPP=$CXXCPP
19757
19758 fi
19759   CXXCPP=$ac_cv_prog_CXXCPP
19760 else
19761   ac_cv_prog_CXXCPP=$CXXCPP
19762 fi
19763 echo "$as_me:19763: result: $CXXCPP" >&5
19764 echo "${ECHO_T}$CXXCPP" >&6
19765 ac_preproc_ok=false
19766 for ac_cxx_preproc_warn_flag in '' yes
19767 do
19768   # Use a header file that comes with gcc, so configuring glibc
19769   # with a fresh cross-compiler works.
19770   # On the NeXT, cc -E runs the code through the compiler's parser,
19771   # not just through cpp. "Syntax error" is here to catch this case.
19772   cat >conftest.$ac_ext <<_ACEOF
19773 #line 19773 "configure"
19774 #include "confdefs.h"
19775 #include <assert.h>
19776                      Syntax error
19777 _ACEOF
19778 if { (eval echo "$as_me:19778: \"$ac_cpp conftest.$ac_ext\"") >&5
19779   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19780   ac_status=$?
19781   egrep -v '^ *\+' conftest.er1 >conftest.err
19782   rm -f conftest.er1
19783   cat conftest.err >&5
19784   echo "$as_me:19784: \$? = $ac_status" >&5
19785   (exit $ac_status); } >/dev/null; then
19786   if test -s conftest.err; then
19787     ac_cpp_err=$ac_cxx_preproc_warn_flag
19788   else
19789     ac_cpp_err=
19790   fi
19791 else
19792   ac_cpp_err=yes
19793 fi
19794 if test -z "$ac_cpp_err"; then
19795   :
19796 else
19797   echo "$as_me: failed program was:" >&5
19798   cat conftest.$ac_ext >&5
19799   # Broken: fails on valid input.
19800 continue
19801 fi
19802 rm -f conftest.err conftest.$ac_ext
19803
19804   # OK, works on sane cases.  Now check whether non-existent headers
19805   # can be detected and how.
19806   cat >conftest.$ac_ext <<_ACEOF
19807 #line 19807 "configure"
19808 #include "confdefs.h"
19809 #include <ac_nonexistent.h>
19810 _ACEOF
19811 if { (eval echo "$as_me:19811: \"$ac_cpp conftest.$ac_ext\"") >&5
19812   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19813   ac_status=$?
19814   egrep -v '^ *\+' conftest.er1 >conftest.err
19815   rm -f conftest.er1
19816   cat conftest.err >&5
19817   echo "$as_me:19817: \$? = $ac_status" >&5
19818   (exit $ac_status); } >/dev/null; then
19819   if test -s conftest.err; then
19820     ac_cpp_err=$ac_cxx_preproc_warn_flag
19821   else
19822     ac_cpp_err=
19823   fi
19824 else
19825   ac_cpp_err=yes
19826 fi
19827 if test -z "$ac_cpp_err"; then
19828   # Broken: success on invalid input.
19829 continue
19830 else
19831   echo "$as_me: failed program was:" >&5
19832   cat conftest.$ac_ext >&5
19833   # Passes both tests.
19834 ac_preproc_ok=:
19835 break
19836 fi
19837 rm -f conftest.err conftest.$ac_ext
19838
19839 done
19840 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19841 rm -f conftest.err conftest.$ac_ext
19842 if $ac_preproc_ok; then
19843   :
19844 else
19845   { { echo "$as_me:19845: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19846 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19847    { (exit 1); exit 1; }; }
19848 fi
19849
19850 ac_ext=cc
19851 ac_cpp='$CXXCPP $CPPFLAGS'
19852 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19853 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19854 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19855 ac_main_return=return
19856
19857 for ac_header in typeinfo
19858 do
19859 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19860 echo "$as_me:19860: checking for $ac_header" >&5
19861 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19862 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19863   echo $ECHO_N "(cached) $ECHO_C" >&6
19864 else
19865   cat >conftest.$ac_ext <<_ACEOF
19866 #line 19866 "configure"
19867 #include "confdefs.h"
19868 #include <$ac_header>
19869 _ACEOF
19870 if { (eval echo "$as_me:19870: \"$ac_cpp conftest.$ac_ext\"") >&5
19871   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19872   ac_status=$?
19873   egrep -v '^ *\+' conftest.er1 >conftest.err
19874   rm -f conftest.er1
19875   cat conftest.err >&5
19876   echo "$as_me:19876: \$? = $ac_status" >&5
19877   (exit $ac_status); } >/dev/null; then
19878   if test -s conftest.err; then
19879     ac_cpp_err=$ac_cxx_preproc_warn_flag
19880   else
19881     ac_cpp_err=
19882   fi
19883 else
19884   ac_cpp_err=yes
19885 fi
19886 if test -z "$ac_cpp_err"; then
19887   eval "$as_ac_Header=yes"
19888 else
19889   echo "$as_me: failed program was:" >&5
19890   cat conftest.$ac_ext >&5
19891   eval "$as_ac_Header=no"
19892 fi
19893 rm -f conftest.err conftest.$ac_ext
19894 fi
19895 echo "$as_me:19895: result: `eval echo '${'$as_ac_Header'}'`" >&5
19896 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19897 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19898   cat >>confdefs.h <<EOF
19899 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19900 EOF
19901
19902 fi
19903 done
19904
19905 for ac_header in iostream
19906 do
19907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19908 echo "$as_me:19908: checking for $ac_header" >&5
19909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19911   echo $ECHO_N "(cached) $ECHO_C" >&6
19912 else
19913   cat >conftest.$ac_ext <<_ACEOF
19914 #line 19914 "configure"
19915 #include "confdefs.h"
19916 #include <$ac_header>
19917 _ACEOF
19918 if { (eval echo "$as_me:19918: \"$ac_cpp conftest.$ac_ext\"") >&5
19919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19920   ac_status=$?
19921   egrep -v '^ *\+' conftest.er1 >conftest.err
19922   rm -f conftest.er1
19923   cat conftest.err >&5
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit $ac_status); } >/dev/null; then
19926   if test -s conftest.err; then
19927     ac_cpp_err=$ac_cxx_preproc_warn_flag
19928   else
19929     ac_cpp_err=
19930   fi
19931 else
19932   ac_cpp_err=yes
19933 fi
19934 if test -z "$ac_cpp_err"; then
19935   eval "$as_ac_Header=yes"
19936 else
19937   echo "$as_me: failed program was:" >&5
19938   cat conftest.$ac_ext >&5
19939   eval "$as_ac_Header=no"
19940 fi
19941 rm -f conftest.err conftest.$ac_ext
19942 fi
19943 echo "$as_me:19943: result: `eval echo '${'$as_ac_Header'}'`" >&5
19944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19945 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19946   cat >>confdefs.h <<EOF
19947 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19948 EOF
19949
19950 fi
19951 done
19952
19953 if test x"$ac_cv_header_iostream" = xyes ; then
19954         echo "$as_me:19954: checking if iostream uses std-namespace" >&5
19955 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19956         cat >conftest.$ac_ext <<_ACEOF
19957 #line 19957 "configure"
19958 #include "confdefs.h"
19959
19960 #include <iostream>
19961 using std::endl;
19962 using std::cerr;
19963 int
19964 main ()
19965 {
19966
19967 cerr << "testing" << endl;
19968
19969   ;
19970   return 0;
19971 }
19972 _ACEOF
19973 rm -f conftest.$ac_objext
19974 if { (eval echo "$as_me:19974: \"$ac_compile\"") >&5
19975   (eval $ac_compile) 2>&5
19976   ac_status=$?
19977   echo "$as_me:19977: \$? = $ac_status" >&5
19978   (exit $ac_status); } &&
19979          { ac_try='test -s conftest.$ac_objext'
19980   { (eval echo "$as_me:19980: \"$ac_try\"") >&5
19981   (eval $ac_try) 2>&5
19982   ac_status=$?
19983   echo "$as_me:19983: \$? = $ac_status" >&5
19984   (exit $ac_status); }; }; then
19985   cf_iostream_namespace=yes
19986 else
19987   echo "$as_me: failed program was:" >&5
19988 cat conftest.$ac_ext >&5
19989 cf_iostream_namespace=no
19990 fi
19991 rm -f conftest.$ac_objext conftest.$ac_ext
19992         echo "$as_me:19992: result: $cf_iostream_namespace" >&5
19993 echo "${ECHO_T}$cf_iostream_namespace" >&6
19994         if test "$cf_iostream_namespace" = yes ; then
19995
19996 cat >>confdefs.h <<\EOF
19997 #define IOSTREAM_NAMESPACE 1
19998 EOF
19999
20000         fi
20001 fi
20002
20003 echo "$as_me:20003: checking if we should include stdbool.h" >&5
20004 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20005
20006 if test "${cf_cv_header_stdbool_h+set}" = set; then
20007   echo $ECHO_N "(cached) $ECHO_C" >&6
20008 else
20009
20010         cat >conftest.$ac_ext <<_ACEOF
20011 #line 20011 "configure"
20012 #include "confdefs.h"
20013
20014 int
20015 main ()
20016 {
20017 bool foo = false
20018   ;
20019   return 0;
20020 }
20021 _ACEOF
20022 rm -f conftest.$ac_objext
20023 if { (eval echo "$as_me:20023: \"$ac_compile\"") >&5
20024   (eval $ac_compile) 2>&5
20025   ac_status=$?
20026   echo "$as_me:20026: \$? = $ac_status" >&5
20027   (exit $ac_status); } &&
20028          { ac_try='test -s conftest.$ac_objext'
20029   { (eval echo "$as_me:20029: \"$ac_try\"") >&5
20030   (eval $ac_try) 2>&5
20031   ac_status=$?
20032   echo "$as_me:20032: \$? = $ac_status" >&5
20033   (exit $ac_status); }; }; then
20034   cf_cv_header_stdbool_h=0
20035 else
20036   echo "$as_me: failed program was:" >&5
20037 cat conftest.$ac_ext >&5
20038 cat >conftest.$ac_ext <<_ACEOF
20039 #line 20039 "configure"
20040 #include "confdefs.h"
20041
20042 #ifndef __BEOS__
20043 #include <stdbool.h>
20044 #endif
20045
20046 int
20047 main ()
20048 {
20049 bool foo = 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_header_stdbool_h=1
20067 else
20068   echo "$as_me: failed program was:" >&5
20069 cat conftest.$ac_ext >&5
20070 cf_cv_header_stdbool_h=0
20071 fi
20072 rm -f conftest.$ac_objext conftest.$ac_ext
20073 fi
20074 rm -f conftest.$ac_objext conftest.$ac_ext
20075 fi
20076
20077 if test "$cf_cv_header_stdbool_h" = 1
20078 then    echo "$as_me:20078: result: yes" >&5
20079 echo "${ECHO_T}yes" >&6
20080 else    echo "$as_me:20080: result: no" >&5
20081 echo "${ECHO_T}no" >&6
20082 fi
20083
20084 echo "$as_me:20084: checking for builtin bool type" >&5
20085 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20086
20087 if test "${cf_cv_builtin_bool+set}" = set; then
20088   echo $ECHO_N "(cached) $ECHO_C" >&6
20089 else
20090
20091         cat >conftest.$ac_ext <<_ACEOF
20092 #line 20092 "configure"
20093 #include "confdefs.h"
20094
20095 #include <stdio.h>
20096 #include <sys/types.h>
20097
20098 int
20099 main ()
20100 {
20101 bool x = false
20102   ;
20103   return 0;
20104 }
20105 _ACEOF
20106 rm -f conftest.$ac_objext
20107 if { (eval echo "$as_me:20107: \"$ac_compile\"") >&5
20108   (eval $ac_compile) 2>&5
20109   ac_status=$?
20110   echo "$as_me:20110: \$? = $ac_status" >&5
20111   (exit $ac_status); } &&
20112          { ac_try='test -s conftest.$ac_objext'
20113   { (eval echo "$as_me:20113: \"$ac_try\"") >&5
20114   (eval $ac_try) 2>&5
20115   ac_status=$?
20116   echo "$as_me:20116: \$? = $ac_status" >&5
20117   (exit $ac_status); }; }; then
20118   cf_cv_builtin_bool=1
20119 else
20120   echo "$as_me: failed program was:" >&5
20121 cat conftest.$ac_ext >&5
20122 cf_cv_builtin_bool=0
20123 fi
20124 rm -f conftest.$ac_objext conftest.$ac_ext
20125
20126 fi
20127
20128 if test "$cf_cv_builtin_bool" = 1
20129 then    echo "$as_me:20129: result: yes" >&5
20130 echo "${ECHO_T}yes" >&6
20131 else    echo "$as_me:20131: result: no" >&5
20132 echo "${ECHO_T}no" >&6
20133 fi
20134
20135 echo "$as_me:20135: checking for size of bool" >&5
20136 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20137 if test "${cf_cv_type_of_bool+set}" = set; then
20138   echo $ECHO_N "(cached) $ECHO_C" >&6
20139 else
20140
20141         rm -f cf_test.out
20142         if test "$cross_compiling" = yes; then
20143   cf_cv_type_of_bool=unknown
20144 else
20145   cat >conftest.$ac_ext <<_ACEOF
20146 #line 20146 "configure"
20147 #include "confdefs.h"
20148
20149 #include <stdlib.h>
20150 #include <stdio.h>
20151
20152 #if defined(__cplusplus)
20153
20154 #ifdef HAVE_GXX_BUILTIN_H
20155 #include <g++/builtin.h>
20156 #elif HAVE_GPP_BUILTIN_H
20157 #include <gpp/builtin.h>
20158 #elif HAVE_BUILTIN_H
20159 #include <builtin.h>
20160 #endif
20161
20162 #else
20163
20164 #if $cf_cv_header_stdbool_h
20165 #include <stdbool.h>
20166 #endif
20167
20168 #endif
20169
20170 int main()
20171 {
20172         FILE *fp = fopen("cf_test.out", "w");
20173         if (fp != 0) {
20174                 bool x = true;
20175                 if ((bool)(-x) >= 0)
20176                         fputs("unsigned ", fp);
20177                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20178                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20179                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20180                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20181                 fclose(fp);
20182         }
20183         ${cf_cv_main_return:-return}(0);
20184 }
20185
20186 _ACEOF
20187 rm -f conftest$ac_exeext
20188 if { (eval echo "$as_me:20188: \"$ac_link\"") >&5
20189   (eval $ac_link) 2>&5
20190   ac_status=$?
20191   echo "$as_me:20191: \$? = $ac_status" >&5
20192   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20193   { (eval echo "$as_me:20193: \"$ac_try\"") >&5
20194   (eval $ac_try) 2>&5
20195   ac_status=$?
20196   echo "$as_me:20196: \$? = $ac_status" >&5
20197   (exit $ac_status); }; }; then
20198   cf_cv_type_of_bool=`cat cf_test.out`
20199                  if test -z "$cf_cv_type_of_bool"; then
20200                    cf_cv_type_of_bool=unknown
20201                  fi
20202 else
20203   echo "$as_me: program exited with status $ac_status" >&5
20204 echo "$as_me: failed program was:" >&5
20205 cat conftest.$ac_ext >&5
20206 cf_cv_type_of_bool=unknown
20207 fi
20208 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20209 fi
20210
20211 fi
20212
20213         rm -f cf_test.out
20214 echo "$as_me:20214: result: $cf_cv_type_of_bool" >&5
20215 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20216 if test "$cf_cv_type_of_bool" = unknown ; then
20217         case .$NCURSES_BOOL in
20218         (.auto|.) NCURSES_BOOL=unsigned;;
20219         esac
20220         { echo "$as_me:20220: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20221 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20222         cf_cv_type_of_bool=$NCURSES_BOOL
20223 fi
20224
20225 echo "$as_me:20225: checking for special defines needed for etip.h" >&5
20226 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20227 cf_save_CXXFLAGS="$CXXFLAGS"
20228 cf_result="none"
20229
20230 # etip.h includes ncurses.h which includes ncurses_dll.h
20231 # But ncurses_dll.h is generated - fix here.
20232 test -d include || mkdir include
20233 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
20234
20235 for cf_math in "" MATH_H
20236 do
20237 for cf_excp in "" MATH_EXCEPTION
20238 do
20239         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20240         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20241         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20242 cat >conftest.$ac_ext <<_ACEOF
20243 #line 20243 "configure"
20244 #include "confdefs.h"
20245
20246 #include <etip.h.in>
20247
20248 int
20249 main ()
20250 {
20251
20252   ;
20253   return 0;
20254 }
20255 _ACEOF
20256 rm -f conftest.$ac_objext
20257 if { (eval echo "$as_me:20257: \"$ac_compile\"") >&5
20258   (eval $ac_compile) 2>&5
20259   ac_status=$?
20260   echo "$as_me:20260: \$? = $ac_status" >&5
20261   (exit $ac_status); } &&
20262          { ac_try='test -s conftest.$ac_objext'
20263   { (eval echo "$as_me:20263: \"$ac_try\"") >&5
20264   (eval $ac_try) 2>&5
20265   ac_status=$?
20266   echo "$as_me:20266: \$? = $ac_status" >&5
20267   (exit $ac_status); }; }; then
20268
20269         test -n "$cf_math" && cat >>confdefs.h <<EOF
20270 #define ETIP_NEEDS_${cf_math} 1
20271 EOF
20272
20273         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20274 #define ETIP_NEEDS_${cf_excp} 1
20275 EOF
20276
20277         cf_result="$cf_math $cf_excp"
20278         break 2
20279
20280 else
20281   echo "$as_me: failed program was:" >&5
20282 cat conftest.$ac_ext >&5
20283 fi
20284 rm -f conftest.$ac_objext conftest.$ac_ext
20285 done
20286 done
20287 echo "$as_me:20287: result: $cf_result" >&5
20288 echo "${ECHO_T}$cf_result" >&6
20289 CXXFLAGS="$cf_save_CXXFLAGS"
20290
20291 if test -n "$CXX"; then
20292 echo "$as_me:20292: checking if $CXX accepts parameter initialization" >&5
20293 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20294 if test "${cf_cv_cpp_param_init+set}" = set; then
20295   echo $ECHO_N "(cached) $ECHO_C" >&6
20296 else
20297
20298         ac_ext=cc
20299 ac_cpp='$CXXCPP $CPPFLAGS'
20300 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20301 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20302 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20303 ac_main_return=return
20304
20305         if test "$cross_compiling" = yes; then
20306   cf_cv_cpp_param_init=unknown
20307 else
20308   cat >conftest.$ac_ext <<_ACEOF
20309 #line 20309 "configure"
20310 #include "confdefs.h"
20311
20312 class TEST {
20313 private:
20314         int value;
20315 public:
20316         TEST(int x = 1);
20317         ~TEST();
20318 };
20319
20320 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20321 {
20322         value = x;
20323 }
20324 int main() { }
20325
20326 _ACEOF
20327 rm -f conftest$ac_exeext
20328 if { (eval echo "$as_me:20328: \"$ac_link\"") >&5
20329   (eval $ac_link) 2>&5
20330   ac_status=$?
20331   echo "$as_me:20331: \$? = $ac_status" >&5
20332   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20333   { (eval echo "$as_me:20333: \"$ac_try\"") >&5
20334   (eval $ac_try) 2>&5
20335   ac_status=$?
20336   echo "$as_me:20336: \$? = $ac_status" >&5
20337   (exit $ac_status); }; }; then
20338   cf_cv_cpp_param_init=yes
20339 else
20340   echo "$as_me: program exited with status $ac_status" >&5
20341 echo "$as_me: failed program was:" >&5
20342 cat conftest.$ac_ext >&5
20343 cf_cv_cpp_param_init=no
20344 fi
20345 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20346 fi
20347         ac_ext=cc
20348 ac_cpp='$CXXCPP $CPPFLAGS'
20349 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20350 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20351 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20352 ac_main_return=return
20353
20354 fi
20355 echo "$as_me:20355: result: $cf_cv_cpp_param_init" >&5
20356 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20357 fi
20358 test "$cf_cv_cpp_param_init" = yes &&
20359 cat >>confdefs.h <<\EOF
20360 #define CPP_HAS_PARAM_INIT 1
20361 EOF
20362
20363 if test -n "$CXX"; then
20364
20365 echo "$as_me:20365: checking if $CXX accepts static_cast" >&5
20366 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20367 if test "${cf_cv_cpp_static_cast+set}" = set; then
20368   echo $ECHO_N "(cached) $ECHO_C" >&6
20369 else
20370
20371         ac_ext=cc
20372 ac_cpp='$CXXCPP $CPPFLAGS'
20373 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20374 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20375 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20376 ac_main_return=return
20377
20378         cat >conftest.$ac_ext <<_ACEOF
20379 #line 20379 "configure"
20380 #include "confdefs.h"
20381
20382 class NCursesPanel
20383 {
20384 public:
20385   NCursesPanel(int nlines,
20386                int ncols,
20387                int begin_y = 0,
20388                int begin_x = 0)
20389   {
20390   }
20391   NCursesPanel();
20392   ~NCursesPanel();
20393 };
20394
20395 template<class T> class NCursesUserPanel : public NCursesPanel
20396 {
20397 public:
20398   NCursesUserPanel (int nlines,
20399                     int ncols,
20400                     int begin_y = 0,
20401                     int begin_x = 0,
20402                     const T* p_UserData = static_cast<T*>(0))
20403     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20404   {
20405   };
20406   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20407   {
20408   };
20409
20410   virtual ~NCursesUserPanel() {};
20411 };
20412
20413 int
20414 main ()
20415 {
20416
20417         const char* p_UserData = static_cast<char*>(0)
20418   ;
20419   return 0;
20420 }
20421 _ACEOF
20422 rm -f conftest.$ac_objext
20423 if { (eval echo "$as_me:20423: \"$ac_compile\"") >&5
20424   (eval $ac_compile) 2>&5
20425   ac_status=$?
20426   echo "$as_me:20426: \$? = $ac_status" >&5
20427   (exit $ac_status); } &&
20428          { ac_try='test -s conftest.$ac_objext'
20429   { (eval echo "$as_me:20429: \"$ac_try\"") >&5
20430   (eval $ac_try) 2>&5
20431   ac_status=$?
20432   echo "$as_me:20432: \$? = $ac_status" >&5
20433   (exit $ac_status); }; }; then
20434   cf_cv_cpp_static_cast=yes
20435 else
20436   echo "$as_me: failed program was:" >&5
20437 cat conftest.$ac_ext >&5
20438 cf_cv_cpp_static_cast=no
20439 fi
20440 rm -f conftest.$ac_objext conftest.$ac_ext
20441
20442         ac_ext=cc
20443 ac_cpp='$CXXCPP $CPPFLAGS'
20444 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20445 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20446 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20447 ac_main_return=return
20448
20449 fi
20450 echo "$as_me:20450: result: $cf_cv_cpp_static_cast" >&5
20451 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20452
20453 fi
20454
20455 test "$cf_cv_cpp_static_cast" = yes &&
20456 cat >>confdefs.h <<\EOF
20457 #define CPP_HAS_STATIC_CAST 1
20458 EOF
20459
20460         CXX_AR='$(AR)'
20461         CXX_ARFLAGS='$(ARFLAGS)'
20462         case $cf_cv_system_name in
20463         (irix*)
20464             if test "$GXX" != yes ; then
20465                 CXX_AR='$(CXX)'
20466                 CXX_ARFLAGS='-ar -o'
20467             fi
20468             ;;
20469         (sco3.2v5*)
20470             CXXLDFLAGS="-u main"
20471             ;;
20472         (solaris2*)
20473             if test "$GXX" != yes ; then
20474                 CXX_AR='$(CXX)'
20475                 CXX_ARFLAGS='-xar -o'
20476             fi
20477             ;;
20478         esac
20479
20480 else
20481         cf_cxx_library=no
20482         cf_cv_builtin_bool=1
20483
20484         # Just because we are not configuring against C++ right now does not
20485         # mean that a user will not want to use C++.  Some distributors disable
20486         # the C++ portion of this configuration as a shortcut (or just to avoid
20487         # compiling the demo in the c++ directory).  So we need a reasonable
20488         # default for the 'bool' type.
20489         #
20490         # Caveat: since the storage of the bool type is not standardized, it
20491         # may change.
20492
20493         if test "$NCURSES_BOOL" != auto ; then
20494                 cf_cv_type_of_bool=$NCURSES_BOOL
20495                 cf_cv_header_stdbool_h=0
20496         else
20497                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20498
20499 echo "$as_me:20499: checking for size of bool" >&5
20500 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20501 if test "${cf_cv_type_of_bool+set}" = set; then
20502   echo $ECHO_N "(cached) $ECHO_C" >&6
20503 else
20504
20505         rm -f cf_test.out
20506         if test "$cross_compiling" = yes; then
20507   cf_cv_type_of_bool=unknown
20508 else
20509   cat >conftest.$ac_ext <<_ACEOF
20510 #line 20510 "configure"
20511 #include "confdefs.h"
20512
20513 #include <stdlib.h>
20514 #include <stdio.h>
20515
20516 #if defined(__cplusplus)
20517
20518 #ifdef HAVE_GXX_BUILTIN_H
20519 #include <g++/builtin.h>
20520 #elif HAVE_GPP_BUILTIN_H
20521 #include <gpp/builtin.h>
20522 #elif HAVE_BUILTIN_H
20523 #include <builtin.h>
20524 #endif
20525
20526 #else
20527
20528 #if $cf_cv_header_stdbool_h
20529 #include <stdbool.h>
20530 #endif
20531
20532 #endif
20533
20534 int main()
20535 {
20536         FILE *fp = fopen("cf_test.out", "w");
20537         if (fp != 0) {
20538                 bool x = true;
20539                 if ((bool)(-x) >= 0)
20540                         fputs("unsigned ", fp);
20541                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20542                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20543                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20544                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20545                 fclose(fp);
20546         }
20547         ${cf_cv_main_return:-return}(0);
20548 }
20549
20550 _ACEOF
20551 rm -f conftest$ac_exeext
20552 if { (eval echo "$as_me:20552: \"$ac_link\"") >&5
20553   (eval $ac_link) 2>&5
20554   ac_status=$?
20555   echo "$as_me:20555: \$? = $ac_status" >&5
20556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20557   { (eval echo "$as_me:20557: \"$ac_try\"") >&5
20558   (eval $ac_try) 2>&5
20559   ac_status=$?
20560   echo "$as_me:20560: \$? = $ac_status" >&5
20561   (exit $ac_status); }; }; then
20562   cf_cv_type_of_bool=`cat cf_test.out`
20563                  if test -z "$cf_cv_type_of_bool"; then
20564                    cf_cv_type_of_bool=unknown
20565                  fi
20566 else
20567   echo "$as_me: program exited with status $ac_status" >&5
20568 echo "$as_me: failed program was:" >&5
20569 cat conftest.$ac_ext >&5
20570 cf_cv_type_of_bool=unknown
20571 fi
20572 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20573 fi
20574
20575 fi
20576
20577         rm -f cf_test.out
20578 echo "$as_me:20578: result: $cf_cv_type_of_bool" >&5
20579 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20580 if test "$cf_cv_type_of_bool" = unknown ; then
20581         case .$NCURSES_BOOL in
20582         (.auto|.) NCURSES_BOOL=unsigned;;
20583         esac
20584         { echo "$as_me:20584: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20585 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20586         cf_cv_type_of_bool=$NCURSES_BOOL
20587 fi
20588
20589                 else
20590                         echo "$as_me:20590: checking for fallback type of bool" >&5
20591 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20592                         case "$host_cpu" in
20593                         (i?86)  cf_cv_type_of_bool=char ;;
20594                         (*)     cf_cv_type_of_bool=int  ;;
20595                         esac
20596                         echo "$as_me:20596: result: $cf_cv_type_of_bool" >&5
20597 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20598                 fi
20599         fi
20600 fi
20601
20602 # If the C compiler did not declare bool, and we did not determine that the C++
20603 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20604 # ncurses library use the same type as C++ bool.  Note that this allows one to
20605 # specify the type of bool in a configure-script option and postpone
20606 # integration with the C++ compiler provided that the types are compatible.
20607 USE_CXX_BOOL=1
20608 if test $cf_cv_cc_bool_type = 1
20609 then
20610         # oops: C has a bool.  Unlikely, but C++ could differ.
20611         USE_CXX_BOOL=0
20612 elif test $cf_cv_builtin_bool = 0
20613 then
20614         # C++ has no bool
20615         USE_CXX_BOOL=0
20616 else
20617         # this is the normal case
20618         USE_CXX_BOOL='defined(__cplusplus)'
20619 fi
20620
20621 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20622
20623         if test "$cf_with_ada" != "no" ; then
20624                 if test "$with_libtool" != "no"; then
20625                         { echo "$as_me:20625: WARNING: libtool does not support Ada - disabling feature" >&5
20626 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20627                         cf_with_ada=no
20628                 fi
20629         fi
20630
20631         if test "$cf_with_ada" != "no" ; then
20632
20633 cf_ada_make=gnatmake
20634 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20635 set dummy $cf_ada_make; ac_word=$2
20636 echo "$as_me:20636: checking for $ac_word" >&5
20637 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20638 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20639   echo $ECHO_N "(cached) $ECHO_C" >&6
20640 else
20641   if test -n "$gnat_exists"; then
20642   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20643 else
20644   ac_save_IFS=$IFS; IFS=$ac_path_separator
20645 ac_dummy="$PATH"
20646 for ac_dir in $ac_dummy; do
20647   IFS=$ac_save_IFS
20648   test -z "$ac_dir" && ac_dir=.
20649   $as_executable_p "$ac_dir/$ac_word" || continue
20650 ac_cv_prog_gnat_exists="yes"
20651 echo "$as_me:20651: found $ac_dir/$ac_word" >&5
20652 break
20653 done
20654
20655   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20656 fi
20657 fi
20658 gnat_exists=$ac_cv_prog_gnat_exists
20659 if test -n "$gnat_exists"; then
20660   echo "$as_me:20660: result: $gnat_exists" >&5
20661 echo "${ECHO_T}$gnat_exists" >&6
20662 else
20663   echo "$as_me:20663: result: no" >&5
20664 echo "${ECHO_T}no" >&6
20665 fi
20666
20667 if test "$ac_cv_prog_gnat_exists" = no; then
20668         cf_ada_make=
20669         cf_cv_prog_gnat_correct=no
20670 else
20671
20672 echo "$as_me:20672: checking for gnat version" >&5
20673 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20674 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20675         grep '[0-9].[0-9][0-9]*' |\
20676         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20677 echo "$as_me:20677: result: $cf_gnat_version" >&5
20678 echo "${ECHO_T}$cf_gnat_version" >&6
20679
20680 case $cf_gnat_version in
20681 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20682         cf_cv_prog_gnat_correct=yes
20683         ;;
20684 (*)
20685         { echo "$as_me:20685: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20686 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20687         cf_cv_prog_gnat_correct=no
20688         ;;
20689 esac
20690
20691         # Extract the first word of "m4", so it can be a program name with args.
20692 set dummy m4; ac_word=$2
20693 echo "$as_me:20693: checking for $ac_word" >&5
20694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20695 if test "${ac_cv_prog_M4_exists+set}" = set; then
20696   echo $ECHO_N "(cached) $ECHO_C" >&6
20697 else
20698   if test -n "$M4_exists"; then
20699   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20700 else
20701   ac_save_IFS=$IFS; IFS=$ac_path_separator
20702 ac_dummy="$PATH"
20703 for ac_dir in $ac_dummy; do
20704   IFS=$ac_save_IFS
20705   test -z "$ac_dir" && ac_dir=.
20706   $as_executable_p "$ac_dir/$ac_word" || continue
20707 ac_cv_prog_M4_exists="yes"
20708 echo "$as_me:20708: found $ac_dir/$ac_word" >&5
20709 break
20710 done
20711
20712   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20713 fi
20714 fi
20715 M4_exists=$ac_cv_prog_M4_exists
20716 if test -n "$M4_exists"; then
20717   echo "$as_me:20717: result: $M4_exists" >&5
20718 echo "${ECHO_T}$M4_exists" >&6
20719 else
20720   echo "$as_me:20720: result: no" >&5
20721 echo "${ECHO_T}no" >&6
20722 fi
20723
20724         if test "$ac_cv_prog_M4_exists" = no; then
20725                 cf_cv_prog_gnat_correct=no
20726                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20727         fi
20728         if test "$cf_cv_prog_gnat_correct" = yes; then
20729                 echo "$as_me:20729: checking if GNAT works" >&5
20730 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20731
20732 rm -rf conftest* *~conftest*
20733 cat >>conftest.ads <<CF_EOF
20734 procedure conftest;
20735 CF_EOF
20736 cat >>conftest.adb <<CF_EOF
20737 with Text_IO;
20738 with GNAT.OS_Lib;
20739 procedure conftest is
20740 begin
20741    Text_IO.Put ("Hello World");
20742    Text_IO.New_Line;
20743    GNAT.OS_Lib.OS_Exit (0);
20744 end conftest;
20745 CF_EOF
20746 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20747    if ( ./conftest 1>&5 2>&1 ) ; then
20748       cf_cv_prog_gnat_correct=yes
20749    else
20750       cf_cv_prog_gnat_correct=no
20751    fi
20752 else
20753    cf_cv_prog_gnat_correct=no
20754 fi
20755 rm -rf conftest* *~conftest*
20756
20757                 echo "$as_me:20757: result: $cf_cv_prog_gnat_correct" >&5
20758 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20759         fi
20760 fi
20761
20762                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20763
20764         ADAFLAGS="$ADAFLAGS -gnatpn"
20765
20766         echo "$as_me:20766: checking optimization options for ADAFLAGS" >&5
20767 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20768         case "$CFLAGS" in
20769         (*-g*)
20770
20771         ADAFLAGS="$ADAFLAGS -g"
20772
20773                 ;;
20774         esac
20775         case "$CFLAGS" in
20776         (*-O*)
20777                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20778
20779         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20780
20781                 ;;
20782         esac
20783         echo "$as_me:20783: result: $ADAFLAGS" >&5
20784 echo "${ECHO_T}$ADAFLAGS" >&6
20785
20786 echo "$as_me:20786: checking if GNATPREP supports -T option" >&5
20787 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20788 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20789   echo $ECHO_N "(cached) $ECHO_C" >&6
20790 else
20791
20792 cf_cv_gnatprep_opt_t=no
20793 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20794
20795 fi
20796 echo "$as_me:20796: result: $cf_cv_gnatprep_opt_t" >&5
20797 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20798 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20799
20800 echo "$as_me:20800: checking if GNAT supports generics" >&5
20801 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20802 case $cf_gnat_version in
20803 (3.[1-9]*|[4-9].*)
20804         cf_gnat_generics=yes
20805         ;;
20806 (*)
20807         cf_gnat_generics=no
20808         ;;
20809 esac
20810 echo "$as_me:20810: result: $cf_gnat_generics" >&5
20811 echo "${ECHO_T}$cf_gnat_generics" >&6
20812
20813 if test "$cf_gnat_generics" = yes
20814 then
20815         cf_compile_generics=generics
20816         cf_generic_objects="\${GENOBJS}"
20817 else
20818         cf_compile_generics=
20819         cf_generic_objects=
20820 fi
20821
20822 echo "$as_me:20822: checking if GNAT supports SIGINT" >&5
20823 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20824 if test "${cf_cv_gnat_sigint+set}" = set; then
20825   echo $ECHO_N "(cached) $ECHO_C" >&6
20826 else
20827
20828 rm -rf conftest* *~conftest*
20829 cat >>conftest.ads <<CF_EOF
20830 with Ada.Interrupts.Names;
20831
20832 package ConfTest is
20833
20834    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20835    pragma Unreserve_All_Interrupts;
20836    pragma Warnings (On);
20837
20838    protected Process is
20839       procedure Stop;
20840       function Continue return Boolean;
20841       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20842    private
20843       Done : Boolean := False;
20844    end Process;
20845
20846 end ConfTest;
20847 CF_EOF
20848 cat >>conftest.adb <<CF_EOF
20849 package body ConfTest is
20850    protected body Process is
20851       procedure Stop is
20852       begin
20853          Done := True;
20854       end Stop;
20855       function Continue return Boolean is
20856       begin
20857          return not Done;
20858       end Continue;
20859    end Process;
20860 end ConfTest;
20861 CF_EOF
20862 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20863       cf_cv_gnat_sigint=yes
20864 else
20865    cf_cv_gnat_sigint=no
20866 fi
20867 rm -rf conftest* *~conftest*
20868
20869 fi
20870 echo "$as_me:20870: result: $cf_cv_gnat_sigint" >&5
20871 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20872
20873 if test $cf_cv_gnat_sigint = yes ; then
20874         USE_GNAT_SIGINT=""
20875 else
20876         USE_GNAT_SIGINT="#"
20877 fi
20878
20879 cf_gnat_libraries=no
20880 cf_gnat_projects=no
20881
20882 if test "$enable_gnat_projects" != no ; then
20883 echo "$as_me:20883: checking if GNAT supports project files" >&5
20884 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20885 case $cf_gnat_version in
20886 (3.[0-9]*)
20887         ;;
20888 (*)
20889         case $cf_cv_system_name in
20890         (cygwin*|msys*)
20891                 ;;
20892         (*)
20893                 mkdir conftest.src conftest.bin conftest.lib
20894                 cd conftest.src
20895                 rm -rf conftest* *~conftest*
20896                 cat >>library.gpr <<CF_EOF
20897 project Library is
20898   Kind := External ("LIB_KIND");
20899   for Library_Name use "ConfTest";
20900   for Object_Dir use ".";
20901   for Library_ALI_Dir use External("LIBRARY_DIR");
20902   for Library_Version use External ("SONAME");
20903   for Library_Kind use Kind;
20904   for Library_Dir use External("BUILD_DIR");
20905   Source_Dir := External ("SOURCE_DIR");
20906   for Source_Dirs use (Source_Dir);
20907 end Library;
20908 CF_EOF
20909                 cat >>confpackage.ads <<CF_EOF
20910 package ConfPackage is
20911    procedure conftest;
20912 end ConfPackage;
20913 CF_EOF
20914                 cat >>confpackage.adb <<CF_EOF
20915 with Text_IO;
20916 package body ConfPackage is
20917    procedure conftest is
20918    begin
20919       Text_IO.Put ("Hello World");
20920       Text_IO.New_Line;
20921    end conftest;
20922 end ConfPackage;
20923 CF_EOF
20924                 if ( $cf_ada_make $ADAFLAGS \
20925                                 -Plibrary.gpr \
20926                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20927                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20928                                 -XSOURCE_DIR=`pwd` \
20929                                 -XSONAME=libConfTest.so.1 \
20930                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20931                         cf_gnat_projects=yes
20932                 fi
20933                 cd ..
20934                 if test -f conftest.lib/confpackage.ali
20935                 then
20936                         cf_gnat_libraries=yes
20937                 fi
20938                 rm -rf conftest* *~conftest*
20939                 ;;
20940         esac
20941         ;;
20942 esac
20943 echo "$as_me:20943: result: $cf_gnat_projects" >&5
20944 echo "${ECHO_T}$cf_gnat_projects" >&6
20945 fi # enable_gnat_projects
20946
20947 if test $cf_gnat_projects = yes
20948 then
20949         echo "$as_me:20949: checking if GNAT supports libraries" >&5
20950 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20951         echo "$as_me:20951: result: $cf_gnat_libraries" >&5
20952 echo "${ECHO_T}$cf_gnat_libraries" >&6
20953 fi
20954
20955 if test "$cf_gnat_projects" = yes
20956 then
20957         USE_OLD_MAKERULES="#"
20958         USE_GNAT_PROJECTS=""
20959 else
20960         USE_OLD_MAKERULES=""
20961         USE_GNAT_PROJECTS="#"
20962 fi
20963
20964 if test "$cf_gnat_libraries" = yes
20965 then
20966         USE_GNAT_LIBRARIES=""
20967 else
20968         USE_GNAT_LIBRARIES="#"
20969 fi
20970
20971 echo "$as_me:20971: checking for ada-compiler" >&5
20972 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20973
20974 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20975 if test "${with_ada_compiler+set}" = set; then
20976   withval="$with_ada_compiler"
20977   cf_ada_compiler=$withval
20978 else
20979   cf_ada_compiler=gnatmake
20980 fi;
20981
20982 echo "$as_me:20982: result: $cf_ada_compiler" >&5
20983 echo "${ECHO_T}$cf_ada_compiler" >&6
20984
20985                         cf_ada_package=terminal_interface
20986
20987 echo "$as_me:20987: checking for ada-include" >&5
20988 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20989
20990 # Check whether --with-ada-include or --without-ada-include was given.
20991 if test "${with_ada_include+set}" = set; then
20992   withval="$with_ada_include"
20993
20994 else
20995   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20996 fi; if test -n "$prefix/share/ada/adainclude" ; then
20997
20998 if test "x$prefix" != xNONE; then
20999         cf_path_syntax="$prefix"
21000 else
21001         cf_path_syntax="$ac_default_prefix"
21002 fi
21003
21004 case ".$withval" in
21005 (.\$\(*\)*|.\'*\'*)
21006         ;;
21007 (..|./*|.\\*)
21008         ;;
21009 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21010         ;;
21011 (.\${*prefix}*|.\${*dir}*)
21012         eval withval="$withval"
21013         case ".$withval" in
21014         (.NONE/*)
21015                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21016                 ;;
21017         esac
21018         ;;
21019 (.no|.NONE/*)
21020         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21021         ;;
21022 (*)
21023         { { echo "$as_me:21023: error: expected a pathname, not \"$withval\"" >&5
21024 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21025    { (exit 1); exit 1; }; }
21026         ;;
21027 esac
21028
21029 fi
21030 eval ADA_INCLUDE="$withval"
21031
21032 echo "$as_me:21032: result: $ADA_INCLUDE" >&5
21033 echo "${ECHO_T}$ADA_INCLUDE" >&6
21034
21035 echo "$as_me:21035: checking for ada-objects" >&5
21036 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21037
21038 # Check whether --with-ada-objects or --without-ada-objects was given.
21039 if test "${with_ada_objects+set}" = set; then
21040   withval="$with_ada_objects"
21041
21042 else
21043   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21044 fi; if test -n "$prefix/lib/ada/adalib" ; then
21045
21046 if test "x$prefix" != xNONE; then
21047         cf_path_syntax="$prefix"
21048 else
21049         cf_path_syntax="$ac_default_prefix"
21050 fi
21051
21052 case ".$withval" in
21053 (.\$\(*\)*|.\'*\'*)
21054         ;;
21055 (..|./*|.\\*)
21056         ;;
21057 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21058         ;;
21059 (.\${*prefix}*|.\${*dir}*)
21060         eval withval="$withval"
21061         case ".$withval" in
21062         (.NONE/*)
21063                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21064                 ;;
21065         esac
21066         ;;
21067 (.no|.NONE/*)
21068         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21069         ;;
21070 (*)
21071         { { echo "$as_me:21071: error: expected a pathname, not \"$withval\"" >&5
21072 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21073    { (exit 1); exit 1; }; }
21074         ;;
21075 esac
21076
21077 fi
21078 eval ADA_OBJECTS="$withval"
21079
21080 echo "$as_me:21080: result: $ADA_OBJECTS" >&5
21081 echo "${ECHO_T}$ADA_OBJECTS" >&6
21082
21083 echo "$as_me:21083: checking if an Ada95 shared-library should be built" >&5
21084 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21085
21086 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21087 if test "${with_ada_sharedlib+set}" = set; then
21088   withval="$with_ada_sharedlib"
21089   with_ada_sharedlib=$withval
21090 else
21091   with_ada_sharedlib=no
21092 fi;
21093 echo "$as_me:21093: result: $with_ada_sharedlib" >&5
21094 echo "${ECHO_T}$with_ada_sharedlib" >&6
21095
21096 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21097 MAKE_ADA_SHAREDLIB="#"
21098
21099 if test "x$with_ada_sharedlib" != xno
21100 then
21101         MAKE_ADA_SHAREDLIB=
21102         if test "x$with_ada_sharedlib" != xyes
21103         then
21104                 ADA_SHAREDLIB="$with_ada_sharedlib"
21105         fi
21106 fi
21107
21108                 fi
21109         fi
21110 else
21111         cf_with_ada=no
21112 fi
21113
21114 # do this "late" to avoid conflict with header-checks
21115 if test "x$with_widec" = xyes ; then
21116         echo "$as_me:21116: checking for wchar_t" >&5
21117 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21118 if test "${ac_cv_type_wchar_t+set}" = set; then
21119   echo $ECHO_N "(cached) $ECHO_C" >&6
21120 else
21121   cat >conftest.$ac_ext <<_ACEOF
21122 #line 21122 "configure"
21123 #include "confdefs.h"
21124 $ac_includes_default
21125 int
21126 main ()
21127 {
21128 if ((wchar_t *) 0)
21129   return 0;
21130 if (sizeof (wchar_t))
21131   return 0;
21132   ;
21133   return 0;
21134 }
21135 _ACEOF
21136 rm -f conftest.$ac_objext
21137 if { (eval echo "$as_me:21137: \"$ac_compile\"") >&5
21138   (eval $ac_compile) 2>&5
21139   ac_status=$?
21140   echo "$as_me:21140: \$? = $ac_status" >&5
21141   (exit $ac_status); } &&
21142          { ac_try='test -s conftest.$ac_objext'
21143   { (eval echo "$as_me:21143: \"$ac_try\"") >&5
21144   (eval $ac_try) 2>&5
21145   ac_status=$?
21146   echo "$as_me:21146: \$? = $ac_status" >&5
21147   (exit $ac_status); }; }; then
21148   ac_cv_type_wchar_t=yes
21149 else
21150   echo "$as_me: failed program was:" >&5
21151 cat conftest.$ac_ext >&5
21152 ac_cv_type_wchar_t=no
21153 fi
21154 rm -f conftest.$ac_objext conftest.$ac_ext
21155 fi
21156 echo "$as_me:21156: result: $ac_cv_type_wchar_t" >&5
21157 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21158
21159 echo "$as_me:21159: checking size of wchar_t" >&5
21160 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21161 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21162   echo $ECHO_N "(cached) $ECHO_C" >&6
21163 else
21164   if test "$ac_cv_type_wchar_t" = yes; then
21165   if test "$cross_compiling" = yes; then
21166   # Depending upon the size, compute the lo and hi bounds.
21167 cat >conftest.$ac_ext <<_ACEOF
21168 #line 21168 "configure"
21169 #include "confdefs.h"
21170 $ac_includes_default
21171 int
21172 main ()
21173 {
21174 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21175   ;
21176   return 0;
21177 }
21178 _ACEOF
21179 rm -f conftest.$ac_objext
21180 if { (eval echo "$as_me:21180: \"$ac_compile\"") >&5
21181   (eval $ac_compile) 2>&5
21182   ac_status=$?
21183   echo "$as_me:21183: \$? = $ac_status" >&5
21184   (exit $ac_status); } &&
21185          { ac_try='test -s conftest.$ac_objext'
21186   { (eval echo "$as_me:21186: \"$ac_try\"") >&5
21187   (eval $ac_try) 2>&5
21188   ac_status=$?
21189   echo "$as_me:21189: \$? = $ac_status" >&5
21190   (exit $ac_status); }; }; then
21191   ac_lo=0 ac_mid=0
21192   while :; do
21193     cat >conftest.$ac_ext <<_ACEOF
21194 #line 21194 "configure"
21195 #include "confdefs.h"
21196 $ac_includes_default
21197 int
21198 main ()
21199 {
21200 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21201   ;
21202   return 0;
21203 }
21204 _ACEOF
21205 rm -f conftest.$ac_objext
21206 if { (eval echo "$as_me:21206: \"$ac_compile\"") >&5
21207   (eval $ac_compile) 2>&5
21208   ac_status=$?
21209   echo "$as_me:21209: \$? = $ac_status" >&5
21210   (exit $ac_status); } &&
21211          { ac_try='test -s conftest.$ac_objext'
21212   { (eval echo "$as_me:21212: \"$ac_try\"") >&5
21213   (eval $ac_try) 2>&5
21214   ac_status=$?
21215   echo "$as_me:21215: \$? = $ac_status" >&5
21216   (exit $ac_status); }; }; then
21217   ac_hi=$ac_mid; break
21218 else
21219   echo "$as_me: failed program was:" >&5
21220 cat conftest.$ac_ext >&5
21221 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21222 fi
21223 rm -f conftest.$ac_objext conftest.$ac_ext
21224   done
21225 else
21226   echo "$as_me: failed program was:" >&5
21227 cat conftest.$ac_ext >&5
21228 ac_hi=-1 ac_mid=-1
21229   while :; do
21230     cat >conftest.$ac_ext <<_ACEOF
21231 #line 21231 "configure"
21232 #include "confdefs.h"
21233 $ac_includes_default
21234 int
21235 main ()
21236 {
21237 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21238   ;
21239   return 0;
21240 }
21241 _ACEOF
21242 rm -f conftest.$ac_objext
21243 if { (eval echo "$as_me:21243: \"$ac_compile\"") >&5
21244   (eval $ac_compile) 2>&5
21245   ac_status=$?
21246   echo "$as_me:21246: \$? = $ac_status" >&5
21247   (exit $ac_status); } &&
21248          { ac_try='test -s conftest.$ac_objext'
21249   { (eval echo "$as_me:21249: \"$ac_try\"") >&5
21250   (eval $ac_try) 2>&5
21251   ac_status=$?
21252   echo "$as_me:21252: \$? = $ac_status" >&5
21253   (exit $ac_status); }; }; then
21254   ac_lo=$ac_mid; break
21255 else
21256   echo "$as_me: failed program was:" >&5
21257 cat conftest.$ac_ext >&5
21258 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21259 fi
21260 rm -f conftest.$ac_objext conftest.$ac_ext
21261   done
21262 fi
21263 rm -f conftest.$ac_objext conftest.$ac_ext
21264 # Binary search between lo and hi bounds.
21265 while test "x$ac_lo" != "x$ac_hi"; do
21266   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21267   cat >conftest.$ac_ext <<_ACEOF
21268 #line 21268 "configure"
21269 #include "confdefs.h"
21270 $ac_includes_default
21271 int
21272 main ()
21273 {
21274 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21275   ;
21276   return 0;
21277 }
21278 _ACEOF
21279 rm -f conftest.$ac_objext
21280 if { (eval echo "$as_me:21280: \"$ac_compile\"") >&5
21281   (eval $ac_compile) 2>&5
21282   ac_status=$?
21283   echo "$as_me:21283: \$? = $ac_status" >&5
21284   (exit $ac_status); } &&
21285          { ac_try='test -s conftest.$ac_objext'
21286   { (eval echo "$as_me:21286: \"$ac_try\"") >&5
21287   (eval $ac_try) 2>&5
21288   ac_status=$?
21289   echo "$as_me:21289: \$? = $ac_status" >&5
21290   (exit $ac_status); }; }; then
21291   ac_hi=$ac_mid
21292 else
21293   echo "$as_me: failed program was:" >&5
21294 cat conftest.$ac_ext >&5
21295 ac_lo=`expr $ac_mid + 1`
21296 fi
21297 rm -f conftest.$ac_objext conftest.$ac_ext
21298 done
21299 ac_cv_sizeof_wchar_t=$ac_lo
21300 else
21301   if test "$cross_compiling" = yes; then
21302   { { echo "$as_me:21302: error: cannot run test program while cross compiling" >&5
21303 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21304    { (exit 1); exit 1; }; }
21305 else
21306   cat >conftest.$ac_ext <<_ACEOF
21307 #line 21307 "configure"
21308 #include "confdefs.h"
21309 $ac_includes_default
21310 int
21311 main ()
21312 {
21313 FILE *f = fopen ("conftest.val", "w");
21314 if (!f)
21315   $ac_main_return (1);
21316 fprintf (f, "%d", (sizeof (wchar_t)));
21317 fclose (f);
21318   ;
21319   return 0;
21320 }
21321 _ACEOF
21322 rm -f conftest$ac_exeext
21323 if { (eval echo "$as_me:21323: \"$ac_link\"") >&5
21324   (eval $ac_link) 2>&5
21325   ac_status=$?
21326   echo "$as_me:21326: \$? = $ac_status" >&5
21327   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21328   { (eval echo "$as_me:21328: \"$ac_try\"") >&5
21329   (eval $ac_try) 2>&5
21330   ac_status=$?
21331   echo "$as_me:21331: \$? = $ac_status" >&5
21332   (exit $ac_status); }; }; then
21333   ac_cv_sizeof_wchar_t=`cat conftest.val`
21334 else
21335   echo "$as_me: program exited with status $ac_status" >&5
21336 echo "$as_me: failed program was:" >&5
21337 cat conftest.$ac_ext >&5
21338 fi
21339 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21340 fi
21341 fi
21342 rm -f conftest.val
21343 else
21344   ac_cv_sizeof_wchar_t=0
21345 fi
21346 fi
21347 echo "$as_me:21347: result: $ac_cv_sizeof_wchar_t" >&5
21348 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21349 cat >>confdefs.h <<EOF
21350 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21351 EOF
21352
21353 fi
21354
21355 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21356 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21357 ###
21358 ### ticlib modules may be a separate library, otherwise contained in termlib.
21359 ### termlib modules may be a separate library, otherwise contained in ncurses.
21360 ###
21361 ### The of "+" or " " between the tokens controls the way the script
21362 ### chooses to split module lists into libraries.
21363 ###
21364 ### (see CF_LIB_RULES).
21365 echo "$as_me:21365: checking for library subsets" >&5
21366 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21367 LIB_SUBSETS=
21368
21369 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21370         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21371         if test "$with_ticlib" != no ; then
21372                 LIB_SUBSETS="${LIB_SUBSETS} "
21373         else
21374                 LIB_SUBSETS="${LIB_SUBSETS}+"
21375         fi
21376 fi
21377
21378 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21379 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21380
21381 if test "$with_termlib" != no ; then
21382         LIB_SUBSETS="${LIB_SUBSETS} "
21383 else
21384         LIB_SUBSETS="${LIB_SUBSETS}+"
21385 fi
21386
21387 LIB_SUBSETS="${LIB_SUBSETS}base"
21388
21389 # Most term-driver calls are to tinfo, but some like init_pair are to the
21390 # base library (so it resides in base).
21391 if test "$with_term_driver" != no ; then
21392         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21393         case $cf_cv_system_name in
21394         (*mingw32*|*mingw64*)
21395                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21396                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21397                 ;;
21398         (*)
21399                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21400                 ;;
21401         esac
21402 fi
21403
21404 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21405 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21406
21407 echo "$as_me:21407: result: $LIB_SUBSETS" >&5
21408 echo "${ECHO_T}$LIB_SUBSETS" >&6
21409
21410 ### Construct the list of include-directories to be generated
21411
21412 if test "$srcdir" != "."; then
21413         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21414 fi
21415 CPPFLAGS="-I../include $CPPFLAGS"
21416 if test "$srcdir" != "."; then
21417         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21418 fi
21419 CPPFLAGS="-I. $CPPFLAGS"
21420
21421 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21422 if test "$srcdir" != "."; then
21423         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21424 fi
21425 if test "$GCC" != yes; then
21426         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21427 elif test "$includedir" != "/usr/include"; then
21428         if test "$includedir" = '${prefix}/include' ; then
21429                 if test x$prefix != x/usr ; then
21430                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21431                 fi
21432         else
21433                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21434         fi
21435 fi
21436
21437 ### Build up pieces for makefile rules
21438 echo "$as_me:21438: checking default library suffix" >&5
21439 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21440
21441         case $DFT_LWR_MODEL in
21442         (libtool) DFT_ARG_SUFFIX=''   ;;
21443         (normal)  DFT_ARG_SUFFIX=''   ;;
21444         (debug)   DFT_ARG_SUFFIX='_g' ;;
21445         (profile) DFT_ARG_SUFFIX='_p' ;;
21446         (shared)  DFT_ARG_SUFFIX=''   ;;
21447         esac
21448         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21449 echo "$as_me:21449: result: $DFT_ARG_SUFFIX" >&5
21450 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21451
21452 echo "$as_me:21452: checking default library-dependency suffix" >&5
21453 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21454
21455         case X$DFT_LWR_MODEL in
21456         (Xlibtool)
21457                 DFT_LIB_SUFFIX='.la'
21458                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21459                 ;;
21460         (Xdebug)
21461                 DFT_LIB_SUFFIX='_g.a'
21462                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21463                 ;;
21464         (Xprofile)
21465                 DFT_LIB_SUFFIX='_p.a'
21466                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21467                 ;;
21468         (Xshared)
21469                 case $cf_cv_system_name in
21470                 (aix[5-7]*)
21471                         DFT_LIB_SUFFIX='.so'
21472                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21473                         ;;
21474                 (cygwin*|msys*|mingw*)
21475                         DFT_LIB_SUFFIX='.dll'
21476                         DFT_DEP_SUFFIX='.dll.a'
21477                         ;;
21478                 (darwin*)
21479                         DFT_LIB_SUFFIX='.dylib'
21480                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21481                         ;;
21482                 (hpux*)
21483                         case $target in
21484                         (ia64*)
21485                                 DFT_LIB_SUFFIX='.so'
21486                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21487                                 ;;
21488                         (*)
21489                                 DFT_LIB_SUFFIX='.sl'
21490                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21491                                 ;;
21492                         esac
21493                         ;;
21494                 (*)
21495                         DFT_LIB_SUFFIX='.so'
21496                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21497                         ;;
21498                 esac
21499                 ;;
21500         (*)
21501                 DFT_LIB_SUFFIX='.a'
21502                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21503                 ;;
21504         esac
21505         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21506         then
21507                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21508                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21509         fi
21510 echo "$as_me:21510: result: $DFT_DEP_SUFFIX" >&5
21511 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21512
21513 echo "$as_me:21513: checking default object directory" >&5
21514 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21515
21516         case $DFT_LWR_MODEL in
21517         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21518         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21519         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21520         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21521         (shared)
21522                 case $cf_cv_system_name in
21523                 (cygwin|msys)
21524                         DFT_OBJ_SUBDIR='objects' ;;
21525                 (*)
21526                         DFT_OBJ_SUBDIR='obj_s' ;;
21527                 esac
21528         esac
21529 echo "$as_me:21529: result: $DFT_OBJ_SUBDIR" >&5
21530 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21531
21532 if test "x$cf_with_cxx" = xyes ; then
21533 echo "$as_me:21533: checking c++ library-dependency suffix" >&5
21534 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21535 if test "$with_libtool" != "no"; then
21536         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21537         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21538 elif test "$with_shared_cxx" != "no"; then
21539         # also for g++ users...
21540         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21541 else
21542         # we normally make a static library because C/C++ library rules differ
21543
21544         case Xnormal in
21545         (Xlibtool)
21546                 CXX_LIB_SUFFIX='.la'
21547                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21548                 ;;
21549         (Xdebug)
21550                 CXX_LIB_SUFFIX='_g.a'
21551                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21552                 ;;
21553         (Xprofile)
21554                 CXX_LIB_SUFFIX='_p.a'
21555                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21556                 ;;
21557         (Xshared)
21558                 case $cf_cv_system_name in
21559                 (aix[5-7]*)
21560                         CXX_LIB_SUFFIX='.so'
21561                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21562                         ;;
21563                 (cygwin*|msys*|mingw*)
21564                         CXX_LIB_SUFFIX='.dll'
21565                         CXX_DEP_SUFFIX='.dll.a'
21566                         ;;
21567                 (darwin*)
21568                         CXX_LIB_SUFFIX='.dylib'
21569                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21570                         ;;
21571                 (hpux*)
21572                         case $target in
21573                         (ia64*)
21574                                 CXX_LIB_SUFFIX='.so'
21575                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21576                                 ;;
21577                         (*)
21578                                 CXX_LIB_SUFFIX='.sl'
21579                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21580                                 ;;
21581                         esac
21582                         ;;
21583                 (*)
21584                         CXX_LIB_SUFFIX='.so'
21585                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21586                         ;;
21587                 esac
21588                 ;;
21589         (*)
21590                 CXX_LIB_SUFFIX='.a'
21591                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21592                 ;;
21593         esac
21594         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21595         then
21596                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21597                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21598         fi
21599
21600 fi
21601 echo "$as_me:21601: result: $CXX_LIB_SUFFIX" >&5
21602 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21603
21604 fi
21605
21606 # do not want -ldl in build except as needed for -lncurses dependency
21607 if test "x$with_dlsym" = xyes ; then
21608 if test $DFT_LWR_MODEL = shared || \
21609    test $DFT_LWR_MODEL = libtool ; then
21610
21611 # remove dl library from $LIBS
21612 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21613
21614 fi
21615 fi
21616 ### Set up low-level terminfo dependencies for makefiles.
21617
21618 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21619 # do not need libdl
21620 TICS_LIST=
21621 if test "x$with_dlsym" = xyes ; then
21622
21623 # remove dl library from $SHLIB_LIST
21624 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21625
21626 fi
21627
21628 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21629 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21630 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21631 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21632 then
21633         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21634 fi
21635
21636 if test "$with_ticlib" != no ; then
21637
21638         if test "x$with_ticlib" != xyes ; then
21639                 TICS_NAME=$with_ticlib
21640                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21641                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21642                 TICS_LIB_SUFFIX="${with_ticlib}"
21643         else
21644                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21645                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21646                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21647         fi
21648         TICS_LDFLAGS="-L${LIB_DIR}"
21649         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21650 else
21651         TICS_LDFLAGS="-L${LIB_DIR}"
21652         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21653 fi
21654
21655 if test "$with_termlib" != no ; then
21656
21657         if test "x$with_termlib" != xyes ; then
21658                 TINFO_NAME=$with_termlib
21659                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21660                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21661                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21662                 TINFO_LIB_SUFFIX="${with_termlib}"
21663         else
21664                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21665                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21666                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21667                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21668         fi
21669
21670         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21671         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21672         if test "$DFT_LWR_MODEL" = "libtool"; then
21673                 TEST_ARGS="${TEST_DEPS}"
21674                 TEST_ARG2="${TEST_DEP2}"
21675                 TINFO_LDFLAGS="-L${LIB_DIR}"
21676                 TINFO_LIBS="$TEST_ARGS"
21677                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21678                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21679         else
21680                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21681                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21682                 if test "x$with_term_driver" != xno ; then
21683                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21684                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21685                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21686                 else
21687                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21688                         TINFO_LIBS="$TEST_ARGS"
21689                 fi
21690                 TINFO_LDFLAGS="-L${LIB_DIR}"
21691                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21692         fi
21693 else
21694         # the next lines are needed for linking libtic over libncurses
21695         TINFO_NAME=${LIB_NAME}
21696         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21697         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21698         if test "x$with_tic_depends" = xyes ; then
21699                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21700         else
21701                 TICS_LIST="$SHLIB_LIST"
21702         fi
21703
21704         TINFO_LDFLAGS="-L${LIB_DIR}"
21705         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21706 fi
21707
21708 if test "$DFT_LWR_MODEL" = shared ; then
21709         case $cf_cv_system_name in
21710         (cygwin*|msys*)
21711                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21712                 TINFO_SUFFIX=.dll
21713                 ;;
21714         esac
21715 fi
21716
21717 if test "x$with_dlsym" = xyes ; then
21718
21719 # remove dl library from $TICS_LIST
21720 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21721
21722 fi
21723
21724 if test "$DFT_LWR_MODEL" = "libtool"; then
21725         OBJEXT=lo
21726 fi
21727
21728 # needed for Ada95
21729 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21730
21731 case $DFT_LWR_MODEL in
21732 (normal|debug|profile)
21733
21734 if test "$GCC" = yes ; then
21735         case $cf_cv_system_name in
21736         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21737                 LDFLAGS_STATIC=
21738                 LDFLAGS_SHARED=
21739                 ;;
21740         (*)     # normally, except when broken
21741                 LDFLAGS_STATIC=-static
21742                 LDFLAGS_SHARED=-dynamic
21743                 ;;
21744         esac
21745 else
21746         case $cf_cv_system_name in
21747         (aix[4-7]*)     # from ld manpage
21748                 LDFLAGS_STATIC=-bstatic
21749                 LDFLAGS_SHARED=-bdynamic
21750                 ;;
21751         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21752                 # We could also use just "archive" and "shared".
21753                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21754                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21755                 ;;
21756         (irix*)         # from ld manpage IRIX64
21757                 LDFLAGS_STATIC=-Bstatic
21758                 LDFLAGS_SHARED=-Bdynamic
21759                 ;;
21760         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21761                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21762                 LDFLAGS_STATIC=-noso
21763                 LDFLAGS_SHARED=-so_archive
21764                 ;;
21765         (solaris2*)
21766                 LDFLAGS_STATIC=-Bstatic
21767                 LDFLAGS_SHARED=-Bdynamic
21768                 ;;
21769         esac
21770 fi
21771
21772 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21773 then
21774         echo "$as_me:21774: checking if linker supports switching between static/dynamic" >&5
21775 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21776
21777         rm -f libconftest.a
21778         cat >conftest.$ac_ext <<EOF
21779 #line 21779 "configure"
21780 #include <stdio.h>
21781 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21782 EOF
21783         if { (eval echo "$as_me:21783: \"$ac_compile\"") >&5
21784   (eval $ac_compile) 2>&5
21785   ac_status=$?
21786   echo "$as_me:21786: \$? = $ac_status" >&5
21787   (exit $ac_status); } ; then
21788                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21789                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21790         fi
21791         rm -f conftest.*
21792
21793         cf_save_LIBS="$LIBS"
21794
21795         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21796         cat >conftest.$ac_ext <<_ACEOF
21797 #line 21797 "configure"
21798 #include "confdefs.h"
21799
21800 #line 21800 "configure"
21801 #include <stdio.h>
21802 int cf_ldflags_static(FILE *fp);
21803
21804 int
21805 main ()
21806 {
21807
21808         return cf_ldflags_static(stdin);
21809
21810   ;
21811   return 0;
21812 }
21813 _ACEOF
21814 rm -f conftest.$ac_objext conftest$ac_exeext
21815 if { (eval echo "$as_me:21815: \"$ac_link\"") >&5
21816   (eval $ac_link) 2>&5
21817   ac_status=$?
21818   echo "$as_me:21818: \$? = $ac_status" >&5
21819   (exit $ac_status); } &&
21820          { ac_try='test -s conftest$ac_exeext'
21821   { (eval echo "$as_me:21821: \"$ac_try\"") >&5
21822   (eval $ac_try) 2>&5
21823   ac_status=$?
21824   echo "$as_me:21824: \$? = $ac_status" >&5
21825   (exit $ac_status); }; }; then
21826
21827         # some linkers simply ignore the -dynamic
21828         case x`file conftest$ac_exeext 2>/dev/null` in
21829         (*static*)
21830                 cf_ldflags_static=no
21831                 ;;
21832         (*)
21833                 cf_ldflags_static=yes
21834                 ;;
21835         esac
21836
21837 else
21838   echo "$as_me: failed program was:" >&5
21839 cat conftest.$ac_ext >&5
21840 cf_ldflags_static=no
21841 fi
21842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21843
21844         rm -f libconftest.*
21845         LIBS="$cf_save_LIBS"
21846
21847         echo "$as_me:21847: result: $cf_ldflags_static" >&5
21848 echo "${ECHO_T}$cf_ldflags_static" >&6
21849
21850         if test $cf_ldflags_static != yes
21851         then
21852                 LDFLAGS_STATIC=
21853                 LDFLAGS_SHARED=
21854         fi
21855 else
21856         LDFLAGS_STATIC=
21857         LDFLAGS_SHARED=
21858 fi
21859
21860         ;;
21861 esac
21862
21863 echo "$as_me:21863: checking where we will install curses.h" >&5
21864 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21865
21866 includesubdir=
21867 if test "$with_overwrite" = no && \
21868  ( test "x$includedir" = 'x${prefix}/include' || \
21869    test "x$includedir" = "x${prefix}/include" )
21870 then
21871         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21872 fi
21873 echo "$as_me:21873: result: ${includedir}${includesubdir}" >&5
21874 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21875
21876 ### Resolve a conflict between normal and wide-curses by forcing applications
21877 ### that will need libutf8 to add it to their configure script.
21878 if test "$with_overwrite" != no ; then
21879 if test "$NCURSES_LIBUTF8" = 1 ; then
21880         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21881         { echo "$as_me:21881: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21882 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21883 fi
21884 fi
21885 WITH_OVERWRITE=$with_overwrite
21886
21887 # used to separate tack out of the tree
21888 NCURSES_TREE=
21889
21890 ### predefined stuff for the test programs
21891
21892 cat >>confdefs.h <<\EOF
21893 #define HAVE_SLK_COLOR 1
21894 EOF
21895
21896 ### Construct the list of subdirectories for which we'll customize makefiles
21897 ### with the appropriate compile-rules.
21898
21899 echo "$as_me:21899: checking for src modules" >&5
21900 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21901
21902 # dependencies and linker-arguments for test-programs
21903 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21904 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21905 if test "$DFT_LWR_MODEL" = "libtool"; then
21906         TEST_ARGS="${TEST_DEPS}"
21907         TEST_ARG2="${TEST_DEP2}"
21908 else
21909         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21910         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21911 fi
21912
21913 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21914 cf_cv_src_modules=
21915 for cf_dir in $modules_to_build
21916 do
21917         if test -f $srcdir/$cf_dir/modules; then
21918
21919                 # We may/may not have tack in the distribution, though the
21920                 # makefile is.
21921                 if test $cf_dir = tack ; then
21922                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21923                                 continue
21924                         fi
21925                 fi
21926
21927                 if test -z "$cf_cv_src_modules"; then
21928                         cf_cv_src_modules=$cf_dir
21929                 else
21930                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21931                 fi
21932
21933                 # Make the ncurses_cfg.h file record the library interface files as
21934                 # well.  These are header files that are the same name as their
21935                 # directory.  Ncurses is the only library that does not follow
21936                 # that pattern.
21937                 if test $cf_dir = tack ; then
21938                         continue
21939                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21940
21941 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21942
21943                         cat >>confdefs.h <<EOF
21944 #define HAVE_${cf_have_include}_H 1
21945 EOF
21946
21947                         cat >>confdefs.h <<EOF
21948 #define HAVE_LIB${cf_have_include} 1
21949 EOF
21950
21951                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21952                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21953                         if test "$DFT_LWR_MODEL" = "libtool"; then
21954                                 TEST_ARGS="${TEST_DEPS}"
21955                                 TEST_ARG2="${TEST_DEP2}"
21956                         else
21957                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21958                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
21959                         fi
21960                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
21961                 fi
21962         fi
21963 done
21964 echo "$as_me:21964: result: $cf_cv_src_modules" >&5
21965 echo "${ECHO_T}$cf_cv_src_modules" >&6
21966
21967 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21968 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21969
21970 SRC_SUBDIRS=
21971 if test "x$cf_with_manpages" != xno ; then
21972         SRC_SUBDIRS="$SRC_SUBDIRS man"
21973 fi
21974 SRC_SUBDIRS="$SRC_SUBDIRS include"
21975 for cf_dir in $cf_cv_src_modules
21976 do
21977         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21978 done
21979 if test "x$cf_with_tests" != "xno" ; then
21980         SRC_SUBDIRS="$SRC_SUBDIRS test"
21981 fi
21982 # always make this, to install the ncurses-config script
21983 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21984 if test "$cf_with_cxx_binding" != no; then
21985         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
21986         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21987 fi
21988
21989 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21990 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21991
21992 ADA_SUBDIRS=
21993 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21994         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21995         ADA_SUBDIRS="gen src"
21996         if test "x$cf_with_tests" != "xno" ; then
21997                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21998         fi
21999 fi
22000
22001 SUB_MAKEFILES=
22002 for cf_dir in $SRC_SUBDIRS
22003 do
22004         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22005 done
22006
22007 if test -n "$ADA_SUBDIRS"; then
22008         for cf_dir in $ADA_SUBDIRS
22009         do
22010                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22011         done
22012
22013 fi
22014
22015 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22016    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22017    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22018 fi
22019
22020 DIRS_TO_MAKE="lib"
22021 for cf_item in $cf_list_models
22022 do
22023
22024         case $cf_item in
22025         (libtool) cf_subdir='obj_lo'  ;;
22026         (normal)  cf_subdir='objects' ;;
22027         (debug)   cf_subdir='obj_g' ;;
22028         (profile) cf_subdir='obj_p' ;;
22029         (shared)
22030                 case $cf_cv_system_name in
22031                 (cygwin|msys)
22032                         cf_subdir='objects' ;;
22033                 (*)
22034                         cf_subdir='obj_s' ;;
22035                 esac
22036         esac
22037
22038         for cf_item2 in $DIRS_TO_MAKE
22039         do
22040                 test $cf_item2 = $cf_subdir && break
22041         done
22042         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22043 done
22044 for cf_dir in $DIRS_TO_MAKE
22045 do
22046         test ! -d $cf_dir && mkdir $cf_dir
22047 done
22048
22049 # symbols that differ when compiling Ada95 by itself.
22050 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22051
22052 # values to use as strings
22053
22054 cat >>confdefs.h <<EOF
22055 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22056 EOF
22057
22058 cat >>confdefs.h <<EOF
22059 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22060 EOF
22061
22062 ### Now that we're done running tests, add the compiler-warnings, if any
22063
22064 cf_fix_cppflags=no
22065 cf_new_cflags=
22066 cf_new_cppflags=
22067 cf_new_extra_cppflags=
22068
22069 for cf_add_cflags in $EXTRA_CFLAGS
22070 do
22071 case $cf_fix_cppflags in
22072 (no)
22073         case $cf_add_cflags in
22074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22075                 case $cf_add_cflags in
22076                 (-D*)
22077                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22078
22079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22080                                 && test -z "${cf_tst_cflags}" \
22081                                 && cf_fix_cppflags=yes
22082
22083                         if test $cf_fix_cppflags = yes ; then
22084                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22085                                 continue
22086                         elif test "${cf_tst_cflags}" = "\"'" ; then
22087                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22088                                 continue
22089                         fi
22090                         ;;
22091                 esac
22092                 case "$CPPFLAGS" in
22093                 (*$cf_add_cflags)
22094                         ;;
22095                 (*)
22096                         case $cf_add_cflags in
22097                         (-D*)
22098                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22099
22100 CPPFLAGS=`echo "$CPPFLAGS" | \
22101         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22102                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22103
22104                                 ;;
22105                         esac
22106                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22107                         ;;
22108                 esac
22109                 ;;
22110         (*)
22111                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22112                 ;;
22113         esac
22114         ;;
22115 (yes)
22116         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22117
22118         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22119
22120         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22121                 && test -z "${cf_tst_cflags}" \
22122                 && cf_fix_cppflags=no
22123         ;;
22124 esac
22125 done
22126
22127 if test -n "$cf_new_cflags" ; then
22128
22129         CFLAGS="$CFLAGS $cf_new_cflags"
22130 fi
22131
22132 if test -n "$cf_new_cppflags" ; then
22133
22134         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22135 fi
22136
22137 if test -n "$cf_new_extra_cppflags" ; then
22138
22139         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22140 fi
22141
22142 ### Define substitutions for header files to avoid name-pollution
22143
22144 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22145         HAVE_TCGETATTR=1
22146 else
22147         HAVE_TCGETATTR=0
22148 fi
22149
22150 if test "x$ac_cv_header_stdint_h" = xyes ; then
22151         HAVE_STDINT_H=1
22152 else
22153         HAVE_STDINT_H=0
22154 fi
22155
22156 if test "x$ac_cv_header_termio_h" = xyes ; then
22157         HAVE_TERMIO_H=1
22158 else
22159         HAVE_TERMIO_H=0
22160 fi
22161
22162 if test "x$ac_cv_header_termios_h" = xyes ; then
22163         HAVE_TERMIOS_H=1
22164 else
22165         HAVE_TERMIOS_H=0
22166 fi
22167
22168 ################################################################################
22169 test "x$use_database" = xyes && \
22170 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22171
22172 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22173 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22174
22175 if test "x$enable_pc_files" = xyes ; then \
22176 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22177 MAKE_PC_FILES=
22178 else
22179 MAKE_PC_FILES="#"
22180 fi
22181
22182 # Extract the first word of "tic", so it can be a program name with args.
22183 set dummy tic; ac_word=$2
22184 echo "$as_me:22184: checking for $ac_word" >&5
22185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22186 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22187   echo $ECHO_N "(cached) $ECHO_C" >&6
22188 else
22189   case $TIC_PATH in
22190   [\\/]* | ?:[\\/]*)
22191   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22192   ;;
22193   *)
22194   ac_save_IFS=$IFS; IFS=$ac_path_separator
22195 ac_dummy="$PATH:/usr/local/ncurses/bin"
22196 for ac_dir in $ac_dummy; do
22197   IFS=$ac_save_IFS
22198   test -z "$ac_dir" && ac_dir=.
22199   if $as_executable_p "$ac_dir/$ac_word"; then
22200    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22201    echo "$as_me:22201: found $ac_dir/$ac_word" >&5
22202    break
22203 fi
22204 done
22205
22206   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22207   ;;
22208 esac
22209 fi
22210 TIC_PATH=$ac_cv_path_TIC_PATH
22211
22212 if test -n "$TIC_PATH"; then
22213   echo "$as_me:22213: result: $TIC_PATH" >&5
22214 echo "${ECHO_T}$TIC_PATH" >&6
22215 else
22216   echo "$as_me:22216: result: no" >&5
22217 echo "${ECHO_T}no" >&6
22218 fi
22219
22220 if test -n "$FALLBACK_LIST"
22221 then
22222         if test "$TIC_PATH" = unknown
22223         then
22224                 { echo "$as_me:22224: WARNING: no tic program found for fallbacks" >&5
22225 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22226         fi
22227 fi
22228
22229 if test "x$cf_with_tests" != xno ; then
22230         MAKE_TESTS=
22231 else
22232         MAKE_TESTS="#"
22233 fi
22234
22235 ADAHTML_DIR=../../doc/html/ada
22236
22237 # these could be configurable, but are not currently
22238 PANEL_NAME=panel
22239 MENU_NAME=menu
22240 FORM_NAME=form
22241 CXX_NAME=ncurses++
22242
22243 # workaround for g++ versus Solaris (20131116)
22244 case $cf_cv_system_name in
22245 (solaris2*)
22246         case "x$CPPFLAGS" in
22247         (*-D_XOPEN_SOURCE_EXTENDED*)
22248                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22249
22250 echo "${as_me:-configure}:22250: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22251
22252                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22253                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22254                 ;;
22255         esac
22256         ;;
22257 esac
22258
22259 # Help to automatically enable the extended curses features when using either
22260 # the *-config or the ".pc" files by adding defines.
22261 echo "$as_me:22261: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22262 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22263 PKG_CFLAGS=
22264 for cf_loop1 in $CPPFLAGS_after_XOPEN
22265 do
22266         cf_found=no
22267         for cf_loop2 in $CPPFLAGS_before_XOPEN
22268         do
22269                 if test "x$cf_loop1" = "x$cf_loop2"
22270                 then
22271                         cf_found=yes
22272                         break
22273                 fi
22274         done
22275         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22276 done
22277 echo "$as_me:22277: result: $PKG_CFLAGS" >&5
22278 echo "${ECHO_T}$PKG_CFLAGS" >&6
22279
22280 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22281 case "x$NCURSES_OSPEED" in
22282 (*short*)
22283         cf_compatible=1
22284         ;;
22285 (*)
22286         cf_compatible=0
22287         ;;
22288 esac
22289
22290 cat >>confdefs.h <<EOF
22291 #define NCURSES_OSPEED_COMPAT $cf_compatible
22292 EOF
22293
22294 case "x$cf_cv_typeof_chtype" in
22295 (xshort|xint|xlong)
22296         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22297         ;;
22298 esac
22299
22300 case "x$cf_cv_typeof_mmask_t" in
22301 (xshort|xint|xlong)
22302         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22303         ;;
22304 esac
22305
22306 # substitute into misc/Makefile to suppress
22307 # (un)install.data from the
22308 # (un)install rules.
22309 if test "x$cf_with_db_install" = "xno"; then
22310         MISC_INSTALL_DATA=
22311         MISC_UNINSTALL_DATA=
22312 else
22313         MISC_INSTALL_DATA=install.data
22314         MISC_UNINSTALL_DATA=uninstall.data
22315 fi
22316
22317 SUB_SCRIPTS=
22318
22319 if test -n "$PACKAGE"
22320 then
22321         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22322         export PACKAGE
22323         echo "package: $PACKAGE"
22324 fi
22325
22326 UNALTERED_SYMS=
22327 cf_filter_syms=no
22328
22329 if test -n "$RESULTING_SYMS"
22330 then
22331         cf_filter_syms=$cf_dft_filter_syms
22332         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22333
22334 echo "${as_me:-configure}:22334: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22335
22336 fi
22337
22338 if test "x$WILDCARD_SYMS" = xno
22339 then
22340         cf_filter_syms=yes
22341 fi
22342
22343 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22344 if test $cf_filter_syms = yes
22345 then
22346         RESULTING_SYMS=resulting.map
22347 fi
22348
22349 if test "x$cross_compiling" = xyes ; then
22350         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22351 else
22352         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22353 fi
22354
22355 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"
22356 ac_config_commands="$ac_config_commands default"
22357 cat >confcache <<\_ACEOF
22358 # This file is a shell script that caches the results of configure
22359 # tests run on this system so they can be shared between configure
22360 # scripts and configure runs, see configure's option --config-cache.
22361 # It is not useful on other systems.  If it contains results you don't
22362 # want to keep, you may remove or edit it.
22363 #
22364 # config.status only pays attention to the cache file if you give it
22365 # the --recheck option to rerun configure.
22366 #
22367 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22368 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22369 # following values.
22370
22371 _ACEOF
22372
22373 # The following way of writing the cache mishandles newlines in values,
22374 # but we know of no workaround that is simple, portable, and efficient.
22375 # So, don't put newlines in cache variables' values.
22376 # Ultrix sh set writes to stderr and can't be redirected directly,
22377 # and sets the high bit in the cache file unless we assign to the vars.
22378 {
22379   (set) 2>&1 |
22380     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22381     *ac_space=\ *)
22382       # `set' does not quote correctly, so add quotes (double-quote
22383       # substitution turns \\\\ into \\, and sed turns \\ into \).
22384       sed -n \
22385         "s/'/'\\\\''/g;
22386           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22387       ;;
22388     *)
22389       # `set' quotes correctly as required by POSIX, so do not add quotes.
22390       sed -n \
22391         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22392       ;;
22393     esac;
22394 } |
22395   sed '
22396      t clear
22397      : clear
22398      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22399      t end
22400      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22401      : end' >>confcache
22402 if cmp -s $cache_file confcache; then :; else
22403   if test -w $cache_file; then
22404     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22405     cat confcache >$cache_file
22406   else
22407     echo "not updating unwritable cache $cache_file"
22408   fi
22409 fi
22410 rm -f confcache
22411
22412 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22413 # Let make expand exec_prefix.
22414 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22415
22416 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22417 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22418 # trailing colons and then remove the whole line if VPATH becomes empty
22419 # (actually we leave an empty line to preserve line numbers).
22420 if test "x$srcdir" = x.; then
22421   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22422 s/:*\$(srcdir):*/:/;
22423 s/:*\${srcdir}:*/:/;
22424 s/:*@srcdir@:*/:/;
22425 s/^\([^=]*=[    ]*\):*/\1/;
22426 s/:*$//;
22427 s/^[^=]*=[      ]*$//;
22428 }'
22429 fi
22430
22431 DEFS=-DHAVE_CONFIG_H
22432
22433 : ${CONFIG_STATUS=./config.status}
22434 ac_clean_files_save=$ac_clean_files
22435 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22436 { echo "$as_me:22436: creating $CONFIG_STATUS" >&5
22437 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22438 cat >$CONFIG_STATUS <<_ACEOF
22439 #! $SHELL
22440 # Generated automatically by configure.
22441 # Run this file to recreate the current configuration.
22442 # Compiler output produced by configure, useful for debugging
22443 # configure, is in config.log if it exists.
22444
22445 debug=false
22446 SHELL=\${CONFIG_SHELL-$SHELL}
22447 ac_cs_invocation="\$0 \$@"
22448
22449 _ACEOF
22450
22451 cat >>$CONFIG_STATUS <<\_ACEOF
22452 # Be Bourne compatible
22453 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22454   emulate sh
22455   NULLCMD=:
22456 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22457   set -o posix
22458 fi
22459
22460 # Name of the executable.
22461 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22462
22463 if expr a : '\(a\)' >/dev/null 2>&1; then
22464   as_expr=expr
22465 else
22466   as_expr=false
22467 fi
22468
22469 rm -f conf$$ conf$$.exe conf$$.file
22470 echo >conf$$.file
22471 if ln -s conf$$.file conf$$ 2>/dev/null; then
22472   # We could just check for DJGPP; but this test a) works b) is more generic
22473   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22474   if test -f conf$$.exe; then
22475     # Don't use ln at all; we don't have any links
22476     as_ln_s='cp -p'
22477   else
22478     as_ln_s='ln -s'
22479   fi
22480 elif ln conf$$.file conf$$ 2>/dev/null; then
22481   as_ln_s=ln
22482 else
22483   as_ln_s='cp -p'
22484 fi
22485 rm -f conf$$ conf$$.exe conf$$.file
22486
22487 as_executable_p="test -f"
22488
22489 # Support unset when possible.
22490 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22491   as_unset=unset
22492 else
22493   as_unset=false
22494 fi
22495
22496 # NLS nuisances.
22497 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22498 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22499 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22500 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22501 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22502 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22503 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22504 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22505
22506 # IFS
22507 # We need space, tab and new line, in precisely that order.
22508 as_nl='
22509 '
22510 IFS="   $as_nl"
22511
22512 # CDPATH.
22513 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22514
22515 exec 6>&1
22516
22517 _ACEOF
22518
22519 # Files that config.status was made for.
22520 if test -n "$ac_config_files"; then
22521   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22522 fi
22523
22524 if test -n "$ac_config_headers"; then
22525   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22526 fi
22527
22528 if test -n "$ac_config_links"; then
22529   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22530 fi
22531
22532 if test -n "$ac_config_commands"; then
22533   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22534 fi
22535
22536 cat >>$CONFIG_STATUS <<\EOF
22537
22538 ac_cs_usage="\
22539 \`$as_me' instantiates files from templates according to the
22540 current configuration.
22541
22542 Usage: $0 [OPTIONS] [FILE]...
22543
22544   -h, --help       print this help, then exit
22545   -V, --version    print version number, then exit
22546   -d, --debug      don't remove temporary files
22547       --recheck    update $as_me by reconfiguring in the same conditions
22548   --file=FILE[:TEMPLATE]
22549                    instantiate the configuration file FILE
22550   --header=FILE[:TEMPLATE]
22551                    instantiate the configuration header FILE
22552
22553 Configuration files:
22554 $config_files
22555
22556 Configuration headers:
22557 $config_headers
22558
22559 Configuration commands:
22560 $config_commands
22561
22562 Report bugs to <dickey@invisible-island.net>."
22563 EOF
22564
22565 cat >>$CONFIG_STATUS <<EOF
22566 ac_cs_version="\\
22567 config.status
22568 configured by $0, generated by GNU Autoconf 2.52.20141204,
22569   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22570
22571 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22572 Free Software Foundation, Inc.
22573 This config.status script is free software; the Free Software Foundation
22574 gives unlimited permission to copy, distribute and modify it."
22575 srcdir=$srcdir
22576 INSTALL="$INSTALL"
22577 EOF
22578
22579 cat >>$CONFIG_STATUS <<\EOF
22580 # If no file are specified by the user, then we need to provide default
22581 # value.  By we need to know if files were specified by the user.
22582 ac_need_defaults=:
22583 while test $# != 0
22584 do
22585   case $1 in
22586   --*=*)
22587     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22588     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22589     shift
22590     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22591     shift
22592     ;;
22593   -*);;
22594   *) # This is not an option, so the user has probably given explicit
22595      # arguments.
22596      ac_need_defaults=false;;
22597   esac
22598
22599   case $1 in
22600   # Handling of the options.
22601 EOF
22602 cat >>$CONFIG_STATUS <<EOF
22603   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22604     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22605     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22606 EOF
22607 cat >>$CONFIG_STATUS <<\EOF
22608   --version | --vers* | -V )
22609     echo "$ac_cs_version"; exit 0 ;;
22610   --he | --h)
22611     # Conflict between --help and --header
22612     { { echo "$as_me:22612: error: ambiguous option: $1
22613 Try \`$0 --help' for more information." >&5
22614 echo "$as_me: error: ambiguous option: $1
22615 Try \`$0 --help' for more information." >&2;}
22616    { (exit 1); exit 1; }; };;
22617   --help | --hel | -h )
22618     echo "$ac_cs_usage"; exit 0 ;;
22619   --debug | --d* | -d )
22620     debug=: ;;
22621   --file | --fil | --fi | --f )
22622     shift
22623     CONFIG_FILES="$CONFIG_FILES $1"
22624     ac_need_defaults=false;;
22625   --header | --heade | --head | --hea )
22626     shift
22627     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22628     ac_need_defaults=false;;
22629
22630   # This is an error.
22631   -*) { { echo "$as_me:22631: error: unrecognized option: $1
22632 Try \`$0 --help' for more information." >&5
22633 echo "$as_me: error: unrecognized option: $1
22634 Try \`$0 --help' for more information." >&2;}
22635    { (exit 1); exit 1; }; } ;;
22636
22637   *) ac_config_targets="$ac_config_targets $1" ;;
22638
22639   esac
22640   shift
22641 done
22642
22643 exec 5>>config.log
22644 cat >&5 << _ACEOF
22645
22646 ## ----------------------- ##
22647 ## Running config.status.  ##
22648 ## ----------------------- ##
22649
22650 This file was extended by $as_me 2.52.20141204, executed with
22651   CONFIG_FILES    = $CONFIG_FILES
22652   CONFIG_HEADERS  = $CONFIG_HEADERS
22653   CONFIG_LINKS    = $CONFIG_LINKS
22654   CONFIG_COMMANDS = $CONFIG_COMMANDS
22655   > $ac_cs_invocation
22656 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22657
22658 _ACEOF
22659 EOF
22660
22661 cat >>$CONFIG_STATUS <<EOF
22662 #
22663 # INIT-COMMANDS section.
22664 #
22665
22666 ### Special initialization commands, used to pass information from the
22667 ### configuration-run into config.status
22668
22669 AWK="$AWK"
22670 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22671 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22672 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22673 ECHO_LD="$ECHO_LD"
22674 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22675 LDCONFIG="$LDCONFIG"
22676 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22677 LIB_NAME="$LIB_NAME"
22678 LIB_PREFIX="$LIB_PREFIX"
22679 LIB_SUBSETS="$LIB_SUBSETS"
22680 LIB_SUFFIX="$LIB_SUFFIX"
22681 LIB_TRACING="$LIB_TRACING"
22682 LN_S="$LN_S"
22683 MAKE_TERMINFO="$MAKE_TERMINFO"
22684 NCURSES_MAJOR="$NCURSES_MAJOR"
22685 NCURSES_MINOR="$NCURSES_MINOR"
22686 NCURSES_OSPEED="$NCURSES_OSPEED"
22687 NCURSES_PATCH="$NCURSES_PATCH"
22688 SRC_SUBDIRS="$SRC_SUBDIRS"
22689 TERMINFO="$TERMINFO"
22690 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22691 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22692 TICS_NAME="$TICS_NAME"
22693 TIC_PATH="$TIC_PATH"
22694 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22695 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22696 TINFO_NAME="$TINFO_NAME"
22697 TINFO_SUFFIX="$TINFO_SUFFIX"
22698 UNALTERED_SYMS="$UNALTERED_SYMS"
22699 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22700 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22701 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22702 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22703 WILDCARD_SYMS="$WILDCARD_SYMS"
22704 WITH_CURSES_H="$with_curses_h"
22705 WITH_ECHO="${enable_echo:=yes}"
22706 WITH_OVERWRITE="$with_overwrite"
22707 cf_LIST_MODELS="$cf_list_models"
22708 cf_cv_abi_version="$cf_cv_abi_version"
22709 cf_cv_do_relink="$cf_cv_do_relink"
22710 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22711 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22712 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22713 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22714 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22715 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22716 cf_cv_rel_version="$cf_cv_rel_version"
22717 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22718 cf_cv_shared_soname='$cf_cv_shared_soname'
22719 cf_cv_shlib_version="$cf_cv_shlib_version"
22720 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22721 cf_cv_system_name="$cf_cv_system_name"
22722 cf_cv_term_driver="$with_term_driver"
22723 cf_with_ada="$cf_with_ada"
22724 cf_with_cxx_binding="$cf_with_cxx_binding"
22725 cf_with_db_install="$cf_with_db_install"
22726 cf_with_manpages="$cf_with_manpages"
22727 cf_with_tests="$cf_with_tests"
22728 host="$host"
22729 target="$target"
22730 with_shared_cxx="$with_shared_cxx"
22731
22732 EOF
22733
22734 cat >>$CONFIG_STATUS <<\EOF
22735 for ac_config_target in $ac_config_targets
22736 do
22737   case "$ac_config_target" in
22738   # Handling of arguments.
22739   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22740   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22741   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22742   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22743   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22744   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22745   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22746   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22747   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22748   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22749   *) { { echo "$as_me:22749: error: invalid argument: $ac_config_target" >&5
22750 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22751    { (exit 1); exit 1; }; };;
22752   esac
22753 done
22754
22755 # If the user did not use the arguments to specify the items to instantiate,
22756 # then the envvar interface is used.  Set only those that are not.
22757 # We use the long form for the default assignment because of an extremely
22758 # bizarre bug on SunOS 4.1.3.
22759 if $ac_need_defaults; then
22760   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22761   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22762   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22763 fi
22764
22765 # Create a temporary directory, and hook for its removal unless debugging.
22766 $debug ||
22767 {
22768   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22769   trap '{ (exit 1); exit 1; }' 1 2 13 15
22770 }
22771
22772 # Create a (secure) tmp directory for tmp files.
22773 : ${TMPDIR=/tmp}
22774 {
22775   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22776   test -n "$tmp" && test -d "$tmp"
22777 }  ||
22778 {
22779   tmp=$TMPDIR/cs$$-$RANDOM
22780   (umask 077 && mkdir $tmp)
22781 } ||
22782 {
22783    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22784    { (exit 1); exit 1; }
22785 }
22786
22787 EOF
22788
22789 cat >>$CONFIG_STATUS <<EOF
22790
22791 #
22792 # CONFIG_FILES section.
22793 #
22794
22795 # No need to generate the scripts if there are no CONFIG_FILES.
22796 # This happens for instance when ./config.status config.h
22797 if test -n "\$CONFIG_FILES"; then
22798   # Protect against being on the right side of a sed subst in config.status.
22799   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22800    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22801 s,@SHELL@,$SHELL,;t t
22802 s,@exec_prefix@,$exec_prefix,;t t
22803 s,@prefix@,$prefix,;t t
22804 s,@program_transform_name@,$program_transform_name,;t t
22805 s,@bindir@,$bindir,;t t
22806 s,@sbindir@,$sbindir,;t t
22807 s,@libexecdir@,$libexecdir,;t t
22808 s,@datarootdir@,$datarootdir,;t t
22809 s,@datadir@,$datadir,;t t
22810 s,@sysconfdir@,$sysconfdir,;t t
22811 s,@sharedstatedir@,$sharedstatedir,;t t
22812 s,@localstatedir@,$localstatedir,;t t
22813 s,@libdir@,$libdir,;t t
22814 s,@includedir@,$includedir,;t t
22815 s,@oldincludedir@,$oldincludedir,;t t
22816 s,@infodir@,$infodir,;t t
22817 s,@mandir@,$mandir,;t t
22818 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22819 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22820 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22821 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22822 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22823 s,@build_alias@,$build_alias,;t t
22824 s,@host_alias@,$host_alias,;t t
22825 s,@target_alias@,$target_alias,;t t
22826 s,@ECHO_C@,$ECHO_C,;t t
22827 s,@ECHO_N@,$ECHO_N,;t t
22828 s,@ECHO_T@,$ECHO_T,;t t
22829 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22830 s,@DEFS@,$DEFS,;t t
22831 s,@LIBS@,$LIBS,;t t
22832 s,@top_builddir@,$top_builddir,;t t
22833 s,@EGREP@,$EGREP,;t t
22834 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22835 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22836 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22837 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22838 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22839 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22840 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22841 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22842 s,@VERSION@,$VERSION,;t t
22843 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22844 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22845 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22846 s,@PACKAGE@,$PACKAGE,;t t
22847 s,@build@,$build,;t t
22848 s,@build_cpu@,$build_cpu,;t t
22849 s,@build_vendor@,$build_vendor,;t t
22850 s,@build_os@,$build_os,;t t
22851 s,@host@,$host,;t t
22852 s,@host_cpu@,$host_cpu,;t t
22853 s,@host_vendor@,$host_vendor,;t t
22854 s,@host_os@,$host_os,;t t
22855 s,@target@,$target,;t t
22856 s,@target_cpu@,$target_cpu,;t t
22857 s,@target_vendor@,$target_vendor,;t t
22858 s,@target_os@,$target_os,;t t
22859 s,@CC@,$CC,;t t
22860 s,@CFLAGS@,$CFLAGS,;t t
22861 s,@LDFLAGS@,$LDFLAGS,;t t
22862 s,@CPPFLAGS@,$CPPFLAGS,;t t
22863 s,@ac_ct_CC@,$ac_ct_CC,;t t
22864 s,@EXEEXT@,$EXEEXT,;t t
22865 s,@OBJEXT@,$OBJEXT,;t t
22866 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22867 s,@CPP@,$CPP,;t t
22868 s,@LDCONFIG@,$LDCONFIG,;t t
22869 s,@CXX@,$CXX,;t t
22870 s,@CXXFLAGS@,$CXXFLAGS,;t t
22871 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22872 s,@AWK@,$AWK,;t t
22873 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22874 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22875 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22876 s,@LINT@,$LINT,;t t
22877 s,@LINT_OPTS@,$LINT_OPTS,;t t
22878 s,@LN_S@,$LN_S,;t t
22879 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22880 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22881 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22882 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22883 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22884 s,@SET_MAKE@,$SET_MAKE,;t t
22885 s,@CTAGS@,$CTAGS,;t t
22886 s,@ETAGS@,$ETAGS,;t t
22887 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22888 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22889 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22890 s,@RANLIB@,$RANLIB,;t t
22891 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22892 s,@LD@,$LD,;t t
22893 s,@ac_ct_LD@,$ac_ct_LD,;t t
22894 s,@AR@,$AR,;t t
22895 s,@ac_ct_AR@,$ac_ct_AR,;t t
22896 s,@NM@,$NM,;t t
22897 s,@ac_ct_NM@,$ac_ct_NM,;t t
22898 s,@ARFLAGS@,$ARFLAGS,;t t
22899 s,@DESTDIR@,$DESTDIR,;t t
22900 s,@BUILD_CC@,$BUILD_CC,;t t
22901 s,@BUILD_CPP@,$BUILD_CPP,;t t
22902 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22903 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22904 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22905 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22906 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22907 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22908 s,@cf_list_models@,$cf_list_models,;t t
22909 s,@ABI_VERSION@,$ABI_VERSION,;t t
22910 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22911 s,@LIBTOOL@,$LIBTOOL,;t t
22912 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22913 s,@LT_UNDEF@,$LT_UNDEF,;t t
22914 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22915 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22916 s,@LIB_CREATE@,$LIB_CREATE,;t t
22917 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22918 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22919 s,@LIB_PREP@,$LIB_PREP,;t t
22920 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22921 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22922 s,@LIB_LINK@,$LIB_LINK,;t t
22923 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22924 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22925 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22926 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22927 s,@TICS_NAME@,$TICS_NAME,;t t
22928 s,@TINFO_NAME@,$TINFO_NAME,;t t
22929 s,@LIB_NAME@,$LIB_NAME,;t t
22930 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22931 s,@CC_G_OPT@,$CC_G_OPT,;t t
22932 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22933 s,@LD_MODEL@,$LD_MODEL,;t t
22934 s,@shlibdir@,$shlibdir,;t t
22935 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22936 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22937 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22938 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22939 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22940 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22941 s,@LINK_PROGS@,$LINK_PROGS,;t t
22942 s,@LINK_TESTS@,$LINK_TESTS,;t t
22943 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22944 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22945 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22946 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22947 s,@RPATH_LIST@,$RPATH_LIST,;t t
22948 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22949 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22950 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22951 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22952 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22953 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
22954 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22955 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22956 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22957 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22958 s,@XTERM_KBS@,$XTERM_KBS,;t t
22959 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22960 s,@TERMINFO@,$TERMINFO,;t t
22961 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22962 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22963 s,@TERMPATH@,$TERMPATH,;t t
22964 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22965 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22966 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22967 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22968 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22969 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22970 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22971 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22972 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22973 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22974 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22975 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22976 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22977 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22978 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22979 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22980 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22981 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22982 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22983 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22984 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22985 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22986 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22987 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22988 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22989 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22990 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22991 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22992 s,@PTHREAD@,$PTHREAD,;t t
22993 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22994 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22995 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22996 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22997 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22998 s,@ECHO_LT@,$ECHO_LT,;t t
22999 s,@ECHO_LD@,$ECHO_LD,;t t
23000 s,@RULE_CC@,$RULE_CC,;t t
23001 s,@SHOW_CC@,$SHOW_CC,;t t
23002 s,@ECHO_CC@,$ECHO_CC,;t t
23003 s,@ECHO_LINK@,$ECHO_LINK,;t t
23004 s,@ADAFLAGS@,$ADAFLAGS,;t t
23005 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23006 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23007 s,@ADA_TRACE@,$ADA_TRACE,;t t
23008 s,@MATH_LIB@,$MATH_LIB,;t t
23009 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23010 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23011 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23012 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23013 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23014 s,@TEST_LIBS@,$TEST_LIBS,;t t
23015 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23016 s,@CXXCPP@,$CXXCPP,;t t
23017 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23018 s,@CXX_AR@,$CXX_AR,;t t
23019 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23020 s,@CXXLIBS@,$CXXLIBS,;t t
23021 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23022 s,@gnat_exists@,$gnat_exists,;t t
23023 s,@M4_exists@,$M4_exists,;t t
23024 s,@cf_ada_make@,$cf_ada_make,;t t
23025 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23026 s,@cf_compile_generics@,$cf_compile_generics,;t t
23027 s,@cf_generic_objects@,$cf_generic_objects,;t t
23028 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23029 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23030 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23031 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23032 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23033 s,@cf_ada_package@,$cf_ada_package,;t t
23034 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23035 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23036 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23037 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23038 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23039 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23040 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23041 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23042 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23043 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23044 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23045 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23046 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23047 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23048 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23049 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23050 s,@TICS_LIBS@,$TICS_LIBS,;t t
23051 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23052 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23053 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23054 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23055 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23056 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23057 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23058 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23059 s,@includesubdir@,$includesubdir,;t t
23060 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23061 s,@TICS_LIST@,$TICS_LIST,;t t
23062 s,@TINFO_LIST@,$TINFO_LIST,;t t
23063 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23064 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23065 s,@TEST_ARGS@,$TEST_ARGS,;t t
23066 s,@TEST_DEPS@,$TEST_DEPS,;t t
23067 s,@TEST_ARG2@,$TEST_ARG2,;t t
23068 s,@TEST_DEP2@,$TEST_DEP2,;t t
23069 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23070 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23071 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23072 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23073 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23074 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23075 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23076 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23077 s,@cross_compiling@,$cross_compiling,;t t
23078 s,@TIC_PATH@,$TIC_PATH,;t t
23079 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23080 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23081 s,@PANEL_NAME@,$PANEL_NAME,;t t
23082 s,@MENU_NAME@,$MENU_NAME,;t t
23083 s,@FORM_NAME@,$FORM_NAME,;t t
23084 s,@CXX_NAME@,$CXX_NAME,;t t
23085 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23086 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23087 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23088 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23089 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23090 CEOF
23091
23092 EOF
23093
23094   cat >>$CONFIG_STATUS <<\EOF
23095   # Split the substitutions into bite-sized pieces for seds with
23096   # small command number limits, like on Digital OSF/1 and HP-UX.
23097   ac_max_sed_lines=48
23098   ac_sed_frag=1 # Number of current file.
23099   ac_beg=1 # First line for current file.
23100   ac_end=$ac_max_sed_lines # Line after last line for current file.
23101   ac_more_lines=:
23102   ac_sed_cmds=
23103   while $ac_more_lines; do
23104     if test $ac_beg -gt 1; then
23105       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23106     else
23107       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23108     fi
23109     if test ! -s $tmp/subs.frag; then
23110       ac_more_lines=false
23111     else
23112       # The purpose of the label and of the branching condition is to
23113       # speed up the sed processing (if there are no `@' at all, there
23114       # is no need to browse any of the substitutions).
23115       # These are the two extra sed commands mentioned above.
23116       (echo ':t
23117   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23118       if test -z "$ac_sed_cmds"; then
23119         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23120       else
23121         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23122       fi
23123       ac_sed_frag=`expr $ac_sed_frag + 1`
23124       ac_beg=$ac_end
23125       ac_end=`expr $ac_end + $ac_max_sed_lines`
23126     fi
23127   done
23128   if test -z "$ac_sed_cmds"; then
23129     ac_sed_cmds=cat
23130   fi
23131 fi # test -n "$CONFIG_FILES"
23132
23133 EOF
23134 cat >>$CONFIG_STATUS <<\EOF
23135 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23136   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23137   case $ac_file in
23138   - | *:- | *:-:* ) # input from stdin
23139         cat >$tmp/stdin
23140         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23141         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23142   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23143         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23144   * )   ac_file_in=$ac_file.in ;;
23145   esac
23146
23147   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23148   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23149          X"$ac_file" : 'X\(//\)[^/]' \| \
23150          X"$ac_file" : 'X\(//\)$' \| \
23151          X"$ac_file" : 'X\(/\)' \| \
23152          .     : '\(.\)' 2>/dev/null ||
23153 echo X"$ac_file" |
23154     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23155           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23156           /^X\(\/\/\)$/{ s//\1/; q; }
23157           /^X\(\/\).*/{ s//\1/; q; }
23158           s/.*/./; q'`
23159   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23160     { case "$ac_dir" in
23161   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23162   *)                      as_incr_dir=.;;
23163 esac
23164 as_dummy="$ac_dir"
23165 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23166   case $as_mkdir_dir in
23167     # Skip DOS drivespec
23168     ?:) as_incr_dir=$as_mkdir_dir ;;
23169     *)
23170       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23171       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23172     ;;
23173   esac
23174 done; }
23175
23176     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23177     # A "../" for each directory in $ac_dir_suffix.
23178     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23179   else
23180     ac_dir_suffix= ac_dots=
23181   fi
23182
23183   case $srcdir in
23184   .)  ac_srcdir=.
23185       if test -z "$ac_dots"; then
23186          ac_top_srcdir=.
23187       else
23188          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23189       fi ;;
23190   [\\/]* | ?:[\\/]* )
23191       ac_srcdir=$srcdir$ac_dir_suffix;
23192       ac_top_srcdir=$srcdir ;;
23193   *) # Relative path.
23194     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23195     ac_top_srcdir=$ac_dots$srcdir ;;
23196   esac
23197
23198   case $INSTALL in
23199   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23200   *) ac_INSTALL=$ac_dots$INSTALL ;;
23201   esac
23202
23203   if test x"$ac_file" != x-; then
23204     { echo "$as_me:23204: creating $ac_file" >&5
23205 echo "$as_me: creating $ac_file" >&6;}
23206     rm -f "$ac_file"
23207   fi
23208   # Let's still pretend it is `configure' which instantiates (i.e., don't
23209   # use $as_me), people would be surprised to read:
23210   #    /* config.h.  Generated automatically by config.status.  */
23211   configure_input="Generated automatically from `echo $ac_file_in |
23212                                                  sed 's,.*/,,'` by configure."
23213
23214   # First look for the input files in the build tree, otherwise in the
23215   # src tree.
23216   ac_file_inputs=`IFS=:
23217     for f in $ac_file_in; do
23218       case $f in
23219       -) echo $tmp/stdin ;;
23220       [\\/$]*)
23221          # Absolute (can't be DOS-style, as IFS=:)
23222          test -f "$f" || { { echo "$as_me:23222: error: cannot find input file: $f" >&5
23223 echo "$as_me: error: cannot find input file: $f" >&2;}
23224    { (exit 1); exit 1; }; }
23225          echo $f;;
23226       *) # Relative
23227          if test -f "$f"; then
23228            # Build tree
23229            echo $f
23230          elif test -f "$srcdir/$f"; then
23231            # Source tree
23232            echo $srcdir/$f
23233          else
23234            # /dev/null tree
23235            { { echo "$as_me:23235: error: cannot find input file: $f" >&5
23236 echo "$as_me: error: cannot find input file: $f" >&2;}
23237    { (exit 1); exit 1; }; }
23238          fi;;
23239       esac
23240     done` || { (exit 1); exit 1; }
23241 EOF
23242 cat >>$CONFIG_STATUS <<\EOF
23243   ac_warn_datarootdir=no
23244   if test x"$ac_file" != x-; then
23245     for ac_item in $ac_file_inputs
23246     do
23247       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23248       if test -n "$ac_seen"; then
23249         ac_used=`grep '@datarootdir@' $ac_item`
23250         if test -z "$ac_used"; then
23251           { echo "$as_me:23251: WARNING: datarootdir was used implicitly but not set:
23252 $ac_seen" >&5
23253 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23254 $ac_seen" >&2;}
23255           ac_warn_datarootdir=yes
23256         fi
23257       fi
23258       ac_seen=`grep '${datarootdir}' $ac_item`
23259       if test -n "$ac_seen"; then
23260         { echo "$as_me:23260: WARNING: datarootdir was used explicitly but not set:
23261 $ac_seen" >&5
23262 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23263 $ac_seen" >&2;}
23264         ac_warn_datarootdir=yes
23265       fi
23266     done
23267   fi
23268
23269 if test "x$ac_warn_datarootdir" = xyes; then
23270   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23271 fi
23272
23273 EOF
23274 cat >>$CONFIG_STATUS <<EOF
23275   sed "$ac_vpsub
23276 $extrasub
23277 EOF
23278 cat >>$CONFIG_STATUS <<\EOF
23279 :t
23280 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23281 s,@configure_input@,$configure_input,;t t
23282 s,@srcdir@,$ac_srcdir,;t t
23283 s,@top_srcdir@,$ac_top_srcdir,;t t
23284 s,@INSTALL@,$ac_INSTALL,;t t
23285 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23286   rm -f $tmp/stdin
23287   if test x"$ac_file" != x-; then
23288     cp $tmp/out $ac_file
23289
23290     for ac_name in prefix exec_prefix datarootdir
23291     do
23292         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23293         if test -n "$ac_seen"; then
23294             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23295             if test -z "$ac_init"; then
23296               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23297               { echo "$as_me:23297: WARNING: Variable $ac_name is used but was not set:
23298 $ac_seen" >&5
23299 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23300 $ac_seen" >&2;}
23301             fi
23302         fi
23303     done
23304     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23305     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23306     if test -s $tmp/out; then
23307       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23308       { echo "$as_me:23308: WARNING: Some variables may not be substituted:
23309 $ac_seen" >&5
23310 echo "$as_me: WARNING: Some variables may not be substituted:
23311 $ac_seen" >&2;}
23312     fi
23313   else
23314     cat $tmp/out
23315   fi
23316   rm -f $tmp/out
23317
23318 done
23319 EOF
23320 cat >>$CONFIG_STATUS <<\EOF
23321
23322 #
23323 # CONFIG_HEADER section.
23324 #
23325
23326 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23327 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23328 #
23329 # ac_d sets the value in "#define NAME VALUE" lines.
23330 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23331 ac_dB='[        ].*$,\1#\2'
23332 ac_dC=' '
23333 ac_dD=',;t'
23334 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23335 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23336 ac_iB='\([      ]\),\1#\2define\3'
23337 ac_iC=' '
23338 ac_iD='\4,;t'
23339 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23340 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23341 ac_uB='$,\1#\2define\3'
23342 ac_uC=' '
23343 ac_uD=',;t'
23344
23345 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23346   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23347   case $ac_file in
23348   - | *:- | *:-:* ) # input from stdin
23349         cat >$tmp/stdin
23350         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23351         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23352   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23353         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23354   * )   ac_file_in=$ac_file.in ;;
23355   esac
23356
23357   test x"$ac_file" != x- && { echo "$as_me:23357: creating $ac_file" >&5
23358 echo "$as_me: creating $ac_file" >&6;}
23359
23360   # First look for the input files in the build tree, otherwise in the
23361   # src tree.
23362   ac_file_inputs=`IFS=:
23363     for f in $ac_file_in; do
23364       case $f in
23365       -) echo $tmp/stdin ;;
23366       [\\/$]*)
23367          # Absolute (can't be DOS-style, as IFS=:)
23368          test -f "$f" || { { echo "$as_me:23368: error: cannot find input file: $f" >&5
23369 echo "$as_me: error: cannot find input file: $f" >&2;}
23370    { (exit 1); exit 1; }; }
23371          echo $f;;
23372       *) # Relative
23373          if test -f "$f"; then
23374            # Build tree
23375            echo $f
23376          elif test -f "$srcdir/$f"; then
23377            # Source tree
23378            echo $srcdir/$f
23379          else
23380            # /dev/null tree
23381            { { echo "$as_me:23381: error: cannot find input file: $f" >&5
23382 echo "$as_me: error: cannot find input file: $f" >&2;}
23383    { (exit 1); exit 1; }; }
23384          fi;;
23385       esac
23386     done` || { (exit 1); exit 1; }
23387   # Remove the trailing spaces.
23388   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23389
23390 EOF
23391
23392 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23393 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23394 # be either 'cat' or 'sort'.
23395 cat confdefs.h | uniq >conftest.vals
23396
23397 # Break up conftest.vals because some shells have a limit on
23398 # the size of here documents, and old seds have small limits too.
23399
23400 rm -f conftest.tail
23401 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23402 while grep . conftest.vals >/dev/null
23403 do
23404   # Write chunks of a limited-size here document to conftest.frag.
23405   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23406   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23407   echo 'CEOF' >> $CONFIG_STATUS
23408   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23409   rm -f conftest.vals
23410   mv conftest.tail conftest.vals
23411 done
23412 rm -f conftest.vals
23413
23414 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23415 # marker @DEFS@.
23416 echo '  cat >> conftest.edit <<CEOF
23417 /@DEFS@/r conftest.frag
23418 /@DEFS@/d
23419 CEOF
23420 sed -f conftest.edit $tmp/in > $tmp/out
23421 rm -f $tmp/in
23422 mv $tmp/out $tmp/in
23423 rm -f conftest.edit conftest.frag
23424 ' >> $CONFIG_STATUS
23425
23426 cat >>$CONFIG_STATUS <<\EOF
23427   # Let's still pretend it is `configure' which instantiates (i.e., don't
23428   # use $as_me), people would be surprised to read:
23429   #    /* config.h.  Generated automatically by config.status.  */
23430   if test x"$ac_file" = x-; then
23431     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23432   else
23433     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23434   fi
23435   cat $tmp/in >>$tmp/config.h
23436   rm -f $tmp/in
23437   if test x"$ac_file" != x-; then
23438     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23439       { echo "$as_me:23439: $ac_file is unchanged" >&5
23440 echo "$as_me: $ac_file is unchanged" >&6;}
23441     else
23442       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23443          X"$ac_file" : 'X\(//\)[^/]' \| \
23444          X"$ac_file" : 'X\(//\)$' \| \
23445          X"$ac_file" : 'X\(/\)' \| \
23446          .     : '\(.\)' 2>/dev/null ||
23447 echo X"$ac_file" |
23448     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23449           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23450           /^X\(\/\/\)$/{ s//\1/; q; }
23451           /^X\(\/\).*/{ s//\1/; q; }
23452           s/.*/./; q'`
23453       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23454         { case "$ac_dir" in
23455   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23456   *)                      as_incr_dir=.;;
23457 esac
23458 as_dummy="$ac_dir"
23459 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23460   case $as_mkdir_dir in
23461     # Skip DOS drivespec
23462     ?:) as_incr_dir=$as_mkdir_dir ;;
23463     *)
23464       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23465       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23466     ;;
23467   esac
23468 done; }
23469
23470       fi
23471       rm -f $ac_file
23472       mv $tmp/config.h $ac_file
23473     fi
23474   else
23475     cat $tmp/config.h
23476     rm -f $tmp/config.h
23477   fi
23478 done
23479 EOF
23480 cat >>$CONFIG_STATUS <<\EOF
23481 #
23482 # CONFIG_COMMANDS section.
23483 #
23484 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23485   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23486   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23487
23488   case $ac_dest in
23489     default )
23490 if test "x$cf_with_tests" != xno ; then
23491
23492 for cf_dir in test
23493 do
23494         if test ! -d $srcdir/$cf_dir; then
23495                 continue
23496         elif test -f $srcdir/$cf_dir/programs; then
23497                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23498         fi
23499 done
23500
23501 fi
23502
23503 cf_prefix=$LIB_PREFIX
23504
23505 case $cf_cv_shlib_version in
23506 (cygdll|msysdll|mingw)
23507         TINFO_NAME=$TINFO_ARG_SUFFIX
23508         TINFO_SUFFIX=.dll
23509         ;;
23510 esac
23511
23512 if test -n "$TINFO_SUFFIX" ; then
23513         case $TINFO_SUFFIX in
23514         (tw*)
23515                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23516                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23517                 ;;
23518         (t*)
23519                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23520                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23521                 ;;
23522         (w*)
23523                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23524                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23525                 ;;
23526         esac
23527 fi
23528
23529 for cf_dir in $SRC_SUBDIRS
23530 do
23531         if test ! -d $srcdir/$cf_dir ; then
23532                 continue
23533         elif test -f $srcdir/$cf_dir/modules; then
23534
23535                 SHARED_LIB=
23536                 Libs_To_Make=
23537
23538                 cf_sed_options=
23539                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23540                 then
23541                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23542                         cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
23543                 fi
23544
23545                 if test "x$WILDCARD_SYMS" = xno
23546                 then
23547                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23548                 fi
23549
23550                 if test "x$cf_sed_options" != "x"
23551                 then
23552                         cat >>$cf_dir/Makefile <<CF_EOF
23553
23554 # Generated by CF_LIB_RULES
23555 resulting.map: $UNALTERED_SYMS
23556         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23557
23558 clean::
23559         rm -f resulting.map
23560 CF_EOF
23561                 fi
23562
23563                 for cf_item in $cf_LIST_MODELS
23564                 do
23565
23566         case X$cf_item in
23567         (Xlibtool)
23568                 cf_suffix='.la'
23569                 cf_depsuf=$cf_suffix
23570                 ;;
23571         (Xdebug)
23572                 cf_suffix='_g.a'
23573                 cf_depsuf=$cf_suffix
23574                 ;;
23575         (Xprofile)
23576                 cf_suffix='_p.a'
23577                 cf_depsuf=$cf_suffix
23578                 ;;
23579         (Xshared)
23580                 case $cf_cv_system_name in
23581                 (aix[5-7]*)
23582                         cf_suffix='.so'
23583                         cf_depsuf=$cf_suffix
23584                         ;;
23585                 (cygwin*|msys*|mingw*)
23586                         cf_suffix='.dll'
23587                         cf_depsuf='.dll.a'
23588                         ;;
23589                 (darwin*)
23590                         cf_suffix='.dylib'
23591                         cf_depsuf=$cf_suffix
23592                         ;;
23593                 (hpux*)
23594                         case $target in
23595                         (ia64*)
23596                                 cf_suffix='.so'
23597                                 cf_depsuf=$cf_suffix
23598                                 ;;
23599                         (*)
23600                                 cf_suffix='.sl'
23601                                 cf_depsuf=$cf_suffix
23602                                 ;;
23603                         esac
23604                         ;;
23605                 (*)
23606                         cf_suffix='.so'
23607                         cf_depsuf=$cf_suffix
23608                         ;;
23609                 esac
23610                 ;;
23611         (*)
23612                 cf_suffix='.a'
23613                 cf_depsuf=$cf_suffix
23614                 ;;
23615         esac
23616         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23617         then
23618                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23619                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23620         fi
23621
23622                         cf_libname=$cf_dir
23623                         test "$cf_dir" = c++ && cf_libname=ncurses++
23624                         if test $cf_item = shared ; then
23625                                 if test -n "${LIB_SUFFIX}"
23626                                 then
23627                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23628                                 else
23629                                         cf_shared_suffix="$cf_suffix"
23630                                 fi
23631                                 if test "$cf_cv_do_symlinks" = yes ; then
23632                                         cf_version_name=
23633
23634                                         case "$cf_cv_shlib_version" in
23635                                         (rel)
23636                                                 cf_version_name=REL_VERSION
23637                                                 ;;
23638                                         (abi)
23639                                                 cf_version_name=ABI_VERSION
23640                                                 ;;
23641                                         esac
23642
23643                                         if test -n "$cf_version_name"
23644                                         then
23645                                                 case "$cf_cv_system_name" in
23646                                                 (darwin*)
23647                                                         # "w", etc?
23648                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23649                                                         ;;
23650                                                 (*)
23651                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23652                                                         ;;
23653                                                 esac
23654                                         fi
23655                                         if test -n "${USE_LIB_SUFFIX}"
23656                                         then
23657                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23658                                         else
23659                                                 cf_shared_suffix="$cf_suffix"
23660                                         fi
23661                                 fi
23662                                 # cygwin needs import library, and has unique naming convention
23663                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23664                                 # use 'cyg' prefix for shared lib.
23665                                 case $cf_cv_shlib_version in
23666                                 (cygdll)
23667                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23668                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23669                                         ;;
23670                                 (msysdll)
23671                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23672                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23673                                         ;;
23674                                 (mingw)
23675                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23676                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23677                                         ;;
23678                                 (*)
23679                                         cf_add_lib=
23680                                         ;;
23681                                 esac
23682                                 if test -n "$cf_add_lib"
23683                                 then
23684                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23685                                         continue
23686                                 fi
23687                         fi
23688                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23689                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23690                 done
23691
23692                 if test $cf_dir = ncurses ; then
23693                         cf_subsets="$LIB_SUBSETS"
23694                         cf_r_parts="$cf_subsets"
23695                         cf_liblist="$Libs_To_Make"
23696
23697                         while test -n "$cf_r_parts"
23698                         do
23699                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23700                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23701                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23702                                         cf_add_lib=
23703                                         case $cf_l_parts in
23704                                         (*termlib*)
23705                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23706                                                 ;;
23707                                         (*ticlib*)
23708                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23709                                                 ;;
23710                                         (*)
23711                                                 break
23712                                                 ;;
23713                                         esac
23714                                         if test -n "$cf_add_lib"; then
23715                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23716                                         fi
23717                                 else
23718                                         break
23719                                 fi
23720                         done
23721                 else
23722                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23723                 fi
23724
23725                 if test $cf_dir = c++; then
23726                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23727                                 cf_list=
23728                                 for cf_item in $Libs_To_Make
23729                                 do
23730                                         case $cf_item in
23731                                         (*.a)
23732                                                 ;;
23733                                         (*)
23734                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23735                                                 ;;
23736                                         esac
23737                                         for cf_test in $cf_list
23738                                         do
23739                                                 if test "$cf_test" = "$cf_item"
23740                                                 then
23741                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23742                                                         cf_item=
23743                                                         break
23744                                                 fi
23745                                         done
23746                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23747                                 done
23748                                 Libs_To_Make="$cf_list"
23749                         fi
23750                 fi
23751
23752                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23753                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23754                         $cf_dir/Makefile >$cf_dir/Makefile.out
23755                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23756
23757                 $AWK -f $srcdir/mk-0th.awk \
23758                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23759                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23760
23761                 for cf_subset in $cf_subsets
23762                 do
23763                         cf_subdirs=
23764                         for cf_item in $cf_LIST_MODELS
23765                         do
23766
23767                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23768
23769 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23770
23771                         CXX_MODEL=$cf_ITEM
23772                         if test "$CXX_MODEL" = SHARED; then
23773                                 case $cf_cv_shlib_version in
23774                                 (cygdll|msysdll|mingw)
23775                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23776
23777 echo "${as_me:-configure}:23777: testing overriding CXX_MODEL to SHARED ..." 1>&5
23778
23779                                         with_shared_cxx=yes
23780                                         ;;
23781                                 (*)
23782                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23783                                         ;;
23784                                 esac
23785                         fi
23786
23787         case X$cf_item in
23788         (Xlibtool)
23789                 cf_suffix='.la'
23790                 cf_depsuf=$cf_suffix
23791                 ;;
23792         (Xdebug)
23793                 cf_suffix='_g.a'
23794                 cf_depsuf=$cf_suffix
23795                 ;;
23796         (Xprofile)
23797                 cf_suffix='_p.a'
23798                 cf_depsuf=$cf_suffix
23799                 ;;
23800         (Xshared)
23801                 case $cf_cv_system_name in
23802                 (aix[5-7]*)
23803                         cf_suffix='.so'
23804                         cf_depsuf=$cf_suffix
23805                         ;;
23806                 (cygwin*|msys*|mingw*)
23807                         cf_suffix='.dll'
23808                         cf_depsuf='.dll.a'
23809                         ;;
23810                 (darwin*)
23811                         cf_suffix='.dylib'
23812                         cf_depsuf=$cf_suffix
23813                         ;;
23814                 (hpux*)
23815                         case $target in
23816                         (ia64*)
23817                                 cf_suffix='.so'
23818                                 cf_depsuf=$cf_suffix
23819                                 ;;
23820                         (*)
23821                                 cf_suffix='.sl'
23822                                 cf_depsuf=$cf_suffix
23823                                 ;;
23824                         esac
23825                         ;;
23826                 (*)
23827                         cf_suffix='.so'
23828                         cf_depsuf=$cf_suffix
23829                         ;;
23830                 esac
23831                 ;;
23832         (*)
23833                 cf_suffix='.a'
23834                 cf_depsuf=$cf_suffix
23835                 ;;
23836         esac
23837         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23838         then
23839                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23840                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23841         fi
23842
23843         case $cf_item in
23844         (libtool) cf_subdir='obj_lo'  ;;
23845         (normal)  cf_subdir='objects' ;;
23846         (debug)   cf_subdir='obj_g' ;;
23847         (profile) cf_subdir='obj_p' ;;
23848         (shared)
23849                 case $cf_cv_system_name in
23850                 (cygwin|msys)
23851                         cf_subdir='objects' ;;
23852                 (*)
23853                         cf_subdir='obj_s' ;;
23854                 esac
23855         esac
23856
23857                         # Test for case where we build libtinfo with a different name.
23858                         cf_libname=$cf_dir
23859                         if test $cf_dir = ncurses ; then
23860                                 case $cf_subset in
23861                                 (*base*)
23862                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23863                                         ;;
23864                                 (*termlib*)
23865                                         cf_libname=$TINFO_LIB_SUFFIX
23866                                         ;;
23867                                 (ticlib*)
23868                                         cf_libname=$TICS_LIB_SUFFIX
23869                                         ;;
23870                                 esac
23871                         elif test $cf_dir = c++ ; then
23872                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23873                         else
23874                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23875                         fi
23876                         if test -n "${USE_ARG_SUFFIX}" ; then
23877                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23878                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23879                         fi
23880
23881                         # These dependencies really are for development, not
23882                         # builds, but they are useful in porting, too.
23883                         cf_depend="../include/ncurses_cfg.h"
23884                         if test "$srcdir" = "."; then
23885                                 cf_reldir="."
23886                         else
23887                                 cf_reldir="\${srcdir}"
23888                         fi
23889
23890                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23891                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23892                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23893                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23894                         fi
23895
23896                         cf_dir_suffix=
23897                         old_cf_suffix="$cf_suffix"
23898                         if test "$cf_cv_shlib_version_infix" = yes ; then
23899                         if test -n "$USE_LIB_SUFFIX" ; then
23900                                 case $USE_LIB_SUFFIX in
23901                                 (tw*)
23902                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
23903                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23904                                         cf_dir_suffix=tw$EXTRA_SUFFIX
23905                                         ;;
23906                                 (t*)
23907                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
23908                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
23909                                         cf_dir_suffix=t$EXTRA_SUFFIX
23910                                         ;;
23911                                 (w*)
23912                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
23913                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
23914                                         cf_dir_suffix=w$EXTRA_SUFFIX
23915                                         ;;
23916                                 (*)
23917                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
23918                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
23919                                         cf_dir_suffix=$EXTRA_SUFFIX
23920                                         ;;
23921                                 esac
23922                         fi
23923                         fi
23924
23925                         $AWK -f $srcdir/mk-1st.awk \
23926                                 name=${cf_libname}${cf_dir_suffix} \
23927                                 traces=$LIB_TRACING \
23928                                 MODEL=$cf_ITEM \
23929                                 CXX_MODEL=$CXX_MODEL \
23930                                 model=$cf_subdir \
23931                                 prefix=$cf_prefix \
23932                                 suffix=$cf_suffix \
23933                                 subset=$cf_subset \
23934                                 driver=$cf_cv_term_driver \
23935                                 SymLink="$LN_S" \
23936                                 TermlibRoot=$TINFO_NAME \
23937                                 TermlibSuffix=$TINFO_SUFFIX \
23938                                 ShlibVer=$cf_cv_shlib_version \
23939                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23940                                 ReLink=${cf_cv_do_relink:-no} \
23941                                 DoLinks=$cf_cv_do_symlinks \
23942                                 rmSoLocs=$cf_cv_rm_so_locs \
23943                                 ldconfig="$LDCONFIG" \
23944                                 overwrite=$WITH_OVERWRITE \
23945                                 depend="$cf_depend" \
23946                                 host="$host" \
23947                                 libtool_version="$LIBTOOL_VERSION" \
23948                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23949
23950                         cf_suffix="$old_cf_suffix"
23951
23952                         for cf_subdir2 in $cf_subdirs lib
23953                         do
23954                                 test $cf_subdir = $cf_subdir2 && break
23955                         done
23956                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23957                         $AWK -f $srcdir/mk-2nd.awk \
23958                                 name=$cf_dir \
23959                                 traces=$LIB_TRACING \
23960                                 MODEL=$cf_ITEM \
23961                                 model=$cf_subdir \
23962                                 subset=$cf_subset \
23963                                 srcdir=$srcdir \
23964                                 echo=$WITH_ECHO \
23965                                 crenames=$cf_cv_prog_CC_c_o \
23966                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23967                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23968                         cf_subdirs="$cf_subdirs $cf_subdir"
23969                         done
23970                 done
23971         fi
23972
23973         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23974 done
23975
23976 for cf_dir in $SRC_SUBDIRS
23977 do
23978         if test ! -d $srcdir/$cf_dir ; then
23979                 continue
23980         fi
23981
23982         if test -f $cf_dir/Makefile ; then
23983                 case "$cf_dir" in
23984                 (Ada95)
23985                         echo 'libs \' >> Makefile
23986                         echo 'install.libs \' >> Makefile
23987                         echo 'uninstall.libs ::' >> Makefile
23988                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23989                         ;;
23990                 esac
23991         fi
23992
23993         if test -f $srcdir/$cf_dir/modules; then
23994                 echo >> Makefile
23995                 if test -f $srcdir/$cf_dir/headers; then
23996 cat >> Makefile <<CF_EOF
23997 install.includes \\
23998 uninstall.includes \\
23999 CF_EOF
24000                 fi
24001 if test "$cf_dir" != "c++" ; then
24002 echo 'lint \' >> Makefile
24003 fi
24004 cat >> Makefile <<CF_EOF
24005 libs \\
24006 lintlib \\
24007 install.libs \\
24008 uninstall.libs \\
24009 install.$cf_dir \\
24010 uninstall.$cf_dir ::
24011         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24012 CF_EOF
24013         elif test -f $srcdir/$cf_dir/headers; then
24014 cat >> Makefile <<CF_EOF
24015
24016 libs \\
24017 install.libs \\
24018 uninstall.libs \\
24019 install.includes \\
24020 uninstall.includes ::
24021         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24022 CF_EOF
24023 fi
24024 done
24025
24026 if test "x$cf_with_db_install" = xyes; then
24027 cat >> Makefile <<CF_EOF
24028
24029 install.libs uninstall.libs \\
24030 install.data uninstall.data ::
24031 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24032 CF_EOF
24033 else
24034 cat >> Makefile <<CF_EOF
24035
24036 install.libs uninstall.libs ::
24037         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24038 CF_EOF
24039 fi
24040
24041 if test "x$cf_with_manpages" = xyes; then
24042 cat >> Makefile <<CF_EOF
24043
24044 install.man \\
24045 uninstall.man ::
24046         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24047 CF_EOF
24048 fi
24049
24050 cat >> Makefile <<CF_EOF
24051
24052 distclean ::
24053         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24054         rm -f headers.sh headers.sed mk_shared_lib.sh
24055         rm -f edit_man.* man_alias.*
24056         rm -rf \${DIRS_TO_MAKE}
24057 CF_EOF
24058
24059 # Special case: tack's manpage lives in its own directory.
24060 if test "x$cf_with_manpages" = xyes; then
24061 if test -d tack ; then
24062 if test -f $srcdir/$tack.h; then
24063 cat >> Makefile <<CF_EOF
24064
24065 install.man \\
24066 uninstall.man ::
24067         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24068 CF_EOF
24069 fi
24070 fi
24071 fi
24072
24073 rm -f headers.sed headers.sh
24074
24075 echo creating headers.sh
24076 cat >headers.sh <<CF_EOF
24077 #! $SHELL
24078 # This shell script is generated by the 'configure' script.  It is invoked in a
24079 # subdirectory of the build tree.  It generates a sed-script in the parent
24080 # directory that is used to adjust includes for header files that reside in a
24081 # subdirectory of /usr/include, etc.
24082 PRG=""
24083 while test \$# != 3
24084 do
24085 PRG="\$PRG \$1"; shift
24086 done
24087 DST=\$1
24088 REF=\$2
24089 SRC=\$3
24090 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24091 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24092 echo installing \$SRC in \$DST
24093 CF_EOF
24094
24095 if test $WITH_CURSES_H = yes; then
24096         cat >>headers.sh <<CF_EOF
24097 case \$DST in
24098 (/*/include/*)
24099         END=\`basename \$DST\`
24100         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24101         do
24102                 NAME=\`basename \$i\`
24103                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24104         done
24105         ;;
24106 (*)
24107         echo "" >> \$TMPSED
24108         ;;
24109 esac
24110 CF_EOF
24111
24112 else
24113         cat >>headers.sh <<CF_EOF
24114 case \$DST in
24115 (/*/include/*)
24116         END=\`basename \$DST\`
24117         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24118         do
24119                 NAME=\`basename \$i\`
24120                 if test "\$NAME" = "curses.h"
24121                 then
24122                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24123                         NAME=ncurses.h
24124                 fi
24125                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24126         done
24127         ;;
24128 (*)
24129         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24130         ;;
24131 esac
24132 CF_EOF
24133 fi
24134 cat >>headers.sh <<CF_EOF
24135 rm -f \$TMPSRC
24136 sed -f \$TMPSED \$SRC > \$TMPSRC
24137 NAME=\`basename \$SRC\`
24138 CF_EOF
24139 if test $WITH_CURSES_H != yes; then
24140         cat >>headers.sh <<CF_EOF
24141 test "\$NAME" = "curses.h" && NAME=ncurses.h
24142 CF_EOF
24143 fi
24144 cat >>headers.sh <<CF_EOF
24145 # Just in case someone gzip'd manpages, remove the conflicting copy.
24146 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24147
24148 eval \$PRG \$TMPSRC \$DST/\$NAME
24149 rm -f \$TMPSRC \$TMPSED
24150 CF_EOF
24151
24152 chmod 0755 headers.sh
24153
24154 for cf_dir in $SRC_SUBDIRS
24155 do
24156         if test ! -d $srcdir/$cf_dir ; then
24157                 continue
24158         fi
24159
24160         if test -f $srcdir/$cf_dir/headers; then
24161                 $AWK -f $srcdir/mk-hdr.awk \
24162                         subset="$LIB_SUBSETS" \
24163                         compat="$WITH_CURSES_H" \
24164                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24165         fi
24166
24167         if test -f $srcdir/$cf_dir/modules; then
24168                 if test "$cf_dir" != "c++" ; then
24169                         cat >>$cf_dir/Makefile <<"CF_EOF"
24170 depend : ${AUTO_SRC}
24171         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24172
24173 # DO NOT DELETE THIS LINE -- make depend depends on it.
24174 CF_EOF
24175                 fi
24176         fi
24177 done
24178
24179 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24180 if test -z "$USE_OLD_MAKERULES" ; then
24181         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24182 fi
24183 fi
24184  ;;
24185   esac
24186 done
24187 EOF
24188
24189 cat >>$CONFIG_STATUS <<\EOF
24190
24191 { (exit 0); exit 0; }
24192 EOF
24193 chmod +x $CONFIG_STATUS
24194 ac_clean_files=$ac_clean_files_save
24195
24196 # configure is writing to config.log, and then calls config.status.
24197 # config.status does its own redirection, appending to config.log.
24198 # Unfortunately, on DOS this fails, as config.log is still kept open
24199 # by configure, so config.status won't be able to write to it; its
24200 # output is simply discarded.  So we exec the FD to /dev/null,
24201 # effectively closing config.log, so it can be properly (re)opened and
24202 # appended to by config.status.  When coming back to configure, we
24203 # need to make the FD available again.
24204 if test "$no_create" != yes; then
24205   ac_cs_success=:
24206   exec 5>/dev/null
24207   $SHELL $CONFIG_STATUS || ac_cs_success=false
24208   exec 5>>config.log
24209   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24210   # would make configure fail if this is the last instruction.
24211   $ac_cs_success || { (exit 1); exit 1; }
24212 fi
24213 ${MAKE:-make} preinstall