]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20150822
[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         echo "$as_me:5476: checking whether able to link to dl*() functions" >&5
5477 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5478         cat >conftest.$ac_ext <<_ACEOF
5479 #line 5479 "configure"
5480 #include "confdefs.h"
5481 #include <dlfcn.h>
5482 int
5483 main ()
5484 {
5485
5486                 void *obj;
5487                 if ((obj = dlopen("filename", 0)) != 0) {
5488                         if (dlsym(obj, "symbolname") == 0) {
5489                         dlclose(obj);
5490                         }
5491                 }
5492   ;
5493   return 0;
5494 }
5495 _ACEOF
5496 rm -f conftest.$ac_objext conftest$ac_exeext
5497 if { (eval echo "$as_me:5497: \"$ac_link\"") >&5
5498   (eval $ac_link) 2>&5
5499   ac_status=$?
5500   echo "$as_me:5500: \$? = $ac_status" >&5
5501   (exit $ac_status); } &&
5502          { ac_try='test -s conftest$ac_exeext'
5503   { (eval echo "$as_me:5503: \"$ac_try\"") >&5
5504   (eval $ac_try) 2>&5
5505   ac_status=$?
5506   echo "$as_me:5506: \$? = $ac_status" >&5
5507   (exit $ac_status); }; }; then
5508
5509 cat >>confdefs.h <<\EOF
5510 #define HAVE_LIBDL 1
5511 EOF
5512
5513 else
5514   echo "$as_me: failed program was:" >&5
5515 cat conftest.$ac_ext >&5
5516
5517                 { { echo "$as_me:5517: error: Cannot link test program for libdl" >&5
5518 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5519    { (exit 1); exit 1; }; }
5520 fi
5521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5522         echo "$as_me:5522: result: ok" >&5
5523 echo "${ECHO_T}ok" >&6
5524 else
5525         { { echo "$as_me:5525: error: Cannot find dlsym function" >&5
5526 echo "$as_me: error: Cannot find dlsym function" >&2;}
5527    { (exit 1); exit 1; }; }
5528 fi
5529
5530                 if test "x$with_gpm" != xyes ; then
5531                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5532
5533 echo "${as_me:-configure}:5533: testing assuming soname for gpm is $with_gpm ..." 1>&5
5534
5535                         cf_cv_gpm_soname="$with_gpm"
5536                 else
5537
5538 echo "$as_me:5538: checking for soname of gpm library" >&5
5539 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5540 if test "${cf_cv_gpm_soname+set}" = set; then
5541   echo $ECHO_N "(cached) $ECHO_C" >&6
5542 else
5543
5544 cf_cv_gpm_soname=unknown
5545 if test "$cross_compiling" != yes ; then
5546 cat >conftest.$ac_ext <<CF_EOF
5547 #include <gpm.h>
5548 int main()
5549 {
5550 if (Gpm_Open(0,0)) Gpm_Close();
5551         ${cf_cv_main_return:-return}(0);
5552 }
5553 CF_EOF
5554 cf_save_LIBS="$LIBS"
5555
5556 cf_add_libs="-lgpm"
5557 # Filter out duplicates - this happens with badly-designed ".pc" files...
5558 for cf_add_1lib in $LIBS
5559 do
5560         for cf_add_2lib in $cf_add_libs
5561         do
5562                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5563                 then
5564                         cf_add_1lib=
5565                         break
5566                 fi
5567         done
5568         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5569 done
5570 LIBS="$cf_add_libs"
5571
5572         if { (eval echo "$as_me:5572: \"$ac_compile\"") >&5
5573   (eval $ac_compile) 2>&5
5574   ac_status=$?
5575   echo "$as_me:5575: \$? = $ac_status" >&5
5576   (exit $ac_status); } ; then
5577                 if { (eval echo "$as_me:5577: \"$ac_link\"") >&5
5578   (eval $ac_link) 2>&5
5579   ac_status=$?
5580   echo "$as_me:5580: \$? = $ac_status" >&5
5581   (exit $ac_status); } ; then
5582                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5583                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5584                 fi
5585         fi
5586 rm -rf conftest*
5587 LIBS="$cf_save_LIBS"
5588 fi
5589
5590 fi
5591 echo "$as_me:5591: result: $cf_cv_gpm_soname" >&5
5592 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5593
5594                 fi
5595                 test "$cf_cv_gpm_soname" != "unknown" &&
5596 cat >>confdefs.h <<EOF
5597 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5598 EOF
5599
5600                 SHLIB_LIST="-ldl $SHLIB_LIST"
5601         else
5602                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5603
5604 cf_add_libs="-lgpm"
5605 # Filter out duplicates - this happens with badly-designed ".pc" files...
5606 for cf_add_1lib in $TEST_LIBS
5607 do
5608         for cf_add_2lib in $cf_add_libs
5609         do
5610                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5611                 then
5612                         cf_add_1lib=
5613                         break
5614                 fi
5615         done
5616         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5617 done
5618 TEST_LIBS="$cf_add_libs"
5619
5620         fi
5621
5622 cat >>confdefs.h <<\EOF
5623 #define HAVE_LIBGPM 1
5624 EOF
5625
5626 echo "$as_me:5626: checking for Gpm_Wgetch in -lgpm" >&5
5627 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5628 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5629   echo $ECHO_N "(cached) $ECHO_C" >&6
5630 else
5631   ac_check_lib_save_LIBS=$LIBS
5632 LIBS="-lgpm  $LIBS"
5633 cat >conftest.$ac_ext <<_ACEOF
5634 #line 5634 "configure"
5635 #include "confdefs.h"
5636
5637 /* Override any gcc2 internal prototype to avoid an error.  */
5638 #ifdef __cplusplus
5639 extern "C"
5640 #endif
5641 /* We use char because int might match the return type of a gcc2
5642    builtin and then its argument prototype would still apply.  */
5643 char Gpm_Wgetch ();
5644 int
5645 main ()
5646 {
5647 Gpm_Wgetch ();
5648   ;
5649   return 0;
5650 }
5651 _ACEOF
5652 rm -f conftest.$ac_objext conftest$ac_exeext
5653 if { (eval echo "$as_me:5653: \"$ac_link\"") >&5
5654   (eval $ac_link) 2>&5
5655   ac_status=$?
5656   echo "$as_me:5656: \$? = $ac_status" >&5
5657   (exit $ac_status); } &&
5658          { ac_try='test -s conftest$ac_exeext'
5659   { (eval echo "$as_me:5659: \"$ac_try\"") >&5
5660   (eval $ac_try) 2>&5
5661   ac_status=$?
5662   echo "$as_me:5662: \$? = $ac_status" >&5
5663   (exit $ac_status); }; }; then
5664   ac_cv_lib_gpm_Gpm_Wgetch=yes
5665 else
5666   echo "$as_me: failed program was:" >&5
5667 cat conftest.$ac_ext >&5
5668 ac_cv_lib_gpm_Gpm_Wgetch=no
5669 fi
5670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5671 LIBS=$ac_check_lib_save_LIBS
5672 fi
5673 echo "$as_me:5673: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5674 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5675 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5676
5677 echo "$as_me:5677: checking if GPM is weakly bound to curses library" >&5
5678 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5679 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5680   echo $ECHO_N "(cached) $ECHO_C" >&6
5681 else
5682
5683 cf_cv_check_gpm_wgetch=unknown
5684 if test "$cross_compiling" != yes ; then
5685
5686 cat >conftest.$ac_ext <<CF_EOF
5687 #include <gpm.h>
5688 int main()
5689 {
5690         Gpm_Wgetch();
5691         ${cf_cv_main_return:-return}(0);
5692 }
5693 CF_EOF
5694
5695         cf_save_LIBS="$LIBS"
5696         # This only works if we can look at the symbol table.  If a shared
5697         # library is stripped for install, we cannot use that.  So we're forced
5698         # to rely on the static library, noting that some packagers may not
5699         # include it.
5700         LIBS="-static -lgpm -dynamic $LIBS"
5701         if { (eval echo "$as_me:5701: \"$ac_compile\"") >&5
5702   (eval $ac_compile) 2>&5
5703   ac_status=$?
5704   echo "$as_me:5704: \$? = $ac_status" >&5
5705   (exit $ac_status); } ; then
5706                 if { (eval echo "$as_me:5706: \"$ac_link\"") >&5
5707   (eval $ac_link) 2>&5
5708   ac_status=$?
5709   echo "$as_me:5709: \$? = $ac_status" >&5
5710   (exit $ac_status); } ; then
5711                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5712                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5713                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5714                 fi
5715         fi
5716         rm -rf conftest*
5717         LIBS="$cf_save_LIBS"
5718 fi
5719
5720 fi
5721 echo "$as_me:5721: result: $cf_cv_check_gpm_wgetch" >&5
5722 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5723
5724 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5725         { echo "$as_me:5725: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5726 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5727 fi
5728
5729 fi
5730
5731 fi
5732
5733 # not everyone has "test -c"
5734 if test -c /dev/sysmouse 2>/dev/null ; then
5735 echo "$as_me:5735: checking if you want to use sysmouse" >&5
5736 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5737
5738 # Check whether --with-sysmouse or --without-sysmouse was given.
5739 if test "${with_sysmouse+set}" = set; then
5740   withval="$with_sysmouse"
5741   cf_with_sysmouse=$withval
5742 else
5743   cf_with_sysmouse=maybe
5744 fi;
5745         if test "$cf_with_sysmouse" != no ; then
5746         cat >conftest.$ac_ext <<_ACEOF
5747 #line 5747 "configure"
5748 #include "confdefs.h"
5749
5750 #include <osreldate.h>
5751 #if (__FreeBSD_version >= 400017)
5752 #include <sys/consio.h>
5753 #include <sys/fbio.h>
5754 #else
5755 #include <machine/console.h>
5756 #endif
5757
5758 int
5759 main ()
5760 {
5761
5762         struct mouse_info the_mouse;
5763         ioctl(0, CONS_MOUSECTL, &the_mouse);
5764
5765   ;
5766   return 0;
5767 }
5768 _ACEOF
5769 rm -f conftest.$ac_objext
5770 if { (eval echo "$as_me:5770: \"$ac_compile\"") >&5
5771   (eval $ac_compile) 2>&5
5772   ac_status=$?
5773   echo "$as_me:5773: \$? = $ac_status" >&5
5774   (exit $ac_status); } &&
5775          { ac_try='test -s conftest.$ac_objext'
5776   { (eval echo "$as_me:5776: \"$ac_try\"") >&5
5777   (eval $ac_try) 2>&5
5778   ac_status=$?
5779   echo "$as_me:5779: \$? = $ac_status" >&5
5780   (exit $ac_status); }; }; then
5781   cf_with_sysmouse=yes
5782 else
5783   echo "$as_me: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5785 cf_with_sysmouse=no
5786 fi
5787 rm -f conftest.$ac_objext conftest.$ac_ext
5788         fi
5789 echo "$as_me:5789: result: $cf_with_sysmouse" >&5
5790 echo "${ECHO_T}$cf_with_sysmouse" >&6
5791 test "$cf_with_sysmouse" = yes &&
5792 cat >>confdefs.h <<\EOF
5793 #define USE_SYSMOUSE 1
5794 EOF
5795
5796 fi
5797
5798 if test X"$CC_G_OPT" = X"" ; then
5799         CC_G_OPT='-g'
5800         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5801 fi
5802
5803 if test X"$CXX_G_OPT" = X"" ; then
5804         CXX_G_OPT='-g'
5805         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5806 fi
5807
5808 echo "$as_me:5808: checking for default loader flags" >&5
5809 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5810 case $DFT_LWR_MODEL in
5811 (libtool) LD_MODEL=''   ;;
5812 (normal)  LD_MODEL=''   ;;
5813 (debug)   LD_MODEL=$CC_G_OPT ;;
5814 (profile) LD_MODEL='-pg';;
5815 (shared)  LD_MODEL=''   ;;
5816 esac
5817 echo "$as_me:5817: result: $LD_MODEL" >&5
5818 echo "${ECHO_T}$LD_MODEL" >&6
5819
5820 case $DFT_LWR_MODEL in
5821 (shared)
5822
5823 echo "$as_me:5823: checking if rpath option should be used" >&5
5824 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5825
5826 # Check whether --enable-rpath or --disable-rpath was given.
5827 if test "${enable_rpath+set}" = set; then
5828   enableval="$enable_rpath"
5829   cf_cv_enable_rpath=$enableval
5830 else
5831   cf_cv_enable_rpath=no
5832 fi;
5833 echo "$as_me:5833: result: $cf_cv_enable_rpath" >&5
5834 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5835
5836 echo "$as_me:5836: checking if shared libraries should be relinked during install" >&5
5837 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5838
5839 # Check whether --enable-relink or --disable-relink was given.
5840 if test "${enable_relink+set}" = set; then
5841   enableval="$enable_relink"
5842   cf_cv_do_relink=$enableval
5843 else
5844   cf_cv_do_relink=yes
5845 fi;
5846 echo "$as_me:5846: result: $cf_cv_do_relink" >&5
5847 echo "${ECHO_T}$cf_cv_do_relink" >&6
5848         ;;
5849 esac
5850
5851 # we will build libraries one-level down.
5852 rel_builddir=..
5853
5854 LD_RPATH_OPT=
5855 echo "$as_me:5855: checking for an rpath option" >&5
5856 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5857 case $cf_cv_system_name in
5858 (irix*)
5859         if test "$GCC" = yes; then
5860                 LD_RPATH_OPT="-Wl,-rpath,"
5861         else
5862                 LD_RPATH_OPT="-rpath "
5863         fi
5864         ;;
5865 (linux*|gnu*|k*bsd*-gnu)
5866         LD_RPATH_OPT="-Wl,-rpath,"
5867         ;;
5868 (openbsd[2-9].*|mirbsd*)
5869         LD_RPATH_OPT="-Wl,-rpath,"
5870         ;;
5871 (dragonfly*|freebsd*)
5872         LD_RPATH_OPT="-rpath "
5873         ;;
5874 (netbsd*)
5875         LD_RPATH_OPT="-Wl,-rpath,"
5876         ;;
5877 (osf*|mls+*)
5878         LD_RPATH_OPT="-rpath "
5879         ;;
5880 (solaris2*)
5881         LD_RPATH_OPT="-R"
5882         ;;
5883 (*)
5884         ;;
5885 esac
5886 echo "$as_me:5886: result: $LD_RPATH_OPT" >&5
5887 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5888
5889 case "x$LD_RPATH_OPT" in
5890 (x-R*)
5891         echo "$as_me:5891: checking if we need a space after rpath option" >&5
5892 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5893         cf_save_LIBS="$LIBS"
5894
5895 cf_add_libs="${LD_RPATH_OPT}$libdir"
5896 # Filter out duplicates - this happens with badly-designed ".pc" files...
5897 for cf_add_1lib in $LIBS
5898 do
5899         for cf_add_2lib in $cf_add_libs
5900         do
5901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5902                 then
5903                         cf_add_1lib=
5904                         break
5905                 fi
5906         done
5907         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5908 done
5909 LIBS="$cf_add_libs"
5910
5911         cat >conftest.$ac_ext <<_ACEOF
5912 #line 5912 "configure"
5913 #include "confdefs.h"
5914
5915 int
5916 main ()
5917 {
5918
5919   ;
5920   return 0;
5921 }
5922 _ACEOF
5923 rm -f conftest.$ac_objext conftest$ac_exeext
5924 if { (eval echo "$as_me:5924: \"$ac_link\"") >&5
5925   (eval $ac_link) 2>&5
5926   ac_status=$?
5927   echo "$as_me:5927: \$? = $ac_status" >&5
5928   (exit $ac_status); } &&
5929          { ac_try='test -s conftest$ac_exeext'
5930   { (eval echo "$as_me:5930: \"$ac_try\"") >&5
5931   (eval $ac_try) 2>&5
5932   ac_status=$?
5933   echo "$as_me:5933: \$? = $ac_status" >&5
5934   (exit $ac_status); }; }; then
5935   cf_rpath_space=no
5936 else
5937   echo "$as_me: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
5939 cf_rpath_space=yes
5940 fi
5941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5942         LIBS="$cf_save_LIBS"
5943         echo "$as_me:5943: result: $cf_rpath_space" >&5
5944 echo "${ECHO_T}$cf_rpath_space" >&6
5945         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5946         ;;
5947 esac
5948
5949         RM_SHARED_OPTS=
5950         LOCAL_LDFLAGS=
5951         LOCAL_LDFLAGS2=
5952         LD_SHARED_OPTS=
5953         INSTALL_LIB="-m 644"
5954         : ${rel_builddir:=.}
5955
5956         shlibdir=$libdir
5957
5958         MAKE_DLLS="#"
5959
5960         cf_cv_do_symlinks=no
5961         cf_ld_rpath_opt=
5962         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5963
5964         echo "$as_me:5964: checking if release/abi version should be used for shared libs" >&5
5965 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5966
5967 # Check whether --with-shlib-version or --without-shlib-version was given.
5968 if test "${with_shlib_version+set}" = set; then
5969   withval="$with_shlib_version"
5970   test -z "$withval" && withval=auto
5971         case $withval in
5972         (yes)
5973                 cf_cv_shlib_version=auto
5974                 ;;
5975         (rel|abi|auto)
5976                 cf_cv_shlib_version=$withval
5977                 ;;
5978         (*)
5979                 echo "$as_me:5979: result: $withval" >&5
5980 echo "${ECHO_T}$withval" >&6
5981                 { { echo "$as_me:5981: error: option value must be one of: rel, abi, or auto" >&5
5982 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5983    { (exit 1); exit 1; }; }
5984                 ;;
5985         esac
5986
5987 else
5988   cf_cv_shlib_version=auto
5989 fi;
5990         echo "$as_me:5990: result: $cf_cv_shlib_version" >&5
5991 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5992
5993         cf_cv_rm_so_locs=no
5994         cf_try_cflags=
5995
5996         # Some less-capable ports of gcc support only -fpic
5997         CC_SHARED_OPTS=
5998         if test "$GCC" = yes
5999         then
6000                 echo "$as_me:6000: checking which $CC option to use" >&5
6001 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6002                 cf_save_CFLAGS="$CFLAGS"
6003                 for CC_SHARED_OPTS in -fPIC -fpic ''
6004                 do
6005                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6006                         cat >conftest.$ac_ext <<_ACEOF
6007 #line 6007 "configure"
6008 #include "confdefs.h"
6009 #include <stdio.h>
6010 int
6011 main ()
6012 {
6013 int x = 1
6014   ;
6015   return 0;
6016 }
6017 _ACEOF
6018 rm -f conftest.$ac_objext
6019 if { (eval echo "$as_me:6019: \"$ac_compile\"") >&5
6020   (eval $ac_compile) 2>&5
6021   ac_status=$?
6022   echo "$as_me:6022: \$? = $ac_status" >&5
6023   (exit $ac_status); } &&
6024          { ac_try='test -s conftest.$ac_objext'
6025   { (eval echo "$as_me:6025: \"$ac_try\"") >&5
6026   (eval $ac_try) 2>&5
6027   ac_status=$?
6028   echo "$as_me:6028: \$? = $ac_status" >&5
6029   (exit $ac_status); }; }; then
6030   break
6031 else
6032   echo "$as_me: failed program was:" >&5
6033 cat conftest.$ac_ext >&5
6034 fi
6035 rm -f conftest.$ac_objext conftest.$ac_ext
6036                 done
6037                 echo "$as_me:6037: result: $CC_SHARED_OPTS" >&5
6038 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6039                 CFLAGS="$cf_save_CFLAGS"
6040         fi
6041
6042         cf_cv_shlib_version_infix=no
6043
6044         case $cf_cv_system_name in
6045         (aix4.3-9*|aix[5-7]*)
6046                 if test "$GCC" = yes; then
6047                         CC_SHARED_OPTS='-Wl,-brtl'
6048                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6049                 else
6050                         CC_SHARED_OPTS='-brtl'
6051                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6052                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6053                 fi
6054                 ;;
6055         (beos*)
6056                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6057                 ;;
6058         (cygwin*)
6059                 CC_SHARED_OPTS=
6060                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6061                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6062                 cf_cv_shlib_version=cygdll
6063                 cf_cv_shlib_version_infix=cygdll
6064                 shlibdir=$bindir
6065                 MAKE_DLLS=
6066                 cat >mk_shared_lib.sh <<-CF_EOF
6067                 #!$SHELL
6068                 SHARED_LIB=\$1
6069                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6070                 shift
6071                 cat <<-EOF
6072                 Linking shared library
6073                 ** SHARED_LIB \$SHARED_LIB
6074                 ** IMPORT_LIB \$IMPORT_LIB
6075 EOF
6076                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6077 CF_EOF
6078                 chmod +x mk_shared_lib.sh
6079                 ;;
6080         (msys*)
6081                 CC_SHARED_OPTS=
6082                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6083                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6084                 cf_cv_shlib_version=msysdll
6085                 cf_cv_shlib_version_infix=msysdll
6086                 shlibdir=$bindir
6087                 MAKE_DLLS=
6088                 cat >mk_shared_lib.sh <<-CF_EOF
6089                 #!$SHELL
6090                 SHARED_LIB=\$1
6091                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6092                 shift
6093                 cat <<-EOF
6094                 Linking shared library
6095                 ** SHARED_LIB \$SHARED_LIB
6096                 ** IMPORT_LIB \$IMPORT_LIB
6097 EOF
6098                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6099 CF_EOF
6100                 chmod +x mk_shared_lib.sh
6101                 ;;
6102         (darwin*)
6103                 cf_try_cflags="no-cpp-precomp"
6104                 CC_SHARED_OPTS="-dynamic"
6105                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6106                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6107                 cf_cv_shlib_version_infix=yes
6108                 echo "$as_me:6108: checking if ld -search_paths_first works" >&5
6109 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6110 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6111   echo $ECHO_N "(cached) $ECHO_C" >&6
6112 else
6113
6114                         cf_save_LDFLAGS=$LDFLAGS
6115                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6116                         cat >conftest.$ac_ext <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6119
6120 int
6121 main ()
6122 {
6123 int i;
6124   ;
6125   return 0;
6126 }
6127 _ACEOF
6128 rm -f conftest.$ac_objext conftest$ac_exeext
6129 if { (eval echo "$as_me:6129: \"$ac_link\"") >&5
6130   (eval $ac_link) 2>&5
6131   ac_status=$?
6132   echo "$as_me:6132: \$? = $ac_status" >&5
6133   (exit $ac_status); } &&
6134          { ac_try='test -s conftest$ac_exeext'
6135   { (eval echo "$as_me:6135: \"$ac_try\"") >&5
6136   (eval $ac_try) 2>&5
6137   ac_status=$?
6138   echo "$as_me:6138: \$? = $ac_status" >&5
6139   (exit $ac_status); }; }; then
6140   cf_cv_ldflags_search_paths_first=yes
6141 else
6142   echo "$as_me: failed program was:" >&5
6143 cat conftest.$ac_ext >&5
6144 cf_cv_ldflags_search_paths_first=no
6145 fi
6146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6147                                 LDFLAGS=$cf_save_LDFLAGS
6148 fi
6149 echo "$as_me:6149: result: $cf_cv_ldflags_search_paths_first" >&5
6150 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6151                 if test $cf_cv_ldflags_search_paths_first = yes; then
6152                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6153                 fi
6154                 ;;
6155         (hpux[7-8]*)
6156                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6157                 if test "$GCC" != yes; then
6158                         CC_SHARED_OPTS='+Z'
6159                 fi
6160                 MK_SHARED_LIB='${LD} -b -o $@'
6161                 INSTALL_LIB="-m 555"
6162                 ;;
6163         (hpux*)
6164                 # (tested with gcc 2.7.2 -- I don't have c89)
6165                 if test "$GCC" = yes; then
6166                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6167                 else
6168                         CC_SHARED_OPTS='+Z'
6169                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6170                 fi
6171                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6172                 # HP-UX shared libraries must be executable, and should be
6173                 # readonly to exploit a quirk in the memory manager.
6174                 INSTALL_LIB="-m 555"
6175                 ;;
6176         (interix*)
6177                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6178                 if test "$cf_cv_shlib_version" = rel; then
6179                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6180                 else
6181                         cf_shared_soname='`basename `'
6182                 fi
6183                 CC_SHARED_OPTS=
6184                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6185                 ;;
6186         (irix*)
6187                 if test "$cf_cv_enable_rpath" = yes ; then
6188                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6189                 fi
6190                 # tested with IRIX 5.2 and 'cc'.
6191                 if test "$GCC" != yes; then
6192                         CC_SHARED_OPTS='-KPIC'
6193                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6194                 else
6195                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6196                 fi
6197                 cf_cv_rm_so_locs=yes
6198                 ;;
6199         (linux*|gnu*|k*bsd*-gnu)
6200                 if test "$DFT_LWR_MODEL" = "shared" ; then
6201                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6202                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6203                 fi
6204                 if test "$cf_cv_enable_rpath" = yes ; then
6205                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6206                 fi
6207
6208         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6209         if test "$cf_cv_shlib_version" = rel; then
6210                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6211         else
6212                 cf_cv_shared_soname='`basename $@`'
6213         fi
6214
6215                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6216                 ;;
6217         (mingw*)
6218                 cf_cv_shlib_version=mingw
6219                 cf_cv_shlib_version_infix=mingw
6220                 shlibdir=$bindir
6221                 MAKE_DLLS=
6222                 if test "$DFT_LWR_MODEL" = "shared" ; then
6223                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6225                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6226                 fi
6227                 CC_SHARED_OPTS=
6228                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6229                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6230                 cat >mk_shared_lib.sh <<-CF_EOF
6231                 #!$SHELL
6232                 SHARED_LIB=\$1
6233                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6234                 shift
6235                 cat <<-EOF
6236                 Linking shared library
6237                 ** SHARED_LIB \$SHARED_LIB
6238                 ** IMPORT_LIB \$IMPORT_LIB
6239 EOF
6240                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6241 CF_EOF
6242                 chmod +x mk_shared_lib.sh
6243                 ;;
6244         (openbsd[2-9].*|mirbsd*)
6245                 if test "$DFT_LWR_MODEL" = "shared" ; then
6246                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6247                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6248                 fi
6249                 if test "$cf_cv_enable_rpath" = yes ; then
6250                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6251                 fi
6252                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6253
6254         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6255         if test "$cf_cv_shlib_version" = rel; then
6256                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6257         else
6258                 cf_cv_shared_soname='`basename $@`'
6259         fi
6260
6261                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6262                 ;;
6263         (nto-qnx*|openbsd*|freebsd[12].*)
6264                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6265                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6266                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6267                 ;;
6268         (dragonfly*|freebsd*)
6269                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6270                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6271                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6272                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6273                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6274                 fi
6275
6276         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6277         if test "$cf_cv_shlib_version" = rel; then
6278                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6279         else
6280                 cf_cv_shared_soname='`basename $@`'
6281         fi
6282
6283                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6284                 ;;
6285         (netbsd*)
6286                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6287                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6288                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6289                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6290                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6291                         if test "$cf_cv_shlib_version" = auto; then
6292                         if test -f /usr/libexec/ld.elf_so; then
6293                                 cf_cv_shlib_version=abi
6294                         else
6295                                 cf_cv_shlib_version=rel
6296                         fi
6297                         fi
6298
6299         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6300         if test "$cf_cv_shlib_version" = rel; then
6301                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6302         else
6303                 cf_cv_shared_soname='`basename $@`'
6304         fi
6305
6306                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6307                 else
6308                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6309                 fi
6310                 ;;
6311         (osf*|mls+*)
6312                 # tested with OSF/1 V3.2 and 'cc'
6313                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6314                 # link with shared libs).
6315                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6316                 case $host_os in
6317                 (osf4*)
6318                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6319                         ;;
6320                 esac
6321                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6322                 if test "$DFT_LWR_MODEL" = "shared" ; then
6323                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6324                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6325                 fi
6326                 cf_cv_rm_so_locs=yes
6327                 ;;
6328         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6329                 # tested with osr5.0.5
6330                 if test "$GCC" != yes; then
6331                         CC_SHARED_OPTS='-belf -KPIC'
6332                 fi
6333                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6334                 if test "$cf_cv_enable_rpath" = yes ; then
6335                         # only way is to set LD_RUN_PATH but no switch for it
6336                         RUN_PATH=$libdir
6337                 fi
6338                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6339                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6340                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6341                 ;;
6342         (sunos4*)
6343                 # tested with SunOS 4.1.1 and gcc 2.7.0
6344                 if test "$GCC" != yes; then
6345                         CC_SHARED_OPTS='-KPIC'
6346                 fi
6347                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6348                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6349                 ;;
6350         (solaris2*)
6351                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6352                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6353                 if test "$DFT_LWR_MODEL" = "shared" ; then
6354                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6355                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6356                 fi
6357                 if test "$cf_cv_enable_rpath" = yes ; then
6358                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6359                 fi
6360
6361         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6362         if test "$cf_cv_shlib_version" = rel; then
6363                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6364         else
6365                 cf_cv_shared_soname='`basename $@`'
6366         fi
6367
6368                 if test "$GCC" != yes; then
6369                         cf_save_CFLAGS="$CFLAGS"
6370                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6371                         do
6372                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6373                                 cat >conftest.$ac_ext <<_ACEOF
6374 #line 6374 "configure"
6375 #include "confdefs.h"
6376 #include <stdio.h>
6377 int
6378 main ()
6379 {
6380 printf("Hello\n");
6381   ;
6382   return 0;
6383 }
6384 _ACEOF
6385 rm -f conftest.$ac_objext
6386 if { (eval echo "$as_me:6386: \"$ac_compile\"") >&5
6387   (eval $ac_compile) 2>&5
6388   ac_status=$?
6389   echo "$as_me:6389: \$? = $ac_status" >&5
6390   (exit $ac_status); } &&
6391          { ac_try='test -s conftest.$ac_objext'
6392   { (eval echo "$as_me:6392: \"$ac_try\"") >&5
6393   (eval $ac_try) 2>&5
6394   ac_status=$?
6395   echo "$as_me:6395: \$? = $ac_status" >&5
6396   (exit $ac_status); }; }; then
6397   break
6398 else
6399   echo "$as_me: failed program was:" >&5
6400 cat conftest.$ac_ext >&5
6401 fi
6402 rm -f conftest.$ac_objext conftest.$ac_ext
6403                         done
6404                         CFLAGS="$cf_save_CFLAGS"
6405                         CC_SHARED_OPTS=$cf_shared_opts
6406                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6407                 else
6408                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6409                 fi
6410                 ;;
6411         (sysv5uw7*|unix_sv*)
6412                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6413                 if test "$GCC" != yes; then
6414                         CC_SHARED_OPTS='-KPIC'
6415                 fi
6416                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6417                 ;;
6418         (*)
6419                 CC_SHARED_OPTS='unknown'
6420                 MK_SHARED_LIB='echo unknown'
6421                 ;;
6422         esac
6423
6424         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6425         case "$cf_cv_shlib_version" in
6426         (rel|abi)
6427                 case "$MK_SHARED_LIB" in
6428                 (*'-o $@')
6429                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6430                         ;;
6431                 (*)
6432                         { echo "$as_me:6432: WARNING: ignored --with-shlib-version" >&5
6433 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6434                         ;;
6435                 esac
6436                 ;;
6437         esac
6438
6439         if test -n "$cf_try_cflags"
6440         then
6441 cat > conftest.$ac_ext <<EOF
6442 #line 6442 "${as_me:-configure}"
6443 #include <stdio.h>
6444 int main(int argc, char *argv[])
6445 {
6446         printf("hello\n");
6447         return (argv[argc-1] == 0) ;
6448 }
6449 EOF
6450                 cf_save_CFLAGS="$CFLAGS"
6451                 for cf_opt in $cf_try_cflags
6452                 do
6453                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6454                         echo "$as_me:6454: checking if CFLAGS option -$cf_opt works" >&5
6455 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6456                         if { (eval echo "$as_me:6456: \"$ac_compile\"") >&5
6457   (eval $ac_compile) 2>&5
6458   ac_status=$?
6459   echo "$as_me:6459: \$? = $ac_status" >&5
6460   (exit $ac_status); }; then
6461                                 echo "$as_me:6461: result: yes" >&5
6462 echo "${ECHO_T}yes" >&6
6463                                 cf_save_CFLAGS="$CFLAGS"
6464                         else
6465                                 echo "$as_me:6465: result: no" >&5
6466 echo "${ECHO_T}no" >&6
6467                         fi
6468                 done
6469                 CFLAGS="$cf_save_CFLAGS"
6470         fi
6471
6472         # RPATH_LIST is a colon-separated list of directories
6473         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6474         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6475
6476         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6477
6478         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6479
6480 echo "${as_me:-configure}:6480: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6481
6482         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6483
6484 echo "${as_me:-configure}:6484: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6485
6486 for model in $cf_list_models; do
6487         case $model in
6488         (libtool)
6489
6490 echo "$as_me:6490: checking for additional libtool options" >&5
6491 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6492
6493 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6494 if test "${with_libtool_opts+set}" = set; then
6495   withval="$with_libtool_opts"
6496   with_libtool_opts=$withval
6497 else
6498   with_libtool_opts=no
6499 fi;
6500 echo "$as_me:6500: result: $with_libtool_opts" >&5
6501 echo "${ECHO_T}$with_libtool_opts" >&6
6502
6503 case .$with_libtool_opts in
6504 (.yes|.no|.)
6505         ;;
6506 (*)
6507         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6508         ;;
6509 esac
6510
6511 echo "$as_me:6511: checking if exported-symbols file should be used" >&5
6512 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6513
6514 # Check whether --with-export-syms or --without-export-syms was given.
6515 if test "${with_export_syms+set}" = set; then
6516   withval="$with_export_syms"
6517   with_export_syms=$withval
6518 else
6519   with_export_syms=no
6520 fi;
6521 if test "x$with_export_syms" = xyes
6522 then
6523         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6524
6525 fi
6526 echo "$as_me:6526: result: $with_export_syms" >&5
6527 echo "${ECHO_T}$with_export_syms" >&6
6528 if test "x$with_export_syms" != xno
6529 then
6530         EXPORT_SYMS="-export-symbols $with_export_syms"
6531
6532 fi
6533
6534                 ;;
6535         (shared)
6536                 if test "$CC_SHARED_OPTS" = "unknown"; then
6537                         { { echo "$as_me:6537: error: Shared libraries are not supported in this version" >&5
6538 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6539    { (exit 1); exit 1; }; }
6540                 fi
6541
6542 echo "$as_me:6542: checking if versioned-symbols file should be used" >&5
6543 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6544
6545 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6546 if test "${with_versioned_syms+set}" = set; then
6547   withval="$with_versioned_syms"
6548   with_versioned_syms=$withval
6549 else
6550   with_versioned_syms=no
6551 fi;
6552 if test "x$with_versioned_syms" = xyes
6553 then
6554         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6555
6556 fi
6557 echo "$as_me:6557: result: $with_versioned_syms" >&5
6558 echo "${ECHO_T}$with_versioned_syms" >&6
6559
6560 RESULTING_SYMS=
6561 VERSIONED_SYMS=
6562 WILDCARD_SYMS=
6563
6564 if test "x$with_versioned_syms" != xno
6565 then
6566         RESULTING_SYMS=$with_versioned_syms
6567         case "x$MK_SHARED_LIB" in
6568         (*-Wl,*)
6569                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6570                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6571                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6572
6573 echo "${as_me:-configure}:6573: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6574
6575                 ;;
6576         (*-dy\ *)
6577                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6578                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6579                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6580
6581 echo "${as_me:-configure}:6581: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6582
6583                 ;;
6584         (*)
6585                 { echo "$as_me:6585: WARNING: this system does not support versioned-symbols" >&5
6586 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6587                 ;;
6588         esac
6589
6590         # Linux ld can selectively override scope, e.g., of symbols beginning with
6591         # "_" by first declaring some as global, and then using a wildcard to
6592         # declare the others as local.  Some other loaders cannot do this.  Check
6593         # by constructing a (very) simple shared library and inspecting its
6594         # symbols.
6595         if test "x$VERSIONED_SYMS" != "x"
6596         then
6597                 echo "$as_me:6597: checking if wildcards can be used to selectively omit symbols" >&5
6598 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6599                 WILDCARD_SYMS=no
6600
6601                 # make sources
6602                 rm -f conftest.*
6603
6604                 cat >conftest.ver <<EOF
6605 module_1.0 {
6606 global:
6607         globalf1;
6608 local:
6609         localf1;
6610 };
6611 module_2.0 {
6612 global:
6613         globalf2;
6614 local:
6615         localf2;
6616         _*;
6617 } module_1.0;
6618 submodule_1.0 {
6619 global:
6620         subglobalf1;
6621         _ismissing;
6622 local:
6623         sublocalf1;
6624 };
6625 submodule_2.0 {
6626 global:
6627         subglobalf2;
6628 local:
6629         sublocalf2;
6630         _*;
6631 } submodule_1.0;
6632 EOF
6633                 cat >conftest.$ac_ext <<EOF
6634 #line 6634 "configure"
6635 int     _ismissing(void) { return 1; }
6636 int     _localf1(void) { return 1; }
6637 int     _localf2(void) { return 2; }
6638 int     globalf1(void) { return 1; }
6639 int     globalf2(void) { return 2; }
6640 int     _sublocalf1(void) { return 1; }
6641 int     _sublocalf2(void) { return 2; }
6642 int     subglobalf1(void) { return 1; }
6643 int     subglobalf2(void) { return 2; }
6644 EOF
6645                 cat >conftest.mk <<EOF
6646 CC=${CC}
6647 CFLAGS=${CFLAGS}
6648 CPPFLAGS=${CPPFLAGS}
6649 LDFLAGS=${LDFLAGS}
6650 LIBS=${LIBS}
6651 VERSIONED_SYMS=${VERSIONED_SYMS}
6652 RESULTING_SYMS=conftest.ver
6653 MK_SHARED_LIB=${MK_SHARED_LIB}
6654 conftest.so: conftest.$ac_cv_objext
6655                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6656 EOF
6657
6658                 # compile source, make library
6659                 if make -f conftest.mk 2>&5 >/dev/null
6660                 then
6661                         # test for missing symbol
6662                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6663                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6664                 fi
6665                 echo "$as_me:6665: result: $WILDCARD_SYMS" >&5
6666 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6667                 rm -f conftest.*
6668         fi
6669 fi
6670
6671                 ;;
6672         esac
6673 done
6674
6675 # pretend that ncurses==ncursesw==ncursest
6676 echo "$as_me:6676: checking if you want to disable library suffixes" >&5
6677 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6678
6679 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6680 if test "${enable_lib_suffixes+set}" = set; then
6681   enableval="$enable_lib_suffixes"
6682   test "$enableval" != no && enableval=yes
6683         if test "$enableval" != "yes" ; then
6684     disable_lib_suffixes=yes
6685         else
6686                 disable_lib_suffixes=no
6687         fi
6688 else
6689   enableval=yes
6690         disable_lib_suffixes=no
6691
6692 fi;
6693 echo "$as_me:6693: result: $disable_lib_suffixes" >&5
6694 echo "${ECHO_T}$disable_lib_suffixes" >&6
6695
6696 ### If we're building with rpath, try to link non-standard libs that way too.
6697 if test "$DFT_LWR_MODEL" = "shared"; then
6698
6699 echo "$as_me:6699: checking if rpath-hack should be disabled" >&5
6700 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6701
6702 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6703 if test "${enable_rpath_hack+set}" = set; then
6704   enableval="$enable_rpath_hack"
6705   test "$enableval" != no && enableval=yes
6706         if test "$enableval" != "yes" ; then
6707     cf_disable_rpath_hack=yes
6708         else
6709                 cf_disable_rpath_hack=no
6710         fi
6711 else
6712   enableval=yes
6713         cf_disable_rpath_hack=no
6714
6715 fi;
6716 echo "$as_me:6716: result: $cf_disable_rpath_hack" >&5
6717 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6718 if test "$cf_disable_rpath_hack" = no ; then
6719
6720 echo "$as_me:6720: checking for updated LDFLAGS" >&5
6721 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6722 if test -n "$LD_RPATH_OPT" ; then
6723         echo "$as_me:6723: result: maybe" >&5
6724 echo "${ECHO_T}maybe" >&6
6725
6726         for ac_prog in ldd
6727 do
6728   # Extract the first word of "$ac_prog", so it can be a program name with args.
6729 set dummy $ac_prog; ac_word=$2
6730 echo "$as_me:6730: checking for $ac_word" >&5
6731 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6732 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6733   echo $ECHO_N "(cached) $ECHO_C" >&6
6734 else
6735   if test -n "$cf_ldd_prog"; then
6736   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6737 else
6738   ac_save_IFS=$IFS; IFS=$ac_path_separator
6739 ac_dummy="$PATH"
6740 for ac_dir in $ac_dummy; do
6741   IFS=$ac_save_IFS
6742   test -z "$ac_dir" && ac_dir=.
6743   $as_executable_p "$ac_dir/$ac_word" || continue
6744 ac_cv_prog_cf_ldd_prog="$ac_prog"
6745 echo "$as_me:6745: found $ac_dir/$ac_word" >&5
6746 break
6747 done
6748
6749 fi
6750 fi
6751 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6752 if test -n "$cf_ldd_prog"; then
6753   echo "$as_me:6753: result: $cf_ldd_prog" >&5
6754 echo "${ECHO_T}$cf_ldd_prog" >&6
6755 else
6756   echo "$as_me:6756: result: no" >&5
6757 echo "${ECHO_T}no" >&6
6758 fi
6759
6760   test -n "$cf_ldd_prog" && break
6761 done
6762 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6763
6764         cf_rpath_list="/usr/lib /lib"
6765         if test "$cf_ldd_prog" != no
6766         then
6767                 cf_rpath_oops=
6768
6769 cat >conftest.$ac_ext <<_ACEOF
6770 #line 6770 "configure"
6771 #include "confdefs.h"
6772 #include <stdio.h>
6773 int
6774 main ()
6775 {
6776 printf("Hello");
6777   ;
6778   return 0;
6779 }
6780 _ACEOF
6781 rm -f conftest.$ac_objext conftest$ac_exeext
6782 if { (eval echo "$as_me:6782: \"$ac_link\"") >&5
6783   (eval $ac_link) 2>&5
6784   ac_status=$?
6785   echo "$as_me:6785: \$? = $ac_status" >&5
6786   (exit $ac_status); } &&
6787          { ac_try='test -s conftest$ac_exeext'
6788   { (eval echo "$as_me:6788: \"$ac_try\"") >&5
6789   (eval $ac_try) 2>&5
6790   ac_status=$?
6791   echo "$as_me:6791: \$? = $ac_status" >&5
6792   (exit $ac_status); }; }; then
6793   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6794                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6795 else
6796   echo "$as_me: failed program was:" >&5
6797 cat conftest.$ac_ext >&5
6798 fi
6799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6800
6801                 # If we passed the link-test, but get a "not found" on a given library,
6802                 # this could be due to inept reconfiguration of gcc to make it only
6803                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6804                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6805                 # /usr/local libraries.
6806                 if test -n "$cf_rpath_oops"
6807                 then
6808                         for cf_rpath_src in $cf_rpath_oops
6809                         do
6810                                 for cf_rpath_dir in \
6811                                         /usr/local \
6812                                         /usr/pkg \
6813                                         /opt/sfw
6814                                 do
6815                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6816                                         then
6817                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6818
6819 echo "${as_me:-configure}:6819: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6820
6821                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6822                                                 break
6823                                         fi
6824                                 done
6825                         done
6826                 fi
6827         fi
6828
6829         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6830
6831 echo "${as_me:-configure}:6831: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6832
6833 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6834
6835 echo "${as_me:-configure}:6835: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6836
6837 cf_rpath_dst=
6838 for cf_rpath_src in $LDFLAGS
6839 do
6840         case $cf_rpath_src in
6841         (-L*)
6842
6843                 # check if this refers to a directory which we will ignore
6844                 cf_rpath_skip=no
6845                 if test -n "$cf_rpath_list"
6846                 then
6847                         for cf_rpath_item in $cf_rpath_list
6848                         do
6849                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6850                                 then
6851                                         cf_rpath_skip=yes
6852                                         break
6853                                 fi
6854                         done
6855                 fi
6856
6857                 if test "$cf_rpath_skip" = no
6858                 then
6859                         # transform the option
6860                         if test "$LD_RPATH_OPT" = "-R " ; then
6861                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6862                         else
6863                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6864                         fi
6865
6866                         # if we have not already added this, add it now
6867                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6868                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6869                         then
6870                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6871
6872 echo "${as_me:-configure}:6872: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6873
6874                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6875                         fi
6876                 fi
6877                 ;;
6878         esac
6879         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6880 done
6881 LDFLAGS=$cf_rpath_dst
6882
6883 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6884
6885 echo "${as_me:-configure}:6885: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6886
6887 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6888
6889 echo "${as_me:-configure}:6889: testing ...checking LIBS $LIBS ..." 1>&5
6890
6891 cf_rpath_dst=
6892 for cf_rpath_src in $LIBS
6893 do
6894         case $cf_rpath_src in
6895         (-L*)
6896
6897                 # check if this refers to a directory which we will ignore
6898                 cf_rpath_skip=no
6899                 if test -n "$cf_rpath_list"
6900                 then
6901                         for cf_rpath_item in $cf_rpath_list
6902                         do
6903                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6904                                 then
6905                                         cf_rpath_skip=yes
6906                                         break
6907                                 fi
6908                         done
6909                 fi
6910
6911                 if test "$cf_rpath_skip" = no
6912                 then
6913                         # transform the option
6914                         if test "$LD_RPATH_OPT" = "-R " ; then
6915                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6916                         else
6917                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6918                         fi
6919
6920                         # if we have not already added this, add it now
6921                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6922                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6923                         then
6924                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6925
6926 echo "${as_me:-configure}:6926: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6927
6928                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6929                         fi
6930                 fi
6931                 ;;
6932         esac
6933         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6934 done
6935 LIBS=$cf_rpath_dst
6936
6937 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6938
6939 echo "${as_me:-configure}:6939: testing ...checked LIBS $LIBS ..." 1>&5
6940
6941         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6942
6943 echo "${as_me:-configure}:6943: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6944
6945 else
6946         echo "$as_me:6946: result: no" >&5
6947 echo "${ECHO_T}no" >&6
6948 fi
6949
6950 fi
6951
6952 fi
6953
6954 ###############################################################################
6955
6956 ###     use option --with-extra-suffix to append suffix to headers and libraries
6957 echo "$as_me:6957: checking if you wish to append extra suffix to header/library paths" >&5
6958 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6959 EXTRA_SUFFIX=
6960
6961 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6962 if test "${with_extra_suffix+set}" = set; then
6963   withval="$with_extra_suffix"
6964   case x$withval in
6965         (no)
6966                 ;;
6967         (xyes|x)
6968                 EXTRA_SUFFIX=$cf_cv_abi_version
6969                 ;;
6970         (*)
6971                 EXTRA_SUFFIX=$withval
6972                 ;;
6973         esac
6974
6975 fi;
6976 echo "$as_me:6976: result: $EXTRA_SUFFIX" >&5
6977 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6978
6979 ###     use option --disable-overwrite to leave out the link to -lcurses
6980 echo "$as_me:6980: checking if you wish to install ncurses overwriting curses" >&5
6981 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6982
6983 # Check whether --enable-overwrite or --disable-overwrite was given.
6984 if test "${enable_overwrite+set}" = set; then
6985   enableval="$enable_overwrite"
6986   with_overwrite=$enableval
6987 else
6988   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6989 fi;
6990 echo "$as_me:6990: result: $with_overwrite" >&5
6991 echo "${ECHO_T}$with_overwrite" >&6
6992
6993 echo "$as_me:6993: checking if external terminfo-database is used" >&5
6994 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6995
6996 # Check whether --enable-database or --disable-database was given.
6997 if test "${enable_database+set}" = set; then
6998   enableval="$enable_database"
6999   use_database=$enableval
7000 else
7001   use_database=yes
7002 fi;
7003 echo "$as_me:7003: result: $use_database" >&5
7004 echo "${ECHO_T}$use_database" >&6
7005
7006 case $host_os in
7007 (os2*)
7008         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7009         ;;
7010 (*)
7011         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7012         ;;
7013 esac
7014
7015 NCURSES_USE_DATABASE=0
7016 if test "$use_database" != no ; then
7017         NCURSES_USE_DATABASE=1
7018
7019         echo "$as_me:7019: checking which terminfo source-file will be installed" >&5
7020 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7021
7022 # Check whether --with-database or --without-database was given.
7023 if test "${with_database+set}" = set; then
7024   withval="$with_database"
7025   TERMINFO_SRC=$withval
7026 fi;
7027         echo "$as_me:7027: result: $TERMINFO_SRC" >&5
7028 echo "${ECHO_T}$TERMINFO_SRC" >&6
7029
7030         echo "$as_me:7030: checking whether to use hashed database instead of directory/tree" >&5
7031 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7032
7033 # Check whether --with-hashed-db or --without-hashed-db was given.
7034 if test "${with_hashed_db+set}" = set; then
7035   withval="$with_hashed_db"
7036
7037 else
7038   with_hashed_db=no
7039 fi;
7040         echo "$as_me:7040: result: $with_hashed_db" >&5
7041 echo "${ECHO_T}$with_hashed_db" >&6
7042 else
7043         with_hashed_db=no
7044 fi
7045
7046 echo "$as_me:7046: checking for list of fallback descriptions" >&5
7047 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7048
7049 # Check whether --with-fallbacks or --without-fallbacks was given.
7050 if test "${with_fallbacks+set}" = set; then
7051   withval="$with_fallbacks"
7052   with_fallback=$withval
7053 else
7054   with_fallback=
7055 fi;
7056 echo "$as_me:7056: result: $with_fallback" >&5
7057 echo "${ECHO_T}$with_fallback" >&6
7058 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7059
7060 echo "$as_me:7060: checking if you want modern xterm or antique" >&5
7061 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7062
7063 # Check whether --with-xterm-new or --without-xterm-new was given.
7064 if test "${with_xterm_new+set}" = set; then
7065   withval="$with_xterm_new"
7066   with_xterm_new=$withval
7067 else
7068   with_xterm_new=yes
7069 fi;
7070 case $with_xterm_new in
7071 (no) with_xterm_new=xterm-old;;
7072 (*)      with_xterm_new=xterm-new;;
7073 esac
7074 echo "$as_me:7074: result: $with_xterm_new" >&5
7075 echo "${ECHO_T}$with_xterm_new" >&6
7076 WHICH_XTERM=$with_xterm_new
7077
7078 echo "$as_me:7078: checking if xterm backspace sends BS or DEL" >&5
7079 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7080
7081 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7082 if test "${with_xterm_kbs+set}" = set; then
7083   withval="$with_xterm_kbs"
7084   with_xterm_kbs=$withval
7085 else
7086   with_xterm_kbs=BS
7087 fi;
7088 case x$with_xterm_kbs in
7089 (xyes|xno|xBS|xbs|x8)
7090         with_xterm_kbs=BS
7091         ;;
7092 (xDEL|xdel|x127)
7093         with_xterm_kbs=DEL
7094         ;;
7095 (*)
7096         with_xterm_kbs=$withval
7097         ;;
7098 esac
7099 echo "$as_me:7099: result: $with_xterm_kbs" >&5
7100 echo "${ECHO_T}$with_xterm_kbs" >&6
7101 XTERM_KBS=$with_xterm_kbs
7102
7103 MAKE_TERMINFO=
7104 if test "$use_database" = no ; then
7105         TERMINFO="${datadir}/terminfo"
7106         MAKE_TERMINFO="#"
7107 else
7108
7109 echo "$as_me:7109: checking for list of terminfo directories" >&5
7110 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7111
7112 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7113 if test "${with_terminfo_dirs+set}" = set; then
7114   withval="$with_terminfo_dirs"
7115
7116 else
7117   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7118 fi;
7119 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7120 cf_dst_path=
7121 for cf_src_path in $withval
7122 do
7123
7124 if test "x$prefix" != xNONE; then
7125         cf_path_syntax="$prefix"
7126 else
7127         cf_path_syntax="$ac_default_prefix"
7128 fi
7129
7130 case ".$cf_src_path" in
7131 (.\$\(*\)*|.\'*\'*)
7132         ;;
7133 (..|./*|.\\*)
7134         ;;
7135 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7136         ;;
7137 (.\${*prefix}*|.\${*dir}*)
7138         eval cf_src_path="$cf_src_path"
7139         case ".$cf_src_path" in
7140         (.NONE/*)
7141                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7142                 ;;
7143         esac
7144         ;;
7145 (.no|.NONE/*)
7146         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7147         ;;
7148 (*)
7149         { { echo "$as_me:7149: error: expected a pathname, not \"$cf_src_path\"" >&5
7150 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7151    { (exit 1); exit 1; }; }
7152         ;;
7153 esac
7154
7155   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7156   cf_dst_path="${cf_dst_path}${cf_src_path}"
7157 done
7158 IFS="$ac_save_ifs"
7159
7160 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7161 # so we have to check/work around.  We do prefer the result of "eval"...
7162 eval cf_dst_eval="$cf_dst_path"
7163 case "x$cf_dst_eval" in
7164 (xNONE*)
7165         TERMINFO_DIRS=$cf_dst_path
7166         ;;
7167 (*)
7168         TERMINFO_DIRS="$cf_dst_eval"
7169         ;;
7170 esac
7171
7172 echo "$as_me:7172: result: $TERMINFO_DIRS" >&5
7173 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7174 test -n "$TERMINFO_DIRS" &&
7175 cat >>confdefs.h <<EOF
7176 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7177 EOF
7178
7179 echo "$as_me:7179: checking for default terminfo directory" >&5
7180 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7181
7182 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7183 if test "${with_default_terminfo_dir+set}" = set; then
7184   withval="$with_default_terminfo_dir"
7185
7186 else
7187   withval="${TERMINFO:-${datadir}/terminfo}"
7188 fi; if test -n "${datadir}/terminfo" ; then
7189
7190 if test "x$prefix" != xNONE; then
7191         cf_path_syntax="$prefix"
7192 else
7193         cf_path_syntax="$ac_default_prefix"
7194 fi
7195
7196 case ".$withval" in
7197 (.\$\(*\)*|.\'*\'*)
7198         ;;
7199 (..|./*|.\\*)
7200         ;;
7201 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7202         ;;
7203 (.\${*prefix}*|.\${*dir}*)
7204         eval withval="$withval"
7205         case ".$withval" in
7206         (.NONE/*)
7207                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7208                 ;;
7209         esac
7210         ;;
7211 (.no|.NONE/*)
7212         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7213         ;;
7214 (*)
7215         { { echo "$as_me:7215: error: expected a pathname, not \"$withval\"" >&5
7216 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7217    { (exit 1); exit 1; }; }
7218         ;;
7219 esac
7220
7221 fi
7222 eval TERMINFO="$withval"
7223
7224 echo "$as_me:7224: result: $TERMINFO" >&5
7225 echo "${ECHO_T}$TERMINFO" >&6
7226
7227 cat >>confdefs.h <<EOF
7228 #define TERMINFO "$TERMINFO"
7229 EOF
7230
7231 fi
7232
7233 ###     use option --disable-big-core to make tic run on small machines
7234 ###     We need 4Mb, check if we can allocate 50% more than that.
7235 echo "$as_me:7235: checking if big-core option selected" >&5
7236 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7237
7238 # Check whether --enable-big-core or --disable-big-core was given.
7239 if test "${enable_big_core+set}" = set; then
7240   enableval="$enable_big_core"
7241   with_big_core=$enableval
7242 else
7243   if test "$cross_compiling" = yes; then
7244   with_big_core=no
7245 else
7246   cat >conftest.$ac_ext <<_ACEOF
7247 #line 7247 "configure"
7248 #include "confdefs.h"
7249
7250 #include <stdlib.h>
7251 #include <string.h>
7252 int main() {
7253         unsigned long n = 6000000L;
7254         char *s = malloc(n);
7255         if (s != 0)
7256                 s[0] = s[n-1] = 0;
7257         ${cf_cv_main_return:-return}(s == 0);
7258 }
7259 _ACEOF
7260 rm -f conftest$ac_exeext
7261 if { (eval echo "$as_me:7261: \"$ac_link\"") >&5
7262   (eval $ac_link) 2>&5
7263   ac_status=$?
7264   echo "$as_me:7264: \$? = $ac_status" >&5
7265   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7266   { (eval echo "$as_me:7266: \"$ac_try\"") >&5
7267   (eval $ac_try) 2>&5
7268   ac_status=$?
7269   echo "$as_me:7269: \$? = $ac_status" >&5
7270   (exit $ac_status); }; }; then
7271   with_big_core=yes
7272 else
7273   echo "$as_me: program exited with status $ac_status" >&5
7274 echo "$as_me: failed program was:" >&5
7275 cat conftest.$ac_ext >&5
7276 with_big_core=no
7277 fi
7278 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7279 fi
7280 fi;
7281 echo "$as_me:7281: result: $with_big_core" >&5
7282 echo "${ECHO_T}$with_big_core" >&6
7283 test "x$with_big_core" = "xyes" &&
7284 cat >>confdefs.h <<\EOF
7285 #define HAVE_BIG_CORE 1
7286 EOF
7287
7288 ### ISO C only guarantees 512-char strings, we have tables which load faster
7289 ### when constructed using "big" strings.  More than the C compiler, the awk
7290 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7291 echo "$as_me:7291: checking if big-strings option selected" >&5
7292 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7293
7294 # Check whether --enable-big-strings or --disable-big-strings was given.
7295 if test "${enable_big_strings+set}" = set; then
7296   enableval="$enable_big_strings"
7297   with_big_strings=$enableval
7298 else
7299
7300         case x$AWK in
7301         (x)
7302                 eval with_big_strings=no
7303                 ;;
7304         (*)
7305                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7306                         | $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
7307                         eval with_big_strings=yes
7308                 else
7309                         eval with_big_strings=no
7310                 fi
7311                 ;;
7312         esac
7313
7314 fi;
7315 echo "$as_me:7315: result: $with_big_strings" >&5
7316 echo "${ECHO_T}$with_big_strings" >&6
7317
7318 USE_BIG_STRINGS=0
7319 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7320
7321 ###     use option --enable-termcap to compile in the termcap fallback support
7322 echo "$as_me:7322: checking if you want termcap-fallback support" >&5
7323 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7324
7325 # Check whether --enable-termcap or --disable-termcap was given.
7326 if test "${enable_termcap+set}" = set; then
7327   enableval="$enable_termcap"
7328   with_termcap=$enableval
7329 else
7330   with_termcap=no
7331 fi;
7332 echo "$as_me:7332: result: $with_termcap" >&5
7333 echo "${ECHO_T}$with_termcap" >&6
7334
7335 NCURSES_USE_TERMCAP=0
7336 if test "x$with_termcap" != "xyes" ; then
7337         if test "$use_database" = no ; then
7338                 if test -z "$with_fallback" ; then
7339                         { { echo "$as_me:7339: error: You have disabled the database w/o specifying fallbacks" >&5
7340 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7341    { (exit 1); exit 1; }; }
7342                 fi
7343         fi
7344
7345 cat >>confdefs.h <<\EOF
7346 #define PURE_TERMINFO 1
7347 EOF
7348
7349 else
7350
7351         if test "$with_ticlib" != no ; then
7352                 { { echo "$as_me:7352: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7353 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7354    { (exit 1); exit 1; }; }
7355         fi
7356
7357         NCURSES_USE_TERMCAP=1
7358         echo "$as_me:7358: checking for list of termcap files" >&5
7359 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7360
7361 # Check whether --with-termpath or --without-termpath was given.
7362 if test "${with_termpath+set}" = set; then
7363   withval="$with_termpath"
7364
7365 else
7366   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7367 fi;
7368 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7369 cf_dst_path=
7370 for cf_src_path in $withval
7371 do
7372
7373 if test "x$prefix" != xNONE; then
7374         cf_path_syntax="$prefix"
7375 else
7376         cf_path_syntax="$ac_default_prefix"
7377 fi
7378
7379 case ".$cf_src_path" in
7380 (.\$\(*\)*|.\'*\'*)
7381         ;;
7382 (..|./*|.\\*)
7383         ;;
7384 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7385         ;;
7386 (.\${*prefix}*|.\${*dir}*)
7387         eval cf_src_path="$cf_src_path"
7388         case ".$cf_src_path" in
7389         (.NONE/*)
7390                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7391                 ;;
7392         esac
7393         ;;
7394 (.no|.NONE/*)
7395         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7396         ;;
7397 (*)
7398         { { echo "$as_me:7398: error: expected a pathname, not \"$cf_src_path\"" >&5
7399 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7400    { (exit 1); exit 1; }; }
7401         ;;
7402 esac
7403
7404   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7405   cf_dst_path="${cf_dst_path}${cf_src_path}"
7406 done
7407 IFS="$ac_save_ifs"
7408
7409 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7410 # so we have to check/work around.  We do prefer the result of "eval"...
7411 eval cf_dst_eval="$cf_dst_path"
7412 case "x$cf_dst_eval" in
7413 (xNONE*)
7414         TERMPATH=$cf_dst_path
7415         ;;
7416 (*)
7417         TERMPATH="$cf_dst_eval"
7418         ;;
7419 esac
7420
7421         echo "$as_me:7421: result: $TERMPATH" >&5
7422 echo "${ECHO_T}$TERMPATH" >&6
7423         test -n "$TERMPATH" &&
7424 cat >>confdefs.h <<EOF
7425 #define TERMPATH "$TERMPATH"
7426 EOF
7427
7428         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7429         echo "$as_me:7429: checking if fast termcap-loader is needed" >&5
7430 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7431
7432 # Check whether --enable-getcap or --disable-getcap was given.
7433 if test "${enable_getcap+set}" = set; then
7434   enableval="$enable_getcap"
7435   with_getcap=$enableval
7436 else
7437   with_getcap=no
7438 fi;
7439         echo "$as_me:7439: result: $with_getcap" >&5
7440 echo "${ECHO_T}$with_getcap" >&6
7441         test "x$with_getcap" = "xyes" &&
7442 cat >>confdefs.h <<\EOF
7443 #define USE_GETCAP 1
7444 EOF
7445
7446         echo "$as_me:7446: checking if translated termcaps will be cached in ~/.terminfo" >&5
7447 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7448
7449 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7450 if test "${enable_getcap_cache+set}" = set; then
7451   enableval="$enable_getcap_cache"
7452   with_getcap_cache=$enableval
7453 else
7454   with_getcap_cache=no
7455 fi;
7456         echo "$as_me:7456: result: $with_getcap_cache" >&5
7457 echo "${ECHO_T}$with_getcap_cache" >&6
7458         test "x$with_getcap_cache" = "xyes" &&
7459 cat >>confdefs.h <<\EOF
7460 #define USE_GETCAP_CACHE 1
7461 EOF
7462
7463 fi
7464
7465 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7466 echo "$as_me:7466: checking if ~/.terminfo is wanted" >&5
7467 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7468
7469 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7470 if test "${enable_home_terminfo+set}" = set; then
7471   enableval="$enable_home_terminfo"
7472   with_home_terminfo=$enableval
7473 else
7474   with_home_terminfo=yes
7475 fi;
7476 echo "$as_me:7476: result: $with_home_terminfo" >&5
7477 echo "${ECHO_T}$with_home_terminfo" >&6
7478 test "x$with_home_terminfo" = "xyes" &&
7479 cat >>confdefs.h <<\EOF
7480 #define USE_HOME_TERMINFO 1
7481 EOF
7482
7483 echo "$as_me:7483: checking if you want to use restricted environment when running as root" >&5
7484 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7485
7486 # Check whether --enable-root-environ or --disable-root-environ was given.
7487 if test "${enable_root_environ+set}" = set; then
7488   enableval="$enable_root_environ"
7489   with_root_environ=$enableval
7490 else
7491   with_root_environ=yes
7492 fi;
7493 echo "$as_me:7493: result: $with_root_environ" >&5
7494 echo "${ECHO_T}$with_root_environ" >&6
7495 test "x$with_root_environ" = xyes &&
7496 cat >>confdefs.h <<\EOF
7497 #define USE_ROOT_ENVIRON 1
7498 EOF
7499
7500 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7501 ###   to reduce storage requirements for the terminfo database.
7502
7503 for ac_func in \
7504         remove \
7505         unlink
7506 do
7507 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7508 echo "$as_me:7508: checking for $ac_func" >&5
7509 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7510 if eval "test \"\${$as_ac_var+set}\" = set"; then
7511   echo $ECHO_N "(cached) $ECHO_C" >&6
7512 else
7513   cat >conftest.$ac_ext <<_ACEOF
7514 #line 7514 "configure"
7515 #include "confdefs.h"
7516 /* System header to define __stub macros and hopefully few prototypes,
7517     which can conflict with char $ac_func (); below.  */
7518 #include <assert.h>
7519 /* Override any gcc2 internal prototype to avoid an error.  */
7520 #ifdef __cplusplus
7521 extern "C"
7522 #endif
7523 /* We use char because int might match the return type of a gcc2
7524    builtin and then its argument prototype would still apply.  */
7525 char $ac_func ();
7526 char (*f) ();
7527
7528 int
7529 main ()
7530 {
7531 /* The GNU C library defines this for functions which it implements
7532     to always fail with ENOSYS.  Some functions are actually named
7533     something starting with __ and the normal name is an alias.  */
7534 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7535 choke me
7536 #else
7537 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7538 #endif
7539
7540   ;
7541   return 0;
7542 }
7543 _ACEOF
7544 rm -f conftest.$ac_objext conftest$ac_exeext
7545 if { (eval echo "$as_me:7545: \"$ac_link\"") >&5
7546   (eval $ac_link) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit $ac_status); } &&
7550          { ac_try='test -s conftest$ac_exeext'
7551   { (eval echo "$as_me:7551: \"$ac_try\"") >&5
7552   (eval $ac_try) 2>&5
7553   ac_status=$?
7554   echo "$as_me:7554: \$? = $ac_status" >&5
7555   (exit $ac_status); }; }; then
7556   eval "$as_ac_var=yes"
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 cat conftest.$ac_ext >&5
7560 eval "$as_ac_var=no"
7561 fi
7562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7563 fi
7564 echo "$as_me:7564: result: `eval echo '${'$as_ac_var'}'`" >&5
7565 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7566 if test `eval echo '${'$as_ac_var'}'` = yes; then
7567   cat >>confdefs.h <<EOF
7568 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7569 EOF
7570
7571 fi
7572 done
7573
7574 if test "$cross_compiling" = yes ; then
7575
7576 for ac_func in \
7577                 link \
7578                 symlink
7579 do
7580 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7581 echo "$as_me:7581: checking for $ac_func" >&5
7582 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7583 if eval "test \"\${$as_ac_var+set}\" = set"; then
7584   echo $ECHO_N "(cached) $ECHO_C" >&6
7585 else
7586   cat >conftest.$ac_ext <<_ACEOF
7587 #line 7587 "configure"
7588 #include "confdefs.h"
7589 /* System header to define __stub macros and hopefully few prototypes,
7590     which can conflict with char $ac_func (); below.  */
7591 #include <assert.h>
7592 /* Override any gcc2 internal prototype to avoid an error.  */
7593 #ifdef __cplusplus
7594 extern "C"
7595 #endif
7596 /* We use char because int might match the return type of a gcc2
7597    builtin and then its argument prototype would still apply.  */
7598 char $ac_func ();
7599 char (*f) ();
7600
7601 int
7602 main ()
7603 {
7604 /* The GNU C library defines this for functions which it implements
7605     to always fail with ENOSYS.  Some functions are actually named
7606     something starting with __ and the normal name is an alias.  */
7607 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7608 choke me
7609 #else
7610 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7611 #endif
7612
7613   ;
7614   return 0;
7615 }
7616 _ACEOF
7617 rm -f conftest.$ac_objext conftest$ac_exeext
7618 if { (eval echo "$as_me:7618: \"$ac_link\"") >&5
7619   (eval $ac_link) 2>&5
7620   ac_status=$?
7621   echo "$as_me:7621: \$? = $ac_status" >&5
7622   (exit $ac_status); } &&
7623          { ac_try='test -s conftest$ac_exeext'
7624   { (eval echo "$as_me:7624: \"$ac_try\"") >&5
7625   (eval $ac_try) 2>&5
7626   ac_status=$?
7627   echo "$as_me:7627: \$? = $ac_status" >&5
7628   (exit $ac_status); }; }; then
7629   eval "$as_ac_var=yes"
7630 else
7631   echo "$as_me: failed program was:" >&5
7632 cat conftest.$ac_ext >&5
7633 eval "$as_ac_var=no"
7634 fi
7635 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7636 fi
7637 echo "$as_me:7637: result: `eval echo '${'$as_ac_var'}'`" >&5
7638 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7639 if test `eval echo '${'$as_ac_var'}'` = yes; then
7640   cat >>confdefs.h <<EOF
7641 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7642 EOF
7643
7644 fi
7645 done
7646
7647 else
7648         echo "$as_me:7648: checking if link/symlink functions work" >&5
7649 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7650 if test "${cf_cv_link_funcs+set}" = set; then
7651   echo $ECHO_N "(cached) $ECHO_C" >&6
7652 else
7653
7654                 cf_cv_link_funcs=
7655                 for cf_func in link symlink ; do
7656                         if test "$cross_compiling" = yes; then
7657
7658                         eval 'ac_cv_func_'$cf_func'=error'
7659 else
7660   cat >conftest.$ac_ext <<_ACEOF
7661 #line 7661 "configure"
7662 #include "confdefs.h"
7663
7664 #include <sys/types.h>
7665 #include <sys/stat.h>
7666 #ifdef HAVE_UNISTD_H
7667 #include <unistd.h>
7668 #endif
7669 int main()
7670 {
7671         int fail = 0;
7672         char *src = "config.log";
7673         char *dst = "conftest.chk";
7674         struct stat src_sb;
7675         struct stat dst_sb;
7676
7677         stat(src, &src_sb);
7678         fail = ($cf_func("config.log", "conftest.chk") < 0)
7679             || (stat(dst, &dst_sb) < 0)
7680             || (dst_sb.st_mtime != src_sb.st_mtime);
7681 #ifdef HAVE_UNLINK
7682         unlink(dst);
7683 #else
7684         remove(dst);
7685 #endif
7686         ${cf_cv_main_return:-return} (fail);
7687 }
7688
7689 _ACEOF
7690 rm -f conftest$ac_exeext
7691 if { (eval echo "$as_me:7691: \"$ac_link\"") >&5
7692   (eval $ac_link) 2>&5
7693   ac_status=$?
7694   echo "$as_me:7694: \$? = $ac_status" >&5
7695   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7696   { (eval echo "$as_me:7696: \"$ac_try\"") >&5
7697   (eval $ac_try) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit $ac_status); }; }; then
7701
7702                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7703                         eval 'ac_cv_func_'$cf_func'=yes'
7704 else
7705   echo "$as_me: program exited with status $ac_status" >&5
7706 echo "$as_me: failed program was:" >&5
7707 cat conftest.$ac_ext >&5
7708
7709                         eval 'ac_cv_func_'$cf_func'=no'
7710 fi
7711 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7712 fi
7713                 done
7714                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7715
7716 fi
7717 echo "$as_me:7717: result: $cf_cv_link_funcs" >&5
7718 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7719         test "$ac_cv_func_link"    = yes &&
7720 cat >>confdefs.h <<\EOF
7721 #define HAVE_LINK 1
7722 EOF
7723
7724         test "$ac_cv_func_symlink" = yes &&
7725 cat >>confdefs.h <<\EOF
7726 #define HAVE_SYMLINK 1
7727 EOF
7728
7729 fi
7730
7731 with_links=no
7732 with_symlinks=no
7733
7734 # soft links (symbolic links) are useful for some systems where hard links do
7735 # not work, or to make it simpler to copy terminfo trees around.
7736 if test "x$ac_cv_func_symlink" = xyes ; then
7737         echo "$as_me:7737: checking if tic should use symbolic links" >&5
7738 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7739
7740 # Check whether --enable-symlinks or --disable-symlinks was given.
7741 if test "${enable_symlinks+set}" = set; then
7742   enableval="$enable_symlinks"
7743   with_symlinks=$enableval
7744 else
7745   with_symlinks=no
7746 fi;
7747         echo "$as_me:7747: result: $with_symlinks" >&5
7748 echo "${ECHO_T}$with_symlinks" >&6
7749 fi
7750
7751 # If we have hard links and did not choose to use soft links instead, there is
7752 # no reason to make this choice optional - use the hard links.
7753 if test "$with_symlinks" = no ; then
7754         echo "$as_me:7754: checking if tic should use hard links" >&5
7755 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7756         if test "x$ac_cv_func_link" = xyes ; then
7757                 with_links=yes
7758         else
7759                 with_links=no
7760         fi
7761         echo "$as_me:7761: result: $with_links" >&5
7762 echo "${ECHO_T}$with_links" >&6
7763 fi
7764
7765 test "x$with_links" = xyes &&
7766 cat >>confdefs.h <<\EOF
7767 #define USE_LINKS 1
7768 EOF
7769
7770 test "x$with_symlinks" = xyes &&
7771 cat >>confdefs.h <<\EOF
7772 #define USE_SYMLINKS 1
7773 EOF
7774
7775 ###   use option --enable-broken-linker to force on use of broken-linker support
7776 echo "$as_me:7776: checking if you want broken-linker support code" >&5
7777 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7778
7779 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7780 if test "${enable_broken_linker+set}" = set; then
7781   enableval="$enable_broken_linker"
7782   with_broken_linker=$enableval
7783 else
7784   with_broken_linker=${BROKEN_LINKER:-no}
7785 fi;
7786 echo "$as_me:7786: result: $with_broken_linker" >&5
7787 echo "${ECHO_T}$with_broken_linker" >&6
7788
7789 BROKEN_LINKER=0
7790 if test "x$with_broken_linker" = xyes ; then
7791
7792 cat >>confdefs.h <<\EOF
7793 #define BROKEN_LINKER 1
7794 EOF
7795
7796         BROKEN_LINKER=1
7797 elif test "$DFT_LWR_MODEL" = shared ; then
7798         case $cf_cv_system_name in
7799         (cygwin*)
7800
7801 cat >>confdefs.h <<\EOF
7802 #define BROKEN_LINKER 1
7803 EOF
7804
7805                 BROKEN_LINKER=1
7806                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7807
7808 echo "${as_me:-configure}:7808: testing cygwin linker is broken anyway ..." 1>&5
7809
7810                 ;;
7811         esac
7812 fi
7813
7814 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7815 echo "$as_me:7815: checking if tputs should process BSD-style prefix padding" >&5
7816 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7817
7818 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7819 if test "${enable_bsdpad+set}" = set; then
7820   enableval="$enable_bsdpad"
7821   with_bsdpad=$enableval
7822 else
7823   with_bsdpad=no
7824 fi;
7825 echo "$as_me:7825: result: $with_bsdpad" >&5
7826 echo "${ECHO_T}$with_bsdpad" >&6
7827 test "x$with_bsdpad" = xyes &&
7828 cat >>confdefs.h <<\EOF
7829 #define BSD_TPUTS 1
7830 EOF
7831
7832 ###   use option --enable-widec to turn on use of wide-character support
7833 NCURSES_CH_T=chtype
7834 NCURSES_LIBUTF8=0
7835
7836 NEED_WCHAR_H=0
7837 NCURSES_MBSTATE_T=0
7838 NCURSES_WCHAR_T=0
7839 NCURSES_WINT_T=0
7840
7841 # Check to define _XOPEN_SOURCE "automatically"
7842 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7843
7844 cf_XOPEN_SOURCE=500
7845 cf_POSIX_C_SOURCE=199506L
7846 cf_xopen_source=
7847
7848 case $host_os in
7849 (aix[4-7]*)
7850         cf_xopen_source="-D_ALL_SOURCE"
7851         ;;
7852 (cygwin|msys)
7853         cf_XOPEN_SOURCE=600
7854         ;;
7855 (darwin[0-8].*)
7856         cf_xopen_source="-D_APPLE_C_SOURCE"
7857         ;;
7858 (darwin*)
7859         cf_xopen_source="-D_DARWIN_C_SOURCE"
7860         cf_XOPEN_SOURCE=
7861         ;;
7862 (freebsd*|dragonfly*)
7863         # 5.x headers associate
7864         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7865         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7866         cf_POSIX_C_SOURCE=200112L
7867         cf_XOPEN_SOURCE=600
7868         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7869         ;;
7870 (hpux11*)
7871         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7872         ;;
7873 (hpux*)
7874         cf_xopen_source="-D_HPUX_SOURCE"
7875         ;;
7876 (irix[56].*)
7877         cf_xopen_source="-D_SGI_SOURCE"
7878         cf_XOPEN_SOURCE=
7879         ;;
7880 (linux*|gnu*|mint*|k*bsd*-gnu)
7881
7882 echo "$as_me:7882: checking if we must define _GNU_SOURCE" >&5
7883 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7884 if test "${cf_cv_gnu_source+set}" = set; then
7885   echo $ECHO_N "(cached) $ECHO_C" >&6
7886 else
7887
7888 cat >conftest.$ac_ext <<_ACEOF
7889 #line 7889 "configure"
7890 #include "confdefs.h"
7891 #include <sys/types.h>
7892 int
7893 main ()
7894 {
7895
7896 #ifndef _XOPEN_SOURCE
7897 make an error
7898 #endif
7899   ;
7900   return 0;
7901 }
7902 _ACEOF
7903 rm -f conftest.$ac_objext
7904 if { (eval echo "$as_me:7904: \"$ac_compile\"") >&5
7905   (eval $ac_compile) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); } &&
7909          { ac_try='test -s conftest.$ac_objext'
7910   { (eval echo "$as_me:7910: \"$ac_try\"") >&5
7911   (eval $ac_try) 2>&5
7912   ac_status=$?
7913   echo "$as_me:7913: \$? = $ac_status" >&5
7914   (exit $ac_status); }; }; then
7915   cf_cv_gnu_source=no
7916 else
7917   echo "$as_me: failed program was:" >&5
7918 cat conftest.$ac_ext >&5
7919 cf_save="$CPPFLAGS"
7920          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7921          cat >conftest.$ac_ext <<_ACEOF
7922 #line 7922 "configure"
7923 #include "confdefs.h"
7924 #include <sys/types.h>
7925 int
7926 main ()
7927 {
7928
7929 #ifdef _XOPEN_SOURCE
7930 make an error
7931 #endif
7932   ;
7933   return 0;
7934 }
7935 _ACEOF
7936 rm -f conftest.$ac_objext
7937 if { (eval echo "$as_me:7937: \"$ac_compile\"") >&5
7938   (eval $ac_compile) 2>&5
7939   ac_status=$?
7940   echo "$as_me:7940: \$? = $ac_status" >&5
7941   (exit $ac_status); } &&
7942          { ac_try='test -s conftest.$ac_objext'
7943   { (eval echo "$as_me:7943: \"$ac_try\"") >&5
7944   (eval $ac_try) 2>&5
7945   ac_status=$?
7946   echo "$as_me:7946: \$? = $ac_status" >&5
7947   (exit $ac_status); }; }; then
7948   cf_cv_gnu_source=no
7949 else
7950   echo "$as_me: failed program was:" >&5
7951 cat conftest.$ac_ext >&5
7952 cf_cv_gnu_source=yes
7953 fi
7954 rm -f conftest.$ac_objext conftest.$ac_ext
7955         CPPFLAGS="$cf_save"
7956
7957 fi
7958 rm -f conftest.$ac_objext conftest.$ac_ext
7959
7960 fi
7961 echo "$as_me:7961: result: $cf_cv_gnu_source" >&5
7962 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7963 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7964
7965         ;;
7966 (minix*)
7967         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7968         ;;
7969 (mirbsd*)
7970         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7971         cf_XOPEN_SOURCE=
7972
7973 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7974
7975 cf_save_CFLAGS="$CFLAGS"
7976 cf_save_CPPFLAGS="$CPPFLAGS"
7977
7978 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7979         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7980                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7981
7982 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7983         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7984                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7985
7986 echo "$as_me:7986: checking if we should define _POSIX_C_SOURCE" >&5
7987 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7988 if test "${cf_cv_posix_c_source+set}" = set; then
7989   echo $ECHO_N "(cached) $ECHO_C" >&6
7990 else
7991
7992 echo "${as_me:-configure}:7992: testing if the symbol is already defined go no further ..." 1>&5
7993
7994         cat >conftest.$ac_ext <<_ACEOF
7995 #line 7995 "configure"
7996 #include "confdefs.h"
7997 #include <sys/types.h>
7998 int
7999 main ()
8000 {
8001
8002 #ifndef _POSIX_C_SOURCE
8003 make an error
8004 #endif
8005   ;
8006   return 0;
8007 }
8008 _ACEOF
8009 rm -f conftest.$ac_objext
8010 if { (eval echo "$as_me:8010: \"$ac_compile\"") >&5
8011   (eval $ac_compile) 2>&5
8012   ac_status=$?
8013   echo "$as_me:8013: \$? = $ac_status" >&5
8014   (exit $ac_status); } &&
8015          { ac_try='test -s conftest.$ac_objext'
8016   { (eval echo "$as_me:8016: \"$ac_try\"") >&5
8017   (eval $ac_try) 2>&5
8018   ac_status=$?
8019   echo "$as_me:8019: \$? = $ac_status" >&5
8020   (exit $ac_status); }; }; then
8021   cf_cv_posix_c_source=no
8022 else
8023   echo "$as_me: failed program was:" >&5
8024 cat conftest.$ac_ext >&5
8025 cf_want_posix_source=no
8026          case .$cf_POSIX_C_SOURCE in
8027          (.[12]??*)
8028                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8029                 ;;
8030          (.2)
8031                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8032                 cf_want_posix_source=yes
8033                 ;;
8034          (.*)
8035                 cf_want_posix_source=yes
8036                 ;;
8037          esac
8038          if test "$cf_want_posix_source" = yes ; then
8039                 cat >conftest.$ac_ext <<_ACEOF
8040 #line 8040 "configure"
8041 #include "confdefs.h"
8042 #include <sys/types.h>
8043 int
8044 main ()
8045 {
8046
8047 #ifdef _POSIX_SOURCE
8048 make an error
8049 #endif
8050   ;
8051   return 0;
8052 }
8053 _ACEOF
8054 rm -f conftest.$ac_objext
8055 if { (eval echo "$as_me:8055: \"$ac_compile\"") >&5
8056   (eval $ac_compile) 2>&5
8057   ac_status=$?
8058   echo "$as_me:8058: \$? = $ac_status" >&5
8059   (exit $ac_status); } &&
8060          { ac_try='test -s conftest.$ac_objext'
8061   { (eval echo "$as_me:8061: \"$ac_try\"") >&5
8062   (eval $ac_try) 2>&5
8063   ac_status=$?
8064   echo "$as_me:8064: \$? = $ac_status" >&5
8065   (exit $ac_status); }; }; then
8066   :
8067 else
8068   echo "$as_me: failed program was:" >&5
8069 cat conftest.$ac_ext >&5
8070 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8071 fi
8072 rm -f conftest.$ac_objext conftest.$ac_ext
8073          fi
8074
8075 echo "${as_me:-configure}:8075: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8076
8077          CFLAGS="$cf_trim_CFLAGS"
8078          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8079
8080 echo "${as_me:-configure}:8080: testing if the second compile does not leave our definition intact error ..." 1>&5
8081
8082          cat >conftest.$ac_ext <<_ACEOF
8083 #line 8083 "configure"
8084 #include "confdefs.h"
8085 #include <sys/types.h>
8086 int
8087 main ()
8088 {
8089
8090 #ifndef _POSIX_C_SOURCE
8091 make an error
8092 #endif
8093   ;
8094   return 0;
8095 }
8096 _ACEOF
8097 rm -f conftest.$ac_objext
8098 if { (eval echo "$as_me:8098: \"$ac_compile\"") >&5
8099   (eval $ac_compile) 2>&5
8100   ac_status=$?
8101   echo "$as_me:8101: \$? = $ac_status" >&5
8102   (exit $ac_status); } &&
8103          { ac_try='test -s conftest.$ac_objext'
8104   { (eval echo "$as_me:8104: \"$ac_try\"") >&5
8105   (eval $ac_try) 2>&5
8106   ac_status=$?
8107   echo "$as_me:8107: \$? = $ac_status" >&5
8108   (exit $ac_status); }; }; then
8109   :
8110 else
8111   echo "$as_me: failed program was:" >&5
8112 cat conftest.$ac_ext >&5
8113 cf_cv_posix_c_source=no
8114 fi
8115 rm -f conftest.$ac_objext conftest.$ac_ext
8116          CFLAGS="$cf_save_CFLAGS"
8117          CPPFLAGS="$cf_save_CPPFLAGS"
8118
8119 fi
8120 rm -f conftest.$ac_objext conftest.$ac_ext
8121
8122 fi
8123 echo "$as_me:8123: result: $cf_cv_posix_c_source" >&5
8124 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8125
8126 if test "$cf_cv_posix_c_source" != no ; then
8127         CFLAGS="$cf_trim_CFLAGS"
8128         CPPFLAGS="$cf_trim_CPPFLAGS"
8129
8130 cf_fix_cppflags=no
8131 cf_new_cflags=
8132 cf_new_cppflags=
8133 cf_new_extra_cppflags=
8134
8135 for cf_add_cflags in $cf_cv_posix_c_source
8136 do
8137 case $cf_fix_cppflags in
8138 (no)
8139         case $cf_add_cflags in
8140         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8141                 case $cf_add_cflags in
8142                 (-D*)
8143                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8144
8145                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8146                                 && test -z "${cf_tst_cflags}" \
8147                                 && cf_fix_cppflags=yes
8148
8149                         if test $cf_fix_cppflags = yes ; then
8150                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8151                                 continue
8152                         elif test "${cf_tst_cflags}" = "\"'" ; then
8153                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8154                                 continue
8155                         fi
8156                         ;;
8157                 esac
8158                 case "$CPPFLAGS" in
8159                 (*$cf_add_cflags)
8160                         ;;
8161                 (*)
8162                         case $cf_add_cflags in
8163                         (-D*)
8164                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8165
8166 CPPFLAGS=`echo "$CPPFLAGS" | \
8167         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8168                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8169
8170                                 ;;
8171                         esac
8172                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8173                         ;;
8174                 esac
8175                 ;;
8176         (*)
8177                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8178                 ;;
8179         esac
8180         ;;
8181 (yes)
8182         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8183
8184         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8185
8186         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8187                 && test -z "${cf_tst_cflags}" \
8188                 && cf_fix_cppflags=no
8189         ;;
8190 esac
8191 done
8192
8193 if test -n "$cf_new_cflags" ; then
8194
8195         CFLAGS="$CFLAGS $cf_new_cflags"
8196 fi
8197
8198 if test -n "$cf_new_cppflags" ; then
8199
8200         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8201 fi
8202
8203 if test -n "$cf_new_extra_cppflags" ; then
8204
8205         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8206 fi
8207
8208 fi
8209
8210         ;;
8211 (netbsd*)
8212         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8213         ;;
8214 (openbsd[4-9]*)
8215         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8216         cf_xopen_source="-D_BSD_SOURCE"
8217         cf_XOPEN_SOURCE=600
8218         ;;
8219 (openbsd*)
8220         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8221         ;;
8222 (osf[45]*)
8223         cf_xopen_source="-D_OSF_SOURCE"
8224         ;;
8225 (nto-qnx*)
8226         cf_xopen_source="-D_QNX_SOURCE"
8227         ;;
8228 (sco*)
8229         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8230         ;;
8231 (solaris2.*)
8232         cf_xopen_source="-D__EXTENSIONS__"
8233         cf_cv_xopen_source=broken
8234         ;;
8235 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8236         cf_XOPEN_SOURCE=
8237         cf_POSIX_C_SOURCE=
8238         ;;
8239 (*)
8240
8241 echo "$as_me:8241: checking if we should define _XOPEN_SOURCE" >&5
8242 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8243 if test "${cf_cv_xopen_source+set}" = set; then
8244   echo $ECHO_N "(cached) $ECHO_C" >&6
8245 else
8246
8247         cat >conftest.$ac_ext <<_ACEOF
8248 #line 8248 "configure"
8249 #include "confdefs.h"
8250
8251 #include <stdlib.h>
8252 #include <string.h>
8253 #include <sys/types.h>
8254
8255 int
8256 main ()
8257 {
8258
8259 #ifndef _XOPEN_SOURCE
8260 make an error
8261 #endif
8262   ;
8263   return 0;
8264 }
8265 _ACEOF
8266 rm -f conftest.$ac_objext
8267 if { (eval echo "$as_me:8267: \"$ac_compile\"") >&5
8268   (eval $ac_compile) 2>&5
8269   ac_status=$?
8270   echo "$as_me:8270: \$? = $ac_status" >&5
8271   (exit $ac_status); } &&
8272          { ac_try='test -s conftest.$ac_objext'
8273   { (eval echo "$as_me:8273: \"$ac_try\"") >&5
8274   (eval $ac_try) 2>&5
8275   ac_status=$?
8276   echo "$as_me:8276: \$? = $ac_status" >&5
8277   (exit $ac_status); }; }; then
8278   cf_cv_xopen_source=no
8279 else
8280   echo "$as_me: failed program was:" >&5
8281 cat conftest.$ac_ext >&5
8282 cf_save="$CPPFLAGS"
8283          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8284          cat >conftest.$ac_ext <<_ACEOF
8285 #line 8285 "configure"
8286 #include "confdefs.h"
8287
8288 #include <stdlib.h>
8289 #include <string.h>
8290 #include <sys/types.h>
8291
8292 int
8293 main ()
8294 {
8295
8296 #ifdef _XOPEN_SOURCE
8297 make an error
8298 #endif
8299   ;
8300   return 0;
8301 }
8302 _ACEOF
8303 rm -f conftest.$ac_objext
8304 if { (eval echo "$as_me:8304: \"$ac_compile\"") >&5
8305   (eval $ac_compile) 2>&5
8306   ac_status=$?
8307   echo "$as_me:8307: \$? = $ac_status" >&5
8308   (exit $ac_status); } &&
8309          { ac_try='test -s conftest.$ac_objext'
8310   { (eval echo "$as_me:8310: \"$ac_try\"") >&5
8311   (eval $ac_try) 2>&5
8312   ac_status=$?
8313   echo "$as_me:8313: \$? = $ac_status" >&5
8314   (exit $ac_status); }; }; then
8315   cf_cv_xopen_source=no
8316 else
8317   echo "$as_me: failed program was:" >&5
8318 cat conftest.$ac_ext >&5
8319 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8320 fi
8321 rm -f conftest.$ac_objext conftest.$ac_ext
8322         CPPFLAGS="$cf_save"
8323
8324 fi
8325 rm -f conftest.$ac_objext conftest.$ac_ext
8326
8327 fi
8328 echo "$as_me:8328: result: $cf_cv_xopen_source" >&5
8329 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8330
8331 if test "$cf_cv_xopen_source" != no ; then
8332
8333 CFLAGS=`echo "$CFLAGS" | \
8334         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8335                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8336
8337 CPPFLAGS=`echo "$CPPFLAGS" | \
8338         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8339                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8340
8341         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8342
8343 cf_fix_cppflags=no
8344 cf_new_cflags=
8345 cf_new_cppflags=
8346 cf_new_extra_cppflags=
8347
8348 for cf_add_cflags in $cf_temp_xopen_source
8349 do
8350 case $cf_fix_cppflags in
8351 (no)
8352         case $cf_add_cflags in
8353         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8354                 case $cf_add_cflags in
8355                 (-D*)
8356                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8357
8358                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8359                                 && test -z "${cf_tst_cflags}" \
8360                                 && cf_fix_cppflags=yes
8361
8362                         if test $cf_fix_cppflags = yes ; then
8363                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8364                                 continue
8365                         elif test "${cf_tst_cflags}" = "\"'" ; then
8366                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8367                                 continue
8368                         fi
8369                         ;;
8370                 esac
8371                 case "$CPPFLAGS" in
8372                 (*$cf_add_cflags)
8373                         ;;
8374                 (*)
8375                         case $cf_add_cflags in
8376                         (-D*)
8377                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8378
8379 CPPFLAGS=`echo "$CPPFLAGS" | \
8380         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8381                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8382
8383                                 ;;
8384                         esac
8385                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8386                         ;;
8387                 esac
8388                 ;;
8389         (*)
8390                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8391                 ;;
8392         esac
8393         ;;
8394 (yes)
8395         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8396
8397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8398
8399         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8400                 && test -z "${cf_tst_cflags}" \
8401                 && cf_fix_cppflags=no
8402         ;;
8403 esac
8404 done
8405
8406 if test -n "$cf_new_cflags" ; then
8407
8408         CFLAGS="$CFLAGS $cf_new_cflags"
8409 fi
8410
8411 if test -n "$cf_new_cppflags" ; then
8412
8413         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8414 fi
8415
8416 if test -n "$cf_new_extra_cppflags" ; then
8417
8418         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8419 fi
8420
8421 fi
8422
8423 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8424
8425 cf_save_CFLAGS="$CFLAGS"
8426 cf_save_CPPFLAGS="$CPPFLAGS"
8427
8428 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8429         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8430                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8431
8432 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8433         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8434                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8435
8436 echo "$as_me:8436: checking if we should define _POSIX_C_SOURCE" >&5
8437 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8438 if test "${cf_cv_posix_c_source+set}" = set; then
8439   echo $ECHO_N "(cached) $ECHO_C" >&6
8440 else
8441
8442 echo "${as_me:-configure}:8442: testing if the symbol is already defined go no further ..." 1>&5
8443
8444         cat >conftest.$ac_ext <<_ACEOF
8445 #line 8445 "configure"
8446 #include "confdefs.h"
8447 #include <sys/types.h>
8448 int
8449 main ()
8450 {
8451
8452 #ifndef _POSIX_C_SOURCE
8453 make an error
8454 #endif
8455   ;
8456   return 0;
8457 }
8458 _ACEOF
8459 rm -f conftest.$ac_objext
8460 if { (eval echo "$as_me:8460: \"$ac_compile\"") >&5
8461   (eval $ac_compile) 2>&5
8462   ac_status=$?
8463   echo "$as_me:8463: \$? = $ac_status" >&5
8464   (exit $ac_status); } &&
8465          { ac_try='test -s conftest.$ac_objext'
8466   { (eval echo "$as_me:8466: \"$ac_try\"") >&5
8467   (eval $ac_try) 2>&5
8468   ac_status=$?
8469   echo "$as_me:8469: \$? = $ac_status" >&5
8470   (exit $ac_status); }; }; then
8471   cf_cv_posix_c_source=no
8472 else
8473   echo "$as_me: failed program was:" >&5
8474 cat conftest.$ac_ext >&5
8475 cf_want_posix_source=no
8476          case .$cf_POSIX_C_SOURCE in
8477          (.[12]??*)
8478                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8479                 ;;
8480          (.2)
8481                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8482                 cf_want_posix_source=yes
8483                 ;;
8484          (.*)
8485                 cf_want_posix_source=yes
8486                 ;;
8487          esac
8488          if test "$cf_want_posix_source" = yes ; then
8489                 cat >conftest.$ac_ext <<_ACEOF
8490 #line 8490 "configure"
8491 #include "confdefs.h"
8492 #include <sys/types.h>
8493 int
8494 main ()
8495 {
8496
8497 #ifdef _POSIX_SOURCE
8498 make an error
8499 #endif
8500   ;
8501   return 0;
8502 }
8503 _ACEOF
8504 rm -f conftest.$ac_objext
8505 if { (eval echo "$as_me:8505: \"$ac_compile\"") >&5
8506   (eval $ac_compile) 2>&5
8507   ac_status=$?
8508   echo "$as_me:8508: \$? = $ac_status" >&5
8509   (exit $ac_status); } &&
8510          { ac_try='test -s conftest.$ac_objext'
8511   { (eval echo "$as_me:8511: \"$ac_try\"") >&5
8512   (eval $ac_try) 2>&5
8513   ac_status=$?
8514   echo "$as_me:8514: \$? = $ac_status" >&5
8515   (exit $ac_status); }; }; then
8516   :
8517 else
8518   echo "$as_me: failed program was:" >&5
8519 cat conftest.$ac_ext >&5
8520 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8521 fi
8522 rm -f conftest.$ac_objext conftest.$ac_ext
8523          fi
8524
8525 echo "${as_me:-configure}:8525: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8526
8527          CFLAGS="$cf_trim_CFLAGS"
8528          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8529
8530 echo "${as_me:-configure}:8530: testing if the second compile does not leave our definition intact error ..." 1>&5
8531
8532          cat >conftest.$ac_ext <<_ACEOF
8533 #line 8533 "configure"
8534 #include "confdefs.h"
8535 #include <sys/types.h>
8536 int
8537 main ()
8538 {
8539
8540 #ifndef _POSIX_C_SOURCE
8541 make an error
8542 #endif
8543   ;
8544   return 0;
8545 }
8546 _ACEOF
8547 rm -f conftest.$ac_objext
8548 if { (eval echo "$as_me:8548: \"$ac_compile\"") >&5
8549   (eval $ac_compile) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); } &&
8553          { ac_try='test -s conftest.$ac_objext'
8554   { (eval echo "$as_me:8554: \"$ac_try\"") >&5
8555   (eval $ac_try) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); }; }; then
8559   :
8560 else
8561   echo "$as_me: failed program was:" >&5
8562 cat conftest.$ac_ext >&5
8563 cf_cv_posix_c_source=no
8564 fi
8565 rm -f conftest.$ac_objext conftest.$ac_ext
8566          CFLAGS="$cf_save_CFLAGS"
8567          CPPFLAGS="$cf_save_CPPFLAGS"
8568
8569 fi
8570 rm -f conftest.$ac_objext conftest.$ac_ext
8571
8572 fi
8573 echo "$as_me:8573: result: $cf_cv_posix_c_source" >&5
8574 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8575
8576 if test "$cf_cv_posix_c_source" != no ; then
8577         CFLAGS="$cf_trim_CFLAGS"
8578         CPPFLAGS="$cf_trim_CPPFLAGS"
8579
8580 cf_fix_cppflags=no
8581 cf_new_cflags=
8582 cf_new_cppflags=
8583 cf_new_extra_cppflags=
8584
8585 for cf_add_cflags in $cf_cv_posix_c_source
8586 do
8587 case $cf_fix_cppflags in
8588 (no)
8589         case $cf_add_cflags in
8590         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8591                 case $cf_add_cflags in
8592                 (-D*)
8593                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8594
8595                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8596                                 && test -z "${cf_tst_cflags}" \
8597                                 && cf_fix_cppflags=yes
8598
8599                         if test $cf_fix_cppflags = yes ; then
8600                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8601                                 continue
8602                         elif test "${cf_tst_cflags}" = "\"'" ; then
8603                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8604                                 continue
8605                         fi
8606                         ;;
8607                 esac
8608                 case "$CPPFLAGS" in
8609                 (*$cf_add_cflags)
8610                         ;;
8611                 (*)
8612                         case $cf_add_cflags in
8613                         (-D*)
8614                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8615
8616 CPPFLAGS=`echo "$CPPFLAGS" | \
8617         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8618                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8619
8620                                 ;;
8621                         esac
8622                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8623                         ;;
8624                 esac
8625                 ;;
8626         (*)
8627                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8628                 ;;
8629         esac
8630         ;;
8631 (yes)
8632         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8633
8634         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8635
8636         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8637                 && test -z "${cf_tst_cflags}" \
8638                 && cf_fix_cppflags=no
8639         ;;
8640 esac
8641 done
8642
8643 if test -n "$cf_new_cflags" ; then
8644
8645         CFLAGS="$CFLAGS $cf_new_cflags"
8646 fi
8647
8648 if test -n "$cf_new_cppflags" ; then
8649
8650         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8651 fi
8652
8653 if test -n "$cf_new_extra_cppflags" ; then
8654
8655         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8656 fi
8657
8658 fi
8659
8660         ;;
8661 esac
8662
8663 if test -n "$cf_xopen_source" ; then
8664
8665 cf_fix_cppflags=no
8666 cf_new_cflags=
8667 cf_new_cppflags=
8668 cf_new_extra_cppflags=
8669
8670 for cf_add_cflags in $cf_xopen_source
8671 do
8672 case $cf_fix_cppflags in
8673 (no)
8674         case $cf_add_cflags in
8675         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8676                 case $cf_add_cflags in
8677                 (-D*)
8678                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8679
8680                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8681                                 && test -z "${cf_tst_cflags}" \
8682                                 && cf_fix_cppflags=yes
8683
8684                         if test $cf_fix_cppflags = yes ; then
8685                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8686                                 continue
8687                         elif test "${cf_tst_cflags}" = "\"'" ; then
8688                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8689                                 continue
8690                         fi
8691                         ;;
8692                 esac
8693                 case "$CPPFLAGS" in
8694                 (*$cf_add_cflags)
8695                         ;;
8696                 (*)
8697                         case $cf_add_cflags in
8698                         (-D*)
8699                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8700
8701 CPPFLAGS=`echo "$CPPFLAGS" | \
8702         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8703                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8704
8705                                 ;;
8706                         esac
8707                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8708                         ;;
8709                 esac
8710                 ;;
8711         (*)
8712                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8713                 ;;
8714         esac
8715         ;;
8716 (yes)
8717         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8718
8719         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8720
8721         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8722                 && test -z "${cf_tst_cflags}" \
8723                 && cf_fix_cppflags=no
8724         ;;
8725 esac
8726 done
8727
8728 if test -n "$cf_new_cflags" ; then
8729         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8730
8731 echo "${as_me:-configure}:8731: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8732
8733         CFLAGS="$CFLAGS $cf_new_cflags"
8734 fi
8735
8736 if test -n "$cf_new_cppflags" ; then
8737         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8738
8739 echo "${as_me:-configure}:8739: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8740
8741         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8742 fi
8743
8744 if test -n "$cf_new_extra_cppflags" ; then
8745         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8746
8747 echo "${as_me:-configure}:8747: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8748
8749         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8750 fi
8751
8752 fi
8753
8754 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8755         echo "$as_me:8755: checking if _XOPEN_SOURCE really is set" >&5
8756 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8757         cat >conftest.$ac_ext <<_ACEOF
8758 #line 8758 "configure"
8759 #include "confdefs.h"
8760 #include <stdlib.h>
8761 int
8762 main ()
8763 {
8764
8765 #ifndef _XOPEN_SOURCE
8766 make an error
8767 #endif
8768   ;
8769   return 0;
8770 }
8771 _ACEOF
8772 rm -f conftest.$ac_objext
8773 if { (eval echo "$as_me:8773: \"$ac_compile\"") >&5
8774   (eval $ac_compile) 2>&5
8775   ac_status=$?
8776   echo "$as_me:8776: \$? = $ac_status" >&5
8777   (exit $ac_status); } &&
8778          { ac_try='test -s conftest.$ac_objext'
8779   { (eval echo "$as_me:8779: \"$ac_try\"") >&5
8780   (eval $ac_try) 2>&5
8781   ac_status=$?
8782   echo "$as_me:8782: \$? = $ac_status" >&5
8783   (exit $ac_status); }; }; then
8784   cf_XOPEN_SOURCE_set=yes
8785 else
8786   echo "$as_me: failed program was:" >&5
8787 cat conftest.$ac_ext >&5
8788 cf_XOPEN_SOURCE_set=no
8789 fi
8790 rm -f conftest.$ac_objext conftest.$ac_ext
8791         echo "$as_me:8791: result: $cf_XOPEN_SOURCE_set" >&5
8792 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8793         if test $cf_XOPEN_SOURCE_set = yes
8794         then
8795                 cat >conftest.$ac_ext <<_ACEOF
8796 #line 8796 "configure"
8797 #include "confdefs.h"
8798 #include <stdlib.h>
8799 int
8800 main ()
8801 {
8802
8803 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8804 make an error
8805 #endif
8806   ;
8807   return 0;
8808 }
8809 _ACEOF
8810 rm -f conftest.$ac_objext
8811 if { (eval echo "$as_me:8811: \"$ac_compile\"") >&5
8812   (eval $ac_compile) 2>&5
8813   ac_status=$?
8814   echo "$as_me:8814: \$? = $ac_status" >&5
8815   (exit $ac_status); } &&
8816          { ac_try='test -s conftest.$ac_objext'
8817   { (eval echo "$as_me:8817: \"$ac_try\"") >&5
8818   (eval $ac_try) 2>&5
8819   ac_status=$?
8820   echo "$as_me:8820: \$? = $ac_status" >&5
8821   (exit $ac_status); }; }; then
8822   cf_XOPEN_SOURCE_set_ok=yes
8823 else
8824   echo "$as_me: failed program was:" >&5
8825 cat conftest.$ac_ext >&5
8826 cf_XOPEN_SOURCE_set_ok=no
8827 fi
8828 rm -f conftest.$ac_objext conftest.$ac_ext
8829                 if test $cf_XOPEN_SOURCE_set_ok = no
8830                 then
8831                         { echo "$as_me:8831: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8832 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8833                 fi
8834         else
8835
8836 echo "$as_me:8836: checking if we should define _XOPEN_SOURCE" >&5
8837 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8838 if test "${cf_cv_xopen_source+set}" = set; then
8839   echo $ECHO_N "(cached) $ECHO_C" >&6
8840 else
8841
8842         cat >conftest.$ac_ext <<_ACEOF
8843 #line 8843 "configure"
8844 #include "confdefs.h"
8845
8846 #include <stdlib.h>
8847 #include <string.h>
8848 #include <sys/types.h>
8849
8850 int
8851 main ()
8852 {
8853
8854 #ifndef _XOPEN_SOURCE
8855 make an error
8856 #endif
8857   ;
8858   return 0;
8859 }
8860 _ACEOF
8861 rm -f conftest.$ac_objext
8862 if { (eval echo "$as_me:8862: \"$ac_compile\"") >&5
8863   (eval $ac_compile) 2>&5
8864   ac_status=$?
8865   echo "$as_me:8865: \$? = $ac_status" >&5
8866   (exit $ac_status); } &&
8867          { ac_try='test -s conftest.$ac_objext'
8868   { (eval echo "$as_me:8868: \"$ac_try\"") >&5
8869   (eval $ac_try) 2>&5
8870   ac_status=$?
8871   echo "$as_me:8871: \$? = $ac_status" >&5
8872   (exit $ac_status); }; }; then
8873   cf_cv_xopen_source=no
8874 else
8875   echo "$as_me: failed program was:" >&5
8876 cat conftest.$ac_ext >&5
8877 cf_save="$CPPFLAGS"
8878          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8879          cat >conftest.$ac_ext <<_ACEOF
8880 #line 8880 "configure"
8881 #include "confdefs.h"
8882
8883 #include <stdlib.h>
8884 #include <string.h>
8885 #include <sys/types.h>
8886
8887 int
8888 main ()
8889 {
8890
8891 #ifdef _XOPEN_SOURCE
8892 make an error
8893 #endif
8894   ;
8895   return 0;
8896 }
8897 _ACEOF
8898 rm -f conftest.$ac_objext
8899 if { (eval echo "$as_me:8899: \"$ac_compile\"") >&5
8900   (eval $ac_compile) 2>&5
8901   ac_status=$?
8902   echo "$as_me:8902: \$? = $ac_status" >&5
8903   (exit $ac_status); } &&
8904          { ac_try='test -s conftest.$ac_objext'
8905   { (eval echo "$as_me:8905: \"$ac_try\"") >&5
8906   (eval $ac_try) 2>&5
8907   ac_status=$?
8908   echo "$as_me:8908: \$? = $ac_status" >&5
8909   (exit $ac_status); }; }; then
8910   cf_cv_xopen_source=no
8911 else
8912   echo "$as_me: failed program was:" >&5
8913 cat conftest.$ac_ext >&5
8914 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8915 fi
8916 rm -f conftest.$ac_objext conftest.$ac_ext
8917         CPPFLAGS="$cf_save"
8918
8919 fi
8920 rm -f conftest.$ac_objext conftest.$ac_ext
8921
8922 fi
8923 echo "$as_me:8923: result: $cf_cv_xopen_source" >&5
8924 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8925
8926 if test "$cf_cv_xopen_source" != no ; then
8927
8928 CFLAGS=`echo "$CFLAGS" | \
8929         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8930                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8931
8932 CPPFLAGS=`echo "$CPPFLAGS" | \
8933         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8934                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8935
8936         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8937
8938 cf_fix_cppflags=no
8939 cf_new_cflags=
8940 cf_new_cppflags=
8941 cf_new_extra_cppflags=
8942
8943 for cf_add_cflags in $cf_temp_xopen_source
8944 do
8945 case $cf_fix_cppflags in
8946 (no)
8947         case $cf_add_cflags in
8948         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8949                 case $cf_add_cflags in
8950                 (-D*)
8951                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8952
8953                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8954                                 && test -z "${cf_tst_cflags}" \
8955                                 && cf_fix_cppflags=yes
8956
8957                         if test $cf_fix_cppflags = yes ; then
8958                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8959                                 continue
8960                         elif test "${cf_tst_cflags}" = "\"'" ; then
8961                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8962                                 continue
8963                         fi
8964                         ;;
8965                 esac
8966                 case "$CPPFLAGS" in
8967                 (*$cf_add_cflags)
8968                         ;;
8969                 (*)
8970                         case $cf_add_cflags in
8971                         (-D*)
8972                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8973
8974 CPPFLAGS=`echo "$CPPFLAGS" | \
8975         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8976                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8977
8978                                 ;;
8979                         esac
8980                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8981                         ;;
8982                 esac
8983                 ;;
8984         (*)
8985                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8986                 ;;
8987         esac
8988         ;;
8989 (yes)
8990         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8991
8992         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8993
8994         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8995                 && test -z "${cf_tst_cflags}" \
8996                 && cf_fix_cppflags=no
8997         ;;
8998 esac
8999 done
9000
9001 if test -n "$cf_new_cflags" ; then
9002
9003         CFLAGS="$CFLAGS $cf_new_cflags"
9004 fi
9005
9006 if test -n "$cf_new_cppflags" ; then
9007
9008         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9009 fi
9010
9011 if test -n "$cf_new_extra_cppflags" ; then
9012
9013         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9014 fi
9015
9016 fi
9017
9018         fi
9019 fi
9020
9021 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9022
9023 # Work around breakage on OS X
9024
9025 echo "$as_me:9025: checking if SIGWINCH is defined" >&5
9026 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9027 if test "${cf_cv_define_sigwinch+set}" = set; then
9028   echo $ECHO_N "(cached) $ECHO_C" >&6
9029 else
9030
9031         cat >conftest.$ac_ext <<_ACEOF
9032 #line 9032 "configure"
9033 #include "confdefs.h"
9034
9035 #include <sys/types.h>
9036 #include <sys/signal.h>
9037
9038 int
9039 main ()
9040 {
9041 int x = SIGWINCH
9042   ;
9043   return 0;
9044 }
9045 _ACEOF
9046 rm -f conftest.$ac_objext
9047 if { (eval echo "$as_me:9047: \"$ac_compile\"") >&5
9048   (eval $ac_compile) 2>&5
9049   ac_status=$?
9050   echo "$as_me:9050: \$? = $ac_status" >&5
9051   (exit $ac_status); } &&
9052          { ac_try='test -s conftest.$ac_objext'
9053   { (eval echo "$as_me:9053: \"$ac_try\"") >&5
9054   (eval $ac_try) 2>&5
9055   ac_status=$?
9056   echo "$as_me:9056: \$? = $ac_status" >&5
9057   (exit $ac_status); }; }; then
9058   cf_cv_define_sigwinch=yes
9059 else
9060   echo "$as_me: failed program was:" >&5
9061 cat conftest.$ac_ext >&5
9062 cat >conftest.$ac_ext <<_ACEOF
9063 #line 9063 "configure"
9064 #include "confdefs.h"
9065
9066 #undef _XOPEN_SOURCE
9067 #undef _POSIX_SOURCE
9068 #undef _POSIX_C_SOURCE
9069 #include <sys/types.h>
9070 #include <sys/signal.h>
9071
9072 int
9073 main ()
9074 {
9075 int x = SIGWINCH
9076   ;
9077   return 0;
9078 }
9079 _ACEOF
9080 rm -f conftest.$ac_objext
9081 if { (eval echo "$as_me:9081: \"$ac_compile\"") >&5
9082   (eval $ac_compile) 2>&5
9083   ac_status=$?
9084   echo "$as_me:9084: \$? = $ac_status" >&5
9085   (exit $ac_status); } &&
9086          { ac_try='test -s conftest.$ac_objext'
9087   { (eval echo "$as_me:9087: \"$ac_try\"") >&5
9088   (eval $ac_try) 2>&5
9089   ac_status=$?
9090   echo "$as_me:9090: \$? = $ac_status" >&5
9091   (exit $ac_status); }; }; then
9092   cf_cv_define_sigwinch=maybe
9093 else
9094   echo "$as_me: failed program was:" >&5
9095 cat conftest.$ac_ext >&5
9096 cf_cv_define_sigwinch=no
9097 fi
9098 rm -f conftest.$ac_objext conftest.$ac_ext
9099
9100 fi
9101 rm -f conftest.$ac_objext conftest.$ac_ext
9102
9103 fi
9104 echo "$as_me:9104: result: $cf_cv_define_sigwinch" >&5
9105 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9106
9107 if test "$cf_cv_define_sigwinch" = maybe ; then
9108 echo "$as_me:9108: checking for actual SIGWINCH definition" >&5
9109 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9110 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9111   echo $ECHO_N "(cached) $ECHO_C" >&6
9112 else
9113
9114 cf_cv_fixup_sigwinch=unknown
9115 cf_sigwinch=32
9116 while test $cf_sigwinch != 1
9117 do
9118         cat >conftest.$ac_ext <<_ACEOF
9119 #line 9119 "configure"
9120 #include "confdefs.h"
9121
9122 #undef _XOPEN_SOURCE
9123 #undef _POSIX_SOURCE
9124 #undef _POSIX_C_SOURCE
9125 #include <sys/types.h>
9126 #include <sys/signal.h>
9127
9128 int
9129 main ()
9130 {
9131
9132 #if SIGWINCH != $cf_sigwinch
9133 make an error
9134 #endif
9135 int x = SIGWINCH
9136   ;
9137   return 0;
9138 }
9139 _ACEOF
9140 rm -f conftest.$ac_objext
9141 if { (eval echo "$as_me:9141: \"$ac_compile\"") >&5
9142   (eval $ac_compile) 2>&5
9143   ac_status=$?
9144   echo "$as_me:9144: \$? = $ac_status" >&5
9145   (exit $ac_status); } &&
9146          { ac_try='test -s conftest.$ac_objext'
9147   { (eval echo "$as_me:9147: \"$ac_try\"") >&5
9148   (eval $ac_try) 2>&5
9149   ac_status=$?
9150   echo "$as_me:9150: \$? = $ac_status" >&5
9151   (exit $ac_status); }; }; then
9152   cf_cv_fixup_sigwinch=$cf_sigwinch
9153          break
9154 else
9155   echo "$as_me: failed program was:" >&5
9156 cat conftest.$ac_ext >&5
9157 fi
9158 rm -f conftest.$ac_objext conftest.$ac_ext
9159
9160 cf_sigwinch=`expr $cf_sigwinch - 1`
9161 done
9162
9163 fi
9164 echo "$as_me:9164: result: $cf_cv_fixup_sigwinch" >&5
9165 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9166
9167         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9168                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9169         fi
9170 fi
9171
9172 # Checks for CODESET support.
9173
9174 echo "$as_me:9174: checking for nl_langinfo and CODESET" >&5
9175 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9176 if test "${am_cv_langinfo_codeset+set}" = set; then
9177   echo $ECHO_N "(cached) $ECHO_C" >&6
9178 else
9179   cat >conftest.$ac_ext <<_ACEOF
9180 #line 9180 "configure"
9181 #include "confdefs.h"
9182 #include <langinfo.h>
9183 int
9184 main ()
9185 {
9186 char* cs = nl_langinfo(CODESET);
9187   ;
9188   return 0;
9189 }
9190 _ACEOF
9191 rm -f conftest.$ac_objext conftest$ac_exeext
9192 if { (eval echo "$as_me:9192: \"$ac_link\"") >&5
9193   (eval $ac_link) 2>&5
9194   ac_status=$?
9195   echo "$as_me:9195: \$? = $ac_status" >&5
9196   (exit $ac_status); } &&
9197          { ac_try='test -s conftest$ac_exeext'
9198   { (eval echo "$as_me:9198: \"$ac_try\"") >&5
9199   (eval $ac_try) 2>&5
9200   ac_status=$?
9201   echo "$as_me:9201: \$? = $ac_status" >&5
9202   (exit $ac_status); }; }; then
9203   am_cv_langinfo_codeset=yes
9204 else
9205   echo "$as_me: failed program was:" >&5
9206 cat conftest.$ac_ext >&5
9207 am_cv_langinfo_codeset=no
9208 fi
9209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9210
9211 fi
9212 echo "$as_me:9212: result: $am_cv_langinfo_codeset" >&5
9213 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9214         if test $am_cv_langinfo_codeset = yes; then
9215
9216 cat >>confdefs.h <<\EOF
9217 #define HAVE_LANGINFO_CODESET 1
9218 EOF
9219
9220         fi
9221
9222 # use these variables to work around a defect in gcc's fixincludes.
9223 NCURSES_OK_WCHAR_T=
9224 NCURSES_OK_WINT_T=
9225
9226 echo "$as_me:9226: checking if you want wide-character code" >&5
9227 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9228
9229 # Check whether --enable-widec or --disable-widec was given.
9230 if test "${enable_widec+set}" = set; then
9231   enableval="$enable_widec"
9232   with_widec=$enableval
9233 else
9234   with_widec=no
9235 fi;
9236 echo "$as_me:9236: result: $with_widec" >&5
9237 echo "${ECHO_T}$with_widec" >&6
9238 if test "x$with_widec" = xyes ; then
9239         if test "x$disable_lib_suffixes" = xno ; then
9240                 LIB_SUFFIX="w${LIB_SUFFIX}"
9241         fi
9242
9243 cat >>confdefs.h <<\EOF
9244 #define USE_WIDEC_SUPPORT 1
9245 EOF
9246
9247 cat >>confdefs.h <<\EOF
9248 #define NCURSES_WIDECHAR 1
9249 EOF
9250
9251 echo "$as_me:9251: checking if wchar.h can be used as is" >&5
9252 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9253 if test "${cf_cv_wchar_h_okay+set}" = set; then
9254   echo $ECHO_N "(cached) $ECHO_C" >&6
9255 else
9256
9257 cat >conftest.$ac_ext <<_ACEOF
9258 #line 9258 "configure"
9259 #include "confdefs.h"
9260
9261 #include <stdlib.h>
9262 #include <wchar.h>
9263
9264 int
9265 main ()
9266 {
9267
9268         wint_t foo = 0;
9269         int bar = iswpunct(foo)
9270   ;
9271   return 0;
9272 }
9273 _ACEOF
9274 rm -f conftest.$ac_objext
9275 if { (eval echo "$as_me:9275: \"$ac_compile\"") >&5
9276   (eval $ac_compile) 2>&5
9277   ac_status=$?
9278   echo "$as_me:9278: \$? = $ac_status" >&5
9279   (exit $ac_status); } &&
9280          { ac_try='test -s conftest.$ac_objext'
9281   { (eval echo "$as_me:9281: \"$ac_try\"") >&5
9282   (eval $ac_try) 2>&5
9283   ac_status=$?
9284   echo "$as_me:9284: \$? = $ac_status" >&5
9285   (exit $ac_status); }; }; then
9286   cf_cv_wchar_h_okay=yes
9287 else
9288   echo "$as_me: failed program was:" >&5
9289 cat conftest.$ac_ext >&5
9290 cf_cv_wchar_h_okay=no
9291 fi
9292 rm -f conftest.$ac_objext conftest.$ac_ext
9293 fi
9294 echo "$as_me:9294: result: $cf_cv_wchar_h_okay" >&5
9295 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9296
9297 if test $cf_cv_wchar_h_okay = no
9298 then
9299
9300 echo "$as_me:9300: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9301 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9302 cat >conftest.$ac_ext <<_ACEOF
9303 #line 9303 "configure"
9304 #include "confdefs.h"
9305 #include <sys/types.h>
9306
9307 int
9308 main ()
9309 {
9310
9311 #ifndef _XOPEN_SOURCE_EXTENDED
9312 make an error
9313 #endif
9314   ;
9315   return 0;
9316 }
9317 _ACEOF
9318 rm -f conftest.$ac_objext
9319 if { (eval echo "$as_me:9319: \"$ac_compile\"") >&5
9320   (eval $ac_compile) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); } &&
9324          { ac_try='test -s conftest.$ac_objext'
9325   { (eval echo "$as_me:9325: \"$ac_try\"") >&5
9326   (eval $ac_try) 2>&5
9327   ac_status=$?
9328   echo "$as_me:9328: \$? = $ac_status" >&5
9329   (exit $ac_status); }; }; then
9330   cf_result=no
9331 else
9332   echo "$as_me: failed program was:" >&5
9333 cat conftest.$ac_ext >&5
9334 cf_result=yes
9335 fi
9336 rm -f conftest.$ac_objext conftest.$ac_ext
9337 echo "$as_me:9337: result: $cf_result" >&5
9338 echo "${ECHO_T}$cf_result" >&6
9339
9340 if test "$cf_result" = yes ; then
9341         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9342 elif test "x" != "x" ; then
9343         echo "$as_me:9343: checking checking for compatible value versus " >&5
9344 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9345         cat >conftest.$ac_ext <<_ACEOF
9346 #line 9346 "configure"
9347 #include "confdefs.h"
9348 #include <sys/types.h>
9349
9350 int
9351 main ()
9352 {
9353
9354 #if _XOPEN_SOURCE_EXTENDED- < 0
9355 make an error
9356 #endif
9357   ;
9358   return 0;
9359 }
9360 _ACEOF
9361 rm -f conftest.$ac_objext
9362 if { (eval echo "$as_me:9362: \"$ac_compile\"") >&5
9363   (eval $ac_compile) 2>&5
9364   ac_status=$?
9365   echo "$as_me:9365: \$? = $ac_status" >&5
9366   (exit $ac_status); } &&
9367          { ac_try='test -s conftest.$ac_objext'
9368   { (eval echo "$as_me:9368: \"$ac_try\"") >&5
9369   (eval $ac_try) 2>&5
9370   ac_status=$?
9371   echo "$as_me:9371: \$? = $ac_status" >&5
9372   (exit $ac_status); }; }; then
9373   cf_result=yes
9374 else
9375   echo "$as_me: failed program was:" >&5
9376 cat conftest.$ac_ext >&5
9377 cf_result=no
9378 fi
9379 rm -f conftest.$ac_objext conftest.$ac_ext
9380         echo "$as_me:9380: result: $cf_result" >&5
9381 echo "${ECHO_T}$cf_result" >&6
9382         if test "$cf_result" = no ; then
9383                 # perhaps we can override it - try...
9384                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9385         fi
9386 fi
9387
9388 fi
9389
9390         # with_overwrite=no
9391         NCURSES_CH_T=cchar_t
9392
9393 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9394 do
9395 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9396 echo "$as_me:9396: checking for $ac_func" >&5
9397 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9398 if eval "test \"\${$as_ac_var+set}\" = set"; then
9399   echo $ECHO_N "(cached) $ECHO_C" >&6
9400 else
9401   cat >conftest.$ac_ext <<_ACEOF
9402 #line 9402 "configure"
9403 #include "confdefs.h"
9404 /* System header to define __stub macros and hopefully few prototypes,
9405     which can conflict with char $ac_func (); below.  */
9406 #include <assert.h>
9407 /* Override any gcc2 internal prototype to avoid an error.  */
9408 #ifdef __cplusplus
9409 extern "C"
9410 #endif
9411 /* We use char because int might match the return type of a gcc2
9412    builtin and then its argument prototype would still apply.  */
9413 char $ac_func ();
9414 char (*f) ();
9415
9416 int
9417 main ()
9418 {
9419 /* The GNU C library defines this for functions which it implements
9420     to always fail with ENOSYS.  Some functions are actually named
9421     something starting with __ and the normal name is an alias.  */
9422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9423 choke me
9424 #else
9425 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9426 #endif
9427
9428   ;
9429   return 0;
9430 }
9431 _ACEOF
9432 rm -f conftest.$ac_objext conftest$ac_exeext
9433 if { (eval echo "$as_me:9433: \"$ac_link\"") >&5
9434   (eval $ac_link) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); } &&
9438          { ac_try='test -s conftest$ac_exeext'
9439   { (eval echo "$as_me:9439: \"$ac_try\"") >&5
9440   (eval $ac_try) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); }; }; then
9444   eval "$as_ac_var=yes"
9445 else
9446   echo "$as_me: failed program was:" >&5
9447 cat conftest.$ac_ext >&5
9448 eval "$as_ac_var=no"
9449 fi
9450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9451 fi
9452 echo "$as_me:9452: result: `eval echo '${'$as_ac_var'}'`" >&5
9453 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9454 if test `eval echo '${'$as_ac_var'}'` = yes; then
9455   cat >>confdefs.h <<EOF
9456 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9457 EOF
9458
9459 fi
9460 done
9461
9462         if test "x$ac_cv_func_putwc" != xyes ; then
9463
9464 echo "$as_me:9464: checking for multibyte character support" >&5
9465 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9466 if test "${cf_cv_utf8_lib+set}" = set; then
9467   echo $ECHO_N "(cached) $ECHO_C" >&6
9468 else
9469
9470         cf_save_LIBS="$LIBS"
9471         cat >conftest.$ac_ext <<_ACEOF
9472 #line 9472 "configure"
9473 #include "confdefs.h"
9474
9475 #include <stdlib.h>
9476 int
9477 main ()
9478 {
9479 putwc(0,0);
9480   ;
9481   return 0;
9482 }
9483 _ACEOF
9484 rm -f conftest.$ac_objext conftest$ac_exeext
9485 if { (eval echo "$as_me:9485: \"$ac_link\"") >&5
9486   (eval $ac_link) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); } &&
9490          { ac_try='test -s conftest$ac_exeext'
9491   { (eval echo "$as_me:9491: \"$ac_try\"") >&5
9492   (eval $ac_try) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); }; }; then
9496   cf_cv_utf8_lib=yes
9497 else
9498   echo "$as_me: failed program was:" >&5
9499 cat conftest.$ac_ext >&5
9500
9501 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9502 # will be set on completion of the AC_TRY_LINK below.
9503 cf_cv_header_path_utf8=
9504 cf_cv_library_path_utf8=
9505
9506 echo "${as_me:-configure}:9506: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9507
9508 cf_save_LIBS="$LIBS"
9509
9510 cat >conftest.$ac_ext <<_ACEOF
9511 #line 9511 "configure"
9512 #include "confdefs.h"
9513
9514 #include <libutf8.h>
9515 int
9516 main ()
9517 {
9518 putwc(0,0);
9519   ;
9520   return 0;
9521 }
9522 _ACEOF
9523 rm -f conftest.$ac_objext conftest$ac_exeext
9524 if { (eval echo "$as_me:9524: \"$ac_link\"") >&5
9525   (eval $ac_link) 2>&5
9526   ac_status=$?
9527   echo "$as_me:9527: \$? = $ac_status" >&5
9528   (exit $ac_status); } &&
9529          { ac_try='test -s conftest$ac_exeext'
9530   { (eval echo "$as_me:9530: \"$ac_try\"") >&5
9531   (eval $ac_try) 2>&5
9532   ac_status=$?
9533   echo "$as_me:9533: \$? = $ac_status" >&5
9534   (exit $ac_status); }; }; then
9535
9536         cf_cv_find_linkage_utf8=yes
9537         cf_cv_header_path_utf8=/usr/include
9538         cf_cv_library_path_utf8=/usr/lib
9539
9540 else
9541   echo "$as_me: failed program was:" >&5
9542 cat conftest.$ac_ext >&5
9543
9544 LIBS="-lutf8  $cf_save_LIBS"
9545
9546 cat >conftest.$ac_ext <<_ACEOF
9547 #line 9547 "configure"
9548 #include "confdefs.h"
9549
9550 #include <libutf8.h>
9551 int
9552 main ()
9553 {
9554 putwc(0,0);
9555   ;
9556   return 0;
9557 }
9558 _ACEOF
9559 rm -f conftest.$ac_objext conftest$ac_exeext
9560 if { (eval echo "$as_me:9560: \"$ac_link\"") >&5
9561   (eval $ac_link) 2>&5
9562   ac_status=$?
9563   echo "$as_me:9563: \$? = $ac_status" >&5
9564   (exit $ac_status); } &&
9565          { ac_try='test -s conftest$ac_exeext'
9566   { (eval echo "$as_me:9566: \"$ac_try\"") >&5
9567   (eval $ac_try) 2>&5
9568   ac_status=$?
9569   echo "$as_me:9569: \$? = $ac_status" >&5
9570   (exit $ac_status); }; }; then
9571
9572         cf_cv_find_linkage_utf8=yes
9573         cf_cv_header_path_utf8=/usr/include
9574         cf_cv_library_path_utf8=/usr/lib
9575         cf_cv_library_file_utf8="-lutf8"
9576
9577 else
9578   echo "$as_me: failed program was:" >&5
9579 cat conftest.$ac_ext >&5
9580
9581         cf_cv_find_linkage_utf8=no
9582         LIBS="$cf_save_LIBS"
9583
9584         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9585
9586 echo "${as_me:-configure}:9586: testing find linkage for utf8 library ..." 1>&5
9587
9588 echo "${as_me:-configure}:9588: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9589
9590         cf_save_CPPFLAGS="$CPPFLAGS"
9591         cf_test_CPPFLAGS="$CPPFLAGS"
9592
9593 cf_search=
9594
9595 # collect the current set of include-directories from compiler flags
9596 cf_header_path_list=""
9597 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9598         for cf_header_path in $CPPFLAGS $CFLAGS
9599         do
9600                 case $cf_header_path in
9601                 (-I*)
9602                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9603
9604 test "x$cf_header_path" != "xNONE" && \
9605 test -d "$cf_header_path" && \
9606  {
9607         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9608         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9609         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9610         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9611         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9612         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9613 }
9614
9615                         cf_header_path_list="$cf_header_path_list $cf_search"
9616                         ;;
9617                 esac
9618         done
9619 fi
9620
9621 # add the variations for the package we are looking for
9622
9623 cf_search=
9624
9625 test "x$prefix" != "xNONE" && \
9626 test -d "$prefix" && \
9627  {
9628         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9629         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9630         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9631         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9632         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9633         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9634 }
9635
9636 for cf_subdir_prefix in \
9637         /usr \
9638         /usr/local \
9639         /usr/pkg \
9640         /opt \
9641         /opt/local \
9642         $HOME
9643 do
9644
9645 test "x$cf_subdir_prefix" != "x$prefix" && \
9646 test -d "$cf_subdir_prefix" && \
9647 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9648         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9649         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9650         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9651         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9652         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9653         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9654 }
9655
9656 done
9657
9658 test "$includedir" != NONE && \
9659 test "$includedir" != "/usr/include" && \
9660 test -d "$includedir" && {
9661         test -d $includedir &&    cf_search="$cf_search $includedir"
9662         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9663 }
9664
9665 test "$oldincludedir" != NONE && \
9666 test "$oldincludedir" != "/usr/include" && \
9667 test -d "$oldincludedir" && {
9668         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9669         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9670 }
9671
9672 cf_search="$cf_search $cf_header_path_list"
9673
9674         for cf_cv_header_path_utf8 in $cf_search
9675         do
9676                 if test -d $cf_cv_header_path_utf8 ; then
9677                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9678
9679 echo "${as_me:-configure}:9679: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9680
9681                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9682                         cat >conftest.$ac_ext <<_ACEOF
9683 #line 9683 "configure"
9684 #include "confdefs.h"
9685
9686 #include <libutf8.h>
9687 int
9688 main ()
9689 {
9690 putwc(0,0);
9691   ;
9692   return 0;
9693 }
9694 _ACEOF
9695 rm -f conftest.$ac_objext
9696 if { (eval echo "$as_me:9696: \"$ac_compile\"") >&5
9697   (eval $ac_compile) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -s conftest.$ac_objext'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); }; }; then
9707
9708                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9709
9710 echo "${as_me:-configure}:9710: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9711
9712                                 cf_cv_find_linkage_utf8=maybe
9713                                 cf_test_CPPFLAGS="$CPPFLAGS"
9714                                 break
9715 else
9716   echo "$as_me: failed program was:" >&5
9717 cat conftest.$ac_ext >&5
9718
9719                                 CPPFLAGS="$cf_save_CPPFLAGS"
9720
9721 fi
9722 rm -f conftest.$ac_objext conftest.$ac_ext
9723                 fi
9724         done
9725
9726         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9727
9728 echo "${as_me:-configure}:9728: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9729
9730                 cf_save_LIBS="$LIBS"
9731                 cf_save_LDFLAGS="$LDFLAGS"
9732
9733                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9734
9735 cf_search=
9736 cf_library_path_list=""
9737 if test -n "${LDFLAGS}${LIBS}" ; then
9738         for cf_library_path in $LDFLAGS $LIBS
9739         do
9740                 case $cf_library_path in
9741                 (-L*)
9742                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9743
9744 test "x$cf_library_path" != "xNONE" && \
9745 test -d "$cf_library_path" && \
9746  {
9747         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9748         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9749         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9750         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9751         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9752         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9753 }
9754
9755                         cf_library_path_list="$cf_library_path_list $cf_search"
9756                         ;;
9757                 esac
9758         done
9759 fi
9760
9761 cf_search=
9762
9763 test "x$prefix" != "xNONE" && \
9764 test -d "$prefix" && \
9765  {
9766         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9767         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9768         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9769         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9770         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9771         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9772 }
9773
9774 for cf_subdir_prefix in \
9775         /usr \
9776         /usr/local \
9777         /usr/pkg \
9778         /opt \
9779         /opt/local \
9780         $HOME
9781 do
9782
9783 test "x$cf_subdir_prefix" != "x$prefix" && \
9784 test -d "$cf_subdir_prefix" && \
9785 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9786         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9787         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9788         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9789         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9790         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9791         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9792 }
9793
9794 done
9795
9796 cf_search="$cf_library_path_list $cf_search"
9797
9798                         for cf_cv_library_path_utf8 in $cf_search
9799                         do
9800                                 if test -d $cf_cv_library_path_utf8 ; then
9801                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9802
9803 echo "${as_me:-configure}:9803: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9804
9805                                         CPPFLAGS="$cf_test_CPPFLAGS"
9806                                         LIBS="-lutf8  $cf_save_LIBS"
9807                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9808                                         cat >conftest.$ac_ext <<_ACEOF
9809 #line 9809 "configure"
9810 #include "confdefs.h"
9811
9812 #include <libutf8.h>
9813 int
9814 main ()
9815 {
9816 putwc(0,0);
9817   ;
9818   return 0;
9819 }
9820 _ACEOF
9821 rm -f conftest.$ac_objext conftest$ac_exeext
9822 if { (eval echo "$as_me:9822: \"$ac_link\"") >&5
9823   (eval $ac_link) 2>&5
9824   ac_status=$?
9825   echo "$as_me:9825: \$? = $ac_status" >&5
9826   (exit $ac_status); } &&
9827          { ac_try='test -s conftest$ac_exeext'
9828   { (eval echo "$as_me:9828: \"$ac_try\"") >&5
9829   (eval $ac_try) 2>&5
9830   ac_status=$?
9831   echo "$as_me:9831: \$? = $ac_status" >&5
9832   (exit $ac_status); }; }; then
9833
9834                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9835
9836 echo "${as_me:-configure}:9836: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9837
9838                                         cf_cv_find_linkage_utf8=yes
9839                                         cf_cv_library_file_utf8="-lutf8"
9840                                         break
9841 else
9842   echo "$as_me: failed program was:" >&5
9843 cat conftest.$ac_ext >&5
9844
9845                                         CPPFLAGS="$cf_save_CPPFLAGS"
9846                                         LIBS="$cf_save_LIBS"
9847                                         LDFLAGS="$cf_save_LDFLAGS"
9848
9849 fi
9850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9851                                 fi
9852                         done
9853                         CPPFLAGS="$cf_save_CPPFLAGS"
9854                         LDFLAGS="$cf_save_LDFLAGS"
9855                 fi
9856
9857         else
9858                 cf_cv_find_linkage_utf8=no
9859         fi
9860
9861 fi
9862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9863
9864 fi
9865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9866
9867 LIBS="$cf_save_LIBS"
9868
9869 if test "$cf_cv_find_linkage_utf8" = yes ; then
9870 cf_cv_utf8_lib=add-on
9871 else
9872 cf_cv_utf8_lib=no
9873 fi
9874
9875 fi
9876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9877 fi
9878 echo "$as_me:9878: result: $cf_cv_utf8_lib" >&5
9879 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9880
9881 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9882 # ncurses/ncursesw:
9883 if test "$cf_cv_utf8_lib" = "add-on" ; then
9884
9885 cat >>confdefs.h <<\EOF
9886 #define HAVE_LIBUTF8_H 1
9887 EOF
9888
9889 if test -n "$cf_cv_header_path_utf8" ; then
9890   for cf_add_incdir in $cf_cv_header_path_utf8
9891   do
9892         while test $cf_add_incdir != /usr/include
9893         do
9894           if test -d $cf_add_incdir
9895           then
9896                 cf_have_incdir=no
9897                 if test -n "$CFLAGS$CPPFLAGS" ; then
9898                   # a loop is needed to ensure we can add subdirs of existing dirs
9899                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9900                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9901                           cf_have_incdir=yes; break
9902                         fi
9903                   done
9904                 fi
9905
9906                 if test "$cf_have_incdir" = no ; then
9907                   if test "$cf_add_incdir" = /usr/local/include ; then
9908                         if test "$GCC" = yes
9909                         then
9910                           cf_save_CPPFLAGS=$CPPFLAGS
9911                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9912                           cat >conftest.$ac_ext <<_ACEOF
9913 #line 9913 "configure"
9914 #include "confdefs.h"
9915 #include <stdio.h>
9916 int
9917 main ()
9918 {
9919 printf("Hello")
9920   ;
9921   return 0;
9922 }
9923 _ACEOF
9924 rm -f conftest.$ac_objext
9925 if { (eval echo "$as_me:9925: \"$ac_compile\"") >&5
9926   (eval $ac_compile) 2>&5
9927   ac_status=$?
9928   echo "$as_me:9928: \$? = $ac_status" >&5
9929   (exit $ac_status); } &&
9930          { ac_try='test -s conftest.$ac_objext'
9931   { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932   (eval $ac_try) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); }; }; then
9936   :
9937 else
9938   echo "$as_me: failed program was:" >&5
9939 cat conftest.$ac_ext >&5
9940 cf_have_incdir=yes
9941 fi
9942 rm -f conftest.$ac_objext conftest.$ac_ext
9943                           CPPFLAGS=$cf_save_CPPFLAGS
9944                         fi
9945                   fi
9946                 fi
9947
9948                 if test "$cf_have_incdir" = no ; then
9949                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9950
9951 echo "${as_me:-configure}:9951: testing adding $cf_add_incdir to include-path ..." 1>&5
9952
9953                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9954
9955                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9956                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9957                   cf_add_incdir="$cf_top_incdir"
9958                 else
9959                   break
9960                 fi
9961           else
9962                 break
9963           fi
9964         done
9965   done
9966 fi
9967
9968 if test -n "$cf_cv_library_path_utf8" ; then
9969         for cf_add_libdir in $cf_cv_library_path_utf8
9970         do
9971                 if test $cf_add_libdir = /usr/lib ; then
9972                         :
9973                 elif test -d $cf_add_libdir
9974                 then
9975                         cf_have_libdir=no
9976                         if test -n "$LDFLAGS$LIBS" ; then
9977                                 # a loop is needed to ensure we can add subdirs of existing dirs
9978                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9979                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9980                                                 cf_have_libdir=yes; break
9981                                         fi
9982                                 done
9983                         fi
9984                         if test "$cf_have_libdir" = no ; then
9985                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9986
9987 echo "${as_me:-configure}:9987: testing adding $cf_add_libdir to library-path ..." 1>&5
9988
9989                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9990                         fi
9991                 fi
9992         done
9993 fi
9994
9995 cf_add_libs="$cf_cv_library_file_utf8"
9996 # Filter out duplicates - this happens with badly-designed ".pc" files...
9997 for cf_add_1lib in $LIBS
9998 do
9999         for cf_add_2lib in $cf_add_libs
10000         do
10001                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10002                 then
10003                         cf_add_1lib=
10004                         break
10005                 fi
10006         done
10007         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10008 done
10009 LIBS="$cf_add_libs"
10010
10011 fi
10012
10013                 if test "$cf_cv_utf8_lib" != no ; then
10014                         NCURSES_LIBUTF8=1
10015                 fi
10016         fi
10017
10018 # This is needed on Tru64 5.0 to declare mbstate_t
10019 echo "$as_me:10019: checking if we must include wchar.h to declare mbstate_t" >&5
10020 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10021 if test "${cf_cv_mbstate_t+set}" = set; then
10022   echo $ECHO_N "(cached) $ECHO_C" >&6
10023 else
10024
10025 cat >conftest.$ac_ext <<_ACEOF
10026 #line 10026 "configure"
10027 #include "confdefs.h"
10028
10029 #include <stdlib.h>
10030 #include <stdarg.h>
10031 #include <stdio.h>
10032 #ifdef HAVE_LIBUTF8_H
10033 #include <libutf8.h>
10034 #endif
10035 int
10036 main ()
10037 {
10038 mbstate_t state
10039   ;
10040   return 0;
10041 }
10042 _ACEOF
10043 rm -f conftest.$ac_objext
10044 if { (eval echo "$as_me:10044: \"$ac_compile\"") >&5
10045   (eval $ac_compile) 2>&5
10046   ac_status=$?
10047   echo "$as_me:10047: \$? = $ac_status" >&5
10048   (exit $ac_status); } &&
10049          { ac_try='test -s conftest.$ac_objext'
10050   { (eval echo "$as_me:10050: \"$ac_try\"") >&5
10051   (eval $ac_try) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); }; }; then
10055   cf_cv_mbstate_t=no
10056 else
10057   echo "$as_me: failed program was:" >&5
10058 cat conftest.$ac_ext >&5
10059 cat >conftest.$ac_ext <<_ACEOF
10060 #line 10060 "configure"
10061 #include "confdefs.h"
10062
10063 #include <stdlib.h>
10064 #include <stdarg.h>
10065 #include <stdio.h>
10066 #include <wchar.h>
10067 #ifdef HAVE_LIBUTF8_H
10068 #include <libutf8.h>
10069 #endif
10070 int
10071 main ()
10072 {
10073 mbstate_t value
10074   ;
10075   return 0;
10076 }
10077 _ACEOF
10078 rm -f conftest.$ac_objext
10079 if { (eval echo "$as_me:10079: \"$ac_compile\"") >&5
10080   (eval $ac_compile) 2>&5
10081   ac_status=$?
10082   echo "$as_me:10082: \$? = $ac_status" >&5
10083   (exit $ac_status); } &&
10084          { ac_try='test -s conftest.$ac_objext'
10085   { (eval echo "$as_me:10085: \"$ac_try\"") >&5
10086   (eval $ac_try) 2>&5
10087   ac_status=$?
10088   echo "$as_me:10088: \$? = $ac_status" >&5
10089   (exit $ac_status); }; }; then
10090   cf_cv_mbstate_t=yes
10091 else
10092   echo "$as_me: failed program was:" >&5
10093 cat conftest.$ac_ext >&5
10094 cf_cv_mbstate_t=unknown
10095 fi
10096 rm -f conftest.$ac_objext conftest.$ac_ext
10097 fi
10098 rm -f conftest.$ac_objext conftest.$ac_ext
10099 fi
10100 echo "$as_me:10100: result: $cf_cv_mbstate_t" >&5
10101 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10102
10103 if test "$cf_cv_mbstate_t" = yes ; then
10104
10105 cat >>confdefs.h <<\EOF
10106 #define NEED_WCHAR_H 1
10107 EOF
10108
10109         NEED_WCHAR_H=1
10110 fi
10111
10112 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10113 if test "$cf_cv_mbstate_t" = unknown ; then
10114         NCURSES_MBSTATE_T=1
10115 fi
10116
10117 # This is needed on Tru64 5.0 to declare wchar_t
10118 echo "$as_me:10118: checking if we must include wchar.h to declare wchar_t" >&5
10119 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10120 if test "${cf_cv_wchar_t+set}" = set; then
10121   echo $ECHO_N "(cached) $ECHO_C" >&6
10122 else
10123
10124 cat >conftest.$ac_ext <<_ACEOF
10125 #line 10125 "configure"
10126 #include "confdefs.h"
10127
10128 #include <stdlib.h>
10129 #include <stdarg.h>
10130 #include <stdio.h>
10131 #ifdef HAVE_LIBUTF8_H
10132 #include <libutf8.h>
10133 #endif
10134 int
10135 main ()
10136 {
10137 wchar_t state
10138   ;
10139   return 0;
10140 }
10141 _ACEOF
10142 rm -f conftest.$ac_objext
10143 if { (eval echo "$as_me:10143: \"$ac_compile\"") >&5
10144   (eval $ac_compile) 2>&5
10145   ac_status=$?
10146   echo "$as_me:10146: \$? = $ac_status" >&5
10147   (exit $ac_status); } &&
10148          { ac_try='test -s conftest.$ac_objext'
10149   { (eval echo "$as_me:10149: \"$ac_try\"") >&5
10150   (eval $ac_try) 2>&5
10151   ac_status=$?
10152   echo "$as_me:10152: \$? = $ac_status" >&5
10153   (exit $ac_status); }; }; then
10154   cf_cv_wchar_t=no
10155 else
10156   echo "$as_me: failed program was:" >&5
10157 cat conftest.$ac_ext >&5
10158 cat >conftest.$ac_ext <<_ACEOF
10159 #line 10159 "configure"
10160 #include "confdefs.h"
10161
10162 #include <stdlib.h>
10163 #include <stdarg.h>
10164 #include <stdio.h>
10165 #include <wchar.h>
10166 #ifdef HAVE_LIBUTF8_H
10167 #include <libutf8.h>
10168 #endif
10169 int
10170 main ()
10171 {
10172 wchar_t value
10173   ;
10174   return 0;
10175 }
10176 _ACEOF
10177 rm -f conftest.$ac_objext
10178 if { (eval echo "$as_me:10178: \"$ac_compile\"") >&5
10179   (eval $ac_compile) 2>&5
10180   ac_status=$?
10181   echo "$as_me:10181: \$? = $ac_status" >&5
10182   (exit $ac_status); } &&
10183          { ac_try='test -s conftest.$ac_objext'
10184   { (eval echo "$as_me:10184: \"$ac_try\"") >&5
10185   (eval $ac_try) 2>&5
10186   ac_status=$?
10187   echo "$as_me:10187: \$? = $ac_status" >&5
10188   (exit $ac_status); }; }; then
10189   cf_cv_wchar_t=yes
10190 else
10191   echo "$as_me: failed program was:" >&5
10192 cat conftest.$ac_ext >&5
10193 cf_cv_wchar_t=unknown
10194 fi
10195 rm -f conftest.$ac_objext conftest.$ac_ext
10196 fi
10197 rm -f conftest.$ac_objext conftest.$ac_ext
10198 fi
10199 echo "$as_me:10199: result: $cf_cv_wchar_t" >&5
10200 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10201
10202 if test "$cf_cv_wchar_t" = yes ; then
10203
10204 cat >>confdefs.h <<\EOF
10205 #define NEED_WCHAR_H 1
10206 EOF
10207
10208         NEED_WCHAR_H=1
10209 fi
10210
10211 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10212 if test "$cf_cv_wchar_t" = unknown ; then
10213         NCURSES_WCHAR_T=1
10214 fi
10215
10216 # if we find wchar_t in either place, use substitution to provide a fallback.
10217 if test "$cf_cv_wchar_t" != unknown ; then
10218         NCURSES_OK_WCHAR_T=1
10219 fi
10220
10221 # This is needed on Tru64 5.0 to declare wint_t
10222 echo "$as_me:10222: checking if we must include wchar.h to declare wint_t" >&5
10223 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10224 if test "${cf_cv_wint_t+set}" = set; then
10225   echo $ECHO_N "(cached) $ECHO_C" >&6
10226 else
10227
10228 cat >conftest.$ac_ext <<_ACEOF
10229 #line 10229 "configure"
10230 #include "confdefs.h"
10231
10232 #include <stdlib.h>
10233 #include <stdarg.h>
10234 #include <stdio.h>
10235 #ifdef HAVE_LIBUTF8_H
10236 #include <libutf8.h>
10237 #endif
10238 int
10239 main ()
10240 {
10241 wint_t state
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 rm -f conftest.$ac_objext
10247 if { (eval echo "$as_me:10247: \"$ac_compile\"") >&5
10248   (eval $ac_compile) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit $ac_status); } &&
10252          { ac_try='test -s conftest.$ac_objext'
10253   { (eval echo "$as_me:10253: \"$ac_try\"") >&5
10254   (eval $ac_try) 2>&5
10255   ac_status=$?
10256   echo "$as_me:10256: \$? = $ac_status" >&5
10257   (exit $ac_status); }; }; then
10258   cf_cv_wint_t=no
10259 else
10260   echo "$as_me: failed program was:" >&5
10261 cat conftest.$ac_ext >&5
10262 cat >conftest.$ac_ext <<_ACEOF
10263 #line 10263 "configure"
10264 #include "confdefs.h"
10265
10266 #include <stdlib.h>
10267 #include <stdarg.h>
10268 #include <stdio.h>
10269 #include <wchar.h>
10270 #ifdef HAVE_LIBUTF8_H
10271 #include <libutf8.h>
10272 #endif
10273 int
10274 main ()
10275 {
10276 wint_t value
10277   ;
10278   return 0;
10279 }
10280 _ACEOF
10281 rm -f conftest.$ac_objext
10282 if { (eval echo "$as_me:10282: \"$ac_compile\"") >&5
10283   (eval $ac_compile) 2>&5
10284   ac_status=$?
10285   echo "$as_me:10285: \$? = $ac_status" >&5
10286   (exit $ac_status); } &&
10287          { ac_try='test -s conftest.$ac_objext'
10288   { (eval echo "$as_me:10288: \"$ac_try\"") >&5
10289   (eval $ac_try) 2>&5
10290   ac_status=$?
10291   echo "$as_me:10291: \$? = $ac_status" >&5
10292   (exit $ac_status); }; }; then
10293   cf_cv_wint_t=yes
10294 else
10295   echo "$as_me: failed program was:" >&5
10296 cat conftest.$ac_ext >&5
10297 cf_cv_wint_t=unknown
10298 fi
10299 rm -f conftest.$ac_objext conftest.$ac_ext
10300 fi
10301 rm -f conftest.$ac_objext conftest.$ac_ext
10302 fi
10303 echo "$as_me:10303: result: $cf_cv_wint_t" >&5
10304 echo "${ECHO_T}$cf_cv_wint_t" >&6
10305
10306 if test "$cf_cv_wint_t" = yes ; then
10307
10308 cat >>confdefs.h <<\EOF
10309 #define NEED_WCHAR_H 1
10310 EOF
10311
10312         NEED_WCHAR_H=1
10313 fi
10314
10315 # if we do not find wint_t in either place, use substitution to provide a fallback.
10316 if test "$cf_cv_wint_t" = unknown ; then
10317         NCURSES_WINT_T=1
10318 fi
10319
10320 # if we find wint_t in either place, use substitution to provide a fallback.
10321 if test "$cf_cv_wint_t" != unknown ; then
10322         NCURSES_OK_WINT_T=1
10323 fi
10324
10325         if test "$NCURSES_MBSTATE_T" != 0; then
10326
10327 cat >>confdefs.h <<\EOF
10328 #define NEED_MBSTATE_T_DEF 1
10329 EOF
10330
10331         fi
10332 fi
10333
10334 ###   use option --disable-lp64 to allow long chtype
10335 echo "$as_me:10335: checking whether to enable _LP64 definition in curses.h" >&5
10336 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10337
10338 # Check whether --enable-lp64 or --disable-lp64 was given.
10339 if test "${enable_lp64+set}" = set; then
10340   enableval="$enable_lp64"
10341   with_lp64=$enableval
10342 else
10343   with_lp64=$cf_dft_with_lp64
10344 fi;
10345 echo "$as_me:10345: result: $with_lp64" >&5
10346 echo "${ECHO_T}$with_lp64" >&6
10347
10348 if test "x$with_lp64" = xyes ; then
10349         cf_cv_enable_lp64=1
10350 else
10351         cf_cv_enable_lp64=0
10352 fi
10353
10354 # Check whether --enable-largefile or --disable-largefile was given.
10355 if test "${enable_largefile+set}" = set; then
10356   enableval="$enable_largefile"
10357
10358 fi;
10359 if test "$enable_largefile" != no; then
10360
10361   echo "$as_me:10361: checking for special C compiler options needed for large files" >&5
10362 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10363 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10364   echo $ECHO_N "(cached) $ECHO_C" >&6
10365 else
10366   ac_cv_sys_largefile_CC=no
10367      if test "$GCC" != yes; then
10368        ac_save_CC=$CC
10369        while :; do
10370          # IRIX 6.2 and later do not support large files by default,
10371          # so use the C compiler's -n32 option if that helps.
10372          cat >conftest.$ac_ext <<_ACEOF
10373 #line 10373 "configure"
10374 #include "confdefs.h"
10375 #include <sys/types.h>
10376  /* Check that off_t can represent 2**63 - 1 correctly.
10377     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10378     since some C++ compilers masquerading as C compilers
10379     incorrectly reject 9223372036854775807.  */
10380 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10381   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10382                        && LARGE_OFF_T % 2147483647 == 1)
10383                       ? 1 : -1];
10384 int
10385 main ()
10386 {
10387
10388   ;
10389   return 0;
10390 }
10391 _ACEOF
10392          rm -f conftest.$ac_objext
10393 if { (eval echo "$as_me:10393: \"$ac_compile\"") >&5
10394   (eval $ac_compile) 2>&5
10395   ac_status=$?
10396   echo "$as_me:10396: \$? = $ac_status" >&5
10397   (exit $ac_status); } &&
10398          { ac_try='test -s conftest.$ac_objext'
10399   { (eval echo "$as_me:10399: \"$ac_try\"") >&5
10400   (eval $ac_try) 2>&5
10401   ac_status=$?
10402   echo "$as_me:10402: \$? = $ac_status" >&5
10403   (exit $ac_status); }; }; then
10404   break
10405 else
10406   echo "$as_me: failed program was:" >&5
10407 cat conftest.$ac_ext >&5
10408 fi
10409 rm -f conftest.$ac_objext
10410          CC="$CC -n32"
10411          rm -f conftest.$ac_objext
10412 if { (eval echo "$as_me:10412: \"$ac_compile\"") >&5
10413   (eval $ac_compile) 2>&5
10414   ac_status=$?
10415   echo "$as_me:10415: \$? = $ac_status" >&5
10416   (exit $ac_status); } &&
10417          { ac_try='test -s conftest.$ac_objext'
10418   { (eval echo "$as_me:10418: \"$ac_try\"") >&5
10419   (eval $ac_try) 2>&5
10420   ac_status=$?
10421   echo "$as_me:10421: \$? = $ac_status" >&5
10422   (exit $ac_status); }; }; then
10423   ac_cv_sys_largefile_CC=' -n32'; break
10424 else
10425   echo "$as_me: failed program was:" >&5
10426 cat conftest.$ac_ext >&5
10427 fi
10428 rm -f conftest.$ac_objext
10429          break
10430        done
10431        CC=$ac_save_CC
10432        rm -f conftest.$ac_ext
10433     fi
10434 fi
10435 echo "$as_me:10435: result: $ac_cv_sys_largefile_CC" >&5
10436 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10437   if test "$ac_cv_sys_largefile_CC" != no; then
10438     CC=$CC$ac_cv_sys_largefile_CC
10439   fi
10440
10441   echo "$as_me:10441: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10442 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10443 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10444   echo $ECHO_N "(cached) $ECHO_C" >&6
10445 else
10446   while :; do
10447   ac_cv_sys_file_offset_bits=no
10448   cat >conftest.$ac_ext <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451 #include <sys/types.h>
10452  /* Check that off_t can represent 2**63 - 1 correctly.
10453     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10454     since some C++ compilers masquerading as C compilers
10455     incorrectly reject 9223372036854775807.  */
10456 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10457   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10458                        && LARGE_OFF_T % 2147483647 == 1)
10459                       ? 1 : -1];
10460 int
10461 main ()
10462 {
10463
10464   ;
10465   return 0;
10466 }
10467 _ACEOF
10468 rm -f conftest.$ac_objext
10469 if { (eval echo "$as_me:10469: \"$ac_compile\"") >&5
10470   (eval $ac_compile) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); } &&
10474          { ac_try='test -s conftest.$ac_objext'
10475   { (eval echo "$as_me:10475: \"$ac_try\"") >&5
10476   (eval $ac_try) 2>&5
10477   ac_status=$?
10478   echo "$as_me:10478: \$? = $ac_status" >&5
10479   (exit $ac_status); }; }; then
10480   break
10481 else
10482   echo "$as_me: failed program was:" >&5
10483 cat conftest.$ac_ext >&5
10484 fi
10485 rm -f conftest.$ac_objext conftest.$ac_ext
10486   cat >conftest.$ac_ext <<_ACEOF
10487 #line 10487 "configure"
10488 #include "confdefs.h"
10489 #define _FILE_OFFSET_BITS 64
10490 #include <sys/types.h>
10491  /* Check that off_t can represent 2**63 - 1 correctly.
10492     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10493     since some C++ compilers masquerading as C compilers
10494     incorrectly reject 9223372036854775807.  */
10495 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10496   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10497                        && LARGE_OFF_T % 2147483647 == 1)
10498                       ? 1 : -1];
10499 int
10500 main ()
10501 {
10502
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 rm -f conftest.$ac_objext
10508 if { (eval echo "$as_me:10508: \"$ac_compile\"") >&5
10509   (eval $ac_compile) 2>&5
10510   ac_status=$?
10511   echo "$as_me:10511: \$? = $ac_status" >&5
10512   (exit $ac_status); } &&
10513          { ac_try='test -s conftest.$ac_objext'
10514   { (eval echo "$as_me:10514: \"$ac_try\"") >&5
10515   (eval $ac_try) 2>&5
10516   ac_status=$?
10517   echo "$as_me:10517: \$? = $ac_status" >&5
10518   (exit $ac_status); }; }; then
10519   ac_cv_sys_file_offset_bits=64; break
10520 else
10521   echo "$as_me: failed program was:" >&5
10522 cat conftest.$ac_ext >&5
10523 fi
10524 rm -f conftest.$ac_objext conftest.$ac_ext
10525   break
10526 done
10527 fi
10528 echo "$as_me:10528: result: $ac_cv_sys_file_offset_bits" >&5
10529 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10530 if test "$ac_cv_sys_file_offset_bits" != no; then
10531
10532 cat >>confdefs.h <<EOF
10533 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10534 EOF
10535
10536 fi
10537 rm -rf conftest*
10538   echo "$as_me:10538: checking for _LARGE_FILES value needed for large files" >&5
10539 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10540 if test "${ac_cv_sys_large_files+set}" = set; then
10541   echo $ECHO_N "(cached) $ECHO_C" >&6
10542 else
10543   while :; do
10544   ac_cv_sys_large_files=no
10545   cat >conftest.$ac_ext <<_ACEOF
10546 #line 10546 "configure"
10547 #include "confdefs.h"
10548 #include <sys/types.h>
10549  /* Check that off_t can represent 2**63 - 1 correctly.
10550     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10551     since some C++ compilers masquerading as C compilers
10552     incorrectly reject 9223372036854775807.  */
10553 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10554   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10555                        && LARGE_OFF_T % 2147483647 == 1)
10556                       ? 1 : -1];
10557 int
10558 main ()
10559 {
10560
10561   ;
10562   return 0;
10563 }
10564 _ACEOF
10565 rm -f conftest.$ac_objext
10566 if { (eval echo "$as_me:10566: \"$ac_compile\"") >&5
10567   (eval $ac_compile) 2>&5
10568   ac_status=$?
10569   echo "$as_me:10569: \$? = $ac_status" >&5
10570   (exit $ac_status); } &&
10571          { ac_try='test -s conftest.$ac_objext'
10572   { (eval echo "$as_me:10572: \"$ac_try\"") >&5
10573   (eval $ac_try) 2>&5
10574   ac_status=$?
10575   echo "$as_me:10575: \$? = $ac_status" >&5
10576   (exit $ac_status); }; }; then
10577   break
10578 else
10579   echo "$as_me: failed program was:" >&5
10580 cat conftest.$ac_ext >&5
10581 fi
10582 rm -f conftest.$ac_objext conftest.$ac_ext
10583   cat >conftest.$ac_ext <<_ACEOF
10584 #line 10584 "configure"
10585 #include "confdefs.h"
10586 #define _LARGE_FILES 1
10587 #include <sys/types.h>
10588  /* Check that off_t can represent 2**63 - 1 correctly.
10589     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10590     since some C++ compilers masquerading as C compilers
10591     incorrectly reject 9223372036854775807.  */
10592 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10593   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10594                        && LARGE_OFF_T % 2147483647 == 1)
10595                       ? 1 : -1];
10596 int
10597 main ()
10598 {
10599
10600   ;
10601   return 0;
10602 }
10603 _ACEOF
10604 rm -f conftest.$ac_objext
10605 if { (eval echo "$as_me:10605: \"$ac_compile\"") >&5
10606   (eval $ac_compile) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); } &&
10610          { ac_try='test -s conftest.$ac_objext'
10611   { (eval echo "$as_me:10611: \"$ac_try\"") >&5
10612   (eval $ac_try) 2>&5
10613   ac_status=$?
10614   echo "$as_me:10614: \$? = $ac_status" >&5
10615   (exit $ac_status); }; }; then
10616   ac_cv_sys_large_files=1; break
10617 else
10618   echo "$as_me: failed program was:" >&5
10619 cat conftest.$ac_ext >&5
10620 fi
10621 rm -f conftest.$ac_objext conftest.$ac_ext
10622   break
10623 done
10624 fi
10625 echo "$as_me:10625: result: $ac_cv_sys_large_files" >&5
10626 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10627 if test "$ac_cv_sys_large_files" != no; then
10628
10629 cat >>confdefs.h <<EOF
10630 #define _LARGE_FILES $ac_cv_sys_large_files
10631 EOF
10632
10633 fi
10634 rm -rf conftest*
10635 fi
10636
10637         if test "$enable_largefile" != no ; then
10638         echo "$as_me:10638: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10639 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10640 if test "${ac_cv_sys_largefile_source+set}" = set; then
10641   echo $ECHO_N "(cached) $ECHO_C" >&6
10642 else
10643   while :; do
10644   ac_cv_sys_largefile_source=no
10645   cat >conftest.$ac_ext <<_ACEOF
10646 #line 10646 "configure"
10647 #include "confdefs.h"
10648 #include <stdio.h>
10649 int
10650 main ()
10651 {
10652 return !fseeko;
10653   ;
10654   return 0;
10655 }
10656 _ACEOF
10657 rm -f conftest.$ac_objext
10658 if { (eval echo "$as_me:10658: \"$ac_compile\"") >&5
10659   (eval $ac_compile) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit $ac_status); } &&
10663          { ac_try='test -s conftest.$ac_objext'
10664   { (eval echo "$as_me:10664: \"$ac_try\"") >&5
10665   (eval $ac_try) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit $ac_status); }; }; then
10669   break
10670 else
10671   echo "$as_me: failed program was:" >&5
10672 cat conftest.$ac_ext >&5
10673 fi
10674 rm -f conftest.$ac_objext conftest.$ac_ext
10675   cat >conftest.$ac_ext <<_ACEOF
10676 #line 10676 "configure"
10677 #include "confdefs.h"
10678 #define _LARGEFILE_SOURCE 1
10679 #include <stdio.h>
10680 int
10681 main ()
10682 {
10683 return !fseeko;
10684   ;
10685   return 0;
10686 }
10687 _ACEOF
10688 rm -f conftest.$ac_objext
10689 if { (eval echo "$as_me:10689: \"$ac_compile\"") >&5
10690   (eval $ac_compile) 2>&5
10691   ac_status=$?
10692   echo "$as_me:10692: \$? = $ac_status" >&5
10693   (exit $ac_status); } &&
10694          { ac_try='test -s conftest.$ac_objext'
10695   { (eval echo "$as_me:10695: \"$ac_try\"") >&5
10696   (eval $ac_try) 2>&5
10697   ac_status=$?
10698   echo "$as_me:10698: \$? = $ac_status" >&5
10699   (exit $ac_status); }; }; then
10700   ac_cv_sys_largefile_source=1; break
10701 else
10702   echo "$as_me: failed program was:" >&5
10703 cat conftest.$ac_ext >&5
10704 fi
10705 rm -f conftest.$ac_objext conftest.$ac_ext
10706   break
10707 done
10708 fi
10709 echo "$as_me:10709: result: $ac_cv_sys_largefile_source" >&5
10710 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10711 if test "$ac_cv_sys_largefile_source" != no; then
10712
10713 cat >>confdefs.h <<EOF
10714 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10715 EOF
10716
10717 fi
10718 rm -rf conftest*
10719
10720 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10721 # in glibc 2.1.3, but that breaks too many other things.
10722 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10723 echo "$as_me:10723: checking for fseeko" >&5
10724 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10725 if test "${ac_cv_func_fseeko+set}" = set; then
10726   echo $ECHO_N "(cached) $ECHO_C" >&6
10727 else
10728   cat >conftest.$ac_ext <<_ACEOF
10729 #line 10729 "configure"
10730 #include "confdefs.h"
10731 #include <stdio.h>
10732 int
10733 main ()
10734 {
10735 return fseeko && fseeko (stdin, 0, 0);
10736   ;
10737   return 0;
10738 }
10739 _ACEOF
10740 rm -f conftest.$ac_objext conftest$ac_exeext
10741 if { (eval echo "$as_me:10741: \"$ac_link\"") >&5
10742   (eval $ac_link) 2>&5
10743   ac_status=$?
10744   echo "$as_me:10744: \$? = $ac_status" >&5
10745   (exit $ac_status); } &&
10746          { ac_try='test -s conftest$ac_exeext'
10747   { (eval echo "$as_me:10747: \"$ac_try\"") >&5
10748   (eval $ac_try) 2>&5
10749   ac_status=$?
10750   echo "$as_me:10750: \$? = $ac_status" >&5
10751   (exit $ac_status); }; }; then
10752   ac_cv_func_fseeko=yes
10753 else
10754   echo "$as_me: failed program was:" >&5
10755 cat conftest.$ac_ext >&5
10756 ac_cv_func_fseeko=no
10757 fi
10758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10759 fi
10760 echo "$as_me:10760: result: $ac_cv_func_fseeko" >&5
10761 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10762 if test $ac_cv_func_fseeko = yes; then
10763
10764 cat >>confdefs.h <<\EOF
10765 #define HAVE_FSEEKO 1
10766 EOF
10767
10768 fi
10769
10770         # Normally we would collect these definitions in the config.h,
10771         # but (like _XOPEN_SOURCE), some environments rely on having these
10772         # defined before any of the system headers are included.  Another
10773         # case comes up with C++, e.g., on AIX the compiler compiles the
10774         # header files by themselves before looking at the body files it is
10775         # told to compile.  For ncurses, those header files do not include
10776         # the config.h
10777         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10778         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10779         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10780
10781         echo "$as_me:10781: checking whether to use struct dirent64" >&5
10782 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10783 if test "${cf_cv_struct_dirent64+set}" = set; then
10784   echo $ECHO_N "(cached) $ECHO_C" >&6
10785 else
10786
10787                 cat >conftest.$ac_ext <<_ACEOF
10788 #line 10788 "configure"
10789 #include "confdefs.h"
10790
10791 #include <sys/types.h>
10792 #include <dirent.h>
10793
10794 int
10795 main ()
10796 {
10797
10798                 /* if transitional largefile support is setup, this is true */
10799                 extern struct dirent64 * readdir(DIR *);
10800                 struct dirent64 *x = readdir((DIR *)0);
10801                 struct dirent *y = readdir((DIR *)0);
10802                 int z = x - y;
10803
10804   ;
10805   return 0;
10806 }
10807 _ACEOF
10808 rm -f conftest.$ac_objext
10809 if { (eval echo "$as_me:10809: \"$ac_compile\"") >&5
10810   (eval $ac_compile) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); } &&
10814          { ac_try='test -s conftest.$ac_objext'
10815   { (eval echo "$as_me:10815: \"$ac_try\"") >&5
10816   (eval $ac_try) 2>&5
10817   ac_status=$?
10818   echo "$as_me:10818: \$? = $ac_status" >&5
10819   (exit $ac_status); }; }; then
10820   cf_cv_struct_dirent64=yes
10821 else
10822   echo "$as_me: failed program was:" >&5
10823 cat conftest.$ac_ext >&5
10824 cf_cv_struct_dirent64=no
10825 fi
10826 rm -f conftest.$ac_objext conftest.$ac_ext
10827
10828 fi
10829 echo "$as_me:10829: result: $cf_cv_struct_dirent64" >&5
10830 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10831         test "$cf_cv_struct_dirent64" = yes &&
10832 cat >>confdefs.h <<\EOF
10833 #define HAVE_STRUCT_DIRENT64 1
10834 EOF
10835
10836         fi
10837
10838 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10839 echo "$as_me:10839: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10840 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10841
10842 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10843 if test "${enable_tparm_varargs+set}" = set; then
10844   enableval="$enable_tparm_varargs"
10845   with_tparm_varargs=$enableval
10846 else
10847   with_tparm_varargs=yes
10848 fi;
10849 echo "$as_me:10849: result: $with_tparm_varargs" >&5
10850 echo "${ECHO_T}$with_tparm_varargs" >&6
10851 NCURSES_TPARM_VARARGS=0
10852 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10853
10854 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10855 if test "$with_ticlib" != no ; then
10856 echo "$as_me:10856: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10857 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10858
10859 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10860 if test "${enable_tic_depends+set}" = set; then
10861   enableval="$enable_tic_depends"
10862   with_tic_depends=$enableval
10863 else
10864   with_tic_depends=yes
10865 fi;
10866 echo "$as_me:10866: result: $with_tic_depends" >&5
10867 echo "${ECHO_T}$with_tic_depends" >&6
10868 else
10869         with_tic_depends=no
10870 fi
10871
10872 ###   use option --with-bool to override bool's type
10873 echo "$as_me:10873: checking for type of bool" >&5
10874 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10875
10876 # Check whether --with-bool or --without-bool was given.
10877 if test "${with_bool+set}" = set; then
10878   withval="$with_bool"
10879   NCURSES_BOOL="$withval"
10880 else
10881   NCURSES_BOOL=auto
10882 fi;
10883 echo "$as_me:10883: result: $NCURSES_BOOL" >&5
10884 echo "${ECHO_T}$NCURSES_BOOL" >&6
10885
10886 echo "$as_me:10886: checking for alternate terminal capabilities file" >&5
10887 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10888
10889 # Check whether --with-caps or --without-caps was given.
10890 if test "${with_caps+set}" = set; then
10891   withval="$with_caps"
10892   TERMINFO_CAPS=Caps.$withval
10893 else
10894   TERMINFO_CAPS=Caps
10895 fi;
10896 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10897 echo "$as_me:10897: result: $TERMINFO_CAPS" >&5
10898 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10899
10900 ###   use option --with-chtype to override chtype's type
10901 echo "$as_me:10901: checking for type of chtype" >&5
10902 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10903
10904 # Check whether --with-chtype or --without-chtype was given.
10905 if test "${with_chtype+set}" = set; then
10906   withval="$with_chtype"
10907   NCURSES_CHTYPE="$withval"
10908 else
10909   NCURSES_CHTYPE=$cf_dft_chtype
10910 fi;
10911 echo "$as_me:10911: result: $NCURSES_CHTYPE" >&5
10912 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10913
10914 ###   use option --with-ospeed to override ospeed's type
10915 echo "$as_me:10915: checking for type of ospeed" >&5
10916 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10917
10918 # Check whether --with-ospeed or --without-ospeed was given.
10919 if test "${with_ospeed+set}" = set; then
10920   withval="$with_ospeed"
10921   NCURSES_OSPEED="$withval"
10922 else
10923   NCURSES_OSPEED=short
10924 fi;
10925 echo "$as_me:10925: result: $NCURSES_OSPEED" >&5
10926 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10927
10928 ###   use option --with-mmask-t to override mmask_t's type
10929 echo "$as_me:10929: checking for type of mmask_t" >&5
10930 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10931
10932 # Check whether --with-mmask-t or --without-mmask-t was given.
10933 if test "${with_mmask_t+set}" = set; then
10934   withval="$with_mmask_t"
10935   NCURSES_MMASK_T="$withval"
10936 else
10937   NCURSES_MMASK_T=$cf_dft_mmask_t
10938 fi;
10939 echo "$as_me:10939: result: $NCURSES_MMASK_T" >&5
10940 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10941
10942 ###   use option --with-ccharw-max to override CCHARW_MAX size
10943 echo "$as_me:10943: checking for size CCHARW_MAX" >&5
10944 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10945
10946 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10947 if test "${with_ccharw_max+set}" = set; then
10948   withval="$with_ccharw_max"
10949   NCURSES_CCHARW_MAX="$withval"
10950 else
10951   NCURSES_CCHARW_MAX=5
10952 fi;
10953 echo "$as_me:10953: result: $NCURSES_CCHARW_MAX" >&5
10954 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10955
10956 ###   use option --with-tparm-arg to override tparm's argument type
10957 echo "$as_me:10957: checking for type of tparm args" >&5
10958 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10959
10960 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10961 if test "${with_tparm_arg+set}" = set; then
10962   withval="$with_tparm_arg"
10963   NCURSES_TPARM_ARG="$withval"
10964 else
10965   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10966 fi;
10967 echo "$as_me:10967: result: $NCURSES_TPARM_ARG" >&5
10968 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10969
10970 ### Enable compiling-in rcs id's
10971 echo "$as_me:10971: checking if RCS identifiers should be compiled-in" >&5
10972 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10973
10974 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10975 if test "${with_rcs_ids+set}" = set; then
10976   withval="$with_rcs_ids"
10977   with_rcs_ids=$withval
10978 else
10979   with_rcs_ids=no
10980 fi;
10981 echo "$as_me:10981: result: $with_rcs_ids" >&5
10982 echo "${ECHO_T}$with_rcs_ids" >&6
10983 test "x$with_rcs_ids" = xyes &&
10984 cat >>confdefs.h <<\EOF
10985 #define USE_RCS_IDS 1
10986 EOF
10987
10988 ###############################################################################
10989
10990 echo "$as_me:10990: checking format of man-pages" >&5
10991 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10992
10993 # Check whether --with-manpage-format or --without-manpage-format was given.
10994 if test "${with_manpage_format+set}" = set; then
10995   withval="$with_manpage_format"
10996   MANPAGE_FORMAT=$withval
10997 else
10998   MANPAGE_FORMAT=unknown
10999 fi;
11000
11001 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11002 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11003
11004 cf_unknown=
11005
11006 case $MANPAGE_FORMAT in
11007 (unknown)
11008         if test -z "$MANPATH" ; then
11009                 MANPATH="/usr/man:/usr/share/man"
11010         fi
11011
11012         # look for the 'date' man-page (it's most likely to be installed!)
11013         MANPAGE_FORMAT=
11014         cf_preform=no
11015         cf_catonly=yes
11016         cf_example=date
11017
11018         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11019         for cf_dir in $MANPATH; do
11020                 test -z "$cf_dir" && cf_dir=/usr/man
11021                 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
11022                 do
11023                         cf_test=`echo $cf_name | sed -e 's/*//'`
11024                         if test "x$cf_test" = "x$cf_name" ; then
11025
11026                                 case "$cf_name" in
11027                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11028                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11029                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11030                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11031                                 esac
11032
11033                                 case "$cf_name" in
11034                                 ($cf_dir/man*)
11035                                         cf_catonly=no
11036                                         ;;
11037                                 ($cf_dir/cat*)
11038                                         cf_preform=yes
11039                                         ;;
11040                                 esac
11041                                 break
11042                         fi
11043
11044                         # if we found a match in either man* or cat*, stop looking
11045                         if test -n "$MANPAGE_FORMAT" ; then
11046                                 cf_found=no
11047                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11048                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11049                                 case "$cf_name" in
11050                                 ($cf_dir/cat*)
11051                                         cf_found=yes
11052                                         ;;
11053                                 esac
11054                                 test $cf_found=yes && break
11055                         fi
11056                 done
11057                 # only check the first directory in $MANPATH where we find manpages
11058                 if test -n "$MANPAGE_FORMAT" ; then
11059                         break
11060                 fi
11061         done
11062         # if we did not find the example, just assume it is normal
11063         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11064         IFS="$ac_save_ifs"
11065         ;;
11066 (*)
11067         for cf_option in $MANPAGE_FORMAT; do
11068         case $cf_option in
11069         (gzip|compress|BSDI|normal|formatted|catonly)
11070                 ;;
11071         (*)
11072                 cf_unknown="$cf_unknown $cf_option"
11073                 ;;
11074         esac
11075         done
11076         ;;
11077 esac
11078
11079 echo "$as_me:11079: result: $MANPAGE_FORMAT" >&5
11080 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11081 if test -n "$cf_unknown" ; then
11082         { echo "$as_me:11082: WARNING: Unexpected manpage-format $cf_unknown" >&5
11083 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11084 fi
11085
11086 echo "$as_me:11086: checking for manpage renaming" >&5
11087 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11088
11089 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11090 if test "${with_manpage_renames+set}" = set; then
11091   withval="$with_manpage_renames"
11092   MANPAGE_RENAMES=$withval
11093 else
11094   MANPAGE_RENAMES=yes
11095 fi;
11096
11097 case ".$MANPAGE_RENAMES" in
11098 (.no)
11099         ;;
11100 (.|.yes)
11101         # Debian 'man' program?
11102         if test -f /etc/debian_version ; then
11103                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11104         else
11105                 MANPAGE_RENAMES=no
11106         fi
11107         ;;
11108 esac
11109
11110 if test "$MANPAGE_RENAMES" != no ; then
11111         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11112                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11113         elif test ! -f $MANPAGE_RENAMES ; then
11114                 { { echo "$as_me:11114: error: not a filename: $MANPAGE_RENAMES" >&5
11115 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11116    { (exit 1); exit 1; }; }
11117         fi
11118
11119         test ! -d man && mkdir man
11120
11121         # Construct a sed-script to perform renaming within man-pages
11122         if test -n "$MANPAGE_RENAMES" ; then
11123                 test ! -d man && mkdir man
11124                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11125         fi
11126 fi
11127
11128 echo "$as_me:11128: result: $MANPAGE_RENAMES" >&5
11129 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11130
11131 echo "$as_me:11131: checking if manpage aliases will be installed" >&5
11132 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11133
11134 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11135 if test "${with_manpage_aliases+set}" = set; then
11136   withval="$with_manpage_aliases"
11137   MANPAGE_ALIASES=$withval
11138 else
11139   MANPAGE_ALIASES=yes
11140 fi;
11141
11142 echo "$as_me:11142: result: $MANPAGE_ALIASES" >&5
11143 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11144
11145 case "x$LN_S" in
11146 (xln*)
11147         cf_use_symlinks=yes
11148         ;;
11149 (*)
11150         cf_use_symlinks=no
11151         ;;
11152 esac
11153
11154 MANPAGE_SYMLINKS=no
11155 if test "$MANPAGE_ALIASES" = yes ; then
11156 echo "$as_me:11156: checking if manpage symlinks should be used" >&5
11157 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11158
11159 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11160 if test "${with_manpage_symlinks+set}" = set; then
11161   withval="$with_manpage_symlinks"
11162   MANPAGE_SYMLINKS=$withval
11163 else
11164   MANPAGE_SYMLINKS=$cf_use_symlinks
11165 fi;
11166
11167 if test "$$cf_use_symlinks" = no; then
11168 if test "$MANPAGE_SYMLINKS" = yes ; then
11169         { echo "$as_me:11169: WARNING: cannot make symlinks" >&5
11170 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11171         MANPAGE_SYMLINKS=no
11172 fi
11173 fi
11174
11175 echo "$as_me:11175: result: $MANPAGE_SYMLINKS" >&5
11176 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11177 fi
11178
11179 echo "$as_me:11179: checking for manpage tbl" >&5
11180 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11181
11182 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11183 if test "${with_manpage_tbl+set}" = set; then
11184   withval="$with_manpage_tbl"
11185   MANPAGE_TBL=$withval
11186 else
11187   MANPAGE_TBL=no
11188 fi;
11189
11190 echo "$as_me:11190: result: $MANPAGE_TBL" >&5
11191 echo "${ECHO_T}$MANPAGE_TBL" >&6
11192
11193 if test "$prefix" = "NONE" ; then
11194         cf_prefix="$ac_default_prefix"
11195 else
11196         cf_prefix="$prefix"
11197 fi
11198
11199 case "$MANPAGE_FORMAT" in
11200 (*catonly*)
11201         cf_format=yes
11202         cf_inboth=no
11203         ;;
11204 (*formatted*)
11205         cf_format=yes
11206         cf_inboth=yes
11207         ;;
11208 (*)
11209         cf_format=no
11210         cf_inboth=no
11211         ;;
11212 esac
11213
11214 test ! -d man && mkdir man
11215
11216 cf_so_strip=
11217 cf_compress=
11218 case "$MANPAGE_FORMAT" in
11219 (*compress*)
11220         cf_so_strip="Z"
11221         cf_compress=compress
11222         ;;
11223 (*gzip*)
11224         cf_so_strip="gz"
11225         cf_compress=gzip
11226         ;;
11227 esac
11228
11229 cf_edit_man=./edit_man.sh
11230 cf_man_alias=`pwd`/man_alias.sed
11231
11232 cat >$cf_edit_man <<CF_EOF
11233 #! $SHELL
11234 # this script is generated by the configure-script CF_MAN_PAGES macro.
11235
11236 prefix="$cf_prefix"
11237 datarootdir="$datarootdir"
11238 datadir="$datadir"
11239
11240 NCURSES_MAJOR="$NCURSES_MAJOR"
11241 NCURSES_MINOR="$NCURSES_MINOR"
11242 NCURSES_PATCH="$NCURSES_PATCH"
11243
11244 NCURSES_OSPEED="$NCURSES_OSPEED"
11245 TERMINFO="$TERMINFO"
11246
11247 INSTALL="$INSTALL"
11248 INSTALL_DATA="$INSTALL_DATA"
11249
11250 transform="$program_transform_name"
11251
11252 TMP=\${TMPDIR:=/tmp}/man\$\$
11253 trap "rm -f \$TMP" 0 1 2 5 15
11254
11255 form=\$1
11256 shift || exit 1
11257
11258 verb=\$1
11259 shift || exit 1
11260
11261 mandir=\$1
11262 shift || exit 1
11263
11264 srcdir=\$1
11265 top_srcdir=\$srcdir/..
11266 shift || exit 1
11267
11268 if test "\$form" = normal ; then
11269         if test "$cf_format" = yes ; then
11270         if test "$cf_inboth" = no ; then
11271                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11272                 exit $?
11273         fi
11274         fi
11275         cf_subdir=\$mandir/man
11276         cf_tables=$MANPAGE_TBL
11277 else
11278         cf_subdir=\$mandir/cat
11279         cf_tables=yes
11280 fi
11281
11282 # process the list of source-files
11283 for i in \$* ; do
11284 case \$i in
11285 (*.orig|*.rej) ;;
11286 (*.[0-9]*)
11287         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11288         if test \$verb = installing ; then
11289         if test ! -d \$cf_subdir\${section} ; then
11290                 mkdir -p \$cf_subdir\$section
11291         fi
11292         fi
11293
11294         # replace variables in man page
11295         if test ! -f $cf_man_alias ; then
11296 cat >>$cf_man_alias <<-CF_EOF2
11297                 s,@DATADIR@,\$datadir,g
11298                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11299                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11300                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11301                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11302                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11303                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11304 CF_EOF
11305
11306         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11307         do
11308                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11309                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11310 cat >>$cf_edit_man <<-CF_EOF
11311                 s,@$cf_NAME@,$cf_name,g
11312 CF_EOF
11313         done
11314
11315 cat >>$cf_edit_man <<CF_EOF
11316 CF_EOF2
11317                 echo "...made $cf_man_alias"
11318         fi
11319
11320         aliases=
11321         cf_source=\`basename \$i\`
11322         inalias=\$cf_source
11323         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11324         if test ! -f \$inalias ; then
11325                 echo .. skipped \$cf_source
11326                 continue
11327         fi
11328 CF_EOF
11329
11330 if test "$MANPAGE_ALIASES" != no ; then
11331 cat >>$cf_edit_man <<CF_EOF
11332         nCurses=ignore.3x
11333         test $with_curses_h = yes && nCurses=ncurses.3x
11334         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11335 CF_EOF
11336 fi
11337
11338 if test "$MANPAGE_RENAMES" = no ; then
11339 cat >>$cf_edit_man <<CF_EOF
11340         # perform program transformations for section 1 man pages
11341         if test \$section = 1 ; then
11342                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11343         else
11344                 cf_target=\$cf_subdir\${section}/\$cf_source
11345         fi
11346 CF_EOF
11347 else
11348 cat >>$cf_edit_man <<CF_EOF
11349         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11350         if test -z "\$cf_target" ; then
11351                 echo '? missing rename for '\$cf_source
11352                 cf_target="\$cf_source"
11353         fi
11354         cf_target="\$cf_subdir\${section}/\${cf_target}"
11355
11356 CF_EOF
11357 fi
11358
11359 cat >>$cf_edit_man <<CF_EOF
11360         sed     -f $cf_man_alias \\
11361 CF_EOF
11362
11363 if test -f $MANPAGE_RENAMES ; then
11364 cat >>$cf_edit_man <<CF_EOF
11365                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11366 CF_EOF
11367 else
11368 cat >>$cf_edit_man <<CF_EOF
11369                 < \$i >\$TMP
11370 CF_EOF
11371 fi
11372
11373 cat >>$cf_edit_man <<CF_EOF
11374 if test \$cf_tables = yes ; then
11375         tbl \$TMP >\$TMP.out
11376         mv \$TMP.out \$TMP
11377 fi
11378 CF_EOF
11379
11380 if test $with_overwrite != yes ; then
11381 cat >>$cf_edit_man <<CF_EOF
11382         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11383         mv \$TMP.out \$TMP
11384 CF_EOF
11385 fi
11386
11387 if test $with_curses_h != yes ; then
11388 cat >>$cf_edit_man <<CF_EOF
11389         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11390         mv \$TMP.out \$TMP
11391 CF_EOF
11392 fi
11393
11394 cat >>$cf_edit_man <<CF_EOF
11395         if test \$form = format ; then
11396                 nroff -man \$TMP >\$TMP.out
11397                 mv \$TMP.out \$TMP
11398         fi
11399 CF_EOF
11400
11401 if test -n "$cf_compress" ; then
11402 cat >>$cf_edit_man <<CF_EOF
11403         if test \$verb = installing ; then
11404         if ( $cf_compress -f \$TMP )
11405         then
11406                 mv \$TMP.$cf_so_strip \$TMP
11407         fi
11408         fi
11409         cf_target="\$cf_target.$cf_so_strip"
11410 CF_EOF
11411 fi
11412
11413 case "$MANPAGE_FORMAT" in
11414 (*BSDI*)
11415 cat >>$cf_edit_man <<CF_EOF
11416         if test \$form = format ; then
11417                 # BSDI installs only .0 suffixes in the cat directories
11418                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11419         fi
11420 CF_EOF
11421   ;;
11422 esac
11423
11424 cat >>$cf_edit_man <<CF_EOF
11425         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11426         if test \$verb = installing ; then
11427                 echo \$verb \$cf_target
11428                 \$INSTALL_DATA \$TMP \$cf_target
11429                 test -d \$cf_subdir\${section} &&
11430                 test -n "\$aliases" && (
11431                         cd \$cf_subdir\${section} && (
11432                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11433                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11434                                 cf_target=\`basename \$cf_target\`
11435                                 for cf_alias in \$aliases
11436                                 do
11437                                         if test \$section = 1 ; then
11438                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11439                                         fi
11440
11441                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11442                                                 if test -f \$cf_alias\${suffix} ; then
11443                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11444                                                         then
11445                                                                 continue
11446                                                         fi
11447                                                 fi
11448                                                 echo .. \$verb alias \$cf_alias\${suffix}
11449 CF_EOF
11450 case "x$LN_S" in
11451 (*-f)
11452 cat >>$cf_edit_man <<CF_EOF
11453                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11454 CF_EOF
11455         ;;
11456 (*)
11457 cat >>$cf_edit_man <<CF_EOF
11458                                                 rm -f \$cf_alias\${suffix}
11459                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11460 CF_EOF
11461         ;;
11462 esac
11463 cat >>$cf_edit_man <<CF_EOF
11464                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11465                                                 echo ".so \$cf_source" >\$TMP
11466 CF_EOF
11467 if test -n "$cf_compress" ; then
11468 cat >>$cf_edit_man <<CF_EOF
11469                                                 if test -n "$cf_so_strip" ; then
11470                                                         $cf_compress -f \$TMP
11471                                                         mv \$TMP.$cf_so_strip \$TMP
11472                                                 fi
11473 CF_EOF
11474 fi
11475 cat >>$cf_edit_man <<CF_EOF
11476                                                 echo .. \$verb alias \$cf_alias\${suffix}
11477                                                 rm -f \$cf_alias\${suffix}
11478                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11479                                         fi
11480                                 done
11481                         )
11482                 )
11483         elif test \$verb = removing ; then
11484                 test -f \$cf_target && (
11485                         echo \$verb \$cf_target
11486                         rm -f \$cf_target
11487                 )
11488                 test -d \$cf_subdir\${section} &&
11489                 test -n "\$aliases" && (
11490                         cd \$cf_subdir\${section} && (
11491                                 for cf_alias in \$aliases
11492                                 do
11493                                         if test \$section = 1 ; then
11494                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11495                                         fi
11496
11497                                         echo .. \$verb alias \$cf_alias\${suffix}
11498                                         rm -f \$cf_alias\${suffix}
11499                                 done
11500                         )
11501                 )
11502         else
11503 #               echo ".hy 0"
11504                 cat \$TMP
11505         fi
11506         ;;
11507 esac
11508 done
11509
11510 if test $cf_inboth = yes ; then
11511 if test \$form != format ; then
11512         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11513 fi
11514 fi
11515
11516 exit 0
11517 CF_EOF
11518 chmod 755 $cf_edit_man
11519
11520 ###############################################################################
11521
11522 ### Note that some functions (such as const) are normally disabled anyway.
11523 echo "$as_me:11523: checking if you want to build with function extensions" >&5
11524 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11525
11526 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11527 if test "${enable_ext_funcs+set}" = set; then
11528   enableval="$enable_ext_funcs"
11529   with_ext_funcs=$enableval
11530 else
11531   with_ext_funcs=yes
11532 fi;
11533 echo "$as_me:11533: result: $with_ext_funcs" >&5
11534 echo "${ECHO_T}$with_ext_funcs" >&6
11535 if test "x$with_ext_funcs" = xyes ; then
11536         NCURSES_EXT_FUNCS=1
11537
11538 cat >>confdefs.h <<\EOF
11539 #define HAVE_ASSUME_DEFAULT_COLORS 1
11540 EOF
11541
11542 cat >>confdefs.h <<\EOF
11543 #define HAVE_CURSES_VERSION 1
11544 EOF
11545
11546 cat >>confdefs.h <<\EOF
11547 #define HAVE_HAS_KEY 1
11548 EOF
11549
11550 cat >>confdefs.h <<\EOF
11551 #define HAVE_RESIZETERM 1
11552 EOF
11553
11554 cat >>confdefs.h <<\EOF
11555 #define HAVE_RESIZE_TERM 1
11556 EOF
11557
11558 cat >>confdefs.h <<\EOF
11559 #define HAVE_TERM_ENTRY_H 1
11560 EOF
11561
11562 cat >>confdefs.h <<\EOF
11563 #define HAVE_USE_DEFAULT_COLORS 1
11564 EOF
11565
11566 cat >>confdefs.h <<\EOF
11567 #define HAVE_USE_SCREEN 1
11568 EOF
11569
11570 cat >>confdefs.h <<\EOF
11571 #define HAVE_USE_WINDOW 1
11572 EOF
11573
11574 cat >>confdefs.h <<\EOF
11575 #define HAVE_WRESIZE 1
11576 EOF
11577
11578 cat >>confdefs.h <<\EOF
11579 #define NCURSES_EXT_FUNCS 1
11580 EOF
11581
11582         GENERATED_EXT_FUNCS=generated
11583 else
11584         NCURSES_EXT_FUNCS=0
11585         GENERATED_EXT_FUNCS=
11586 fi
11587
11588 echo "$as_me:11588: checking if you want to build with SCREEN extensions" >&5
11589 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11590
11591 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11592 if test "${enable_sp_funcs+set}" = set; then
11593   enableval="$enable_sp_funcs"
11594   with_sp_funcs=$enableval
11595 else
11596   with_sp_funcs=$cf_dft_ext_spfuncs
11597 fi;
11598 echo "$as_me:11598: result: $with_sp_funcs" >&5
11599 echo "${ECHO_T}$with_sp_funcs" >&6
11600 if test "x$with_sp_funcs" = xyes ; then
11601         NCURSES_SP_FUNCS=1
11602
11603 cat >>confdefs.h <<\EOF
11604 #define NCURSES_SP_FUNCS 1
11605 EOF
11606
11607         GENERATED_SP_FUNCS=generated
11608 else
11609         NCURSES_SP_FUNCS=0
11610         GENERATED_SP_FUNCS=
11611 fi
11612
11613 echo "$as_me:11613: checking if you want to build with terminal-driver" >&5
11614 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11615
11616 # Check whether --enable-term-driver or --disable-term-driver was given.
11617 if test "${enable_term_driver+set}" = set; then
11618   enableval="$enable_term_driver"
11619   with_term_driver=$enableval
11620 else
11621   with_term_driver=no
11622 fi;
11623 echo "$as_me:11623: result: $with_term_driver" >&5
11624 echo "${ECHO_T}$with_term_driver" >&6
11625 if test "x$with_term_driver" = xyes ; then
11626
11627 cat >>confdefs.h <<\EOF
11628 #define USE_TERM_DRIVER 1
11629 EOF
11630
11631         if test "x$with_termlib" != xno ; then
11632                 { { echo "$as_me:11632: error: The term-driver option conflicts with the termlib option" >&5
11633 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11634    { (exit 1); exit 1; }; }
11635         fi
11636         if test "x$with_sp_funcs" != xyes ; then
11637                 { { echo "$as_me:11637: error: The term-driver option relies upon sp-funcs" >&5
11638 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11639    { (exit 1); exit 1; }; }
11640         fi
11641 fi
11642
11643 ###   use option --enable-const to turn on use of const beyond that in XSI.
11644 echo "$as_me:11644: checking for extended use of const keyword" >&5
11645 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11646
11647 # Check whether --enable-const or --disable-const was given.
11648 if test "${enable_const+set}" = set; then
11649   enableval="$enable_const"
11650   with_ext_const=$enableval
11651 else
11652   with_ext_const=$cf_dft_ext_const
11653 fi;
11654 echo "$as_me:11654: result: $with_ext_const" >&5
11655 echo "${ECHO_T}$with_ext_const" >&6
11656 NCURSES_CONST='/*nothing*/'
11657 if test "x$with_ext_const" = xyes ; then
11658         NCURSES_CONST=const
11659 fi
11660
11661 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11662 echo "$as_me:11662: checking if you want to use extended colors" >&5
11663 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11664
11665 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11666 if test "${enable_ext_colors+set}" = set; then
11667   enableval="$enable_ext_colors"
11668   with_ext_colors=$enableval
11669 else
11670   with_ext_colors=$cf_dft_ext_colors
11671 fi;
11672 echo "$as_me:11672: result: $with_ext_colors" >&5
11673 echo "${ECHO_T}$with_ext_colors" >&6
11674 NCURSES_EXT_COLORS=0
11675 if test "x$with_ext_colors" = xyes ; then
11676         if test "x$with_widec" != xyes ; then
11677                 { echo "$as_me:11677: WARNING: This option applies only to wide-character library" >&5
11678 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11679         else
11680                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11681
11682 if test "${with_abi_version+set}" != set; then
11683         case $cf_cv_rel_version in
11684         (5.*)
11685                 cf_cv_rel_version=6.0
11686                 cf_cv_abi_version=6
11687                 { echo "$as_me:11687: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11688 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11689                 ;;
11690         esac
11691 fi
11692
11693                 NCURSES_EXT_COLORS=1
11694
11695 cat >>confdefs.h <<\EOF
11696 #define NCURSES_EXT_COLORS 1
11697 EOF
11698
11699         fi
11700 fi
11701
11702 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11703 echo "$as_me:11703: checking if you want to use extended mouse encoding" >&5
11704 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11705
11706 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11707 if test "${enable_ext_mouse+set}" = set; then
11708   enableval="$enable_ext_mouse"
11709   with_ext_mouse=$enableval
11710 else
11711   with_ext_mouse=$cf_dft_ext_mouse
11712 fi;
11713 echo "$as_me:11713: result: $with_ext_mouse" >&5
11714 echo "${ECHO_T}$with_ext_mouse" >&6
11715 NCURSES_MOUSE_VERSION=1
11716 if test "x$with_ext_mouse" = xyes ; then
11717         NCURSES_MOUSE_VERSION=2
11718
11719 if test "${with_abi_version+set}" != set; then
11720         case $cf_cv_rel_version in
11721         (5.*)
11722                 cf_cv_rel_version=6.0
11723                 cf_cv_abi_version=6
11724                 { echo "$as_me:11724: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11725 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11726                 ;;
11727         esac
11728 fi
11729
11730 fi
11731
11732 ###   use option --enable-ext-putwin to turn on extended screendumps
11733 echo "$as_me:11733: checking if you want to use extended putwin/screendump" >&5
11734 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11735
11736 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11737 if test "${enable_ext_putwin+set}" = set; then
11738   enableval="$enable_ext_putwin"
11739   with_ext_putwin=$enableval
11740 else
11741   with_ext_putwin=$cf_dft_ext_putwin
11742 fi;
11743 echo "$as_me:11743: result: $with_ext_putwin" >&5
11744 echo "${ECHO_T}$with_ext_putwin" >&6
11745 if test "x$with_ext_putwin" = xyes ; then
11746
11747 cat >>confdefs.h <<\EOF
11748 #define NCURSES_EXT_PUTWIN 1
11749 EOF
11750
11751 fi
11752
11753 echo "$as_me:11753: checking if you want \$NCURSES_NO_PADDING code" >&5
11754 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11755
11756 # Check whether --enable-no-padding or --disable-no-padding was given.
11757 if test "${enable_no_padding+set}" = set; then
11758   enableval="$enable_no_padding"
11759   with_no_padding=$enableval
11760 else
11761   with_no_padding=$with_ext_funcs
11762 fi;
11763 echo "$as_me:11763: result: $with_no_padding" >&5
11764 echo "${ECHO_T}$with_no_padding" >&6
11765 test "x$with_no_padding" = xyes &&
11766 cat >>confdefs.h <<\EOF
11767 #define NCURSES_NO_PADDING 1
11768 EOF
11769
11770 echo "$as_me:11770: checking for ANSI C header files" >&5
11771 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11772 if test "${ac_cv_header_stdc+set}" = set; then
11773   echo $ECHO_N "(cached) $ECHO_C" >&6
11774 else
11775   cat >conftest.$ac_ext <<_ACEOF
11776 #line 11776 "configure"
11777 #include "confdefs.h"
11778 #include <stdlib.h>
11779 #include <stdarg.h>
11780 #include <string.h>
11781 #include <float.h>
11782
11783 _ACEOF
11784 if { (eval echo "$as_me:11784: \"$ac_cpp conftest.$ac_ext\"") >&5
11785   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11786   ac_status=$?
11787   egrep -v '^ *\+' conftest.er1 >conftest.err
11788   rm -f conftest.er1
11789   cat conftest.err >&5
11790   echo "$as_me:11790: \$? = $ac_status" >&5
11791   (exit $ac_status); } >/dev/null; then
11792   if test -s conftest.err; then
11793     ac_cpp_err=$ac_c_preproc_warn_flag
11794   else
11795     ac_cpp_err=
11796   fi
11797 else
11798   ac_cpp_err=yes
11799 fi
11800 if test -z "$ac_cpp_err"; then
11801   ac_cv_header_stdc=yes
11802 else
11803   echo "$as_me: failed program was:" >&5
11804   cat conftest.$ac_ext >&5
11805   ac_cv_header_stdc=no
11806 fi
11807 rm -f conftest.err conftest.$ac_ext
11808
11809 if test $ac_cv_header_stdc = yes; then
11810   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11811   cat >conftest.$ac_ext <<_ACEOF
11812 #line 11812 "configure"
11813 #include "confdefs.h"
11814 #include <string.h>
11815
11816 _ACEOF
11817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11818   egrep "memchr" >/dev/null 2>&1; then
11819   :
11820 else
11821   ac_cv_header_stdc=no
11822 fi
11823 rm -rf conftest*
11824
11825 fi
11826
11827 if test $ac_cv_header_stdc = yes; then
11828   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11829   cat >conftest.$ac_ext <<_ACEOF
11830 #line 11830 "configure"
11831 #include "confdefs.h"
11832 #include <stdlib.h>
11833
11834 _ACEOF
11835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11836   egrep "free" >/dev/null 2>&1; then
11837   :
11838 else
11839   ac_cv_header_stdc=no
11840 fi
11841 rm -rf conftest*
11842
11843 fi
11844
11845 if test $ac_cv_header_stdc = yes; then
11846   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11847   if test "$cross_compiling" = yes; then
11848   :
11849 else
11850   cat >conftest.$ac_ext <<_ACEOF
11851 #line 11851 "configure"
11852 #include "confdefs.h"
11853 #include <ctype.h>
11854 #if ((' ' & 0x0FF) == 0x020)
11855 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11856 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11857 #else
11858 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11859                      || ('j' <= (c) && (c) <= 'r') \
11860                      || ('s' <= (c) && (c) <= 'z'))
11861 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11862 #endif
11863
11864 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11865 int
11866 main ()
11867 {
11868   int i;
11869   for (i = 0; i < 256; i++)
11870     if (XOR (islower (i), ISLOWER (i))
11871         || toupper (i) != TOUPPER (i))
11872       $ac_main_return(2);
11873   $ac_main_return (0);
11874 }
11875 _ACEOF
11876 rm -f conftest$ac_exeext
11877 if { (eval echo "$as_me:11877: \"$ac_link\"") >&5
11878   (eval $ac_link) 2>&5
11879   ac_status=$?
11880   echo "$as_me:11880: \$? = $ac_status" >&5
11881   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11882   { (eval echo "$as_me:11882: \"$ac_try\"") >&5
11883   (eval $ac_try) 2>&5
11884   ac_status=$?
11885   echo "$as_me:11885: \$? = $ac_status" >&5
11886   (exit $ac_status); }; }; then
11887   :
11888 else
11889   echo "$as_me: program exited with status $ac_status" >&5
11890 echo "$as_me: failed program was:" >&5
11891 cat conftest.$ac_ext >&5
11892 ac_cv_header_stdc=no
11893 fi
11894 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11895 fi
11896 fi
11897 fi
11898 echo "$as_me:11898: result: $ac_cv_header_stdc" >&5
11899 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11900 if test $ac_cv_header_stdc = yes; then
11901
11902 cat >>confdefs.h <<\EOF
11903 #define STDC_HEADERS 1
11904 EOF
11905
11906 fi
11907
11908 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11909
11910 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11911                   inttypes.h stdint.h unistd.h
11912 do
11913 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11914 echo "$as_me:11914: checking for $ac_header" >&5
11915 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11917   echo $ECHO_N "(cached) $ECHO_C" >&6
11918 else
11919   cat >conftest.$ac_ext <<_ACEOF
11920 #line 11920 "configure"
11921 #include "confdefs.h"
11922 $ac_includes_default
11923 #include <$ac_header>
11924 _ACEOF
11925 rm -f conftest.$ac_objext
11926 if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5
11927   (eval $ac_compile) 2>&5
11928   ac_status=$?
11929   echo "$as_me:11929: \$? = $ac_status" >&5
11930   (exit $ac_status); } &&
11931          { ac_try='test -s conftest.$ac_objext'
11932   { (eval echo "$as_me:11932: \"$ac_try\"") >&5
11933   (eval $ac_try) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); }; }; then
11937   eval "$as_ac_Header=yes"
11938 else
11939   echo "$as_me: failed program was:" >&5
11940 cat conftest.$ac_ext >&5
11941 eval "$as_ac_Header=no"
11942 fi
11943 rm -f conftest.$ac_objext conftest.$ac_ext
11944 fi
11945 echo "$as_me:11945: result: `eval echo '${'$as_ac_Header'}'`" >&5
11946 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11947 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11948   cat >>confdefs.h <<EOF
11949 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11950 EOF
11951
11952 fi
11953 done
11954
11955 echo "$as_me:11955: checking for signed char" >&5
11956 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11957 if test "${ac_cv_type_signed_char+set}" = set; then
11958   echo $ECHO_N "(cached) $ECHO_C" >&6
11959 else
11960   cat >conftest.$ac_ext <<_ACEOF
11961 #line 11961 "configure"
11962 #include "confdefs.h"
11963 $ac_includes_default
11964 int
11965 main ()
11966 {
11967 if ((signed char *) 0)
11968   return 0;
11969 if (sizeof (signed char))
11970   return 0;
11971   ;
11972   return 0;
11973 }
11974 _ACEOF
11975 rm -f conftest.$ac_objext
11976 if { (eval echo "$as_me:11976: \"$ac_compile\"") >&5
11977   (eval $ac_compile) 2>&5
11978   ac_status=$?
11979   echo "$as_me:11979: \$? = $ac_status" >&5
11980   (exit $ac_status); } &&
11981          { ac_try='test -s conftest.$ac_objext'
11982   { (eval echo "$as_me:11982: \"$ac_try\"") >&5
11983   (eval $ac_try) 2>&5
11984   ac_status=$?
11985   echo "$as_me:11985: \$? = $ac_status" >&5
11986   (exit $ac_status); }; }; then
11987   ac_cv_type_signed_char=yes
11988 else
11989   echo "$as_me: failed program was:" >&5
11990 cat conftest.$ac_ext >&5
11991 ac_cv_type_signed_char=no
11992 fi
11993 rm -f conftest.$ac_objext conftest.$ac_ext
11994 fi
11995 echo "$as_me:11995: result: $ac_cv_type_signed_char" >&5
11996 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11997
11998 echo "$as_me:11998: checking size of signed char" >&5
11999 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12000 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12001   echo $ECHO_N "(cached) $ECHO_C" >&6
12002 else
12003   if test "$ac_cv_type_signed_char" = yes; then
12004   if test "$cross_compiling" = yes; then
12005   # Depending upon the size, compute the lo and hi bounds.
12006 cat >conftest.$ac_ext <<_ACEOF
12007 #line 12007 "configure"
12008 #include "confdefs.h"
12009 $ac_includes_default
12010 int
12011 main ()
12012 {
12013 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12014   ;
12015   return 0;
12016 }
12017 _ACEOF
12018 rm -f conftest.$ac_objext
12019 if { (eval echo "$as_me:12019: \"$ac_compile\"") >&5
12020   (eval $ac_compile) 2>&5
12021   ac_status=$?
12022   echo "$as_me:12022: \$? = $ac_status" >&5
12023   (exit $ac_status); } &&
12024          { ac_try='test -s conftest.$ac_objext'
12025   { (eval echo "$as_me:12025: \"$ac_try\"") >&5
12026   (eval $ac_try) 2>&5
12027   ac_status=$?
12028   echo "$as_me:12028: \$? = $ac_status" >&5
12029   (exit $ac_status); }; }; then
12030   ac_lo=0 ac_mid=0
12031   while :; do
12032     cat >conftest.$ac_ext <<_ACEOF
12033 #line 12033 "configure"
12034 #include "confdefs.h"
12035 $ac_includes_default
12036 int
12037 main ()
12038 {
12039 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12040   ;
12041   return 0;
12042 }
12043 _ACEOF
12044 rm -f conftest.$ac_objext
12045 if { (eval echo "$as_me:12045: \"$ac_compile\"") >&5
12046   (eval $ac_compile) 2>&5
12047   ac_status=$?
12048   echo "$as_me:12048: \$? = $ac_status" >&5
12049   (exit $ac_status); } &&
12050          { ac_try='test -s conftest.$ac_objext'
12051   { (eval echo "$as_me:12051: \"$ac_try\"") >&5
12052   (eval $ac_try) 2>&5
12053   ac_status=$?
12054   echo "$as_me:12054: \$? = $ac_status" >&5
12055   (exit $ac_status); }; }; then
12056   ac_hi=$ac_mid; break
12057 else
12058   echo "$as_me: failed program was:" >&5
12059 cat conftest.$ac_ext >&5
12060 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12061 fi
12062 rm -f conftest.$ac_objext conftest.$ac_ext
12063   done
12064 else
12065   echo "$as_me: failed program was:" >&5
12066 cat conftest.$ac_ext >&5
12067 ac_hi=-1 ac_mid=-1
12068   while :; do
12069     cat >conftest.$ac_ext <<_ACEOF
12070 #line 12070 "configure"
12071 #include "confdefs.h"
12072 $ac_includes_default
12073 int
12074 main ()
12075 {
12076 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12077   ;
12078   return 0;
12079 }
12080 _ACEOF
12081 rm -f conftest.$ac_objext
12082 if { (eval echo "$as_me:12082: \"$ac_compile\"") >&5
12083   (eval $ac_compile) 2>&5
12084   ac_status=$?
12085   echo "$as_me:12085: \$? = $ac_status" >&5
12086   (exit $ac_status); } &&
12087          { ac_try='test -s conftest.$ac_objext'
12088   { (eval echo "$as_me:12088: \"$ac_try\"") >&5
12089   (eval $ac_try) 2>&5
12090   ac_status=$?
12091   echo "$as_me:12091: \$? = $ac_status" >&5
12092   (exit $ac_status); }; }; then
12093   ac_lo=$ac_mid; break
12094 else
12095   echo "$as_me: failed program was:" >&5
12096 cat conftest.$ac_ext >&5
12097 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12098 fi
12099 rm -f conftest.$ac_objext conftest.$ac_ext
12100   done
12101 fi
12102 rm -f conftest.$ac_objext conftest.$ac_ext
12103 # Binary search between lo and hi bounds.
12104 while test "x$ac_lo" != "x$ac_hi"; do
12105   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12106   cat >conftest.$ac_ext <<_ACEOF
12107 #line 12107 "configure"
12108 #include "confdefs.h"
12109 $ac_includes_default
12110 int
12111 main ()
12112 {
12113 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12114   ;
12115   return 0;
12116 }
12117 _ACEOF
12118 rm -f conftest.$ac_objext
12119 if { (eval echo "$as_me:12119: \"$ac_compile\"") >&5
12120   (eval $ac_compile) 2>&5
12121   ac_status=$?
12122   echo "$as_me:12122: \$? = $ac_status" >&5
12123   (exit $ac_status); } &&
12124          { ac_try='test -s conftest.$ac_objext'
12125   { (eval echo "$as_me:12125: \"$ac_try\"") >&5
12126   (eval $ac_try) 2>&5
12127   ac_status=$?
12128   echo "$as_me:12128: \$? = $ac_status" >&5
12129   (exit $ac_status); }; }; then
12130   ac_hi=$ac_mid
12131 else
12132   echo "$as_me: failed program was:" >&5
12133 cat conftest.$ac_ext >&5
12134 ac_lo=`expr $ac_mid + 1`
12135 fi
12136 rm -f conftest.$ac_objext conftest.$ac_ext
12137 done
12138 ac_cv_sizeof_signed_char=$ac_lo
12139 else
12140   if test "$cross_compiling" = yes; then
12141   { { echo "$as_me:12141: error: cannot run test program while cross compiling" >&5
12142 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12143    { (exit 1); exit 1; }; }
12144 else
12145   cat >conftest.$ac_ext <<_ACEOF
12146 #line 12146 "configure"
12147 #include "confdefs.h"
12148 $ac_includes_default
12149 int
12150 main ()
12151 {
12152 FILE *f = fopen ("conftest.val", "w");
12153 if (!f)
12154   $ac_main_return (1);
12155 fprintf (f, "%d", (sizeof (signed char)));
12156 fclose (f);
12157   ;
12158   return 0;
12159 }
12160 _ACEOF
12161 rm -f conftest$ac_exeext
12162 if { (eval echo "$as_me:12162: \"$ac_link\"") >&5
12163   (eval $ac_link) 2>&5
12164   ac_status=$?
12165   echo "$as_me:12165: \$? = $ac_status" >&5
12166   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12167   { (eval echo "$as_me:12167: \"$ac_try\"") >&5
12168   (eval $ac_try) 2>&5
12169   ac_status=$?
12170   echo "$as_me:12170: \$? = $ac_status" >&5
12171   (exit $ac_status); }; }; then
12172   ac_cv_sizeof_signed_char=`cat conftest.val`
12173 else
12174   echo "$as_me: program exited with status $ac_status" >&5
12175 echo "$as_me: failed program was:" >&5
12176 cat conftest.$ac_ext >&5
12177 fi
12178 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12179 fi
12180 fi
12181 rm -f conftest.val
12182 else
12183   ac_cv_sizeof_signed_char=0
12184 fi
12185 fi
12186 echo "$as_me:12186: result: $ac_cv_sizeof_signed_char" >&5
12187 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12188 cat >>confdefs.h <<EOF
12189 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12190 EOF
12191
12192 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12193         NCURSES_SBOOL="signed char"
12194 else
12195         NCURSES_SBOOL="char"
12196 fi
12197 echo "$as_me:12197: checking if you want to use signed Boolean array in term.h" >&5
12198 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12199
12200 # Check whether --enable-signed-char or --disable-signed-char was given.
12201 if test "${enable_signed_char+set}" = set; then
12202   enableval="$enable_signed_char"
12203   with_signed_char=$enableval
12204 else
12205   with_signed_char=no
12206 fi;
12207 echo "$as_me:12207: result: $with_signed_char" >&5
12208 echo "${ECHO_T}$with_signed_char" >&6
12209 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12210
12211 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12212 echo "$as_me:12212: checking if you want SIGWINCH handler" >&5
12213 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12214
12215 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12216 if test "${enable_sigwinch+set}" = set; then
12217   enableval="$enable_sigwinch"
12218   with_sigwinch=$enableval
12219 else
12220   with_sigwinch=$with_ext_funcs
12221 fi;
12222 echo "$as_me:12222: result: $with_sigwinch" >&5
12223 echo "${ECHO_T}$with_sigwinch" >&6
12224 test "x$with_sigwinch" = xyes &&
12225 cat >>confdefs.h <<\EOF
12226 #define USE_SIGWINCH 1
12227 EOF
12228
12229 ###   use option --enable-tcap-names to allow user to define new capabilities
12230 echo "$as_me:12230: checking if you want user-definable terminal capabilities like termcap" >&5
12231 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12232
12233 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12234 if test "${enable_tcap_names+set}" = set; then
12235   enableval="$enable_tcap_names"
12236   with_tcap_names=$enableval
12237 else
12238   with_tcap_names=$with_ext_funcs
12239 fi;
12240 echo "$as_me:12240: result: $with_tcap_names" >&5
12241 echo "${ECHO_T}$with_tcap_names" >&6
12242 NCURSES_XNAMES=0
12243 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12244
12245 ###############################################################################
12246 # These options are relatively safe to experiment with.
12247
12248 echo "$as_me:12248: checking if you want all development code" >&5
12249 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12250
12251 # Check whether --with-develop or --without-develop was given.
12252 if test "${with_develop+set}" = set; then
12253   withval="$with_develop"
12254   with_develop=$withval
12255 else
12256   with_develop=no
12257 fi;
12258 echo "$as_me:12258: result: $with_develop" >&5
12259 echo "${ECHO_T}$with_develop" >&6
12260
12261 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12262 echo "$as_me:12262: checking if you want hard-tabs code" >&5
12263 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12264
12265 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12266 if test "${enable_hard_tabs+set}" = set; then
12267   enableval="$enable_hard_tabs"
12268
12269 else
12270   enable_hard_tabs=$with_develop
12271 fi;
12272 echo "$as_me:12272: result: $enable_hard_tabs" >&5
12273 echo "${ECHO_T}$enable_hard_tabs" >&6
12274 test "x$enable_hard_tabs" = xyes &&
12275 cat >>confdefs.h <<\EOF
12276 #define USE_HARD_TABS 1
12277 EOF
12278
12279 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12280 echo "$as_me:12280: checking if you want limited support for xmc" >&5
12281 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12282
12283 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12284 if test "${enable_xmc_glitch+set}" = set; then
12285   enableval="$enable_xmc_glitch"
12286
12287 else
12288   enable_xmc_glitch=$with_develop
12289 fi;
12290 echo "$as_me:12290: result: $enable_xmc_glitch" >&5
12291 echo "${ECHO_T}$enable_xmc_glitch" >&6
12292 test "x$enable_xmc_glitch" = xyes &&
12293 cat >>confdefs.h <<\EOF
12294 #define USE_XMC_SUPPORT 1
12295 EOF
12296
12297 ###############################################################################
12298 # These are just experimental, probably should not be in a package:
12299
12300 echo "$as_me:12300: checking if you do not want to assume colors are white-on-black" >&5
12301 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12302
12303 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12304 if test "${enable_assumed_color+set}" = set; then
12305   enableval="$enable_assumed_color"
12306   with_assumed_color=$enableval
12307 else
12308   with_assumed_color=yes
12309 fi;
12310 echo "$as_me:12310: result: $with_assumed_color" >&5
12311 echo "${ECHO_T}$with_assumed_color" >&6
12312 test "x$with_assumed_color" = xyes &&
12313 cat >>confdefs.h <<\EOF
12314 #define USE_ASSUMED_COLOR 1
12315 EOF
12316
12317 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12318 echo "$as_me:12318: checking if you want hashmap scrolling-optimization code" >&5
12319 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12320
12321 # Check whether --enable-hashmap or --disable-hashmap was given.
12322 if test "${enable_hashmap+set}" = set; then
12323   enableval="$enable_hashmap"
12324   with_hashmap=$enableval
12325 else
12326   with_hashmap=yes
12327 fi;
12328 echo "$as_me:12328: result: $with_hashmap" >&5
12329 echo "${ECHO_T}$with_hashmap" >&6
12330 test "x$with_hashmap" = xyes &&
12331 cat >>confdefs.h <<\EOF
12332 #define USE_HASHMAP 1
12333 EOF
12334
12335 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12336 echo "$as_me:12336: checking if you want colorfgbg code" >&5
12337 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12338
12339 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12340 if test "${enable_colorfgbg+set}" = set; then
12341   enableval="$enable_colorfgbg"
12342   with_colorfgbg=$enableval
12343 else
12344   with_colorfgbg=no
12345 fi;
12346 echo "$as_me:12346: result: $with_colorfgbg" >&5
12347 echo "${ECHO_T}$with_colorfgbg" >&6
12348 test "x$with_colorfgbg" = xyes &&
12349 cat >>confdefs.h <<\EOF
12350 #define USE_COLORFGBG 1
12351 EOF
12352
12353 ###   use option --enable-interop to turn on use of bindings used for interop
12354 echo "$as_me:12354: checking if you want interop bindings" >&5
12355 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12356
12357 # Check whether --enable-interop or --disable-interop was given.
12358 if test "${enable_interop+set}" = set; then
12359   enableval="$enable_interop"
12360   with_exp_interop=$enableval
12361 else
12362   with_exp_interop=$cf_dft_interop
12363 fi;
12364 echo "$as_me:12364: result: $with_exp_interop" >&5
12365 echo "${ECHO_T}$with_exp_interop" >&6
12366
12367 NCURSES_INTEROP_FUNCS=0
12368 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12369
12370 # This is still experimental (20080329), but should ultimately be moved to
12371 # the script-block --with-normal, etc.
12372
12373 echo "$as_me:12373: checking if you want to link with the pthread library" >&5
12374 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12375
12376 # Check whether --with-pthread or --without-pthread was given.
12377 if test "${with_pthread+set}" = set; then
12378   withval="$with_pthread"
12379   with_pthread=$withval
12380 else
12381   with_pthread=no
12382 fi;
12383 echo "$as_me:12383: result: $with_pthread" >&5
12384 echo "${ECHO_T}$with_pthread" >&6
12385
12386 if test "$with_pthread" != no ; then
12387         echo "$as_me:12387: checking for pthread.h" >&5
12388 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12389 if test "${ac_cv_header_pthread_h+set}" = set; then
12390   echo $ECHO_N "(cached) $ECHO_C" >&6
12391 else
12392   cat >conftest.$ac_ext <<_ACEOF
12393 #line 12393 "configure"
12394 #include "confdefs.h"
12395 #include <pthread.h>
12396 _ACEOF
12397 if { (eval echo "$as_me:12397: \"$ac_cpp conftest.$ac_ext\"") >&5
12398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12399   ac_status=$?
12400   egrep -v '^ *\+' conftest.er1 >conftest.err
12401   rm -f conftest.er1
12402   cat conftest.err >&5
12403   echo "$as_me:12403: \$? = $ac_status" >&5
12404   (exit $ac_status); } >/dev/null; then
12405   if test -s conftest.err; then
12406     ac_cpp_err=$ac_c_preproc_warn_flag
12407   else
12408     ac_cpp_err=
12409   fi
12410 else
12411   ac_cpp_err=yes
12412 fi
12413 if test -z "$ac_cpp_err"; then
12414   ac_cv_header_pthread_h=yes
12415 else
12416   echo "$as_me: failed program was:" >&5
12417   cat conftest.$ac_ext >&5
12418   ac_cv_header_pthread_h=no
12419 fi
12420 rm -f conftest.err conftest.$ac_ext
12421 fi
12422 echo "$as_me:12422: result: $ac_cv_header_pthread_h" >&5
12423 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12424 if test $ac_cv_header_pthread_h = yes; then
12425
12426 cat >>confdefs.h <<\EOF
12427 #define HAVE_PTHREADS_H 1
12428 EOF
12429
12430         for cf_lib_pthread in pthread c_r
12431         do
12432             echo "$as_me:12432: checking if we can link with the $cf_lib_pthread library" >&5
12433 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12434             cf_save_LIBS="$LIBS"
12435
12436 cf_add_libs="-l$cf_lib_pthread"
12437 # Filter out duplicates - this happens with badly-designed ".pc" files...
12438 for cf_add_1lib in $LIBS
12439 do
12440         for cf_add_2lib in $cf_add_libs
12441         do
12442                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12443                 then
12444                         cf_add_1lib=
12445                         break
12446                 fi
12447         done
12448         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12449 done
12450 LIBS="$cf_add_libs"
12451
12452             cat >conftest.$ac_ext <<_ACEOF
12453 #line 12453 "configure"
12454 #include "confdefs.h"
12455
12456 #include <pthread.h>
12457
12458 int
12459 main ()
12460 {
12461
12462                 int rc = pthread_create(0,0,0,0);
12463                 int r2 = pthread_mutexattr_settype(0, 0);
12464
12465   ;
12466   return 0;
12467 }
12468 _ACEOF
12469 rm -f conftest.$ac_objext conftest$ac_exeext
12470 if { (eval echo "$as_me:12470: \"$ac_link\"") >&5
12471   (eval $ac_link) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit $ac_status); } &&
12475          { ac_try='test -s conftest$ac_exeext'
12476   { (eval echo "$as_me:12476: \"$ac_try\"") >&5
12477   (eval $ac_try) 2>&5
12478   ac_status=$?
12479   echo "$as_me:12479: \$? = $ac_status" >&5
12480   (exit $ac_status); }; }; then
12481   with_pthread=yes
12482 else
12483   echo "$as_me: failed program was:" >&5
12484 cat conftest.$ac_ext >&5
12485 with_pthread=no
12486 fi
12487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12488             LIBS="$cf_save_LIBS"
12489             echo "$as_me:12489: result: $with_pthread" >&5
12490 echo "${ECHO_T}$with_pthread" >&6
12491             test "$with_pthread" = yes && break
12492         done
12493
12494         if test "$with_pthread" = yes ; then
12495
12496 cf_add_libs="-l$cf_lib_pthread"
12497 # Filter out duplicates - this happens with badly-designed ".pc" files...
12498 for cf_add_1lib in $LIBS
12499 do
12500         for cf_add_2lib in $cf_add_libs
12501         do
12502                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12503                 then
12504                         cf_add_1lib=
12505                         break
12506                 fi
12507         done
12508         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12509 done
12510 LIBS="$cf_add_libs"
12511
12512 cat >>confdefs.h <<\EOF
12513 #define HAVE_LIBPTHREADS 1
12514 EOF
12515
12516         else
12517             { { echo "$as_me:12517: error: Cannot link with pthread library" >&5
12518 echo "$as_me: error: Cannot link with pthread library" >&2;}
12519    { (exit 1); exit 1; }; }
12520         fi
12521
12522 fi
12523
12524 fi
12525
12526 if test "x$with_pthread" != xno; then
12527         echo "$as_me:12527: checking for pthread_kill" >&5
12528 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12529 if test "${ac_cv_func_pthread_kill+set}" = set; then
12530   echo $ECHO_N "(cached) $ECHO_C" >&6
12531 else
12532   cat >conftest.$ac_ext <<_ACEOF
12533 #line 12533 "configure"
12534 #include "confdefs.h"
12535 /* System header to define __stub macros and hopefully few prototypes,
12536     which can conflict with char pthread_kill (); below.  */
12537 #include <assert.h>
12538 /* Override any gcc2 internal prototype to avoid an error.  */
12539 #ifdef __cplusplus
12540 extern "C"
12541 #endif
12542 /* We use char because int might match the return type of a gcc2
12543    builtin and then its argument prototype would still apply.  */
12544 char pthread_kill ();
12545 char (*f) ();
12546
12547 int
12548 main ()
12549 {
12550 /* The GNU C library defines this for functions which it implements
12551     to always fail with ENOSYS.  Some functions are actually named
12552     something starting with __ and the normal name is an alias.  */
12553 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12554 choke me
12555 #else
12556 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12557 #endif
12558
12559   ;
12560   return 0;
12561 }
12562 _ACEOF
12563 rm -f conftest.$ac_objext conftest$ac_exeext
12564 if { (eval echo "$as_me:12564: \"$ac_link\"") >&5
12565   (eval $ac_link) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); } &&
12569          { ac_try='test -s conftest$ac_exeext'
12570   { (eval echo "$as_me:12570: \"$ac_try\"") >&5
12571   (eval $ac_try) 2>&5
12572   ac_status=$?
12573   echo "$as_me:12573: \$? = $ac_status" >&5
12574   (exit $ac_status); }; }; then
12575   ac_cv_func_pthread_kill=yes
12576 else
12577   echo "$as_me: failed program was:" >&5
12578 cat conftest.$ac_ext >&5
12579 ac_cv_func_pthread_kill=no
12580 fi
12581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12582 fi
12583 echo "$as_me:12583: result: $ac_cv_func_pthread_kill" >&5
12584 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12585 if test $ac_cv_func_pthread_kill = yes; then
12586
12587                 echo "$as_me:12587: checking if you want to allow EINTR in wgetch with pthreads" >&5
12588 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12589
12590 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12591 if test "${enable_pthreads_eintr+set}" = set; then
12592   enableval="$enable_pthreads_eintr"
12593   use_pthreads_eintr=$enableval
12594 else
12595   use_pthreads_eintr=no
12596 fi;
12597                 echo "$as_me:12597: result: $use_pthreads_eintr" >&5
12598 echo "${ECHO_T}$use_pthreads_eintr" >&6
12599                 if test "x$use_pthreads_eintr" = xyes ; then
12600
12601 cat >>confdefs.h <<\EOF
12602 #define USE_PTHREADS_EINTR 1
12603 EOF
12604
12605                 fi
12606 fi
12607
12608         echo "$as_me:12608: checking if you want to use weak-symbols for pthreads" >&5
12609 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12610
12611 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12612 if test "${enable_weak_symbols+set}" = set; then
12613   enableval="$enable_weak_symbols"
12614   use_weak_symbols=$enableval
12615 else
12616   use_weak_symbols=no
12617 fi;
12618         echo "$as_me:12618: result: $use_weak_symbols" >&5
12619 echo "${ECHO_T}$use_weak_symbols" >&6
12620         if test "x$use_weak_symbols" = xyes ; then
12621
12622 echo "$as_me:12622: checking if $CC supports weak symbols" >&5
12623 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12624 if test "${cf_cv_weak_symbols+set}" = set; then
12625   echo $ECHO_N "(cached) $ECHO_C" >&6
12626 else
12627
12628 cat >conftest.$ac_ext <<_ACEOF
12629 #line 12629 "configure"
12630 #include "confdefs.h"
12631
12632 #include <stdio.h>
12633 int
12634 main ()
12635 {
12636
12637 #if defined(__GNUC__)
12638 #  if defined __USE_ISOC99
12639 #    define _cat_pragma(exp)    _Pragma(#exp)
12640 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12641 #  else
12642 #    define _weak_pragma(exp)
12643 #  endif
12644 #  define _declare(name)        __extension__ extern __typeof__(name) name
12645 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12646 #endif
12647
12648 weak_symbol(fopen);
12649
12650   ;
12651   return 0;
12652 }
12653 _ACEOF
12654 rm -f conftest.$ac_objext
12655 if { (eval echo "$as_me:12655: \"$ac_compile\"") >&5
12656   (eval $ac_compile) 2>&5
12657   ac_status=$?
12658   echo "$as_me:12658: \$? = $ac_status" >&5
12659   (exit $ac_status); } &&
12660          { ac_try='test -s conftest.$ac_objext'
12661   { (eval echo "$as_me:12661: \"$ac_try\"") >&5
12662   (eval $ac_try) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit $ac_status); }; }; then
12666   cf_cv_weak_symbols=yes
12667 else
12668   echo "$as_me: failed program was:" >&5
12669 cat conftest.$ac_ext >&5
12670 cf_cv_weak_symbols=no
12671 fi
12672 rm -f conftest.$ac_objext conftest.$ac_ext
12673
12674 fi
12675 echo "$as_me:12675: result: $cf_cv_weak_symbols" >&5
12676 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12677
12678         else
12679                 cf_cv_weak_symbols=no
12680         fi
12681
12682         if test "x$cf_cv_weak_symbols" = xyes ; then
12683
12684 cat >>confdefs.h <<\EOF
12685 #define USE_WEAK_SYMBOLS 1
12686 EOF
12687
12688         fi
12689 fi
12690
12691 PTHREAD=
12692 if test "x$with_pthread" = "xyes" ; then
12693
12694 cat >>confdefs.h <<\EOF
12695 #define USE_PTHREADS 1
12696 EOF
12697
12698         enable_reentrant=yes
12699         if test "x$cf_cv_weak_symbols" = xyes ; then
12700                 PTHREAD=-lpthread
12701         fi
12702 fi
12703
12704 # Reentrant code has to be opaque; there's little advantage to making ncurses
12705 # opaque outside of that, so there is no --enable-opaque option.  We can use
12706 # this option without --with-pthreads, but this will be always set for
12707 # pthreads.
12708 echo "$as_me:12708: checking if you want reentrant code" >&5
12709 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12710
12711 # Check whether --enable-reentrant or --disable-reentrant was given.
12712 if test "${enable_reentrant+set}" = set; then
12713   enableval="$enable_reentrant"
12714   with_reentrant=$enableval
12715 else
12716   with_reentrant=no
12717 fi;
12718 echo "$as_me:12718: result: $with_reentrant" >&5
12719 echo "${ECHO_T}$with_reentrant" >&6
12720 if test "x$with_reentrant" = xyes ; then
12721         cf_cv_enable_reentrant=1
12722         cf_cv_enable_opaque="NCURSES_INTERNALS"
12723         NCURSES_OPAQUE=1
12724         NCURSES_SIZE_T=int
12725         if test "x$cf_cv_weak_symbols" = xyes ; then
12726
12727 # remove pthread library from $LIBS
12728 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12729
12730 cf_add_libs="-lpthread"
12731 # Filter out duplicates - this happens with badly-designed ".pc" files...
12732 for cf_add_1lib in $TEST_LIBS
12733 do
12734         for cf_add_2lib in $cf_add_libs
12735         do
12736                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12737                 then
12738                         cf_add_1lib=
12739                         break
12740                 fi
12741         done
12742         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12743 done
12744 TEST_LIBS="$cf_add_libs"
12745
12746 cf_add_libs="-lpthread"
12747 # Filter out duplicates - this happens with badly-designed ".pc" files...
12748 for cf_add_1lib in $TEST_LIBS2
12749 do
12750         for cf_add_2lib in $cf_add_libs
12751         do
12752                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12753                 then
12754                         cf_add_1lib=
12755                         break
12756                 fi
12757         done
12758         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12759 done
12760 TEST_LIBS2="$cf_add_libs"
12761
12762         else
12763                 # when not using weak symbols but with_reentrant,
12764                 # add 't' to the library suffix on all platforms
12765                 # except cygwin, where we only do that if ALSO
12766                 # compiling with full thread support.
12767                 case "$host" in
12768                 (*cygwin* | *msys*)
12769                         if test "$with_pthread" = "yes" ; then
12770                                 if test "x$disable_lib_suffixes" = "xno" ; then
12771                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12772                                 fi
12773                         fi ;;
12774                 (*)
12775                         if test "x$disable_lib_suffixes" = "xno" ; then
12776                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12777                         fi
12778                         ;;
12779                 esac
12780         fi
12781
12782 cat >>confdefs.h <<\EOF
12783 #define USE_REENTRANT 1
12784 EOF
12785
12786 if test "${with_abi_version+set}" != set; then
12787         case $cf_cv_rel_version in
12788         (5.*)
12789                 cf_cv_rel_version=6.0
12790                 cf_cv_abi_version=6
12791                 { echo "$as_me:12791: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12792 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12793                 ;;
12794         esac
12795 fi
12796
12797 else
12798         cf_cv_enable_reentrant=0
12799         cf_cv_enable_opaque="NCURSES_OPAQUE"
12800         NCURSES_OPAQUE=0
12801         NCURSES_SIZE_T=short
12802 fi
12803
12804 ### Allow using a different wrap-prefix
12805 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12806         echo "$as_me:12806: checking for prefix used to wrap public variables" >&5
12807 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12808
12809 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12810 if test "${with_wrap_prefix+set}" = set; then
12811   withval="$with_wrap_prefix"
12812   NCURSES_WRAP_PREFIX=$withval
12813 else
12814   NCURSES_WRAP_PREFIX=_nc_
12815 fi;
12816         echo "$as_me:12816: result: $NCURSES_WRAP_PREFIX" >&5
12817 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12818 else
12819         NCURSES_WRAP_PREFIX=_nc_
12820 fi
12821
12822 cat >>confdefs.h <<EOF
12823 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12824 EOF
12825
12826 echo "$as_me:12826: checking if you want experimental safe-sprintf code" >&5
12827 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12828
12829 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12830 if test "${enable_safe_sprintf+set}" = set; then
12831   enableval="$enable_safe_sprintf"
12832   with_safe_sprintf=$enableval
12833 else
12834   with_safe_sprintf=no
12835 fi;
12836 echo "$as_me:12836: result: $with_safe_sprintf" >&5
12837 echo "${ECHO_T}$with_safe_sprintf" >&6
12838 test "x$with_safe_sprintf" = xyes &&
12839 cat >>confdefs.h <<\EOF
12840 #define USE_SAFE_SPRINTF 1
12841 EOF
12842
12843 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12844 # when hashmap is used scroll hints are useless
12845 if test "$with_hashmap" = no ; then
12846 echo "$as_me:12846: checking if you want to experiment without scrolling-hints code" >&5
12847 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12848
12849 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12850 if test "${enable_scroll_hints+set}" = set; then
12851   enableval="$enable_scroll_hints"
12852   with_scroll_hints=$enableval
12853 else
12854   with_scroll_hints=yes
12855 fi;
12856 echo "$as_me:12856: result: $with_scroll_hints" >&5
12857 echo "${ECHO_T}$with_scroll_hints" >&6
12858 test "x$with_scroll_hints" = xyes &&
12859 cat >>confdefs.h <<\EOF
12860 #define USE_SCROLL_HINTS 1
12861 EOF
12862
12863 fi
12864
12865 echo "$as_me:12865: checking if you want wgetch-events code" >&5
12866 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12867
12868 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12869 if test "${enable_wgetch_events+set}" = set; then
12870   enableval="$enable_wgetch_events"
12871   with_wgetch_events=$enableval
12872 else
12873   with_wgetch_events=no
12874 fi;
12875 echo "$as_me:12875: result: $with_wgetch_events" >&5
12876 echo "${ECHO_T}$with_wgetch_events" >&6
12877 test "x$with_wgetch_events" = xyes &&
12878 cat >>confdefs.h <<\EOF
12879 #define NCURSES_WGETCH_EVENTS 1
12880 EOF
12881
12882 ###############################################################################
12883
12884 ###     use option --disable-echo to suppress full display compiling commands
12885
12886 echo "$as_me:12886: checking if you want to see long compiling messages" >&5
12887 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12888
12889 # Check whether --enable-echo or --disable-echo was given.
12890 if test "${enable_echo+set}" = set; then
12891   enableval="$enable_echo"
12892   test "$enableval" != no && enableval=yes
12893         if test "$enableval" != "yes" ; then
12894
12895         ECHO_LT='--silent'
12896         ECHO_LD='@echo linking $@;'
12897         RULE_CC='@echo compiling $<'
12898         SHOW_CC='@echo compiling $@'
12899         ECHO_CC='@'
12900
12901         else
12902
12903         ECHO_LT=''
12904         ECHO_LD=''
12905         RULE_CC=''
12906         SHOW_CC=''
12907         ECHO_CC=''
12908
12909         fi
12910 else
12911   enableval=yes
12912
12913         ECHO_LT=''
12914         ECHO_LD=''
12915         RULE_CC=''
12916         SHOW_CC=''
12917         ECHO_CC=''
12918
12919 fi;
12920 echo "$as_me:12920: result: $enableval" >&5
12921 echo "${ECHO_T}$enableval" >&6
12922
12923 if test "x$enable_echo" = xyes; then
12924         ECHO_LINK=
12925 else
12926         ECHO_LINK='@ echo linking $@ ... ;'
12927         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12928         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12929 fi
12930
12931 ###     use option --enable-warnings to turn on all gcc warnings
12932 echo "$as_me:12932: checking if you want to see compiler warnings" >&5
12933 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12934
12935 # Check whether --enable-warnings or --disable-warnings was given.
12936 if test "${enable_warnings+set}" = set; then
12937   enableval="$enable_warnings"
12938   with_warnings=$enableval
12939 fi;
12940 echo "$as_me:12940: result: $with_warnings" >&5
12941 echo "${ECHO_T}$with_warnings" >&6
12942
12943 if test "x$with_warnings" = "xyes"; then
12944
12945         ADAFLAGS="$ADAFLAGS -gnatg"
12946
12947 INTEL_COMPILER=no
12948
12949 if test "$GCC" = yes ; then
12950         case $host_os in
12951         (linux*|gnu*)
12952                 echo "$as_me:12952: checking if this is really Intel C compiler" >&5
12953 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12954                 cf_save_CFLAGS="$CFLAGS"
12955                 CFLAGS="$CFLAGS -no-gcc"
12956                 cat >conftest.$ac_ext <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959
12960 int
12961 main ()
12962 {
12963
12964 #ifdef __INTEL_COMPILER
12965 #else
12966 make an error
12967 #endif
12968
12969   ;
12970   return 0;
12971 }
12972 _ACEOF
12973 rm -f conftest.$ac_objext
12974 if { (eval echo "$as_me:12974: \"$ac_compile\"") >&5
12975   (eval $ac_compile) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); } &&
12979          { ac_try='test -s conftest.$ac_objext'
12980   { (eval echo "$as_me:12980: \"$ac_try\"") >&5
12981   (eval $ac_try) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); }; }; then
12985   INTEL_COMPILER=yes
12986 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12987
12988 else
12989   echo "$as_me: failed program was:" >&5
12990 cat conftest.$ac_ext >&5
12991 fi
12992 rm -f conftest.$ac_objext conftest.$ac_ext
12993                 CFLAGS="$cf_save_CFLAGS"
12994                 echo "$as_me:12994: result: $INTEL_COMPILER" >&5
12995 echo "${ECHO_T}$INTEL_COMPILER" >&6
12996                 ;;
12997         esac
12998 fi
12999
13000 CLANG_COMPILER=no
13001
13002 if test "$GCC" = yes ; then
13003         echo "$as_me:13003: checking if this is really Clang C compiler" >&5
13004 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13005         cf_save_CFLAGS="$CFLAGS"
13006         CFLAGS="$CFLAGS -Qunused-arguments"
13007         cat >conftest.$ac_ext <<_ACEOF
13008 #line 13008 "configure"
13009 #include "confdefs.h"
13010
13011 int
13012 main ()
13013 {
13014
13015 #ifdef __clang__
13016 #else
13017 make an error
13018 #endif
13019
13020   ;
13021   return 0;
13022 }
13023 _ACEOF
13024 rm -f conftest.$ac_objext
13025 if { (eval echo "$as_me:13025: \"$ac_compile\"") >&5
13026   (eval $ac_compile) 2>&5
13027   ac_status=$?
13028   echo "$as_me:13028: \$? = $ac_status" >&5
13029   (exit $ac_status); } &&
13030          { ac_try='test -s conftest.$ac_objext'
13031   { (eval echo "$as_me:13031: \"$ac_try\"") >&5
13032   (eval $ac_try) 2>&5
13033   ac_status=$?
13034   echo "$as_me:13034: \$? = $ac_status" >&5
13035   (exit $ac_status); }; }; then
13036   CLANG_COMPILER=yes
13037 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13038
13039 else
13040   echo "$as_me: failed program was:" >&5
13041 cat conftest.$ac_ext >&5
13042 fi
13043 rm -f conftest.$ac_objext conftest.$ac_ext
13044         CFLAGS="$cf_save_CFLAGS"
13045         echo "$as_me:13045: result: $CLANG_COMPILER" >&5
13046 echo "${ECHO_T}$CLANG_COMPILER" >&6
13047 fi
13048
13049 cat > conftest.$ac_ext <<EOF
13050 #line 13050 "${as_me:-configure}"
13051 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13052 EOF
13053
13054 if test "$INTEL_COMPILER" = yes
13055 then
13056 # The "-wdXXX" options suppress warnings:
13057 # remark #1419: external declaration in primary source file
13058 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13059 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13060 # remark #193: zero used for undefined preprocessing identifier
13061 # remark #593: variable "curs_sb_left_arrow" was set but never used
13062 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13063 # remark #869: parameter "tw" was never referenced
13064 # remark #981: operands are evaluated in unspecified order
13065 # warning #279: controlling expression is constant
13066
13067         { echo "$as_me:13067: checking for $CC warning options..." >&5
13068 echo "$as_me: checking for $CC warning options..." >&6;}
13069         cf_save_CFLAGS="$CFLAGS"
13070         EXTRA_CFLAGS="-Wall"
13071         for cf_opt in \
13072                 wd1419 \
13073                 wd1683 \
13074                 wd1684 \
13075                 wd193 \
13076                 wd593 \
13077                 wd279 \
13078                 wd810 \
13079                 wd869 \
13080                 wd981
13081         do
13082                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13083                 if { (eval echo "$as_me:13083: \"$ac_compile\"") >&5
13084   (eval $ac_compile) 2>&5
13085   ac_status=$?
13086   echo "$as_me:13086: \$? = $ac_status" >&5
13087   (exit $ac_status); }; then
13088                         test -n "$verbose" && echo "$as_me:13088: result: ... -$cf_opt" >&5
13089 echo "${ECHO_T}... -$cf_opt" >&6
13090                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13091                 fi
13092         done
13093         CFLAGS="$cf_save_CFLAGS"
13094
13095 elif test "$GCC" = yes
13096 then
13097         { echo "$as_me:13097: checking for $CC warning options..." >&5
13098 echo "$as_me: checking for $CC warning options..." >&6;}
13099         cf_save_CFLAGS="$CFLAGS"
13100         EXTRA_CFLAGS=
13101         cf_warn_CONST=""
13102         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13103         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13104         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13105         for cf_opt in W Wall \
13106                 Wbad-function-cast \
13107                 Wcast-align \
13108                 Wcast-qual \
13109                 Wdeclaration-after-statement \
13110                 Wextra \
13111                 Winline \
13112                 Wmissing-declarations \
13113                 Wmissing-prototypes \
13114                 Wnested-externs \
13115                 Wpointer-arith \
13116                 Wshadow \
13117                 Wstrict-prototypes \
13118                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13119         do
13120                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13121                 if { (eval echo "$as_me:13121: \"$ac_compile\"") >&5
13122   (eval $ac_compile) 2>&5
13123   ac_status=$?
13124   echo "$as_me:13124: \$? = $ac_status" >&5
13125   (exit $ac_status); }; then
13126                         test -n "$verbose" && echo "$as_me:13126: result: ... -$cf_opt" >&5
13127 echo "${ECHO_T}... -$cf_opt" >&6
13128                         case $cf_opt in
13129                         (Wcast-qual)
13130                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13131                                 ;;
13132                         (Winline)
13133                                 case $GCC_VERSION in
13134                                 ([34].*)
13135                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13136
13137 echo "${as_me:-configure}:13137: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13138
13139                                         continue;;
13140                                 esac
13141                                 ;;
13142                         (Wpointer-arith)
13143                                 case $GCC_VERSION in
13144                                 ([12].*)
13145                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13146
13147 echo "${as_me:-configure}:13147: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13148
13149                                         continue;;
13150                                 esac
13151                                 ;;
13152                         esac
13153                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13154                 fi
13155         done
13156         CFLAGS="$cf_save_CFLAGS"
13157 fi
13158 rm -rf conftest*
13159
13160         if test "x$cf_with_cxx" = xyes ; then
13161
13162 INTEL_CPLUSPLUS=no
13163
13164 if test "$GCC" = yes ; then
13165         case $host_os in
13166         (linux*|gnu*)
13167                 echo "$as_me:13167: checking if this is really Intel C++ compiler" >&5
13168 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13169                 cf_save_CFLAGS="$CXXFLAGS"
13170                 CXXFLAGS="$CXXFLAGS -no-gcc"
13171                 cat >conftest.$ac_ext <<_ACEOF
13172 #line 13172 "configure"
13173 #include "confdefs.h"
13174
13175 int
13176 main ()
13177 {
13178
13179 #ifdef __INTEL_COMPILER
13180 #else
13181 make an error
13182 #endif
13183
13184   ;
13185   return 0;
13186 }
13187 _ACEOF
13188 rm -f conftest.$ac_objext
13189 if { (eval echo "$as_me:13189: \"$ac_compile\"") >&5
13190   (eval $ac_compile) 2>&5
13191   ac_status=$?
13192   echo "$as_me:13192: \$? = $ac_status" >&5
13193   (exit $ac_status); } &&
13194          { ac_try='test -s conftest.$ac_objext'
13195   { (eval echo "$as_me:13195: \"$ac_try\"") >&5
13196   (eval $ac_try) 2>&5
13197   ac_status=$?
13198   echo "$as_me:13198: \$? = $ac_status" >&5
13199   (exit $ac_status); }; }; then
13200   INTEL_CPLUSPLUS=yes
13201 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13202
13203 else
13204   echo "$as_me: failed program was:" >&5
13205 cat conftest.$ac_ext >&5
13206 fi
13207 rm -f conftest.$ac_objext conftest.$ac_ext
13208                 CXXFLAGS="$cf_save_CFLAGS"
13209                 echo "$as_me:13209: result: $INTEL_CPLUSPLUS" >&5
13210 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13211                 ;;
13212         esac
13213 fi
13214
13215 CLANG_CPLUSPLUS=no
13216
13217 if test "$GCC" = yes ; then
13218         echo "$as_me:13218: checking if this is really Clang C++ compiler" >&5
13219 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13220         cf_save_CFLAGS="$CXXFLAGS"
13221         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13222         cat >conftest.$ac_ext <<_ACEOF
13223 #line 13223 "configure"
13224 #include "confdefs.h"
13225
13226 int
13227 main ()
13228 {
13229
13230 #ifdef __clang__
13231 #else
13232 make an error
13233 #endif
13234
13235   ;
13236   return 0;
13237 }
13238 _ACEOF
13239 rm -f conftest.$ac_objext
13240 if { (eval echo "$as_me:13240: \"$ac_compile\"") >&5
13241   (eval $ac_compile) 2>&5
13242   ac_status=$?
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); } &&
13245          { ac_try='test -s conftest.$ac_objext'
13246   { (eval echo "$as_me:13246: \"$ac_try\"") >&5
13247   (eval $ac_try) 2>&5
13248   ac_status=$?
13249   echo "$as_me:13249: \$? = $ac_status" >&5
13250   (exit $ac_status); }; }; then
13251   CLANG_CPLUSPLUS=yes
13252 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13253
13254 else
13255   echo "$as_me: failed program was:" >&5
13256 cat conftest.$ac_ext >&5
13257 fi
13258 rm -f conftest.$ac_objext conftest.$ac_ext
13259         CXXFLAGS="$cf_save_CFLAGS"
13260         echo "$as_me:13260: result: $CLANG_CPLUSPLUS" >&5
13261 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13262 fi
13263
13264 ac_ext=cc
13265 ac_cpp='$CXXCPP $CPPFLAGS'
13266 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13267 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13268 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13269 ac_main_return=return
13270
13271 cat > conftest.$ac_ext <<EOF
13272 #line 13272 "configure"
13273 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13274 EOF
13275
13276 if test "$INTEL_CPLUSPLUS" = yes
13277 then
13278 # The "-wdXXX" options suppress warnings:
13279 # remark #1419: external declaration in primary source file
13280 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13281 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13282 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13283 # remark #193: zero used for undefined preprocessing identifier
13284 # remark #593: variable "curs_sb_left_arrow" was set but never used
13285 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13286 # remark #869: parameter "tw" was never referenced
13287 # remark #981: operands are evaluated in unspecified order
13288 # warning #269: invalid format string conversion
13289
13290         { echo "$as_me:13290: checking for $CC warning options..." >&5
13291 echo "$as_me: checking for $CC warning options..." >&6;}
13292         cf_save_CXXFLAGS="$CXXFLAGS"
13293         EXTRA_CXXFLAGS="-Wall"
13294         for cf_opt in \
13295                 wd1419 \
13296                 wd1682 \
13297                 wd1683 \
13298                 wd1684 \
13299                 wd193 \
13300                 wd279 \
13301                 wd593 \
13302                 wd810 \
13303                 wd869 \
13304                 wd981
13305         do
13306                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13307                 if { (eval echo "$as_me:13307: \"$ac_compile\"") >&5
13308   (eval $ac_compile) 2>&5
13309   ac_status=$?
13310   echo "$as_me:13310: \$? = $ac_status" >&5
13311   (exit $ac_status); }; then
13312                         test -n "$verbose" && echo "$as_me:13312: result: ... -$cf_opt" >&5
13313 echo "${ECHO_T}... -$cf_opt" >&6
13314                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13315                 fi
13316         done
13317         CXXFLAGS="$cf_save_CXXFLAGS"
13318
13319 elif test "$GXX" = yes
13320 then
13321         { echo "$as_me:13321: checking for $CXX warning options..." >&5
13322 echo "$as_me: checking for $CXX warning options..." >&6;}
13323         cf_save_CXXFLAGS="$CXXFLAGS"
13324         EXTRA_CXXFLAGS="-W -Wall"
13325         cf_gxx_extra_warnings=""
13326         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13327         case "$GCC_VERSION" in
13328         ([1-2].*)
13329                 ;;
13330         (*)
13331                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13332                 ;;
13333         esac
13334         for cf_opt in \
13335                 Wabi \
13336                 fabi-version=0 \
13337                 Wextra \
13338                 Wignored-qualifiers \
13339                 Wlogical-op \
13340                 Woverloaded-virtual \
13341                 Wsign-promo \
13342                 Wsynth \
13343                 Wold-style-cast \
13344                 Wcast-align \
13345                 Wcast-qual \
13346                 Wpointer-arith \
13347                 Wshadow \
13348                 Wundef $cf_gxx_extra_warnings Wno-unused
13349         do
13350                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13351                 if { (eval echo "$as_me:13351: \"$ac_compile\"") >&5
13352   (eval $ac_compile) 2>&5
13353   ac_status=$?
13354   echo "$as_me:13354: \$? = $ac_status" >&5
13355   (exit $ac_status); }; then
13356                         test -n "$verbose" && echo "$as_me:13356: result: ... -$cf_opt" >&5
13357 echo "${ECHO_T}... -$cf_opt" >&6
13358                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13359                 else
13360                         test -n "$verbose" && echo "$as_me:13360: result: ... no -$cf_opt" >&5
13361 echo "${ECHO_T}... no -$cf_opt" >&6
13362                 fi
13363         done
13364         CXXFLAGS="$cf_save_CXXFLAGS"
13365 fi
13366
13367 rm -rf conftest*
13368 ac_ext=c
13369 ac_cpp='$CPP $CPPFLAGS'
13370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13373 ac_main_return=return
13374
13375         fi
13376 fi
13377
13378 if test "$GCC" = yes
13379 then
13380 cat > conftest.i <<EOF
13381 #ifndef GCC_PRINTF
13382 #define GCC_PRINTF 0
13383 #endif
13384 #ifndef GCC_SCANF
13385 #define GCC_SCANF 0
13386 #endif
13387 #ifndef GCC_NORETURN
13388 #define GCC_NORETURN /* nothing */
13389 #endif
13390 #ifndef GCC_UNUSED
13391 #define GCC_UNUSED /* nothing */
13392 #endif
13393 EOF
13394 if test "$GCC" = yes
13395 then
13396         { echo "$as_me:13396: checking for $CC __attribute__ directives..." >&5
13397 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13398 cat > conftest.$ac_ext <<EOF
13399 #line 13399 "${as_me:-configure}"
13400 #include "confdefs.h"
13401 #include "conftest.h"
13402 #include "conftest.i"
13403 #if     GCC_PRINTF
13404 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13405 #else
13406 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13407 #endif
13408 #if     GCC_SCANF
13409 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13410 #else
13411 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13412 #endif
13413 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13414 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13415 extern void foo(void) GCC_NORETURN;
13416 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13417 EOF
13418         cf_printf_attribute=no
13419         cf_scanf_attribute=no
13420         for cf_attribute in scanf printf unused noreturn
13421         do
13422
13423 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13424
13425                 cf_directive="__attribute__(($cf_attribute))"
13426                 echo "checking for $CC $cf_directive" 1>&5
13427
13428                 case $cf_attribute in
13429                 (printf)
13430                         cf_printf_attribute=yes
13431                         cat >conftest.h <<EOF
13432 #define GCC_$cf_ATTRIBUTE 1
13433 EOF
13434                         ;;
13435                 (scanf)
13436                         cf_scanf_attribute=yes
13437                         cat >conftest.h <<EOF
13438 #define GCC_$cf_ATTRIBUTE 1
13439 EOF
13440                         ;;
13441                 (*)
13442                         cat >conftest.h <<EOF
13443 #define GCC_$cf_ATTRIBUTE $cf_directive
13444 EOF
13445                         ;;
13446                 esac
13447
13448                 if { (eval echo "$as_me:13448: \"$ac_compile\"") >&5
13449   (eval $ac_compile) 2>&5
13450   ac_status=$?
13451   echo "$as_me:13451: \$? = $ac_status" >&5
13452   (exit $ac_status); }; then
13453                         test -n "$verbose" && echo "$as_me:13453: result: ... $cf_attribute" >&5
13454 echo "${ECHO_T}... $cf_attribute" >&6
13455                         cat conftest.h >>confdefs.h
13456                         case $cf_attribute in
13457                         (noreturn)
13458
13459 cat >>confdefs.h <<EOF
13460 #define GCC_NORETURN $cf_directive
13461 EOF
13462
13463                                 ;;
13464                         (printf)
13465                                 cf_value='/* nothing */'
13466                                 if test "$cf_printf_attribute" != no ; then
13467                                         cf_value='__attribute__((format(printf,fmt,var)))'
13468
13469 cat >>confdefs.h <<\EOF
13470 #define GCC_PRINTF 1
13471 EOF
13472
13473                                 fi
13474
13475 cat >>confdefs.h <<EOF
13476 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13477 EOF
13478
13479                                 ;;
13480                         (scanf)
13481                                 cf_value='/* nothing */'
13482                                 if test "$cf_scanf_attribute" != no ; then
13483                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13484
13485 cat >>confdefs.h <<\EOF
13486 #define GCC_SCANF 1
13487 EOF
13488
13489                                 fi
13490
13491 cat >>confdefs.h <<EOF
13492 #define GCC_SCANFLIKE(fmt,var) $cf_value
13493 EOF
13494
13495                                 ;;
13496                         (unused)
13497
13498 cat >>confdefs.h <<EOF
13499 #define GCC_UNUSED $cf_directive
13500 EOF
13501
13502                                 ;;
13503                         esac
13504                 fi
13505         done
13506 else
13507         fgrep define conftest.i >>confdefs.h
13508 fi
13509 rm -rf conftest*
13510 fi
13511
13512 echo "$as_me:13512: checking if you want to work around bogus compiler/loader warnings" >&5
13513 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13514
13515 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13516 if test "${enable_string_hacks+set}" = set; then
13517   enableval="$enable_string_hacks"
13518   with_string_hacks=$enableval
13519 else
13520   with_string_hacks=no
13521 fi;
13522 echo "$as_me:13522: result: $with_string_hacks" >&5
13523 echo "${ECHO_T}$with_string_hacks" >&6
13524
13525 if test "x$with_string_hacks" = "xyes"; then
13526
13527 cat >>confdefs.h <<\EOF
13528 #define USE_STRING_HACKS 1
13529 EOF
13530
13531         { echo "$as_me:13531: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13532 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13533
13534 for ac_func in strlcat strlcpy snprintf
13535 do
13536 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13537 echo "$as_me:13537: checking for $ac_func" >&5
13538 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13539 if eval "test \"\${$as_ac_var+set}\" = set"; then
13540   echo $ECHO_N "(cached) $ECHO_C" >&6
13541 else
13542   cat >conftest.$ac_ext <<_ACEOF
13543 #line 13543 "configure"
13544 #include "confdefs.h"
13545 /* System header to define __stub macros and hopefully few prototypes,
13546     which can conflict with char $ac_func (); below.  */
13547 #include <assert.h>
13548 /* Override any gcc2 internal prototype to avoid an error.  */
13549 #ifdef __cplusplus
13550 extern "C"
13551 #endif
13552 /* We use char because int might match the return type of a gcc2
13553    builtin and then its argument prototype would still apply.  */
13554 char $ac_func ();
13555 char (*f) ();
13556
13557 int
13558 main ()
13559 {
13560 /* The GNU C library defines this for functions which it implements
13561     to always fail with ENOSYS.  Some functions are actually named
13562     something starting with __ and the normal name is an alias.  */
13563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13564 choke me
13565 #else
13566 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13567 #endif
13568
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 rm -f conftest.$ac_objext conftest$ac_exeext
13574 if { (eval echo "$as_me:13574: \"$ac_link\"") >&5
13575   (eval $ac_link) 2>&5
13576   ac_status=$?
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit $ac_status); } &&
13579          { ac_try='test -s conftest$ac_exeext'
13580   { (eval echo "$as_me:13580: \"$ac_try\"") >&5
13581   (eval $ac_try) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit $ac_status); }; }; then
13585   eval "$as_ac_var=yes"
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 cat conftest.$ac_ext >&5
13589 eval "$as_ac_var=no"
13590 fi
13591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13592 fi
13593 echo "$as_me:13593: result: `eval echo '${'$as_ac_var'}'`" >&5
13594 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13595 if test `eval echo '${'$as_ac_var'}'` = yes; then
13596   cat >>confdefs.h <<EOF
13597 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13598 EOF
13599
13600 fi
13601 done
13602
13603 fi
13604
13605 ###     use option --enable-assertions to turn on generation of assertion code
13606 echo "$as_me:13606: checking if you want to enable runtime assertions" >&5
13607 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13608
13609 # Check whether --enable-assertions or --disable-assertions was given.
13610 if test "${enable_assertions+set}" = set; then
13611   enableval="$enable_assertions"
13612   with_assertions=$enableval
13613 else
13614   with_assertions=no
13615 fi;
13616 echo "$as_me:13616: result: $with_assertions" >&5
13617 echo "${ECHO_T}$with_assertions" >&6
13618 if test -n "$GCC"
13619 then
13620         if test "$with_assertions" = no
13621         then
13622                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13623         else
13624
13625         ADAFLAGS="$ADAFLAGS -gnata"
13626
13627         fi
13628 fi
13629
13630 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13631
13632 echo "$as_me:13632: checking if you want to use dmalloc for testing" >&5
13633 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13634
13635 # Check whether --with-dmalloc or --without-dmalloc was given.
13636 if test "${with_dmalloc+set}" = set; then
13637   withval="$with_dmalloc"
13638
13639 cat >>confdefs.h <<EOF
13640 #define USE_DMALLOC 1
13641 EOF
13642
13643         : ${with_cflags:=-g}
13644         : ${with_no_leaks:=yes}
13645          with_dmalloc=yes
13646 else
13647   with_dmalloc=
13648 fi;
13649 echo "$as_me:13649: result: ${with_dmalloc:-no}" >&5
13650 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13651
13652 case .$with_cflags in
13653 (.*-g*)
13654         case .$CFLAGS in
13655         (.*-g*)
13656                 ;;
13657         (*)
13658
13659 cf_fix_cppflags=no
13660 cf_new_cflags=
13661 cf_new_cppflags=
13662 cf_new_extra_cppflags=
13663
13664 for cf_add_cflags in -g
13665 do
13666 case $cf_fix_cppflags in
13667 (no)
13668         case $cf_add_cflags in
13669         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13670                 case $cf_add_cflags in
13671                 (-D*)
13672                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13673
13674                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13675                                 && test -z "${cf_tst_cflags}" \
13676                                 && cf_fix_cppflags=yes
13677
13678                         if test $cf_fix_cppflags = yes ; then
13679                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13680                                 continue
13681                         elif test "${cf_tst_cflags}" = "\"'" ; then
13682                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13683                                 continue
13684                         fi
13685                         ;;
13686                 esac
13687                 case "$CPPFLAGS" in
13688                 (*$cf_add_cflags)
13689                         ;;
13690                 (*)
13691                         case $cf_add_cflags in
13692                         (-D*)
13693                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13694
13695 CPPFLAGS=`echo "$CPPFLAGS" | \
13696         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13697                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13698
13699                                 ;;
13700                         esac
13701                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13702                         ;;
13703                 esac
13704                 ;;
13705         (*)
13706                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13707                 ;;
13708         esac
13709         ;;
13710 (yes)
13711         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13712
13713         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13714
13715         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13716                 && test -z "${cf_tst_cflags}" \
13717                 && cf_fix_cppflags=no
13718         ;;
13719 esac
13720 done
13721
13722 if test -n "$cf_new_cflags" ; then
13723
13724         CFLAGS="$CFLAGS $cf_new_cflags"
13725 fi
13726
13727 if test -n "$cf_new_cppflags" ; then
13728
13729         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13730 fi
13731
13732 if test -n "$cf_new_extra_cppflags" ; then
13733
13734         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13735 fi
13736
13737                 ;;
13738         esac
13739         ;;
13740 esac
13741
13742 if test "$with_dmalloc" = yes ; then
13743         echo "$as_me:13743: checking for dmalloc.h" >&5
13744 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13745 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13746   echo $ECHO_N "(cached) $ECHO_C" >&6
13747 else
13748   cat >conftest.$ac_ext <<_ACEOF
13749 #line 13749 "configure"
13750 #include "confdefs.h"
13751 #include <dmalloc.h>
13752 _ACEOF
13753 if { (eval echo "$as_me:13753: \"$ac_cpp conftest.$ac_ext\"") >&5
13754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13755   ac_status=$?
13756   egrep -v '^ *\+' conftest.er1 >conftest.err
13757   rm -f conftest.er1
13758   cat conftest.err >&5
13759   echo "$as_me:13759: \$? = $ac_status" >&5
13760   (exit $ac_status); } >/dev/null; then
13761   if test -s conftest.err; then
13762     ac_cpp_err=$ac_c_preproc_warn_flag
13763   else
13764     ac_cpp_err=
13765   fi
13766 else
13767   ac_cpp_err=yes
13768 fi
13769 if test -z "$ac_cpp_err"; then
13770   ac_cv_header_dmalloc_h=yes
13771 else
13772   echo "$as_me: failed program was:" >&5
13773   cat conftest.$ac_ext >&5
13774   ac_cv_header_dmalloc_h=no
13775 fi
13776 rm -f conftest.err conftest.$ac_ext
13777 fi
13778 echo "$as_me:13778: result: $ac_cv_header_dmalloc_h" >&5
13779 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13780 if test $ac_cv_header_dmalloc_h = yes; then
13781
13782 echo "$as_me:13782: checking for dmalloc_debug in -ldmalloc" >&5
13783 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13784 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13785   echo $ECHO_N "(cached) $ECHO_C" >&6
13786 else
13787   ac_check_lib_save_LIBS=$LIBS
13788 LIBS="-ldmalloc  $LIBS"
13789 cat >conftest.$ac_ext <<_ACEOF
13790 #line 13790 "configure"
13791 #include "confdefs.h"
13792
13793 /* Override any gcc2 internal prototype to avoid an error.  */
13794 #ifdef __cplusplus
13795 extern "C"
13796 #endif
13797 /* We use char because int might match the return type of a gcc2
13798    builtin and then its argument prototype would still apply.  */
13799 char dmalloc_debug ();
13800 int
13801 main ()
13802 {
13803 dmalloc_debug ();
13804   ;
13805   return 0;
13806 }
13807 _ACEOF
13808 rm -f conftest.$ac_objext conftest$ac_exeext
13809 if { (eval echo "$as_me:13809: \"$ac_link\"") >&5
13810   (eval $ac_link) 2>&5
13811   ac_status=$?
13812   echo "$as_me:13812: \$? = $ac_status" >&5
13813   (exit $ac_status); } &&
13814          { ac_try='test -s conftest$ac_exeext'
13815   { (eval echo "$as_me:13815: \"$ac_try\"") >&5
13816   (eval $ac_try) 2>&5
13817   ac_status=$?
13818   echo "$as_me:13818: \$? = $ac_status" >&5
13819   (exit $ac_status); }; }; then
13820   ac_cv_lib_dmalloc_dmalloc_debug=yes
13821 else
13822   echo "$as_me: failed program was:" >&5
13823 cat conftest.$ac_ext >&5
13824 ac_cv_lib_dmalloc_dmalloc_debug=no
13825 fi
13826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13827 LIBS=$ac_check_lib_save_LIBS
13828 fi
13829 echo "$as_me:13829: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13830 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13831 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13832   cat >>confdefs.h <<EOF
13833 #define HAVE_LIBDMALLOC 1
13834 EOF
13835
13836   LIBS="-ldmalloc $LIBS"
13837
13838 fi
13839
13840 fi
13841
13842 fi
13843
13844 echo "$as_me:13844: checking if you want to use dbmalloc for testing" >&5
13845 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13846
13847 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13848 if test "${with_dbmalloc+set}" = set; then
13849   withval="$with_dbmalloc"
13850
13851 cat >>confdefs.h <<EOF
13852 #define USE_DBMALLOC 1
13853 EOF
13854
13855         : ${with_cflags:=-g}
13856         : ${with_no_leaks:=yes}
13857          with_dbmalloc=yes
13858 else
13859   with_dbmalloc=
13860 fi;
13861 echo "$as_me:13861: result: ${with_dbmalloc:-no}" >&5
13862 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13863
13864 case .$with_cflags in
13865 (.*-g*)
13866         case .$CFLAGS in
13867         (.*-g*)
13868                 ;;
13869         (*)
13870
13871 cf_fix_cppflags=no
13872 cf_new_cflags=
13873 cf_new_cppflags=
13874 cf_new_extra_cppflags=
13875
13876 for cf_add_cflags in -g
13877 do
13878 case $cf_fix_cppflags in
13879 (no)
13880         case $cf_add_cflags in
13881         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13882                 case $cf_add_cflags in
13883                 (-D*)
13884                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13885
13886                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13887                                 && test -z "${cf_tst_cflags}" \
13888                                 && cf_fix_cppflags=yes
13889
13890                         if test $cf_fix_cppflags = yes ; then
13891                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13892                                 continue
13893                         elif test "${cf_tst_cflags}" = "\"'" ; then
13894                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13895                                 continue
13896                         fi
13897                         ;;
13898                 esac
13899                 case "$CPPFLAGS" in
13900                 (*$cf_add_cflags)
13901                         ;;
13902                 (*)
13903                         case $cf_add_cflags in
13904                         (-D*)
13905                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13906
13907 CPPFLAGS=`echo "$CPPFLAGS" | \
13908         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13909                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13910
13911                                 ;;
13912                         esac
13913                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13914                         ;;
13915                 esac
13916                 ;;
13917         (*)
13918                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13919                 ;;
13920         esac
13921         ;;
13922 (yes)
13923         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13924
13925         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13926
13927         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13928                 && test -z "${cf_tst_cflags}" \
13929                 && cf_fix_cppflags=no
13930         ;;
13931 esac
13932 done
13933
13934 if test -n "$cf_new_cflags" ; then
13935
13936         CFLAGS="$CFLAGS $cf_new_cflags"
13937 fi
13938
13939 if test -n "$cf_new_cppflags" ; then
13940
13941         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13942 fi
13943
13944 if test -n "$cf_new_extra_cppflags" ; then
13945
13946         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13947 fi
13948
13949                 ;;
13950         esac
13951         ;;
13952 esac
13953
13954 if test "$with_dbmalloc" = yes ; then
13955         echo "$as_me:13955: checking for dbmalloc.h" >&5
13956 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13957 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13958   echo $ECHO_N "(cached) $ECHO_C" >&6
13959 else
13960   cat >conftest.$ac_ext <<_ACEOF
13961 #line 13961 "configure"
13962 #include "confdefs.h"
13963 #include <dbmalloc.h>
13964 _ACEOF
13965 if { (eval echo "$as_me:13965: \"$ac_cpp conftest.$ac_ext\"") >&5
13966   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13967   ac_status=$?
13968   egrep -v '^ *\+' conftest.er1 >conftest.err
13969   rm -f conftest.er1
13970   cat conftest.err >&5
13971   echo "$as_me:13971: \$? = $ac_status" >&5
13972   (exit $ac_status); } >/dev/null; then
13973   if test -s conftest.err; then
13974     ac_cpp_err=$ac_c_preproc_warn_flag
13975   else
13976     ac_cpp_err=
13977   fi
13978 else
13979   ac_cpp_err=yes
13980 fi
13981 if test -z "$ac_cpp_err"; then
13982   ac_cv_header_dbmalloc_h=yes
13983 else
13984   echo "$as_me: failed program was:" >&5
13985   cat conftest.$ac_ext >&5
13986   ac_cv_header_dbmalloc_h=no
13987 fi
13988 rm -f conftest.err conftest.$ac_ext
13989 fi
13990 echo "$as_me:13990: result: $ac_cv_header_dbmalloc_h" >&5
13991 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13992 if test $ac_cv_header_dbmalloc_h = yes; then
13993
13994 echo "$as_me:13994: checking for debug_malloc in -ldbmalloc" >&5
13995 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13996 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13997   echo $ECHO_N "(cached) $ECHO_C" >&6
13998 else
13999   ac_check_lib_save_LIBS=$LIBS
14000 LIBS="-ldbmalloc  $LIBS"
14001 cat >conftest.$ac_ext <<_ACEOF
14002 #line 14002 "configure"
14003 #include "confdefs.h"
14004
14005 /* Override any gcc2 internal prototype to avoid an error.  */
14006 #ifdef __cplusplus
14007 extern "C"
14008 #endif
14009 /* We use char because int might match the return type of a gcc2
14010    builtin and then its argument prototype would still apply.  */
14011 char debug_malloc ();
14012 int
14013 main ()
14014 {
14015 debug_malloc ();
14016   ;
14017   return 0;
14018 }
14019 _ACEOF
14020 rm -f conftest.$ac_objext conftest$ac_exeext
14021 if { (eval echo "$as_me:14021: \"$ac_link\"") >&5
14022   (eval $ac_link) 2>&5
14023   ac_status=$?
14024   echo "$as_me:14024: \$? = $ac_status" >&5
14025   (exit $ac_status); } &&
14026          { ac_try='test -s conftest$ac_exeext'
14027   { (eval echo "$as_me:14027: \"$ac_try\"") >&5
14028   (eval $ac_try) 2>&5
14029   ac_status=$?
14030   echo "$as_me:14030: \$? = $ac_status" >&5
14031   (exit $ac_status); }; }; then
14032   ac_cv_lib_dbmalloc_debug_malloc=yes
14033 else
14034   echo "$as_me: failed program was:" >&5
14035 cat conftest.$ac_ext >&5
14036 ac_cv_lib_dbmalloc_debug_malloc=no
14037 fi
14038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14039 LIBS=$ac_check_lib_save_LIBS
14040 fi
14041 echo "$as_me:14041: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14042 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14043 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14044   cat >>confdefs.h <<EOF
14045 #define HAVE_LIBDBMALLOC 1
14046 EOF
14047
14048   LIBS="-ldbmalloc $LIBS"
14049
14050 fi
14051
14052 fi
14053
14054 fi
14055
14056 echo "$as_me:14056: checking if you want to use valgrind for testing" >&5
14057 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14058
14059 # Check whether --with-valgrind or --without-valgrind was given.
14060 if test "${with_valgrind+set}" = set; then
14061   withval="$with_valgrind"
14062
14063 cat >>confdefs.h <<EOF
14064 #define USE_VALGRIND 1
14065 EOF
14066
14067         : ${with_cflags:=-g}
14068         : ${with_no_leaks:=yes}
14069          with_valgrind=yes
14070 else
14071   with_valgrind=
14072 fi;
14073 echo "$as_me:14073: result: ${with_valgrind:-no}" >&5
14074 echo "${ECHO_T}${with_valgrind:-no}" >&6
14075
14076 case .$with_cflags in
14077 (.*-g*)
14078         case .$CFLAGS in
14079         (.*-g*)
14080                 ;;
14081         (*)
14082
14083 cf_fix_cppflags=no
14084 cf_new_cflags=
14085 cf_new_cppflags=
14086 cf_new_extra_cppflags=
14087
14088 for cf_add_cflags in -g
14089 do
14090 case $cf_fix_cppflags in
14091 (no)
14092         case $cf_add_cflags in
14093         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14094                 case $cf_add_cflags in
14095                 (-D*)
14096                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14097
14098                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14099                                 && test -z "${cf_tst_cflags}" \
14100                                 && cf_fix_cppflags=yes
14101
14102                         if test $cf_fix_cppflags = yes ; then
14103                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14104                                 continue
14105                         elif test "${cf_tst_cflags}" = "\"'" ; then
14106                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14107                                 continue
14108                         fi
14109                         ;;
14110                 esac
14111                 case "$CPPFLAGS" in
14112                 (*$cf_add_cflags)
14113                         ;;
14114                 (*)
14115                         case $cf_add_cflags in
14116                         (-D*)
14117                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14118
14119 CPPFLAGS=`echo "$CPPFLAGS" | \
14120         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14121                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14122
14123                                 ;;
14124                         esac
14125                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14126                         ;;
14127                 esac
14128                 ;;
14129         (*)
14130                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14131                 ;;
14132         esac
14133         ;;
14134 (yes)
14135         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14136
14137         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14138
14139         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14140                 && test -z "${cf_tst_cflags}" \
14141                 && cf_fix_cppflags=no
14142         ;;
14143 esac
14144 done
14145
14146 if test -n "$cf_new_cflags" ; then
14147
14148         CFLAGS="$CFLAGS $cf_new_cflags"
14149 fi
14150
14151 if test -n "$cf_new_cppflags" ; then
14152
14153         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14154 fi
14155
14156 if test -n "$cf_new_extra_cppflags" ; then
14157
14158         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14159 fi
14160
14161                 ;;
14162         esac
14163         ;;
14164 esac
14165
14166 echo "$as_me:14166: checking if you want to perform memory-leak testing" >&5
14167 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14168
14169 # Check whether --enable-leaks or --disable-leaks was given.
14170 if test "${enable_leaks+set}" = set; then
14171   enableval="$enable_leaks"
14172   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14173 else
14174   : ${with_no_leaks:=no}
14175 fi;
14176 echo "$as_me:14176: result: $with_no_leaks" >&5
14177 echo "${ECHO_T}$with_no_leaks" >&6
14178
14179 if test "$with_no_leaks" = yes ; then
14180
14181 cat >>confdefs.h <<\EOF
14182 #define NO_LEAKS 1
14183 EOF
14184
14185 cat >>confdefs.h <<\EOF
14186 #define YY_NO_LEAKS 1
14187 EOF
14188
14189 fi
14190
14191 cat >>confdefs.h <<\EOF
14192 #define HAVE_NC_ALLOC_H 1
14193 EOF
14194
14195 ###     use option --enable-expanded to generate certain macros as functions
14196
14197 # Check whether --enable-expanded or --disable-expanded was given.
14198 if test "${enable_expanded+set}" = set; then
14199   enableval="$enable_expanded"
14200   test "x$enableval" = xyes &&
14201 cat >>confdefs.h <<\EOF
14202 #define NCURSES_EXPANDED 1
14203 EOF
14204
14205 fi;
14206
14207 ###     use option --disable-macros to suppress macros in favor of functions
14208
14209 # Check whether --enable-macros or --disable-macros was given.
14210 if test "${enable_macros+set}" = set; then
14211   enableval="$enable_macros"
14212   test "$enableval" = no &&
14213 cat >>confdefs.h <<\EOF
14214 #define NCURSES_NOMACROS 1
14215 EOF
14216
14217 fi;
14218
14219 # Normally we only add trace() to the debug-library.  Allow this to be
14220 # extended to all models of the ncurses library:
14221 cf_all_traces=no
14222 case "$CFLAGS $CPPFLAGS" in
14223 (*-DTRACE*)
14224         cf_all_traces=yes
14225         ;;
14226 esac
14227
14228 echo "$as_me:14228: checking whether to add trace feature to all models" >&5
14229 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14230
14231 # Check whether --with-trace or --without-trace was given.
14232 if test "${with_trace+set}" = set; then
14233   withval="$with_trace"
14234   cf_with_trace=$withval
14235 else
14236   cf_with_trace=$cf_all_traces
14237 fi;
14238 echo "$as_me:14238: result: $cf_with_trace" >&5
14239 echo "${ECHO_T}$cf_with_trace" >&6
14240
14241 if test "x$cf_with_trace" = xyes ; then
14242         LIB_TRACING=all
14243         ADA_TRACE=TRUE
14244
14245 cf_fix_cppflags=no
14246 cf_new_cflags=
14247 cf_new_cppflags=
14248 cf_new_extra_cppflags=
14249
14250 for cf_add_cflags in -DTRACE
14251 do
14252 case $cf_fix_cppflags in
14253 (no)
14254         case $cf_add_cflags in
14255         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14256                 case $cf_add_cflags in
14257                 (-D*)
14258                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14259
14260                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14261                                 && test -z "${cf_tst_cflags}" \
14262                                 && cf_fix_cppflags=yes
14263
14264                         if test $cf_fix_cppflags = yes ; then
14265                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14266                                 continue
14267                         elif test "${cf_tst_cflags}" = "\"'" ; then
14268                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14269                                 continue
14270                         fi
14271                         ;;
14272                 esac
14273                 case "$CPPFLAGS" in
14274                 (*$cf_add_cflags)
14275                         ;;
14276                 (*)
14277                         case $cf_add_cflags in
14278                         (-D*)
14279                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14280
14281 CPPFLAGS=`echo "$CPPFLAGS" | \
14282         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14283                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14284
14285                                 ;;
14286                         esac
14287                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14288                         ;;
14289                 esac
14290                 ;;
14291         (*)
14292                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14293                 ;;
14294         esac
14295         ;;
14296 (yes)
14297         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14298
14299         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14300
14301         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14302                 && test -z "${cf_tst_cflags}" \
14303                 && cf_fix_cppflags=no
14304         ;;
14305 esac
14306 done
14307
14308 if test -n "$cf_new_cflags" ; then
14309
14310         CFLAGS="$CFLAGS $cf_new_cflags"
14311 fi
14312
14313 if test -n "$cf_new_cppflags" ; then
14314
14315         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14316 fi
14317
14318 if test -n "$cf_new_extra_cppflags" ; then
14319
14320         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14321 fi
14322
14323 else
14324         LIB_TRACING=DEBUG
14325         ADA_TRACE=FALSE
14326 fi
14327
14328 echo "$as_me:14328: checking if we want to use GNAT projects" >&5
14329 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14330
14331 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14332 if test "${enable_gnat_projects+set}" = set; then
14333   enableval="$enable_gnat_projects"
14334   test "$enableval" != no && enableval=yes
14335         if test "$enableval" != "yes" ; then
14336     enable_gnat_projects=no
14337         else
14338                 enable_gnat_projects=yes
14339         fi
14340 else
14341   enableval=yes
14342         enable_gnat_projects=yes
14343
14344 fi;
14345 echo "$as_me:14345: result: $enable_gnat_projects" >&5
14346 echo "${ECHO_T}$enable_gnat_projects" >&6
14347
14348 ###     Checks for libraries.
14349 case $cf_cv_system_name in
14350 (*mingw32*|*mingw64*)
14351         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14352         LIBS=" -lpsapi $LIBS"
14353         ;;
14354 (*)
14355 echo "$as_me:14355: checking for gettimeofday" >&5
14356 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14357 if test "${ac_cv_func_gettimeofday+set}" = set; then
14358   echo $ECHO_N "(cached) $ECHO_C" >&6
14359 else
14360   cat >conftest.$ac_ext <<_ACEOF
14361 #line 14361 "configure"
14362 #include "confdefs.h"
14363 /* System header to define __stub macros and hopefully few prototypes,
14364     which can conflict with char gettimeofday (); below.  */
14365 #include <assert.h>
14366 /* Override any gcc2 internal prototype to avoid an error.  */
14367 #ifdef __cplusplus
14368 extern "C"
14369 #endif
14370 /* We use char because int might match the return type of a gcc2
14371    builtin and then its argument prototype would still apply.  */
14372 char gettimeofday ();
14373 char (*f) ();
14374
14375 int
14376 main ()
14377 {
14378 /* The GNU C library defines this for functions which it implements
14379     to always fail with ENOSYS.  Some functions are actually named
14380     something starting with __ and the normal name is an alias.  */
14381 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14382 choke me
14383 #else
14384 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14385 #endif
14386
14387   ;
14388   return 0;
14389 }
14390 _ACEOF
14391 rm -f conftest.$ac_objext conftest$ac_exeext
14392 if { (eval echo "$as_me:14392: \"$ac_link\"") >&5
14393   (eval $ac_link) 2>&5
14394   ac_status=$?
14395   echo "$as_me:14395: \$? = $ac_status" >&5
14396   (exit $ac_status); } &&
14397          { ac_try='test -s conftest$ac_exeext'
14398   { (eval echo "$as_me:14398: \"$ac_try\"") >&5
14399   (eval $ac_try) 2>&5
14400   ac_status=$?
14401   echo "$as_me:14401: \$? = $ac_status" >&5
14402   (exit $ac_status); }; }; then
14403   ac_cv_func_gettimeofday=yes
14404 else
14405   echo "$as_me: failed program was:" >&5
14406 cat conftest.$ac_ext >&5
14407 ac_cv_func_gettimeofday=no
14408 fi
14409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14410 fi
14411 echo "$as_me:14411: result: $ac_cv_func_gettimeofday" >&5
14412 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14413 if test $ac_cv_func_gettimeofday = yes; then
14414
14415 cat >>confdefs.h <<\EOF
14416 #define HAVE_GETTIMEOFDAY 1
14417 EOF
14418
14419 else
14420
14421 echo "$as_me:14421: checking for gettimeofday in -lbsd" >&5
14422 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14423 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14424   echo $ECHO_N "(cached) $ECHO_C" >&6
14425 else
14426   ac_check_lib_save_LIBS=$LIBS
14427 LIBS="-lbsd  $LIBS"
14428 cat >conftest.$ac_ext <<_ACEOF
14429 #line 14429 "configure"
14430 #include "confdefs.h"
14431
14432 /* Override any gcc2 internal prototype to avoid an error.  */
14433 #ifdef __cplusplus
14434 extern "C"
14435 #endif
14436 /* We use char because int might match the return type of a gcc2
14437    builtin and then its argument prototype would still apply.  */
14438 char gettimeofday ();
14439 int
14440 main ()
14441 {
14442 gettimeofday ();
14443   ;
14444   return 0;
14445 }
14446 _ACEOF
14447 rm -f conftest.$ac_objext conftest$ac_exeext
14448 if { (eval echo "$as_me:14448: \"$ac_link\"") >&5
14449   (eval $ac_link) 2>&5
14450   ac_status=$?
14451   echo "$as_me:14451: \$? = $ac_status" >&5
14452   (exit $ac_status); } &&
14453          { ac_try='test -s conftest$ac_exeext'
14454   { (eval echo "$as_me:14454: \"$ac_try\"") >&5
14455   (eval $ac_try) 2>&5
14456   ac_status=$?
14457   echo "$as_me:14457: \$? = $ac_status" >&5
14458   (exit $ac_status); }; }; then
14459   ac_cv_lib_bsd_gettimeofday=yes
14460 else
14461   echo "$as_me: failed program was:" >&5
14462 cat conftest.$ac_ext >&5
14463 ac_cv_lib_bsd_gettimeofday=no
14464 fi
14465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14466 LIBS=$ac_check_lib_save_LIBS
14467 fi
14468 echo "$as_me:14468: result: $ac_cv_lib_bsd_gettimeofday" >&5
14469 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14470 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14471
14472 cat >>confdefs.h <<\EOF
14473 #define HAVE_GETTIMEOFDAY 1
14474 EOF
14475
14476 cf_add_libs="-lbsd"
14477 # Filter out duplicates - this happens with badly-designed ".pc" files...
14478 for cf_add_1lib in $LIBS
14479 do
14480         for cf_add_2lib in $cf_add_libs
14481         do
14482                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14483                 then
14484                         cf_add_1lib=
14485                         break
14486                 fi
14487         done
14488         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14489 done
14490 LIBS="$cf_add_libs"
14491
14492 fi
14493
14494 fi
14495         ;;
14496 esac
14497
14498 echo "$as_me:14498: checking if -lm needed for math functions" >&5
14499 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14500 if test "${cf_cv_need_libm+set}" = set; then
14501   echo $ECHO_N "(cached) $ECHO_C" >&6
14502 else
14503
14504         cat >conftest.$ac_ext <<_ACEOF
14505 #line 14505 "configure"
14506 #include "confdefs.h"
14507
14508         #include <stdio.h>
14509         #include <math.h>
14510
14511 int
14512 main ()
14513 {
14514 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14515   ;
14516   return 0;
14517 }
14518 _ACEOF
14519 rm -f conftest.$ac_objext conftest$ac_exeext
14520 if { (eval echo "$as_me:14520: \"$ac_link\"") >&5
14521   (eval $ac_link) 2>&5
14522   ac_status=$?
14523   echo "$as_me:14523: \$? = $ac_status" >&5
14524   (exit $ac_status); } &&
14525          { ac_try='test -s conftest$ac_exeext'
14526   { (eval echo "$as_me:14526: \"$ac_try\"") >&5
14527   (eval $ac_try) 2>&5
14528   ac_status=$?
14529   echo "$as_me:14529: \$? = $ac_status" >&5
14530   (exit $ac_status); }; }; then
14531   cf_cv_need_libm=no
14532 else
14533   echo "$as_me: failed program was:" >&5
14534 cat conftest.$ac_ext >&5
14535 cf_cv_need_libm=yes
14536 fi
14537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14538 fi
14539 echo "$as_me:14539: result: $cf_cv_need_libm" >&5
14540 echo "${ECHO_T}$cf_cv_need_libm" >&6
14541 if test "$cf_cv_need_libm" = yes
14542 then
14543 MATH_LIB=-lm
14544 fi
14545
14546 ###     Checks for header files.
14547 echo "$as_me:14547: checking for ANSI C header files" >&5
14548 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14549 if test "${ac_cv_header_stdc+set}" = set; then
14550   echo $ECHO_N "(cached) $ECHO_C" >&6
14551 else
14552   cat >conftest.$ac_ext <<_ACEOF
14553 #line 14553 "configure"
14554 #include "confdefs.h"
14555 #include <stdlib.h>
14556 #include <stdarg.h>
14557 #include <string.h>
14558 #include <float.h>
14559
14560 _ACEOF
14561 if { (eval echo "$as_me:14561: \"$ac_cpp conftest.$ac_ext\"") >&5
14562   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14563   ac_status=$?
14564   egrep -v '^ *\+' conftest.er1 >conftest.err
14565   rm -f conftest.er1
14566   cat conftest.err >&5
14567   echo "$as_me:14567: \$? = $ac_status" >&5
14568   (exit $ac_status); } >/dev/null; then
14569   if test -s conftest.err; then
14570     ac_cpp_err=$ac_c_preproc_warn_flag
14571   else
14572     ac_cpp_err=
14573   fi
14574 else
14575   ac_cpp_err=yes
14576 fi
14577 if test -z "$ac_cpp_err"; then
14578   ac_cv_header_stdc=yes
14579 else
14580   echo "$as_me: failed program was:" >&5
14581   cat conftest.$ac_ext >&5
14582   ac_cv_header_stdc=no
14583 fi
14584 rm -f conftest.err conftest.$ac_ext
14585
14586 if test $ac_cv_header_stdc = yes; then
14587   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14588   cat >conftest.$ac_ext <<_ACEOF
14589 #line 14589 "configure"
14590 #include "confdefs.h"
14591 #include <string.h>
14592
14593 _ACEOF
14594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14595   egrep "memchr" >/dev/null 2>&1; then
14596   :
14597 else
14598   ac_cv_header_stdc=no
14599 fi
14600 rm -rf conftest*
14601
14602 fi
14603
14604 if test $ac_cv_header_stdc = yes; then
14605   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14606   cat >conftest.$ac_ext <<_ACEOF
14607 #line 14607 "configure"
14608 #include "confdefs.h"
14609 #include <stdlib.h>
14610
14611 _ACEOF
14612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14613   egrep "free" >/dev/null 2>&1; then
14614   :
14615 else
14616   ac_cv_header_stdc=no
14617 fi
14618 rm -rf conftest*
14619
14620 fi
14621
14622 if test $ac_cv_header_stdc = yes; then
14623   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14624   if test "$cross_compiling" = yes; then
14625   :
14626 else
14627   cat >conftest.$ac_ext <<_ACEOF
14628 #line 14628 "configure"
14629 #include "confdefs.h"
14630 #include <ctype.h>
14631 #if ((' ' & 0x0FF) == 0x020)
14632 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14633 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14634 #else
14635 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14636                      || ('j' <= (c) && (c) <= 'r') \
14637                      || ('s' <= (c) && (c) <= 'z'))
14638 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14639 #endif
14640
14641 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14642 int
14643 main ()
14644 {
14645   int i;
14646   for (i = 0; i < 256; i++)
14647     if (XOR (islower (i), ISLOWER (i))
14648         || toupper (i) != TOUPPER (i))
14649       $ac_main_return(2);
14650   $ac_main_return (0);
14651 }
14652 _ACEOF
14653 rm -f conftest$ac_exeext
14654 if { (eval echo "$as_me:14654: \"$ac_link\"") >&5
14655   (eval $ac_link) 2>&5
14656   ac_status=$?
14657   echo "$as_me:14657: \$? = $ac_status" >&5
14658   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14659   { (eval echo "$as_me:14659: \"$ac_try\"") >&5
14660   (eval $ac_try) 2>&5
14661   ac_status=$?
14662   echo "$as_me:14662: \$? = $ac_status" >&5
14663   (exit $ac_status); }; }; then
14664   :
14665 else
14666   echo "$as_me: program exited with status $ac_status" >&5
14667 echo "$as_me: failed program was:" >&5
14668 cat conftest.$ac_ext >&5
14669 ac_cv_header_stdc=no
14670 fi
14671 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14672 fi
14673 fi
14674 fi
14675 echo "$as_me:14675: result: $ac_cv_header_stdc" >&5
14676 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14677 if test $ac_cv_header_stdc = yes; then
14678
14679 cat >>confdefs.h <<\EOF
14680 #define STDC_HEADERS 1
14681 EOF
14682
14683 fi
14684
14685 ac_header_dirent=no
14686 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14687   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14688 echo "$as_me:14688: checking for $ac_hdr that defines DIR" >&5
14689 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14690 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14691   echo $ECHO_N "(cached) $ECHO_C" >&6
14692 else
14693   cat >conftest.$ac_ext <<_ACEOF
14694 #line 14694 "configure"
14695 #include "confdefs.h"
14696 #include <sys/types.h>
14697 #include <$ac_hdr>
14698
14699 int
14700 main ()
14701 {
14702 if ((DIR *) 0)
14703 return 0;
14704   ;
14705   return 0;
14706 }
14707 _ACEOF
14708 rm -f conftest.$ac_objext
14709 if { (eval echo "$as_me:14709: \"$ac_compile\"") >&5
14710   (eval $ac_compile) 2>&5
14711   ac_status=$?
14712   echo "$as_me:14712: \$? = $ac_status" >&5
14713   (exit $ac_status); } &&
14714          { ac_try='test -s conftest.$ac_objext'
14715   { (eval echo "$as_me:14715: \"$ac_try\"") >&5
14716   (eval $ac_try) 2>&5
14717   ac_status=$?
14718   echo "$as_me:14718: \$? = $ac_status" >&5
14719   (exit $ac_status); }; }; then
14720   eval "$as_ac_Header=yes"
14721 else
14722   echo "$as_me: failed program was:" >&5
14723 cat conftest.$ac_ext >&5
14724 eval "$as_ac_Header=no"
14725 fi
14726 rm -f conftest.$ac_objext conftest.$ac_ext
14727 fi
14728 echo "$as_me:14728: result: `eval echo '${'$as_ac_Header'}'`" >&5
14729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14730 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14731   cat >>confdefs.h <<EOF
14732 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14733 EOF
14734
14735 ac_header_dirent=$ac_hdr; break
14736 fi
14737
14738 done
14739 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14740 if test $ac_header_dirent = dirent.h; then
14741   echo "$as_me:14741: checking for opendir in -ldir" >&5
14742 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14743 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14744   echo $ECHO_N "(cached) $ECHO_C" >&6
14745 else
14746   ac_check_lib_save_LIBS=$LIBS
14747 LIBS="-ldir  $LIBS"
14748 cat >conftest.$ac_ext <<_ACEOF
14749 #line 14749 "configure"
14750 #include "confdefs.h"
14751
14752 /* Override any gcc2 internal prototype to avoid an error.  */
14753 #ifdef __cplusplus
14754 extern "C"
14755 #endif
14756 /* We use char because int might match the return type of a gcc2
14757    builtin and then its argument prototype would still apply.  */
14758 char opendir ();
14759 int
14760 main ()
14761 {
14762 opendir ();
14763   ;
14764   return 0;
14765 }
14766 _ACEOF
14767 rm -f conftest.$ac_objext conftest$ac_exeext
14768 if { (eval echo "$as_me:14768: \"$ac_link\"") >&5
14769   (eval $ac_link) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit $ac_status); } &&
14773          { ac_try='test -s conftest$ac_exeext'
14774   { (eval echo "$as_me:14774: \"$ac_try\"") >&5
14775   (eval $ac_try) 2>&5
14776   ac_status=$?
14777   echo "$as_me:14777: \$? = $ac_status" >&5
14778   (exit $ac_status); }; }; then
14779   ac_cv_lib_dir_opendir=yes
14780 else
14781   echo "$as_me: failed program was:" >&5
14782 cat conftest.$ac_ext >&5
14783 ac_cv_lib_dir_opendir=no
14784 fi
14785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14786 LIBS=$ac_check_lib_save_LIBS
14787 fi
14788 echo "$as_me:14788: result: $ac_cv_lib_dir_opendir" >&5
14789 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14790 if test $ac_cv_lib_dir_opendir = yes; then
14791   LIBS="$LIBS -ldir"
14792 fi
14793
14794 else
14795   echo "$as_me:14795: checking for opendir in -lx" >&5
14796 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14797 if test "${ac_cv_lib_x_opendir+set}" = set; then
14798   echo $ECHO_N "(cached) $ECHO_C" >&6
14799 else
14800   ac_check_lib_save_LIBS=$LIBS
14801 LIBS="-lx  $LIBS"
14802 cat >conftest.$ac_ext <<_ACEOF
14803 #line 14803 "configure"
14804 #include "confdefs.h"
14805
14806 /* Override any gcc2 internal prototype to avoid an error.  */
14807 #ifdef __cplusplus
14808 extern "C"
14809 #endif
14810 /* We use char because int might match the return type of a gcc2
14811    builtin and then its argument prototype would still apply.  */
14812 char opendir ();
14813 int
14814 main ()
14815 {
14816 opendir ();
14817   ;
14818   return 0;
14819 }
14820 _ACEOF
14821 rm -f conftest.$ac_objext conftest$ac_exeext
14822 if { (eval echo "$as_me:14822: \"$ac_link\"") >&5
14823   (eval $ac_link) 2>&5
14824   ac_status=$?
14825   echo "$as_me:14825: \$? = $ac_status" >&5
14826   (exit $ac_status); } &&
14827          { ac_try='test -s conftest$ac_exeext'
14828   { (eval echo "$as_me:14828: \"$ac_try\"") >&5
14829   (eval $ac_try) 2>&5
14830   ac_status=$?
14831   echo "$as_me:14831: \$? = $ac_status" >&5
14832   (exit $ac_status); }; }; then
14833   ac_cv_lib_x_opendir=yes
14834 else
14835   echo "$as_me: failed program was:" >&5
14836 cat conftest.$ac_ext >&5
14837 ac_cv_lib_x_opendir=no
14838 fi
14839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14840 LIBS=$ac_check_lib_save_LIBS
14841 fi
14842 echo "$as_me:14842: result: $ac_cv_lib_x_opendir" >&5
14843 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14844 if test $ac_cv_lib_x_opendir = yes; then
14845   LIBS="$LIBS -lx"
14846 fi
14847
14848 fi
14849
14850 echo "$as_me:14850: checking whether time.h and sys/time.h may both be included" >&5
14851 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14852 if test "${ac_cv_header_time+set}" = set; then
14853   echo $ECHO_N "(cached) $ECHO_C" >&6
14854 else
14855   cat >conftest.$ac_ext <<_ACEOF
14856 #line 14856 "configure"
14857 #include "confdefs.h"
14858 #include <sys/types.h>
14859 #include <sys/time.h>
14860 #include <time.h>
14861
14862 int
14863 main ()
14864 {
14865 if ((struct tm *) 0)
14866 return 0;
14867   ;
14868   return 0;
14869 }
14870 _ACEOF
14871 rm -f conftest.$ac_objext
14872 if { (eval echo "$as_me:14872: \"$ac_compile\"") >&5
14873   (eval $ac_compile) 2>&5
14874   ac_status=$?
14875   echo "$as_me:14875: \$? = $ac_status" >&5
14876   (exit $ac_status); } &&
14877          { ac_try='test -s conftest.$ac_objext'
14878   { (eval echo "$as_me:14878: \"$ac_try\"") >&5
14879   (eval $ac_try) 2>&5
14880   ac_status=$?
14881   echo "$as_me:14881: \$? = $ac_status" >&5
14882   (exit $ac_status); }; }; then
14883   ac_cv_header_time=yes
14884 else
14885   echo "$as_me: failed program was:" >&5
14886 cat conftest.$ac_ext >&5
14887 ac_cv_header_time=no
14888 fi
14889 rm -f conftest.$ac_objext conftest.$ac_ext
14890 fi
14891 echo "$as_me:14891: result: $ac_cv_header_time" >&5
14892 echo "${ECHO_T}$ac_cv_header_time" >&6
14893 if test $ac_cv_header_time = yes; then
14894
14895 cat >>confdefs.h <<\EOF
14896 #define TIME_WITH_SYS_TIME 1
14897 EOF
14898
14899 fi
14900
14901 cf_regex_func=no
14902
14903 cf_regex_libs="regex re"
14904 case $host_os in
14905 (mingw*)
14906         cf_regex_libs="gnurx $cf_regex_libs"
14907         ;;
14908 esac
14909
14910 echo "$as_me:14910: checking for regcomp" >&5
14911 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14912 if test "${ac_cv_func_regcomp+set}" = set; then
14913   echo $ECHO_N "(cached) $ECHO_C" >&6
14914 else
14915   cat >conftest.$ac_ext <<_ACEOF
14916 #line 14916 "configure"
14917 #include "confdefs.h"
14918 /* System header to define __stub macros and hopefully few prototypes,
14919     which can conflict with char regcomp (); below.  */
14920 #include <assert.h>
14921 /* Override any gcc2 internal prototype to avoid an error.  */
14922 #ifdef __cplusplus
14923 extern "C"
14924 #endif
14925 /* We use char because int might match the return type of a gcc2
14926    builtin and then its argument prototype would still apply.  */
14927 char regcomp ();
14928 char (*f) ();
14929
14930 int
14931 main ()
14932 {
14933 /* The GNU C library defines this for functions which it implements
14934     to always fail with ENOSYS.  Some functions are actually named
14935     something starting with __ and the normal name is an alias.  */
14936 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14937 choke me
14938 #else
14939 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14940 #endif
14941
14942   ;
14943   return 0;
14944 }
14945 _ACEOF
14946 rm -f conftest.$ac_objext conftest$ac_exeext
14947 if { (eval echo "$as_me:14947: \"$ac_link\"") >&5
14948   (eval $ac_link) 2>&5
14949   ac_status=$?
14950   echo "$as_me:14950: \$? = $ac_status" >&5
14951   (exit $ac_status); } &&
14952          { ac_try='test -s conftest$ac_exeext'
14953   { (eval echo "$as_me:14953: \"$ac_try\"") >&5
14954   (eval $ac_try) 2>&5
14955   ac_status=$?
14956   echo "$as_me:14956: \$? = $ac_status" >&5
14957   (exit $ac_status); }; }; then
14958   ac_cv_func_regcomp=yes
14959 else
14960   echo "$as_me: failed program was:" >&5
14961 cat conftest.$ac_ext >&5
14962 ac_cv_func_regcomp=no
14963 fi
14964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14965 fi
14966 echo "$as_me:14966: result: $ac_cv_func_regcomp" >&5
14967 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14968 if test $ac_cv_func_regcomp = yes; then
14969   cf_regex_func=regcomp
14970 else
14971
14972         for cf_regex_lib in $cf_regex_libs
14973         do
14974                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14975 echo "$as_me:14975: checking for regcomp in -l$cf_regex_lib" >&5
14976 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14977 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14978   echo $ECHO_N "(cached) $ECHO_C" >&6
14979 else
14980   ac_check_lib_save_LIBS=$LIBS
14981 LIBS="-l$cf_regex_lib  $LIBS"
14982 cat >conftest.$ac_ext <<_ACEOF
14983 #line 14983 "configure"
14984 #include "confdefs.h"
14985
14986 /* Override any gcc2 internal prototype to avoid an error.  */
14987 #ifdef __cplusplus
14988 extern "C"
14989 #endif
14990 /* We use char because int might match the return type of a gcc2
14991    builtin and then its argument prototype would still apply.  */
14992 char regcomp ();
14993 int
14994 main ()
14995 {
14996 regcomp ();
14997   ;
14998   return 0;
14999 }
15000 _ACEOF
15001 rm -f conftest.$ac_objext conftest$ac_exeext
15002 if { (eval echo "$as_me:15002: \"$ac_link\"") >&5
15003   (eval $ac_link) 2>&5
15004   ac_status=$?
15005   echo "$as_me:15005: \$? = $ac_status" >&5
15006   (exit $ac_status); } &&
15007          { ac_try='test -s conftest$ac_exeext'
15008   { (eval echo "$as_me:15008: \"$ac_try\"") >&5
15009   (eval $ac_try) 2>&5
15010   ac_status=$?
15011   echo "$as_me:15011: \$? = $ac_status" >&5
15012   (exit $ac_status); }; }; then
15013   eval "$as_ac_Lib=yes"
15014 else
15015   echo "$as_me: failed program was:" >&5
15016 cat conftest.$ac_ext >&5
15017 eval "$as_ac_Lib=no"
15018 fi
15019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15020 LIBS=$ac_check_lib_save_LIBS
15021 fi
15022 echo "$as_me:15022: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15023 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15024 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15025
15026 cf_add_libs="-l$cf_regex_lib"
15027 # Filter out duplicates - this happens with badly-designed ".pc" files...
15028 for cf_add_1lib in $LIBS
15029 do
15030         for cf_add_2lib in $cf_add_libs
15031         do
15032                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15033                 then
15034                         cf_add_1lib=
15035                         break
15036                 fi
15037         done
15038         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15039 done
15040 LIBS="$cf_add_libs"
15041
15042                                 cf_regex_func=regcomp
15043                                 break
15044 fi
15045
15046         done
15047
15048 fi
15049
15050 if test "$cf_regex_func" = no ; then
15051         echo "$as_me:15051: checking for compile" >&5
15052 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15053 if test "${ac_cv_func_compile+set}" = set; then
15054   echo $ECHO_N "(cached) $ECHO_C" >&6
15055 else
15056   cat >conftest.$ac_ext <<_ACEOF
15057 #line 15057 "configure"
15058 #include "confdefs.h"
15059 /* System header to define __stub macros and hopefully few prototypes,
15060     which can conflict with char compile (); below.  */
15061 #include <assert.h>
15062 /* Override any gcc2 internal prototype to avoid an error.  */
15063 #ifdef __cplusplus
15064 extern "C"
15065 #endif
15066 /* We use char because int might match the return type of a gcc2
15067    builtin and then its argument prototype would still apply.  */
15068 char compile ();
15069 char (*f) ();
15070
15071 int
15072 main ()
15073 {
15074 /* The GNU C library defines this for functions which it implements
15075     to always fail with ENOSYS.  Some functions are actually named
15076     something starting with __ and the normal name is an alias.  */
15077 #if defined (__stub_compile) || defined (__stub___compile)
15078 choke me
15079 #else
15080 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15081 #endif
15082
15083   ;
15084   return 0;
15085 }
15086 _ACEOF
15087 rm -f conftest.$ac_objext conftest$ac_exeext
15088 if { (eval echo "$as_me:15088: \"$ac_link\"") >&5
15089   (eval $ac_link) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); } &&
15093          { ac_try='test -s conftest$ac_exeext'
15094   { (eval echo "$as_me:15094: \"$ac_try\"") >&5
15095   (eval $ac_try) 2>&5
15096   ac_status=$?
15097   echo "$as_me:15097: \$? = $ac_status" >&5
15098   (exit $ac_status); }; }; then
15099   ac_cv_func_compile=yes
15100 else
15101   echo "$as_me: failed program was:" >&5
15102 cat conftest.$ac_ext >&5
15103 ac_cv_func_compile=no
15104 fi
15105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15106 fi
15107 echo "$as_me:15107: result: $ac_cv_func_compile" >&5
15108 echo "${ECHO_T}$ac_cv_func_compile" >&6
15109 if test $ac_cv_func_compile = yes; then
15110   cf_regex_func=compile
15111 else
15112
15113                 echo "$as_me:15113: checking for compile in -lgen" >&5
15114 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15115 if test "${ac_cv_lib_gen_compile+set}" = set; then
15116   echo $ECHO_N "(cached) $ECHO_C" >&6
15117 else
15118   ac_check_lib_save_LIBS=$LIBS
15119 LIBS="-lgen  $LIBS"
15120 cat >conftest.$ac_ext <<_ACEOF
15121 #line 15121 "configure"
15122 #include "confdefs.h"
15123
15124 /* Override any gcc2 internal prototype to avoid an error.  */
15125 #ifdef __cplusplus
15126 extern "C"
15127 #endif
15128 /* We use char because int might match the return type of a gcc2
15129    builtin and then its argument prototype would still apply.  */
15130 char compile ();
15131 int
15132 main ()
15133 {
15134 compile ();
15135   ;
15136   return 0;
15137 }
15138 _ACEOF
15139 rm -f conftest.$ac_objext conftest$ac_exeext
15140 if { (eval echo "$as_me:15140: \"$ac_link\"") >&5
15141   (eval $ac_link) 2>&5
15142   ac_status=$?
15143   echo "$as_me:15143: \$? = $ac_status" >&5
15144   (exit $ac_status); } &&
15145          { ac_try='test -s conftest$ac_exeext'
15146   { (eval echo "$as_me:15146: \"$ac_try\"") >&5
15147   (eval $ac_try) 2>&5
15148   ac_status=$?
15149   echo "$as_me:15149: \$? = $ac_status" >&5
15150   (exit $ac_status); }; }; then
15151   ac_cv_lib_gen_compile=yes
15152 else
15153   echo "$as_me: failed program was:" >&5
15154 cat conftest.$ac_ext >&5
15155 ac_cv_lib_gen_compile=no
15156 fi
15157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15158 LIBS=$ac_check_lib_save_LIBS
15159 fi
15160 echo "$as_me:15160: result: $ac_cv_lib_gen_compile" >&5
15161 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15162 if test $ac_cv_lib_gen_compile = yes; then
15163
15164 cf_add_libs="-lgen"
15165 # Filter out duplicates - this happens with badly-designed ".pc" files...
15166 for cf_add_1lib in $LIBS
15167 do
15168         for cf_add_2lib in $cf_add_libs
15169         do
15170                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15171                 then
15172                         cf_add_1lib=
15173                         break
15174                 fi
15175         done
15176         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15177 done
15178 LIBS="$cf_add_libs"
15179
15180                                 cf_regex_func=compile
15181 fi
15182
15183 fi
15184
15185 fi
15186
15187 if test "$cf_regex_func" = no ; then
15188         { echo "$as_me:15188: WARNING: cannot find regular expression library" >&5
15189 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15190 fi
15191
15192 echo "$as_me:15192: checking for regular-expression headers" >&5
15193 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15194 if test "${cf_cv_regex_hdrs+set}" = set; then
15195   echo $ECHO_N "(cached) $ECHO_C" >&6
15196 else
15197
15198 cf_cv_regex_hdrs=no
15199 case $cf_regex_func in
15200 (compile)
15201         for cf_regex_hdr in regexp.h regexpr.h
15202         do
15203                 cat >conftest.$ac_ext <<_ACEOF
15204 #line 15204 "configure"
15205 #include "confdefs.h"
15206 #include <$cf_regex_hdr>
15207 int
15208 main ()
15209 {
15210
15211                         char *p = compile("", "", "", 0);
15212                         int x = step("", "");
15213
15214   ;
15215   return 0;
15216 }
15217 _ACEOF
15218 rm -f conftest.$ac_objext conftest$ac_exeext
15219 if { (eval echo "$as_me:15219: \"$ac_link\"") >&5
15220   (eval $ac_link) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit $ac_status); } &&
15224          { ac_try='test -s conftest$ac_exeext'
15225   { (eval echo "$as_me:15225: \"$ac_try\"") >&5
15226   (eval $ac_try) 2>&5
15227   ac_status=$?
15228   echo "$as_me:15228: \$? = $ac_status" >&5
15229   (exit $ac_status); }; }; then
15230
15231                         cf_cv_regex_hdrs=$cf_regex_hdr
15232                         break
15233
15234 else
15235   echo "$as_me: failed program was:" >&5
15236 cat conftest.$ac_ext >&5
15237 fi
15238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15239         done
15240         ;;
15241 (*)
15242         for cf_regex_hdr in regex.h
15243         do
15244                 cat >conftest.$ac_ext <<_ACEOF
15245 #line 15245 "configure"
15246 #include "confdefs.h"
15247 #include <sys/types.h>
15248 #include <$cf_regex_hdr>
15249 int
15250 main ()
15251 {
15252
15253                         regex_t *p;
15254                         int x = regcomp(p, "", 0);
15255                         int y = regexec(p, "", 0, 0, 0);
15256                         regfree(p);
15257
15258   ;
15259   return 0;
15260 }
15261 _ACEOF
15262 rm -f conftest.$ac_objext conftest$ac_exeext
15263 if { (eval echo "$as_me:15263: \"$ac_link\"") >&5
15264   (eval $ac_link) 2>&5
15265   ac_status=$?
15266   echo "$as_me:15266: \$? = $ac_status" >&5
15267   (exit $ac_status); } &&
15268          { ac_try='test -s conftest$ac_exeext'
15269   { (eval echo "$as_me:15269: \"$ac_try\"") >&5
15270   (eval $ac_try) 2>&5
15271   ac_status=$?
15272   echo "$as_me:15272: \$? = $ac_status" >&5
15273   (exit $ac_status); }; }; then
15274
15275                         cf_cv_regex_hdrs=$cf_regex_hdr
15276                         break
15277
15278 else
15279   echo "$as_me: failed program was:" >&5
15280 cat conftest.$ac_ext >&5
15281 fi
15282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15283         done
15284         ;;
15285 esac
15286
15287 fi
15288 echo "$as_me:15288: result: $cf_cv_regex_hdrs" >&5
15289 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15290
15291 case $cf_cv_regex_hdrs in
15292         (no)            { echo "$as_me:15292: WARNING: no regular expression header found" >&5
15293 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15294         (regex.h)
15295 cat >>confdefs.h <<\EOF
15296 #define HAVE_REGEX_H_FUNCS 1
15297 EOF
15298  ;;
15299         (regexp.h)
15300 cat >>confdefs.h <<\EOF
15301 #define HAVE_REGEXP_H_FUNCS 1
15302 EOF
15303  ;;
15304         (regexpr.h)
15305 cat >>confdefs.h <<\EOF
15306 #define HAVE_REGEXPR_H_FUNCS 1
15307 EOF
15308  ;;
15309 esac
15310
15311 for ac_header in \
15312 fcntl.h \
15313 getopt.h \
15314 limits.h \
15315 locale.h \
15316 math.h \
15317 poll.h \
15318 sys/bsdtypes.h \
15319 sys/ioctl.h \
15320 sys/param.h \
15321 sys/poll.h \
15322 sys/select.h \
15323 sys/time.h \
15324 sys/times.h \
15325 ttyent.h \
15326 unistd.h \
15327 wctype.h \
15328
15329 do
15330 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15331 echo "$as_me:15331: checking for $ac_header" >&5
15332 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15333 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15334   echo $ECHO_N "(cached) $ECHO_C" >&6
15335 else
15336   cat >conftest.$ac_ext <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15339 #include <$ac_header>
15340 _ACEOF
15341 if { (eval echo "$as_me:15341: \"$ac_cpp conftest.$ac_ext\"") >&5
15342   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15343   ac_status=$?
15344   egrep -v '^ *\+' conftest.er1 >conftest.err
15345   rm -f conftest.er1
15346   cat conftest.err >&5
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); } >/dev/null; then
15349   if test -s conftest.err; then
15350     ac_cpp_err=$ac_c_preproc_warn_flag
15351   else
15352     ac_cpp_err=
15353   fi
15354 else
15355   ac_cpp_err=yes
15356 fi
15357 if test -z "$ac_cpp_err"; then
15358   eval "$as_ac_Header=yes"
15359 else
15360   echo "$as_me: failed program was:" >&5
15361   cat conftest.$ac_ext >&5
15362   eval "$as_ac_Header=no"
15363 fi
15364 rm -f conftest.err conftest.$ac_ext
15365 fi
15366 echo "$as_me:15366: result: `eval echo '${'$as_ac_Header'}'`" >&5
15367 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15368 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15369   cat >>confdefs.h <<EOF
15370 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15371 EOF
15372
15373 fi
15374 done
15375
15376 for ac_header in unistd.h getopt.h
15377 do
15378 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15379 echo "$as_me:15379: checking for $ac_header" >&5
15380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15381 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15382   echo $ECHO_N "(cached) $ECHO_C" >&6
15383 else
15384   cat >conftest.$ac_ext <<_ACEOF
15385 #line 15385 "configure"
15386 #include "confdefs.h"
15387 #include <$ac_header>
15388 _ACEOF
15389 if { (eval echo "$as_me:15389: \"$ac_cpp conftest.$ac_ext\"") >&5
15390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15391   ac_status=$?
15392   egrep -v '^ *\+' conftest.er1 >conftest.err
15393   rm -f conftest.er1
15394   cat conftest.err >&5
15395   echo "$as_me:15395: \$? = $ac_status" >&5
15396   (exit $ac_status); } >/dev/null; then
15397   if test -s conftest.err; then
15398     ac_cpp_err=$ac_c_preproc_warn_flag
15399   else
15400     ac_cpp_err=
15401   fi
15402 else
15403   ac_cpp_err=yes
15404 fi
15405 if test -z "$ac_cpp_err"; then
15406   eval "$as_ac_Header=yes"
15407 else
15408   echo "$as_me: failed program was:" >&5
15409   cat conftest.$ac_ext >&5
15410   eval "$as_ac_Header=no"
15411 fi
15412 rm -f conftest.err conftest.$ac_ext
15413 fi
15414 echo "$as_me:15414: result: `eval echo '${'$as_ac_Header'}'`" >&5
15415 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15416 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15417   cat >>confdefs.h <<EOF
15418 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15419 EOF
15420
15421 fi
15422 done
15423
15424 echo "$as_me:15424: checking for header declaring getopt variables" >&5
15425 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15426 if test "${cf_cv_getopt_header+set}" = set; then
15427   echo $ECHO_N "(cached) $ECHO_C" >&6
15428 else
15429
15430 cf_cv_getopt_header=none
15431 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15432 do
15433 cat >conftest.$ac_ext <<_ACEOF
15434 #line 15434 "configure"
15435 #include "confdefs.h"
15436
15437 #include <$cf_header>
15438 int
15439 main ()
15440 {
15441 int x = optind; char *y = optarg
15442   ;
15443   return 0;
15444 }
15445 _ACEOF
15446 rm -f conftest.$ac_objext
15447 if { (eval echo "$as_me:15447: \"$ac_compile\"") >&5
15448   (eval $ac_compile) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); } &&
15452          { ac_try='test -s conftest.$ac_objext'
15453   { (eval echo "$as_me:15453: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:15456: \$? = $ac_status" >&5
15457   (exit $ac_status); }; }; then
15458   cf_cv_getopt_header=$cf_header
15459  break
15460 else
15461   echo "$as_me: failed program was:" >&5
15462 cat conftest.$ac_ext >&5
15463 fi
15464 rm -f conftest.$ac_objext conftest.$ac_ext
15465 done
15466
15467 fi
15468 echo "$as_me:15468: result: $cf_cv_getopt_header" >&5
15469 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15470 if test $cf_cv_getopt_header != none ; then
15471
15472 cat >>confdefs.h <<\EOF
15473 #define HAVE_GETOPT_HEADER 1
15474 EOF
15475
15476 fi
15477 if test $cf_cv_getopt_header = getopt.h ; then
15478
15479 cat >>confdefs.h <<\EOF
15480 #define NEED_GETOPT_H 1
15481 EOF
15482
15483 fi
15484
15485 # check for ISC (this may also define _POSIX_SOURCE)
15486 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15487 if test "x$ISC" = xyes ; then
15488
15489 echo "$as_me:15489: checking for main in -lcposix" >&5
15490 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15491 if test "${ac_cv_lib_cposix_main+set}" = set; then
15492   echo $ECHO_N "(cached) $ECHO_C" >&6
15493 else
15494   ac_check_lib_save_LIBS=$LIBS
15495 LIBS="-lcposix  $LIBS"
15496 cat >conftest.$ac_ext <<_ACEOF
15497 #line 15497 "configure"
15498 #include "confdefs.h"
15499
15500 int
15501 main ()
15502 {
15503 main ();
15504   ;
15505   return 0;
15506 }
15507 _ACEOF
15508 rm -f conftest.$ac_objext conftest$ac_exeext
15509 if { (eval echo "$as_me:15509: \"$ac_link\"") >&5
15510   (eval $ac_link) 2>&5
15511   ac_status=$?
15512   echo "$as_me:15512: \$? = $ac_status" >&5
15513   (exit $ac_status); } &&
15514          { ac_try='test -s conftest$ac_exeext'
15515   { (eval echo "$as_me:15515: \"$ac_try\"") >&5
15516   (eval $ac_try) 2>&5
15517   ac_status=$?
15518   echo "$as_me:15518: \$? = $ac_status" >&5
15519   (exit $ac_status); }; }; then
15520   ac_cv_lib_cposix_main=yes
15521 else
15522   echo "$as_me: failed program was:" >&5
15523 cat conftest.$ac_ext >&5
15524 ac_cv_lib_cposix_main=no
15525 fi
15526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15527 LIBS=$ac_check_lib_save_LIBS
15528 fi
15529 echo "$as_me:15529: result: $ac_cv_lib_cposix_main" >&5
15530 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15531 if test $ac_cv_lib_cposix_main = yes; then
15532   cat >>confdefs.h <<EOF
15533 #define HAVE_LIBCPOSIX 1
15534 EOF
15535
15536   LIBS="-lcposix $LIBS"
15537
15538 fi
15539
15540         echo "$as_me:15540: checking for bzero in -linet" >&5
15541 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15542 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15543   echo $ECHO_N "(cached) $ECHO_C" >&6
15544 else
15545   ac_check_lib_save_LIBS=$LIBS
15546 LIBS="-linet  $LIBS"
15547 cat >conftest.$ac_ext <<_ACEOF
15548 #line 15548 "configure"
15549 #include "confdefs.h"
15550
15551 /* Override any gcc2 internal prototype to avoid an error.  */
15552 #ifdef __cplusplus
15553 extern "C"
15554 #endif
15555 /* We use char because int might match the return type of a gcc2
15556    builtin and then its argument prototype would still apply.  */
15557 char bzero ();
15558 int
15559 main ()
15560 {
15561 bzero ();
15562   ;
15563   return 0;
15564 }
15565 _ACEOF
15566 rm -f conftest.$ac_objext conftest$ac_exeext
15567 if { (eval echo "$as_me:15567: \"$ac_link\"") >&5
15568   (eval $ac_link) 2>&5
15569   ac_status=$?
15570   echo "$as_me:15570: \$? = $ac_status" >&5
15571   (exit $ac_status); } &&
15572          { ac_try='test -s conftest$ac_exeext'
15573   { (eval echo "$as_me:15573: \"$ac_try\"") >&5
15574   (eval $ac_try) 2>&5
15575   ac_status=$?
15576   echo "$as_me:15576: \$? = $ac_status" >&5
15577   (exit $ac_status); }; }; then
15578   ac_cv_lib_inet_bzero=yes
15579 else
15580   echo "$as_me: failed program was:" >&5
15581 cat conftest.$ac_ext >&5
15582 ac_cv_lib_inet_bzero=no
15583 fi
15584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15585 LIBS=$ac_check_lib_save_LIBS
15586 fi
15587 echo "$as_me:15587: result: $ac_cv_lib_inet_bzero" >&5
15588 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15589 if test $ac_cv_lib_inet_bzero = yes; then
15590
15591 cf_add_libs="-linet"
15592 # Filter out duplicates - this happens with badly-designed ".pc" files...
15593 for cf_add_1lib in $LIBS
15594 do
15595         for cf_add_2lib in $cf_add_libs
15596         do
15597                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15598                 then
15599                         cf_add_1lib=
15600                         break
15601                 fi
15602         done
15603         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15604 done
15605 LIBS="$cf_add_libs"
15606
15607 fi
15608 fi
15609
15610 echo "$as_me:15610: checking if sys/time.h works with sys/select.h" >&5
15611 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15612 if test "${cf_cv_sys_time_select+set}" = set; then
15613   echo $ECHO_N "(cached) $ECHO_C" >&6
15614 else
15615
15616 cat >conftest.$ac_ext <<_ACEOF
15617 #line 15617 "configure"
15618 #include "confdefs.h"
15619
15620 #include <sys/types.h>
15621 #ifdef HAVE_SYS_TIME_H
15622 #include <sys/time.h>
15623 #endif
15624 #ifdef HAVE_SYS_SELECT_H
15625 #include <sys/select.h>
15626 #endif
15627
15628 int
15629 main ()
15630 {
15631
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 rm -f conftest.$ac_objext
15637 if { (eval echo "$as_me:15637: \"$ac_compile\"") >&5
15638   (eval $ac_compile) 2>&5
15639   ac_status=$?
15640   echo "$as_me:15640: \$? = $ac_status" >&5
15641   (exit $ac_status); } &&
15642          { ac_try='test -s conftest.$ac_objext'
15643   { (eval echo "$as_me:15643: \"$ac_try\"") >&5
15644   (eval $ac_try) 2>&5
15645   ac_status=$?
15646   echo "$as_me:15646: \$? = $ac_status" >&5
15647   (exit $ac_status); }; }; then
15648   cf_cv_sys_time_select=yes
15649 else
15650   echo "$as_me: failed program was:" >&5
15651 cat conftest.$ac_ext >&5
15652 cf_cv_sys_time_select=no
15653 fi
15654 rm -f conftest.$ac_objext conftest.$ac_ext
15655
15656 fi
15657
15658 echo "$as_me:15658: result: $cf_cv_sys_time_select" >&5
15659 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15660 test "$cf_cv_sys_time_select" = yes &&
15661 cat >>confdefs.h <<\EOF
15662 #define HAVE_SYS_TIME_SELECT 1
15663 EOF
15664
15665 ###     checks for compiler characteristics
15666 ac_ext=c
15667 ac_cpp='$CPP $CPPFLAGS'
15668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15671 ac_main_return=return
15672
15673 echo "$as_me:15673: checking for an ANSI C-conforming const" >&5
15674 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15675 if test "${ac_cv_c_const+set}" = set; then
15676   echo $ECHO_N "(cached) $ECHO_C" >&6
15677 else
15678   cat >conftest.$ac_ext <<_ACEOF
15679 #line 15679 "configure"
15680 #include "confdefs.h"
15681
15682 int
15683 main ()
15684 {
15685 /* FIXME: Include the comments suggested by Paul. */
15686 #ifndef __cplusplus
15687   /* Ultrix mips cc rejects this.  */
15688   typedef int charset[2];
15689   const charset x;
15690   /* SunOS 4.1.1 cc rejects this.  */
15691   char const *const *ccp;
15692   char **p;
15693   /* NEC SVR4.0.2 mips cc rejects this.  */
15694   struct point {int x, y;};
15695   static struct point const zero = {0,0};
15696   /* AIX XL C 1.02.0.0 rejects this.
15697      It does not let you subtract one const X* pointer from another in
15698      an arm of an if-expression whose if-part is not a constant
15699      expression */
15700   const char *g = "string";
15701   ccp = &g + (g ? g-g : 0);
15702   /* HPUX 7.0 cc rejects these. */
15703   ++ccp;
15704   p = (char**) ccp;
15705   ccp = (char const *const *) p;
15706   { /* SCO 3.2v4 cc rejects this.  */
15707     char *t;
15708     char const *s = 0 ? (char *) 0 : (char const *) 0;
15709
15710     *t++ = 0;
15711   }
15712   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15713     int x[] = {25, 17};
15714     const int *foo = &x[0];
15715     ++foo;
15716   }
15717   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15718     typedef const int *iptr;
15719     iptr p = 0;
15720     ++p;
15721   }
15722   { /* AIX XL C 1.02.0.0 rejects this saying
15723        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15724     struct s { int j; const int *ap[3]; };
15725     struct s *b; b->j = 5;
15726   }
15727   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15728     const int foo = 10;
15729   }
15730 #endif
15731
15732   ;
15733   return 0;
15734 }
15735 _ACEOF
15736 rm -f conftest.$ac_objext
15737 if { (eval echo "$as_me:15737: \"$ac_compile\"") >&5
15738   (eval $ac_compile) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); } &&
15742          { ac_try='test -s conftest.$ac_objext'
15743   { (eval echo "$as_me:15743: \"$ac_try\"") >&5
15744   (eval $ac_try) 2>&5
15745   ac_status=$?
15746   echo "$as_me:15746: \$? = $ac_status" >&5
15747   (exit $ac_status); }; }; then
15748   ac_cv_c_const=yes
15749 else
15750   echo "$as_me: failed program was:" >&5
15751 cat conftest.$ac_ext >&5
15752 ac_cv_c_const=no
15753 fi
15754 rm -f conftest.$ac_objext conftest.$ac_ext
15755 fi
15756 echo "$as_me:15756: result: $ac_cv_c_const" >&5
15757 echo "${ECHO_T}$ac_cv_c_const" >&6
15758 if test $ac_cv_c_const = no; then
15759
15760 cat >>confdefs.h <<\EOF
15761 #define const
15762 EOF
15763
15764 fi
15765
15766 echo "$as_me:15766: checking for inline" >&5
15767 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15768 if test "${ac_cv_c_inline+set}" = set; then
15769   echo $ECHO_N "(cached) $ECHO_C" >&6
15770 else
15771   ac_cv_c_inline=no
15772 for ac_kw in inline __inline__ __inline; do
15773   cat >conftest.$ac_ext <<_ACEOF
15774 #line 15774 "configure"
15775 #include "confdefs.h"
15776 #ifndef __cplusplus
15777 static $ac_kw int static_foo () {return 0; }
15778 $ac_kw int foo () {return 0; }
15779 #endif
15780
15781 _ACEOF
15782 rm -f conftest.$ac_objext
15783 if { (eval echo "$as_me:15783: \"$ac_compile\"") >&5
15784   (eval $ac_compile) 2>&5
15785   ac_status=$?
15786   echo "$as_me:15786: \$? = $ac_status" >&5
15787   (exit $ac_status); } &&
15788          { ac_try='test -s conftest.$ac_objext'
15789   { (eval echo "$as_me:15789: \"$ac_try\"") >&5
15790   (eval $ac_try) 2>&5
15791   ac_status=$?
15792   echo "$as_me:15792: \$? = $ac_status" >&5
15793   (exit $ac_status); }; }; then
15794   ac_cv_c_inline=$ac_kw; break
15795 else
15796   echo "$as_me: failed program was:" >&5
15797 cat conftest.$ac_ext >&5
15798 fi
15799 rm -f conftest.$ac_objext conftest.$ac_ext
15800 done
15801
15802 fi
15803 echo "$as_me:15803: result: $ac_cv_c_inline" >&5
15804 echo "${ECHO_T}$ac_cv_c_inline" >&6
15805 case $ac_cv_c_inline in
15806   inline | yes) ;;
15807   no)
15808 cat >>confdefs.h <<\EOF
15809 #define inline
15810 EOF
15811  ;;
15812   *)  cat >>confdefs.h <<EOF
15813 #define inline $ac_cv_c_inline
15814 EOF
15815  ;;
15816 esac
15817
15818 NCURSES_INLINE=
15819 if test "$ac_cv_c_inline" != no ; then
15820         NCURSES_INLINE=inline
15821         if test "$INTEL_COMPILER" = yes
15822         then
15823                 :
15824         elif test "$CLANG_COMPILER" = yes
15825         then
15826                 :
15827         elif test "$GCC" = yes
15828         then
15829                 echo "$as_me:15829: checking if $CC supports options to tune inlining" >&5
15830 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15831 if test "${cf_cv_gcc_inline+set}" = set; then
15832   echo $ECHO_N "(cached) $ECHO_C" >&6
15833 else
15834
15835                 cf_save_CFLAGS=$CFLAGS
15836                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15837                 cat >conftest.$ac_ext <<_ACEOF
15838 #line 15838 "configure"
15839 #include "confdefs.h"
15840 inline int foo(void) { return 1; }
15841 int
15842 main ()
15843 {
15844 ${cf_cv_main_return:-return} foo()
15845   ;
15846   return 0;
15847 }
15848 _ACEOF
15849 rm -f conftest.$ac_objext
15850 if { (eval echo "$as_me:15850: \"$ac_compile\"") >&5
15851   (eval $ac_compile) 2>&5
15852   ac_status=$?
15853   echo "$as_me:15853: \$? = $ac_status" >&5
15854   (exit $ac_status); } &&
15855          { ac_try='test -s conftest.$ac_objext'
15856   { (eval echo "$as_me:15856: \"$ac_try\"") >&5
15857   (eval $ac_try) 2>&5
15858   ac_status=$?
15859   echo "$as_me:15859: \$? = $ac_status" >&5
15860   (exit $ac_status); }; }; then
15861   cf_cv_gcc_inline=yes
15862 else
15863   echo "$as_me: failed program was:" >&5
15864 cat conftest.$ac_ext >&5
15865 cf_cv_gcc_inline=no
15866 fi
15867 rm -f conftest.$ac_objext conftest.$ac_ext
15868                 CFLAGS=$cf_save_CFLAGS
15869
15870 fi
15871 echo "$as_me:15871: result: $cf_cv_gcc_inline" >&5
15872 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15873                 if test "$cf_cv_gcc_inline" = yes ; then
15874
15875 cf_fix_cppflags=no
15876 cf_new_cflags=
15877 cf_new_cppflags=
15878 cf_new_extra_cppflags=
15879
15880 for cf_add_cflags in --param max-inline-insns-single=1200
15881 do
15882 case $cf_fix_cppflags in
15883 (no)
15884         case $cf_add_cflags in
15885         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15886                 case $cf_add_cflags in
15887                 (-D*)
15888                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15889
15890                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15891                                 && test -z "${cf_tst_cflags}" \
15892                                 && cf_fix_cppflags=yes
15893
15894                         if test $cf_fix_cppflags = yes ; then
15895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15896                                 continue
15897                         elif test "${cf_tst_cflags}" = "\"'" ; then
15898                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15899                                 continue
15900                         fi
15901                         ;;
15902                 esac
15903                 case "$CPPFLAGS" in
15904                 (*$cf_add_cflags)
15905                         ;;
15906                 (*)
15907                         case $cf_add_cflags in
15908                         (-D*)
15909                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15910
15911 CPPFLAGS=`echo "$CPPFLAGS" | \
15912         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15913                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15914
15915                                 ;;
15916                         esac
15917                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15918                         ;;
15919                 esac
15920                 ;;
15921         (*)
15922                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15923                 ;;
15924         esac
15925         ;;
15926 (yes)
15927         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15928
15929         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15930
15931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15932                 && test -z "${cf_tst_cflags}" \
15933                 && cf_fix_cppflags=no
15934         ;;
15935 esac
15936 done
15937
15938 if test -n "$cf_new_cflags" ; then
15939
15940         CFLAGS="$CFLAGS $cf_new_cflags"
15941 fi
15942
15943 if test -n "$cf_new_cppflags" ; then
15944
15945         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15946 fi
15947
15948 if test -n "$cf_new_extra_cppflags" ; then
15949
15950         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15951 fi
15952
15953                 fi
15954         fi
15955 fi
15956
15957 echo "$as_me:15957: checking for signal global datatype" >&5
15958 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15959 if test "${cf_cv_sig_atomic_t+set}" = set; then
15960   echo $ECHO_N "(cached) $ECHO_C" >&6
15961 else
15962
15963         for cf_type in \
15964                 "volatile sig_atomic_t" \
15965                 "sig_atomic_t" \
15966                 "int"
15967         do
15968         cat >conftest.$ac_ext <<_ACEOF
15969 #line 15969 "configure"
15970 #include "confdefs.h"
15971
15972 #include <sys/types.h>
15973 #include <signal.h>
15974 #include <stdio.h>
15975
15976 extern $cf_type x;
15977 $cf_type x;
15978 static void handler(int sig)
15979 {
15980         x = 5;
15981 }
15982 int
15983 main ()
15984 {
15985 signal(SIGINT, handler);
15986                  x = 1
15987   ;
15988   return 0;
15989 }
15990 _ACEOF
15991 rm -f conftest.$ac_objext
15992 if { (eval echo "$as_me:15992: \"$ac_compile\"") >&5
15993   (eval $ac_compile) 2>&5
15994   ac_status=$?
15995   echo "$as_me:15995: \$? = $ac_status" >&5
15996   (exit $ac_status); } &&
15997          { ac_try='test -s conftest.$ac_objext'
15998   { (eval echo "$as_me:15998: \"$ac_try\"") >&5
15999   (eval $ac_try) 2>&5
16000   ac_status=$?
16001   echo "$as_me:16001: \$? = $ac_status" >&5
16002   (exit $ac_status); }; }; then
16003   cf_cv_sig_atomic_t=$cf_type
16004 else
16005   echo "$as_me: failed program was:" >&5
16006 cat conftest.$ac_ext >&5
16007 cf_cv_sig_atomic_t=no
16008 fi
16009 rm -f conftest.$ac_objext conftest.$ac_ext
16010                 test "$cf_cv_sig_atomic_t" != no && break
16011         done
16012
16013 fi
16014
16015 echo "$as_me:16015: result: $cf_cv_sig_atomic_t" >&5
16016 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16017 test "$cf_cv_sig_atomic_t" != no &&
16018 cat >>confdefs.h <<EOF
16019 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16020 EOF
16021
16022 if test $NCURSES_CHTYPE = auto ; then
16023
16024 echo "$as_me:16024: checking for type of chtype" >&5
16025 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16026 if test "${cf_cv_typeof_chtype+set}" = set; then
16027   echo $ECHO_N "(cached) $ECHO_C" >&6
16028 else
16029
16030                 if test "$cross_compiling" = yes; then
16031   cf_cv_typeof_chtype=long
16032 else
16033   cat >conftest.$ac_ext <<_ACEOF
16034 #line 16034 "configure"
16035 #include "confdefs.h"
16036
16037 #define WANT_BITS 31
16038 #include <stdio.h>
16039 int main()
16040 {
16041         FILE *fp = fopen("cf_test.out", "w");
16042         if (fp != 0) {
16043                 char *result = "long";
16044                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16045                         int n;
16046                         unsigned int x, y;
16047                         for (n = 0; n < WANT_BITS; n++) {
16048                                 x = (1 << n);
16049                                 y = (x >> n);
16050                                 if (y != 1 || x == 0) {
16051                                         x = 0;
16052                                         break;
16053                                 }
16054                         }
16055                         /*
16056                          * If x is nonzero, an int is big enough for the bits
16057                          * that we want.
16058                          */
16059                         result = (x != 0) ? "int" : "long";
16060                 }
16061                 fputs(result, fp);
16062                 fclose(fp);
16063         }
16064         ${cf_cv_main_return:-return}(0);
16065 }
16066
16067 _ACEOF
16068 rm -f conftest$ac_exeext
16069 if { (eval echo "$as_me:16069: \"$ac_link\"") >&5
16070   (eval $ac_link) 2>&5
16071   ac_status=$?
16072   echo "$as_me:16072: \$? = $ac_status" >&5
16073   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16074   { (eval echo "$as_me:16074: \"$ac_try\"") >&5
16075   (eval $ac_try) 2>&5
16076   ac_status=$?
16077   echo "$as_me:16077: \$? = $ac_status" >&5
16078   (exit $ac_status); }; }; then
16079   cf_cv_typeof_chtype=`cat cf_test.out`
16080 else
16081   echo "$as_me: program exited with status $ac_status" >&5
16082 echo "$as_me: failed program was:" >&5
16083 cat conftest.$ac_ext >&5
16084 cf_cv_typeof_chtype=long
16085 fi
16086 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16087 fi
16088                 rm -f cf_test.out
16089
16090 fi
16091
16092 echo "$as_me:16092: result: $cf_cv_typeof_chtype" >&5
16093 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16094
16095 cat >>confdefs.h <<EOF
16096 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16097 EOF
16098
16099 else
16100         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16101 fi
16102 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16103
16104 echo "$as_me:16104: checking if unsigned literals are legal" >&5
16105 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16106 if test "${cf_cv_unsigned_literals+set}" = set; then
16107   echo $ECHO_N "(cached) $ECHO_C" >&6
16108 else
16109
16110         cat >conftest.$ac_ext <<_ACEOF
16111 #line 16111 "configure"
16112 #include "confdefs.h"
16113
16114 int
16115 main ()
16116 {
16117 long x = 1L + 1UL + 1U + 1
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 rm -f conftest.$ac_objext
16123 if { (eval echo "$as_me:16123: \"$ac_compile\"") >&5
16124   (eval $ac_compile) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); } &&
16128          { ac_try='test -s conftest.$ac_objext'
16129   { (eval echo "$as_me:16129: \"$ac_try\"") >&5
16130   (eval $ac_try) 2>&5
16131   ac_status=$?
16132   echo "$as_me:16132: \$? = $ac_status" >&5
16133   (exit $ac_status); }; }; then
16134   cf_cv_unsigned_literals=yes
16135 else
16136   echo "$as_me: failed program was:" >&5
16137 cat conftest.$ac_ext >&5
16138 cf_cv_unsigned_literals=no
16139 fi
16140 rm -f conftest.$ac_objext conftest.$ac_ext
16141
16142 fi
16143
16144 echo "$as_me:16144: result: $cf_cv_unsigned_literals" >&5
16145 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16146
16147 cf_cv_1UL="1"
16148 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16149 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16150
16151 if test $NCURSES_MMASK_T = auto ; then
16152         cf_cv_typeof_mmask_t=long
16153 else
16154         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16155 fi
16156 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16157
16158 ###     Checks for external-data
16159
16160 echo "$as_me:16160: checking if external errno is declared" >&5
16161 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16162 if test "${cf_cv_dcl_errno+set}" = set; then
16163   echo $ECHO_N "(cached) $ECHO_C" >&6
16164 else
16165
16166         cat >conftest.$ac_ext <<_ACEOF
16167 #line 16167 "configure"
16168 #include "confdefs.h"
16169
16170 #ifdef HAVE_STDLIB_H
16171 #include <stdlib.h>
16172 #endif
16173 #include <stdio.h>
16174 #include <sys/types.h>
16175 #include <errno.h>
16176 int
16177 main ()
16178 {
16179 int x = (int) errno
16180   ;
16181   return 0;
16182 }
16183 _ACEOF
16184 rm -f conftest.$ac_objext
16185 if { (eval echo "$as_me:16185: \"$ac_compile\"") >&5
16186   (eval $ac_compile) 2>&5
16187   ac_status=$?
16188   echo "$as_me:16188: \$? = $ac_status" >&5
16189   (exit $ac_status); } &&
16190          { ac_try='test -s conftest.$ac_objext'
16191   { (eval echo "$as_me:16191: \"$ac_try\"") >&5
16192   (eval $ac_try) 2>&5
16193   ac_status=$?
16194   echo "$as_me:16194: \$? = $ac_status" >&5
16195   (exit $ac_status); }; }; then
16196   cf_cv_dcl_errno=yes
16197 else
16198   echo "$as_me: failed program was:" >&5
16199 cat conftest.$ac_ext >&5
16200 cf_cv_dcl_errno=no
16201 fi
16202 rm -f conftest.$ac_objext conftest.$ac_ext
16203
16204 fi
16205 echo "$as_me:16205: result: $cf_cv_dcl_errno" >&5
16206 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16207
16208 if test "$cf_cv_dcl_errno" = no ; then
16209
16210 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16211
16212         cat >>confdefs.h <<EOF
16213 #define $cf_result 1
16214 EOF
16215
16216 fi
16217
16218 # It's possible (for near-UNIX clones) that the data doesn't exist
16219
16220 echo "$as_me:16220: checking if external errno exists" >&5
16221 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16222 if test "${cf_cv_have_errno+set}" = set; then
16223   echo $ECHO_N "(cached) $ECHO_C" >&6
16224 else
16225
16226         cat >conftest.$ac_ext <<_ACEOF
16227 #line 16227 "configure"
16228 #include "confdefs.h"
16229
16230 #undef errno
16231 extern int errno;
16232
16233 int
16234 main ()
16235 {
16236 errno = 2
16237   ;
16238   return 0;
16239 }
16240 _ACEOF
16241 rm -f conftest.$ac_objext conftest$ac_exeext
16242 if { (eval echo "$as_me:16242: \"$ac_link\"") >&5
16243   (eval $ac_link) 2>&5
16244   ac_status=$?
16245   echo "$as_me:16245: \$? = $ac_status" >&5
16246   (exit $ac_status); } &&
16247          { ac_try='test -s conftest$ac_exeext'
16248   { (eval echo "$as_me:16248: \"$ac_try\"") >&5
16249   (eval $ac_try) 2>&5
16250   ac_status=$?
16251   echo "$as_me:16251: \$? = $ac_status" >&5
16252   (exit $ac_status); }; }; then
16253   cf_cv_have_errno=yes
16254 else
16255   echo "$as_me: failed program was:" >&5
16256 cat conftest.$ac_ext >&5
16257 cf_cv_have_errno=no
16258 fi
16259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16260
16261 fi
16262 echo "$as_me:16262: result: $cf_cv_have_errno" >&5
16263 echo "${ECHO_T}$cf_cv_have_errno" >&6
16264
16265 if test "$cf_cv_have_errno" = yes ; then
16266
16267 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16268
16269         cat >>confdefs.h <<EOF
16270 #define $cf_result 1
16271 EOF
16272
16273 fi
16274
16275 echo "$as_me:16275: checking if data-only library module links" >&5
16276 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16277 if test "${cf_cv_link_dataonly+set}" = set; then
16278   echo $ECHO_N "(cached) $ECHO_C" >&6
16279 else
16280
16281         rm -f conftest.a
16282         cat >conftest.$ac_ext <<EOF
16283 #line 16283 "configure"
16284 int     testdata[3] = { 123, 456, 789 };
16285 EOF
16286         if { (eval echo "$as_me:16286: \"$ac_compile\"") >&5
16287   (eval $ac_compile) 2>&5
16288   ac_status=$?
16289   echo "$as_me:16289: \$? = $ac_status" >&5
16290   (exit $ac_status); } ; then
16291                 mv conftest.o data.o && \
16292                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16293         fi
16294         rm -f conftest.$ac_ext data.o
16295         cat >conftest.$ac_ext <<EOF
16296 #line 16296 "configure"
16297 int     testfunc()
16298 {
16299 #if defined(NeXT)
16300         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16301 #else
16302         extern int testdata[3];
16303         return testdata[0] == 123
16304            &&  testdata[1] == 456
16305            &&  testdata[2] == 789;
16306 #endif
16307 }
16308 EOF
16309         if { (eval echo "$as_me:16309: \"$ac_compile\"") >&5
16310   (eval $ac_compile) 2>&5
16311   ac_status=$?
16312   echo "$as_me:16312: \$? = $ac_status" >&5
16313   (exit $ac_status); }; then
16314                 mv conftest.o func.o && \
16315                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16316         fi
16317         rm -f conftest.$ac_ext func.o
16318         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16319         cf_saveLIBS="$LIBS"
16320         LIBS="conftest.a $LIBS"
16321         if test "$cross_compiling" = yes; then
16322   cf_cv_link_dataonly=unknown
16323 else
16324   cat >conftest.$ac_ext <<_ACEOF
16325 #line 16325 "configure"
16326 #include "confdefs.h"
16327
16328         int main()
16329         {
16330                 extern int testfunc();
16331                 ${cf_cv_main_return:-return} (!testfunc());
16332         }
16333
16334 _ACEOF
16335 rm -f conftest$ac_exeext
16336 if { (eval echo "$as_me:16336: \"$ac_link\"") >&5
16337   (eval $ac_link) 2>&5
16338   ac_status=$?
16339   echo "$as_me:16339: \$? = $ac_status" >&5
16340   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16341   { (eval echo "$as_me:16341: \"$ac_try\"") >&5
16342   (eval $ac_try) 2>&5
16343   ac_status=$?
16344   echo "$as_me:16344: \$? = $ac_status" >&5
16345   (exit $ac_status); }; }; then
16346   cf_cv_link_dataonly=yes
16347 else
16348   echo "$as_me: program exited with status $ac_status" >&5
16349 echo "$as_me: failed program was:" >&5
16350 cat conftest.$ac_ext >&5
16351 cf_cv_link_dataonly=no
16352 fi
16353 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16354 fi
16355         LIBS="$cf_saveLIBS"
16356
16357 fi
16358
16359 echo "$as_me:16359: result: $cf_cv_link_dataonly" >&5
16360 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16361
16362 if test "$cf_cv_link_dataonly" = no ; then
16363
16364 cat >>confdefs.h <<\EOF
16365 #define BROKEN_LINKER 1
16366 EOF
16367
16368         BROKEN_LINKER=1
16369 fi
16370
16371 ###     Checks for library functions.
16372
16373 for ac_func in \
16374 getcwd \
16375 getegid \
16376 geteuid \
16377 getopt \
16378 getttynam \
16379 issetugid \
16380 poll \
16381 putenv \
16382 remove \
16383 select \
16384 setbuf \
16385 setbuffer \
16386 setenv \
16387 setvbuf \
16388 sigaction \
16389 sigvec \
16390 strdup \
16391 strstr \
16392 tcgetpgrp \
16393 times \
16394 vsnprintf \
16395
16396 do
16397 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16398 echo "$as_me:16398: checking for $ac_func" >&5
16399 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16400 if eval "test \"\${$as_ac_var+set}\" = set"; then
16401   echo $ECHO_N "(cached) $ECHO_C" >&6
16402 else
16403   cat >conftest.$ac_ext <<_ACEOF
16404 #line 16404 "configure"
16405 #include "confdefs.h"
16406 /* System header to define __stub macros and hopefully few prototypes,
16407     which can conflict with char $ac_func (); below.  */
16408 #include <assert.h>
16409 /* Override any gcc2 internal prototype to avoid an error.  */
16410 #ifdef __cplusplus
16411 extern "C"
16412 #endif
16413 /* We use char because int might match the return type of a gcc2
16414    builtin and then its argument prototype would still apply.  */
16415 char $ac_func ();
16416 char (*f) ();
16417
16418 int
16419 main ()
16420 {
16421 /* The GNU C library defines this for functions which it implements
16422     to always fail with ENOSYS.  Some functions are actually named
16423     something starting with __ and the normal name is an alias.  */
16424 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16425 choke me
16426 #else
16427 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16428 #endif
16429
16430   ;
16431   return 0;
16432 }
16433 _ACEOF
16434 rm -f conftest.$ac_objext conftest$ac_exeext
16435 if { (eval echo "$as_me:16435: \"$ac_link\"") >&5
16436   (eval $ac_link) 2>&5
16437   ac_status=$?
16438   echo "$as_me:16438: \$? = $ac_status" >&5
16439   (exit $ac_status); } &&
16440          { ac_try='test -s conftest$ac_exeext'
16441   { (eval echo "$as_me:16441: \"$ac_try\"") >&5
16442   (eval $ac_try) 2>&5
16443   ac_status=$?
16444   echo "$as_me:16444: \$? = $ac_status" >&5
16445   (exit $ac_status); }; }; then
16446   eval "$as_ac_var=yes"
16447 else
16448   echo "$as_me: failed program was:" >&5
16449 cat conftest.$ac_ext >&5
16450 eval "$as_ac_var=no"
16451 fi
16452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16453 fi
16454 echo "$as_me:16454: result: `eval echo '${'$as_ac_var'}'`" >&5
16455 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16456 if test `eval echo '${'$as_ac_var'}'` = yes; then
16457   cat >>confdefs.h <<EOF
16458 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16459 EOF
16460
16461 fi
16462 done
16463
16464 if test "x$ac_cv_func_getopt" = xno &&
16465    test "x$cf_with_progs$cf_with_tests" != xnono; then
16466         { { echo "$as_me:16466: error: getopt is required for building programs" >&5
16467 echo "$as_me: error: getopt is required for building programs" >&2;}
16468    { (exit 1); exit 1; }; }
16469 fi
16470
16471 if test "x$with_getcap" = "xyes" ; then
16472
16473 echo "$as_me:16473: checking for terminal-capability database functions" >&5
16474 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16475 if test "${cf_cv_cgetent+set}" = set; then
16476   echo $ECHO_N "(cached) $ECHO_C" >&6
16477 else
16478
16479 cat >conftest.$ac_ext <<_ACEOF
16480 #line 16480 "configure"
16481 #include "confdefs.h"
16482
16483 #include <stdlib.h>
16484 int
16485 main ()
16486 {
16487
16488         char temp[128];
16489         char *buf = temp;
16490         char *db_array = temp;
16491         cgetent(&buf, &db_array, "vt100");
16492         cgetcap(buf, "tc", '=');
16493         cgetmatch(buf, "tc");
16494
16495   ;
16496   return 0;
16497 }
16498 _ACEOF
16499 rm -f conftest.$ac_objext conftest$ac_exeext
16500 if { (eval echo "$as_me:16500: \"$ac_link\"") >&5
16501   (eval $ac_link) 2>&5
16502   ac_status=$?
16503   echo "$as_me:16503: \$? = $ac_status" >&5
16504   (exit $ac_status); } &&
16505          { ac_try='test -s conftest$ac_exeext'
16506   { (eval echo "$as_me:16506: \"$ac_try\"") >&5
16507   (eval $ac_try) 2>&5
16508   ac_status=$?
16509   echo "$as_me:16509: \$? = $ac_status" >&5
16510   (exit $ac_status); }; }; then
16511   cf_cv_cgetent=yes
16512 else
16513   echo "$as_me: failed program was:" >&5
16514 cat conftest.$ac_ext >&5
16515 cf_cv_cgetent=no
16516 fi
16517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16518
16519 fi
16520 echo "$as_me:16520: result: $cf_cv_cgetent" >&5
16521 echo "${ECHO_T}$cf_cv_cgetent" >&6
16522
16523 if test "$cf_cv_cgetent" = yes
16524 then
16525
16526 cat >>confdefs.h <<\EOF
16527 #define HAVE_BSD_CGETENT 1
16528 EOF
16529
16530 echo "$as_me:16530: checking if cgetent uses const parameter" >&5
16531 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16532 if test "${cf_cv_cgetent_const+set}" = set; then
16533   echo $ECHO_N "(cached) $ECHO_C" >&6
16534 else
16535
16536 cat >conftest.$ac_ext <<_ACEOF
16537 #line 16537 "configure"
16538 #include "confdefs.h"
16539
16540 #include <stdlib.h>
16541 int
16542 main ()
16543 {
16544
16545         char temp[128];
16546         char *buf = temp;
16547 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16548         const char *db_array = temp;
16549         cgetent(&buf, &db_array, "vt100");
16550 #endif
16551         cgetcap(buf, "tc", '=');
16552         cgetmatch(buf, "tc");
16553
16554   ;
16555   return 0;
16556 }
16557 _ACEOF
16558 rm -f conftest.$ac_objext conftest$ac_exeext
16559 if { (eval echo "$as_me:16559: \"$ac_link\"") >&5
16560   (eval $ac_link) 2>&5
16561   ac_status=$?
16562   echo "$as_me:16562: \$? = $ac_status" >&5
16563   (exit $ac_status); } &&
16564          { ac_try='test -s conftest$ac_exeext'
16565   { (eval echo "$as_me:16565: \"$ac_try\"") >&5
16566   (eval $ac_try) 2>&5
16567   ac_status=$?
16568   echo "$as_me:16568: \$? = $ac_status" >&5
16569   (exit $ac_status); }; }; then
16570   cf_cv_cgetent_const=yes
16571 else
16572   echo "$as_me: failed program was:" >&5
16573 cat conftest.$ac_ext >&5
16574 cf_cv_cgetent_const=no
16575 fi
16576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16577
16578 fi
16579 echo "$as_me:16579: result: $cf_cv_cgetent_const" >&5
16580 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16581         if test "$cf_cv_cgetent_const" = yes
16582         then
16583
16584 cat >>confdefs.h <<EOF
16585 #define CGETENT_CONST const
16586 EOF
16587
16588         fi
16589 fi
16590
16591 fi
16592
16593 echo "$as_me:16593: checking for isascii" >&5
16594 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16595 if test "${cf_cv_have_isascii+set}" = set; then
16596   echo $ECHO_N "(cached) $ECHO_C" >&6
16597 else
16598
16599         cat >conftest.$ac_ext <<_ACEOF
16600 #line 16600 "configure"
16601 #include "confdefs.h"
16602 #include <ctype.h>
16603 int
16604 main ()
16605 {
16606 int x = isascii(' ')
16607   ;
16608   return 0;
16609 }
16610 _ACEOF
16611 rm -f conftest.$ac_objext conftest$ac_exeext
16612 if { (eval echo "$as_me:16612: \"$ac_link\"") >&5
16613   (eval $ac_link) 2>&5
16614   ac_status=$?
16615   echo "$as_me:16615: \$? = $ac_status" >&5
16616   (exit $ac_status); } &&
16617          { ac_try='test -s conftest$ac_exeext'
16618   { (eval echo "$as_me:16618: \"$ac_try\"") >&5
16619   (eval $ac_try) 2>&5
16620   ac_status=$?
16621   echo "$as_me:16621: \$? = $ac_status" >&5
16622   (exit $ac_status); }; }; then
16623   cf_cv_have_isascii=yes
16624 else
16625   echo "$as_me: failed program was:" >&5
16626 cat conftest.$ac_ext >&5
16627 cf_cv_have_isascii=no
16628 fi
16629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16630
16631 fi
16632 echo "$as_me:16632: result: $cf_cv_have_isascii" >&5
16633 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16634 test "$cf_cv_have_isascii" = yes &&
16635 cat >>confdefs.h <<\EOF
16636 #define HAVE_ISASCII 1
16637 EOF
16638
16639 if test "$ac_cv_func_sigaction" = yes; then
16640 echo "$as_me:16640: checking whether sigaction needs _POSIX_SOURCE" >&5
16641 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16642 cat >conftest.$ac_ext <<_ACEOF
16643 #line 16643 "configure"
16644 #include "confdefs.h"
16645
16646 #include <sys/types.h>
16647 #include <signal.h>
16648 int
16649 main ()
16650 {
16651 struct sigaction act
16652   ;
16653   return 0;
16654 }
16655 _ACEOF
16656 rm -f conftest.$ac_objext
16657 if { (eval echo "$as_me:16657: \"$ac_compile\"") >&5
16658   (eval $ac_compile) 2>&5
16659   ac_status=$?
16660   echo "$as_me:16660: \$? = $ac_status" >&5
16661   (exit $ac_status); } &&
16662          { ac_try='test -s conftest.$ac_objext'
16663   { (eval echo "$as_me:16663: \"$ac_try\"") >&5
16664   (eval $ac_try) 2>&5
16665   ac_status=$?
16666   echo "$as_me:16666: \$? = $ac_status" >&5
16667   (exit $ac_status); }; }; then
16668   sigact_bad=no
16669 else
16670   echo "$as_me: failed program was:" >&5
16671 cat conftest.$ac_ext >&5
16672
16673 cat >conftest.$ac_ext <<_ACEOF
16674 #line 16674 "configure"
16675 #include "confdefs.h"
16676
16677 #define _POSIX_SOURCE
16678 #include <sys/types.h>
16679 #include <signal.h>
16680 int
16681 main ()
16682 {
16683 struct sigaction act
16684   ;
16685   return 0;
16686 }
16687 _ACEOF
16688 rm -f conftest.$ac_objext
16689 if { (eval echo "$as_me:16689: \"$ac_compile\"") >&5
16690   (eval $ac_compile) 2>&5
16691   ac_status=$?
16692   echo "$as_me:16692: \$? = $ac_status" >&5
16693   (exit $ac_status); } &&
16694          { ac_try='test -s conftest.$ac_objext'
16695   { (eval echo "$as_me:16695: \"$ac_try\"") >&5
16696   (eval $ac_try) 2>&5
16697   ac_status=$?
16698   echo "$as_me:16698: \$? = $ac_status" >&5
16699   (exit $ac_status); }; }; then
16700   sigact_bad=yes
16701
16702 cat >>confdefs.h <<\EOF
16703 #define _POSIX_SOURCE 1
16704 EOF
16705
16706 else
16707   echo "$as_me: failed program was:" >&5
16708 cat conftest.$ac_ext >&5
16709 sigact_bad=unknown
16710 fi
16711 rm -f conftest.$ac_objext conftest.$ac_ext
16712 fi
16713 rm -f conftest.$ac_objext conftest.$ac_ext
16714 echo "$as_me:16714: result: $sigact_bad" >&5
16715 echo "${ECHO_T}$sigact_bad" >&6
16716 fi
16717
16718 echo "$as_me:16718: checking if nanosleep really works" >&5
16719 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16720 if test "${cf_cv_func_nanosleep+set}" = set; then
16721   echo $ECHO_N "(cached) $ECHO_C" >&6
16722 else
16723
16724 if test "$cross_compiling" = yes; then
16725   cf_cv_func_nanosleep=unknown
16726 else
16727   cat >conftest.$ac_ext <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16730
16731 #include <stdio.h>
16732 #include <errno.h>
16733 #include <time.h>
16734
16735 #ifdef HAVE_SYS_TIME_H
16736 #include <sys/time.h>
16737 #endif
16738
16739 int main() {
16740         struct timespec ts1, ts2;
16741         int code;
16742         ts1.tv_sec  = 0;
16743         ts1.tv_nsec = 750000000;
16744         ts2.tv_sec  = 0;
16745         ts2.tv_nsec = 0;
16746         errno = 0;
16747         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16748         ${cf_cv_main_return:-return}(code != 0);
16749 }
16750
16751 _ACEOF
16752 rm -f conftest$ac_exeext
16753 if { (eval echo "$as_me:16753: \"$ac_link\"") >&5
16754   (eval $ac_link) 2>&5
16755   ac_status=$?
16756   echo "$as_me:16756: \$? = $ac_status" >&5
16757   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16758   { (eval echo "$as_me:16758: \"$ac_try\"") >&5
16759   (eval $ac_try) 2>&5
16760   ac_status=$?
16761   echo "$as_me:16761: \$? = $ac_status" >&5
16762   (exit $ac_status); }; }; then
16763   cf_cv_func_nanosleep=yes
16764 else
16765   echo "$as_me: program exited with status $ac_status" >&5
16766 echo "$as_me: failed program was:" >&5
16767 cat conftest.$ac_ext >&5
16768 cf_cv_func_nanosleep=no
16769 fi
16770 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16771 fi
16772 fi
16773 echo "$as_me:16773: result: $cf_cv_func_nanosleep" >&5
16774 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16775
16776 test "$cf_cv_func_nanosleep" = "yes" &&
16777 cat >>confdefs.h <<\EOF
16778 #define HAVE_NANOSLEEP 1
16779 EOF
16780
16781 for ac_header in \
16782 termio.h \
16783 termios.h \
16784 unistd.h \
16785
16786 do
16787 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16788 echo "$as_me:16788: checking for $ac_header" >&5
16789 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16791   echo $ECHO_N "(cached) $ECHO_C" >&6
16792 else
16793   cat >conftest.$ac_ext <<_ACEOF
16794 #line 16794 "configure"
16795 #include "confdefs.h"
16796 #include <$ac_header>
16797 _ACEOF
16798 if { (eval echo "$as_me:16798: \"$ac_cpp conftest.$ac_ext\"") >&5
16799   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16800   ac_status=$?
16801   egrep -v '^ *\+' conftest.er1 >conftest.err
16802   rm -f conftest.er1
16803   cat conftest.err >&5
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit $ac_status); } >/dev/null; then
16806   if test -s conftest.err; then
16807     ac_cpp_err=$ac_c_preproc_warn_flag
16808   else
16809     ac_cpp_err=
16810   fi
16811 else
16812   ac_cpp_err=yes
16813 fi
16814 if test -z "$ac_cpp_err"; then
16815   eval "$as_ac_Header=yes"
16816 else
16817   echo "$as_me: failed program was:" >&5
16818   cat conftest.$ac_ext >&5
16819   eval "$as_ac_Header=no"
16820 fi
16821 rm -f conftest.err conftest.$ac_ext
16822 fi
16823 echo "$as_me:16823: result: `eval echo '${'$as_ac_Header'}'`" >&5
16824 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16825 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16826   cat >>confdefs.h <<EOF
16827 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16828 EOF
16829
16830 fi
16831 done
16832
16833 if test "$ISC" = yes ; then
16834
16835 for ac_header in sys/termio.h
16836 do
16837 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16838 echo "$as_me:16838: checking for $ac_header" >&5
16839 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16840 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16841   echo $ECHO_N "(cached) $ECHO_C" >&6
16842 else
16843   cat >conftest.$ac_ext <<_ACEOF
16844 #line 16844 "configure"
16845 #include "confdefs.h"
16846 #include <$ac_header>
16847 _ACEOF
16848 if { (eval echo "$as_me:16848: \"$ac_cpp conftest.$ac_ext\"") >&5
16849   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16850   ac_status=$?
16851   egrep -v '^ *\+' conftest.er1 >conftest.err
16852   rm -f conftest.er1
16853   cat conftest.err >&5
16854   echo "$as_me:16854: \$? = $ac_status" >&5
16855   (exit $ac_status); } >/dev/null; then
16856   if test -s conftest.err; then
16857     ac_cpp_err=$ac_c_preproc_warn_flag
16858   else
16859     ac_cpp_err=
16860   fi
16861 else
16862   ac_cpp_err=yes
16863 fi
16864 if test -z "$ac_cpp_err"; then
16865   eval "$as_ac_Header=yes"
16866 else
16867   echo "$as_me: failed program was:" >&5
16868   cat conftest.$ac_ext >&5
16869   eval "$as_ac_Header=no"
16870 fi
16871 rm -f conftest.err conftest.$ac_ext
16872 fi
16873 echo "$as_me:16873: result: `eval echo '${'$as_ac_Header'}'`" >&5
16874 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16875 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16876   cat >>confdefs.h <<EOF
16877 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16878 EOF
16879
16880 fi
16881 done
16882
16883 fi
16884 if test "$ac_cv_header_termios_h" = yes ; then
16885         case "$CFLAGS $CPPFLAGS" in
16886         (*-D_POSIX_SOURCE*)
16887                 termios_bad=dunno ;;
16888         (*)     termios_bad=maybe ;;
16889         esac
16890         if test "$termios_bad" = maybe ; then
16891         echo "$as_me:16891: checking whether termios.h needs _POSIX_SOURCE" >&5
16892 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16893         cat >conftest.$ac_ext <<_ACEOF
16894 #line 16894 "configure"
16895 #include "confdefs.h"
16896 #include <termios.h>
16897 int
16898 main ()
16899 {
16900 struct termios foo; int x = foo.c_iflag
16901   ;
16902   return 0;
16903 }
16904 _ACEOF
16905 rm -f conftest.$ac_objext
16906 if { (eval echo "$as_me:16906: \"$ac_compile\"") >&5
16907   (eval $ac_compile) 2>&5
16908   ac_status=$?
16909   echo "$as_me:16909: \$? = $ac_status" >&5
16910   (exit $ac_status); } &&
16911          { ac_try='test -s conftest.$ac_objext'
16912   { (eval echo "$as_me:16912: \"$ac_try\"") >&5
16913   (eval $ac_try) 2>&5
16914   ac_status=$?
16915   echo "$as_me:16915: \$? = $ac_status" >&5
16916   (exit $ac_status); }; }; then
16917   termios_bad=no
16918 else
16919   echo "$as_me: failed program was:" >&5
16920 cat conftest.$ac_ext >&5
16921
16922                 cat >conftest.$ac_ext <<_ACEOF
16923 #line 16923 "configure"
16924 #include "confdefs.h"
16925
16926 #define _POSIX_SOURCE
16927 #include <termios.h>
16928 int
16929 main ()
16930 {
16931 struct termios foo; int x = foo.c_iflag
16932   ;
16933   return 0;
16934 }
16935 _ACEOF
16936 rm -f conftest.$ac_objext
16937 if { (eval echo "$as_me:16937: \"$ac_compile\"") >&5
16938   (eval $ac_compile) 2>&5
16939   ac_status=$?
16940   echo "$as_me:16940: \$? = $ac_status" >&5
16941   (exit $ac_status); } &&
16942          { ac_try='test -s conftest.$ac_objext'
16943   { (eval echo "$as_me:16943: \"$ac_try\"") >&5
16944   (eval $ac_try) 2>&5
16945   ac_status=$?
16946   echo "$as_me:16946: \$? = $ac_status" >&5
16947   (exit $ac_status); }; }; then
16948   termios_bad=unknown
16949 else
16950   echo "$as_me: failed program was:" >&5
16951 cat conftest.$ac_ext >&5
16952 termios_bad=yes
16953 cat >>confdefs.h <<\EOF
16954 #define _POSIX_SOURCE 1
16955 EOF
16956
16957 fi
16958 rm -f conftest.$ac_objext conftest.$ac_ext
16959
16960 fi
16961 rm -f conftest.$ac_objext conftest.$ac_ext
16962         echo "$as_me:16962: result: $termios_bad" >&5
16963 echo "${ECHO_T}$termios_bad" >&6
16964         fi
16965 fi
16966
16967 echo "$as_me:16967: checking for tcgetattr" >&5
16968 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16969 if test "${cf_cv_have_tcgetattr+set}" = set; then
16970   echo $ECHO_N "(cached) $ECHO_C" >&6
16971 else
16972
16973 cat >conftest.$ac_ext <<_ACEOF
16974 #line 16974 "configure"
16975 #include "confdefs.h"
16976
16977 #include <sys/types.h>
16978 #ifdef HAVE_UNISTD_H
16979 #include <unistd.h>
16980 #endif
16981 #ifdef HAVE_TERMIOS_H
16982 #include <termios.h>
16983 #define TTY struct termios
16984 #else
16985 #ifdef HAVE_TERMIO_H
16986 #include <termio.h>
16987 #define TTY struct termio
16988 #endif
16989 #endif
16990
16991 int
16992 main ()
16993 {
16994
16995 TTY foo;
16996 tcgetattr(1, &foo);
16997   ;
16998   return 0;
16999 }
17000 _ACEOF
17001 rm -f conftest.$ac_objext conftest$ac_exeext
17002 if { (eval echo "$as_me:17002: \"$ac_link\"") >&5
17003   (eval $ac_link) 2>&5
17004   ac_status=$?
17005   echo "$as_me:17005: \$? = $ac_status" >&5
17006   (exit $ac_status); } &&
17007          { ac_try='test -s conftest$ac_exeext'
17008   { (eval echo "$as_me:17008: \"$ac_try\"") >&5
17009   (eval $ac_try) 2>&5
17010   ac_status=$?
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit $ac_status); }; }; then
17013   cf_cv_have_tcgetattr=yes
17014 else
17015   echo "$as_me: failed program was:" >&5
17016 cat conftest.$ac_ext >&5
17017 cf_cv_have_tcgetattr=no
17018 fi
17019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17020 fi
17021 echo "$as_me:17021: result: $cf_cv_have_tcgetattr" >&5
17022 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17023 test "$cf_cv_have_tcgetattr" = yes &&
17024 cat >>confdefs.h <<\EOF
17025 #define HAVE_TCGETATTR 1
17026 EOF
17027
17028 echo "$as_me:17028: checking for vsscanf function or workaround" >&5
17029 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17030 if test "${cf_cv_func_vsscanf+set}" = set; then
17031   echo $ECHO_N "(cached) $ECHO_C" >&6
17032 else
17033
17034 cat >conftest.$ac_ext <<_ACEOF
17035 #line 17035 "configure"
17036 #include "confdefs.h"
17037
17038 #include <stdarg.h>
17039 #include <stdio.h>
17040 int
17041 main ()
17042 {
17043
17044         va_list ap;
17045         vsscanf("from", "%d", ap)
17046   ;
17047   return 0;
17048 }
17049 _ACEOF
17050 rm -f conftest.$ac_objext conftest$ac_exeext
17051 if { (eval echo "$as_me:17051: \"$ac_link\"") >&5
17052   (eval $ac_link) 2>&5
17053   ac_status=$?
17054   echo "$as_me:17054: \$? = $ac_status" >&5
17055   (exit $ac_status); } &&
17056          { ac_try='test -s conftest$ac_exeext'
17057   { (eval echo "$as_me:17057: \"$ac_try\"") >&5
17058   (eval $ac_try) 2>&5
17059   ac_status=$?
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit $ac_status); }; }; then
17062   cf_cv_func_vsscanf=vsscanf
17063 else
17064   echo "$as_me: failed program was:" >&5
17065 cat conftest.$ac_ext >&5
17066
17067 cat >conftest.$ac_ext <<_ACEOF
17068 #line 17068 "configure"
17069 #include "confdefs.h"
17070
17071 #include <stdarg.h>
17072 #include <stdio.h>
17073 int
17074 main ()
17075 {
17076
17077         FILE strbuf;
17078         char *str = "from";
17079
17080         strbuf._flag = _IOREAD;
17081         strbuf._ptr = strbuf._base = (unsigned char *) str;
17082         strbuf._cnt = strlen(str);
17083         strbuf._file = _NFILE;
17084         return (vfscanf(&strbuf, "%d", ap))
17085   ;
17086   return 0;
17087 }
17088 _ACEOF
17089 rm -f conftest.$ac_objext conftest$ac_exeext
17090 if { (eval echo "$as_me:17090: \"$ac_link\"") >&5
17091   (eval $ac_link) 2>&5
17092   ac_status=$?
17093   echo "$as_me:17093: \$? = $ac_status" >&5
17094   (exit $ac_status); } &&
17095          { ac_try='test -s conftest$ac_exeext'
17096   { (eval echo "$as_me:17096: \"$ac_try\"") >&5
17097   (eval $ac_try) 2>&5
17098   ac_status=$?
17099   echo "$as_me:17099: \$? = $ac_status" >&5
17100   (exit $ac_status); }; }; then
17101   cf_cv_func_vsscanf=vfscanf
17102 else
17103   echo "$as_me: failed program was:" >&5
17104 cat conftest.$ac_ext >&5
17105
17106 cat >conftest.$ac_ext <<_ACEOF
17107 #line 17107 "configure"
17108 #include "confdefs.h"
17109
17110 #include <stdarg.h>
17111 #include <stdio.h>
17112 int
17113 main ()
17114 {
17115
17116         FILE strbuf;
17117         char *str = "from";
17118
17119         strbuf._flag = _IOREAD;
17120         strbuf._ptr = strbuf._base = (unsigned char *) str;
17121         strbuf._cnt = strlen(str);
17122         strbuf._file = _NFILE;
17123         return (_doscan(&strbuf, "%d", ap))
17124   ;
17125   return 0;
17126 }
17127 _ACEOF
17128 rm -f conftest.$ac_objext conftest$ac_exeext
17129 if { (eval echo "$as_me:17129: \"$ac_link\"") >&5
17130   (eval $ac_link) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); } &&
17134          { ac_try='test -s conftest$ac_exeext'
17135   { (eval echo "$as_me:17135: \"$ac_try\"") >&5
17136   (eval $ac_try) 2>&5
17137   ac_status=$?
17138   echo "$as_me:17138: \$? = $ac_status" >&5
17139   (exit $ac_status); }; }; then
17140   cf_cv_func_vsscanf=_doscan
17141 else
17142   echo "$as_me: failed program was:" >&5
17143 cat conftest.$ac_ext >&5
17144
17145 cf_cv_func_vsscanf=no
17146 fi
17147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17148 fi
17149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17150 fi
17151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17152 fi
17153 echo "$as_me:17153: result: $cf_cv_func_vsscanf" >&5
17154 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17155
17156 case $cf_cv_func_vsscanf in
17157 (vsscanf)
17158 cat >>confdefs.h <<\EOF
17159 #define HAVE_VSSCANF 1
17160 EOF
17161 ;;
17162 (vfscanf)
17163 cat >>confdefs.h <<\EOF
17164 #define HAVE_VFSCANF 1
17165 EOF
17166 ;;
17167 (_doscan)
17168 cat >>confdefs.h <<\EOF
17169 #define HAVE__DOSCAN 1
17170 EOF
17171 ;;
17172 esac
17173
17174 echo "$as_me:17174: checking for working mkstemp" >&5
17175 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17176 if test "${cf_cv_func_mkstemp+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179
17180 rm -rf conftest*
17181 if test "$cross_compiling" = yes; then
17182   cf_cv_func_mkstemp=maybe
17183 else
17184   cat >conftest.$ac_ext <<_ACEOF
17185 #line 17185 "configure"
17186 #include "confdefs.h"
17187
17188 #include <sys/types.h>
17189 #include <stdlib.h>
17190 #include <stdio.h>
17191 #include <string.h>
17192 #include <sys/stat.h>
17193 int main()
17194 {
17195         char *tmpl = "conftestXXXXXX";
17196         char name[2][80];
17197         int n;
17198         int result = 0;
17199         int fd;
17200         struct stat sb;
17201
17202         umask(077);
17203         for (n = 0; n < 2; ++n) {
17204                 strcpy(name[n], tmpl);
17205                 if ((fd = mkstemp(name[n])) >= 0) {
17206                         if (!strcmp(name[n], tmpl)
17207                          || stat(name[n], &sb) != 0
17208                          || (sb.st_mode & S_IFMT) != S_IFREG
17209                          || (sb.st_mode & 077) != 0) {
17210                                 result = 1;
17211                         }
17212                         close(fd);
17213                 }
17214         }
17215         if (result == 0
17216          && !strcmp(name[0], name[1]))
17217                 result = 1;
17218         ${cf_cv_main_return:-return}(result);
17219 }
17220
17221 _ACEOF
17222 rm -f conftest$ac_exeext
17223 if { (eval echo "$as_me:17223: \"$ac_link\"") >&5
17224   (eval $ac_link) 2>&5
17225   ac_status=$?
17226   echo "$as_me:17226: \$? = $ac_status" >&5
17227   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17228   { (eval echo "$as_me:17228: \"$ac_try\"") >&5
17229   (eval $ac_try) 2>&5
17230   ac_status=$?
17231   echo "$as_me:17231: \$? = $ac_status" >&5
17232   (exit $ac_status); }; }; then
17233   cf_cv_func_mkstemp=yes
17234
17235 else
17236   echo "$as_me: program exited with status $ac_status" >&5
17237 echo "$as_me: failed program was:" >&5
17238 cat conftest.$ac_ext >&5
17239 cf_cv_func_mkstemp=no
17240
17241 fi
17242 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17243 fi
17244
17245 fi
17246 echo "$as_me:17246: result: $cf_cv_func_mkstemp" >&5
17247 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17248 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17249         echo "$as_me:17249: checking for mkstemp" >&5
17250 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17251 if test "${ac_cv_func_mkstemp+set}" = set; then
17252   echo $ECHO_N "(cached) $ECHO_C" >&6
17253 else
17254   cat >conftest.$ac_ext <<_ACEOF
17255 #line 17255 "configure"
17256 #include "confdefs.h"
17257 /* System header to define __stub macros and hopefully few prototypes,
17258     which can conflict with char mkstemp (); below.  */
17259 #include <assert.h>
17260 /* Override any gcc2 internal prototype to avoid an error.  */
17261 #ifdef __cplusplus
17262 extern "C"
17263 #endif
17264 /* We use char because int might match the return type of a gcc2
17265    builtin and then its argument prototype would still apply.  */
17266 char mkstemp ();
17267 char (*f) ();
17268
17269 int
17270 main ()
17271 {
17272 /* The GNU C library defines this for functions which it implements
17273     to always fail with ENOSYS.  Some functions are actually named
17274     something starting with __ and the normal name is an alias.  */
17275 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17276 choke me
17277 #else
17278 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17279 #endif
17280
17281   ;
17282   return 0;
17283 }
17284 _ACEOF
17285 rm -f conftest.$ac_objext conftest$ac_exeext
17286 if { (eval echo "$as_me:17286: \"$ac_link\"") >&5
17287   (eval $ac_link) 2>&5
17288   ac_status=$?
17289   echo "$as_me:17289: \$? = $ac_status" >&5
17290   (exit $ac_status); } &&
17291          { ac_try='test -s conftest$ac_exeext'
17292   { (eval echo "$as_me:17292: \"$ac_try\"") >&5
17293   (eval $ac_try) 2>&5
17294   ac_status=$?
17295   echo "$as_me:17295: \$? = $ac_status" >&5
17296   (exit $ac_status); }; }; then
17297   ac_cv_func_mkstemp=yes
17298 else
17299   echo "$as_me: failed program was:" >&5
17300 cat conftest.$ac_ext >&5
17301 ac_cv_func_mkstemp=no
17302 fi
17303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17304 fi
17305 echo "$as_me:17305: result: $ac_cv_func_mkstemp" >&5
17306 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17307
17308 fi
17309 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17310
17311 cat >>confdefs.h <<\EOF
17312 #define HAVE_MKSTEMP 1
17313 EOF
17314
17315 fi
17316
17317 # setup for prototype of fallback for vsscanf()
17318
17319 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17320         HAVE_VSSCANF=1
17321 else
17322         HAVE_VSSCANF=0
17323 fi
17324
17325 if test "x$cross_compiling" = xyes ; then
17326         { echo "$as_me:17326: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17327 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17328 else
17329         echo "$as_me:17329: checking whether setvbuf arguments are reversed" >&5
17330 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17331 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17332   echo $ECHO_N "(cached) $ECHO_C" >&6
17333 else
17334   if test "$cross_compiling" = yes; then
17335   { { echo "$as_me:17335: error: cannot run test program while cross compiling" >&5
17336 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17337    { (exit 1); exit 1; }; }
17338 else
17339   cat >conftest.$ac_ext <<_ACEOF
17340 #line 17340 "configure"
17341 #include "confdefs.h"
17342 #include <stdio.h>
17343 /* If setvbuf has the reversed format, exit 0. */
17344 int
17345 main ()
17346 {
17347   /* This call has the arguments reversed.
17348      A reversed system may check and see that the address of main
17349      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17350   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17351     $ac_main_return(1);
17352   putc('\r', stdout);
17353   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17354 }
17355 _ACEOF
17356 rm -f conftest$ac_exeext
17357 if { (eval echo "$as_me:17357: \"$ac_link\"") >&5
17358   (eval $ac_link) 2>&5
17359   ac_status=$?
17360   echo "$as_me:17360: \$? = $ac_status" >&5
17361   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17362   { (eval echo "$as_me:17362: \"$ac_try\"") >&5
17363   (eval $ac_try) 2>&5
17364   ac_status=$?
17365   echo "$as_me:17365: \$? = $ac_status" >&5
17366   (exit $ac_status); }; }; then
17367   ac_cv_func_setvbuf_reversed=yes
17368 else
17369   echo "$as_me: program exited with status $ac_status" >&5
17370 echo "$as_me: failed program was:" >&5
17371 cat conftest.$ac_ext >&5
17372 ac_cv_func_setvbuf_reversed=no
17373 fi
17374 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17375 fi
17376 rm -f core core.* *.core
17377 fi
17378 echo "$as_me:17378: result: $ac_cv_func_setvbuf_reversed" >&5
17379 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17380 if test $ac_cv_func_setvbuf_reversed = yes; then
17381
17382 cat >>confdefs.h <<\EOF
17383 #define SETVBUF_REVERSED 1
17384 EOF
17385
17386 fi
17387
17388 fi
17389 echo "$as_me:17389: checking for intptr_t" >&5
17390 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17391 if test "${ac_cv_type_intptr_t+set}" = set; then
17392   echo $ECHO_N "(cached) $ECHO_C" >&6
17393 else
17394   cat >conftest.$ac_ext <<_ACEOF
17395 #line 17395 "configure"
17396 #include "confdefs.h"
17397 $ac_includes_default
17398 int
17399 main ()
17400 {
17401 if ((intptr_t *) 0)
17402   return 0;
17403 if (sizeof (intptr_t))
17404   return 0;
17405   ;
17406   return 0;
17407 }
17408 _ACEOF
17409 rm -f conftest.$ac_objext
17410 if { (eval echo "$as_me:17410: \"$ac_compile\"") >&5
17411   (eval $ac_compile) 2>&5
17412   ac_status=$?
17413   echo "$as_me:17413: \$? = $ac_status" >&5
17414   (exit $ac_status); } &&
17415          { ac_try='test -s conftest.$ac_objext'
17416   { (eval echo "$as_me:17416: \"$ac_try\"") >&5
17417   (eval $ac_try) 2>&5
17418   ac_status=$?
17419   echo "$as_me:17419: \$? = $ac_status" >&5
17420   (exit $ac_status); }; }; then
17421   ac_cv_type_intptr_t=yes
17422 else
17423   echo "$as_me: failed program was:" >&5
17424 cat conftest.$ac_ext >&5
17425 ac_cv_type_intptr_t=no
17426 fi
17427 rm -f conftest.$ac_objext conftest.$ac_ext
17428 fi
17429 echo "$as_me:17429: result: $ac_cv_type_intptr_t" >&5
17430 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17431 if test $ac_cv_type_intptr_t = yes; then
17432   :
17433 else
17434
17435 cat >>confdefs.h <<EOF
17436 #define intptr_t long
17437 EOF
17438
17439 fi
17440
17441 echo "$as_me:17441: checking for ssize_t" >&5
17442 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17443 if test "${ac_cv_type_ssize_t+set}" = set; then
17444   echo $ECHO_N "(cached) $ECHO_C" >&6
17445 else
17446   cat >conftest.$ac_ext <<_ACEOF
17447 #line 17447 "configure"
17448 #include "confdefs.h"
17449 $ac_includes_default
17450 int
17451 main ()
17452 {
17453 if ((ssize_t *) 0)
17454   return 0;
17455 if (sizeof (ssize_t))
17456   return 0;
17457   ;
17458   return 0;
17459 }
17460 _ACEOF
17461 rm -f conftest.$ac_objext
17462 if { (eval echo "$as_me:17462: \"$ac_compile\"") >&5
17463   (eval $ac_compile) 2>&5
17464   ac_status=$?
17465   echo "$as_me:17465: \$? = $ac_status" >&5
17466   (exit $ac_status); } &&
17467          { ac_try='test -s conftest.$ac_objext'
17468   { (eval echo "$as_me:17468: \"$ac_try\"") >&5
17469   (eval $ac_try) 2>&5
17470   ac_status=$?
17471   echo "$as_me:17471: \$? = $ac_status" >&5
17472   (exit $ac_status); }; }; then
17473   ac_cv_type_ssize_t=yes
17474 else
17475   echo "$as_me: failed program was:" >&5
17476 cat conftest.$ac_ext >&5
17477 ac_cv_type_ssize_t=no
17478 fi
17479 rm -f conftest.$ac_objext conftest.$ac_ext
17480 fi
17481 echo "$as_me:17481: result: $ac_cv_type_ssize_t" >&5
17482 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17483 if test $ac_cv_type_ssize_t = yes; then
17484   :
17485 else
17486
17487 cat >>confdefs.h <<EOF
17488 #define ssize_t int
17489 EOF
17490
17491 fi
17492
17493 echo "$as_me:17493: checking for type sigaction_t" >&5
17494 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17495 if test "${cf_cv_type_sigaction+set}" = set; then
17496   echo $ECHO_N "(cached) $ECHO_C" >&6
17497 else
17498
17499         cat >conftest.$ac_ext <<_ACEOF
17500 #line 17500 "configure"
17501 #include "confdefs.h"
17502
17503 #include <signal.h>
17504 int
17505 main ()
17506 {
17507 sigaction_t x
17508   ;
17509   return 0;
17510 }
17511 _ACEOF
17512 rm -f conftest.$ac_objext
17513 if { (eval echo "$as_me:17513: \"$ac_compile\"") >&5
17514   (eval $ac_compile) 2>&5
17515   ac_status=$?
17516   echo "$as_me:17516: \$? = $ac_status" >&5
17517   (exit $ac_status); } &&
17518          { ac_try='test -s conftest.$ac_objext'
17519   { (eval echo "$as_me:17519: \"$ac_try\"") >&5
17520   (eval $ac_try) 2>&5
17521   ac_status=$?
17522   echo "$as_me:17522: \$? = $ac_status" >&5
17523   (exit $ac_status); }; }; then
17524   cf_cv_type_sigaction=yes
17525 else
17526   echo "$as_me: failed program was:" >&5
17527 cat conftest.$ac_ext >&5
17528 cf_cv_type_sigaction=no
17529 fi
17530 rm -f conftest.$ac_objext conftest.$ac_ext
17531 fi
17532
17533 echo "$as_me:17533: result: $cf_cv_type_sigaction" >&5
17534 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17535 test "$cf_cv_type_sigaction" = yes &&
17536 cat >>confdefs.h <<\EOF
17537 #define HAVE_TYPE_SIGACTION 1
17538 EOF
17539
17540 echo "$as_me:17540: checking declaration of size-change" >&5
17541 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17542 if test "${cf_cv_sizechange+set}" = set; then
17543   echo $ECHO_N "(cached) $ECHO_C" >&6
17544 else
17545
17546         cf_cv_sizechange=unknown
17547         cf_save_CPPFLAGS="$CPPFLAGS"
17548
17549 for cf_opts in "" "NEED_PTEM_H"
17550 do
17551
17552         CPPFLAGS="$cf_save_CPPFLAGS"
17553         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17554         cat >conftest.$ac_ext <<_ACEOF
17555 #line 17555 "configure"
17556 #include "confdefs.h"
17557 #include <sys/types.h>
17558 #ifdef HAVE_TERMIOS_H
17559 #include <termios.h>
17560 #else
17561 #ifdef HAVE_TERMIO_H
17562 #include <termio.h>
17563 #endif
17564 #endif
17565 #ifdef NEED_PTEM_H
17566 /* This is a workaround for SCO:  they neglected to define struct winsize in
17567  * termios.h -- it's only in termio.h and ptem.h
17568  */
17569 #include        <sys/stream.h>
17570 #include        <sys/ptem.h>
17571 #endif
17572 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17573 #include <sys/ioctl.h>
17574 #endif
17575
17576 int
17577 main ()
17578 {
17579
17580 #ifdef TIOCGSIZE
17581         struct ttysize win;     /* FIXME: what system is this? */
17582         int y = win.ts_lines;
17583         int x = win.ts_cols;
17584 #else
17585 #ifdef TIOCGWINSZ
17586         struct winsize win;
17587         int y = win.ws_row;
17588         int x = win.ws_col;
17589 #else
17590         no TIOCGSIZE or TIOCGWINSZ
17591 #endif /* TIOCGWINSZ */
17592 #endif /* TIOCGSIZE */
17593
17594   ;
17595   return 0;
17596 }
17597 _ACEOF
17598 rm -f conftest.$ac_objext
17599 if { (eval echo "$as_me:17599: \"$ac_compile\"") >&5
17600   (eval $ac_compile) 2>&5
17601   ac_status=$?
17602   echo "$as_me:17602: \$? = $ac_status" >&5
17603   (exit $ac_status); } &&
17604          { ac_try='test -s conftest.$ac_objext'
17605   { (eval echo "$as_me:17605: \"$ac_try\"") >&5
17606   (eval $ac_try) 2>&5
17607   ac_status=$?
17608   echo "$as_me:17608: \$? = $ac_status" >&5
17609   (exit $ac_status); }; }; then
17610   cf_cv_sizechange=yes
17611 else
17612   echo "$as_me: failed program was:" >&5
17613 cat conftest.$ac_ext >&5
17614 cf_cv_sizechange=no
17615 fi
17616 rm -f conftest.$ac_objext conftest.$ac_ext
17617
17618         CPPFLAGS="$cf_save_CPPFLAGS"
17619         if test "$cf_cv_sizechange" = yes ; then
17620                 echo "size-change succeeded ($cf_opts)" >&5
17621                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17622                 break
17623         fi
17624 done
17625
17626 fi
17627 echo "$as_me:17627: result: $cf_cv_sizechange" >&5
17628 echo "${ECHO_T}$cf_cv_sizechange" >&6
17629 if test "$cf_cv_sizechange" != no ; then
17630
17631 cat >>confdefs.h <<\EOF
17632 #define HAVE_SIZECHANGE 1
17633 EOF
17634
17635         case $cf_cv_sizechange in
17636         (NEED*)
17637                 cat >>confdefs.h <<EOF
17638 #define $cf_cv_sizechange  1
17639 EOF
17640
17641                 ;;
17642         esac
17643 fi
17644
17645 echo "$as_me:17645: checking for memmove" >&5
17646 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17647 if test "${ac_cv_func_memmove+set}" = set; then
17648   echo $ECHO_N "(cached) $ECHO_C" >&6
17649 else
17650   cat >conftest.$ac_ext <<_ACEOF
17651 #line 17651 "configure"
17652 #include "confdefs.h"
17653 /* System header to define __stub macros and hopefully few prototypes,
17654     which can conflict with char memmove (); below.  */
17655 #include <assert.h>
17656 /* Override any gcc2 internal prototype to avoid an error.  */
17657 #ifdef __cplusplus
17658 extern "C"
17659 #endif
17660 /* We use char because int might match the return type of a gcc2
17661    builtin and then its argument prototype would still apply.  */
17662 char memmove ();
17663 char (*f) ();
17664
17665 int
17666 main ()
17667 {
17668 /* The GNU C library defines this for functions which it implements
17669     to always fail with ENOSYS.  Some functions are actually named
17670     something starting with __ and the normal name is an alias.  */
17671 #if defined (__stub_memmove) || defined (__stub___memmove)
17672 choke me
17673 #else
17674 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17675 #endif
17676
17677   ;
17678   return 0;
17679 }
17680 _ACEOF
17681 rm -f conftest.$ac_objext conftest$ac_exeext
17682 if { (eval echo "$as_me:17682: \"$ac_link\"") >&5
17683   (eval $ac_link) 2>&5
17684   ac_status=$?
17685   echo "$as_me:17685: \$? = $ac_status" >&5
17686   (exit $ac_status); } &&
17687          { ac_try='test -s conftest$ac_exeext'
17688   { (eval echo "$as_me:17688: \"$ac_try\"") >&5
17689   (eval $ac_try) 2>&5
17690   ac_status=$?
17691   echo "$as_me:17691: \$? = $ac_status" >&5
17692   (exit $ac_status); }; }; then
17693   ac_cv_func_memmove=yes
17694 else
17695   echo "$as_me: failed program was:" >&5
17696 cat conftest.$ac_ext >&5
17697 ac_cv_func_memmove=no
17698 fi
17699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17700 fi
17701 echo "$as_me:17701: result: $ac_cv_func_memmove" >&5
17702 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17703 if test $ac_cv_func_memmove = yes; then
17704   :
17705 else
17706
17707 echo "$as_me:17707: checking for bcopy" >&5
17708 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17709 if test "${ac_cv_func_bcopy+set}" = set; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712   cat >conftest.$ac_ext <<_ACEOF
17713 #line 17713 "configure"
17714 #include "confdefs.h"
17715 /* System header to define __stub macros and hopefully few prototypes,
17716     which can conflict with char bcopy (); below.  */
17717 #include <assert.h>
17718 /* Override any gcc2 internal prototype to avoid an error.  */
17719 #ifdef __cplusplus
17720 extern "C"
17721 #endif
17722 /* We use char because int might match the return type of a gcc2
17723    builtin and then its argument prototype would still apply.  */
17724 char bcopy ();
17725 char (*f) ();
17726
17727 int
17728 main ()
17729 {
17730 /* The GNU C library defines this for functions which it implements
17731     to always fail with ENOSYS.  Some functions are actually named
17732     something starting with __ and the normal name is an alias.  */
17733 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17734 choke me
17735 #else
17736 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17737 #endif
17738
17739   ;
17740   return 0;
17741 }
17742 _ACEOF
17743 rm -f conftest.$ac_objext conftest$ac_exeext
17744 if { (eval echo "$as_me:17744: \"$ac_link\"") >&5
17745   (eval $ac_link) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit $ac_status); } &&
17749          { ac_try='test -s conftest$ac_exeext'
17750   { (eval echo "$as_me:17750: \"$ac_try\"") >&5
17751   (eval $ac_try) 2>&5
17752   ac_status=$?
17753   echo "$as_me:17753: \$? = $ac_status" >&5
17754   (exit $ac_status); }; }; then
17755   ac_cv_func_bcopy=yes
17756 else
17757   echo "$as_me: failed program was:" >&5
17758 cat conftest.$ac_ext >&5
17759 ac_cv_func_bcopy=no
17760 fi
17761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17762 fi
17763 echo "$as_me:17763: result: $ac_cv_func_bcopy" >&5
17764 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17765 if test $ac_cv_func_bcopy = yes; then
17766
17767         echo "$as_me:17767: checking if bcopy does overlapping moves" >&5
17768 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17769 if test "${cf_cv_good_bcopy+set}" = set; then
17770   echo $ECHO_N "(cached) $ECHO_C" >&6
17771 else
17772
17773                 if test "$cross_compiling" = yes; then
17774   cf_cv_good_bcopy=unknown
17775 else
17776   cat >conftest.$ac_ext <<_ACEOF
17777 #line 17777 "configure"
17778 #include "confdefs.h"
17779
17780 int main() {
17781         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17782         char temp[40];
17783         bcopy(data, temp, sizeof(data));
17784         bcopy(temp+10, temp, 15);
17785         bcopy(temp+5, temp+15, 10);
17786         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17787 }
17788
17789 _ACEOF
17790 rm -f conftest$ac_exeext
17791 if { (eval echo "$as_me:17791: \"$ac_link\"") >&5
17792   (eval $ac_link) 2>&5
17793   ac_status=$?
17794   echo "$as_me:17794: \$? = $ac_status" >&5
17795   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17796   { (eval echo "$as_me:17796: \"$ac_try\"") >&5
17797   (eval $ac_try) 2>&5
17798   ac_status=$?
17799   echo "$as_me:17799: \$? = $ac_status" >&5
17800   (exit $ac_status); }; }; then
17801   cf_cv_good_bcopy=yes
17802 else
17803   echo "$as_me: program exited with status $ac_status" >&5
17804 echo "$as_me: failed program was:" >&5
17805 cat conftest.$ac_ext >&5
17806 cf_cv_good_bcopy=no
17807 fi
17808 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17809 fi
17810
17811 fi
17812 echo "$as_me:17812: result: $cf_cv_good_bcopy" >&5
17813 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17814
17815 else
17816   cf_cv_good_bcopy=no
17817 fi
17818
17819         if test "$cf_cv_good_bcopy" = yes ; then
17820
17821 cat >>confdefs.h <<\EOF
17822 #define USE_OK_BCOPY 1
17823 EOF
17824
17825         else
17826
17827 cat >>confdefs.h <<\EOF
17828 #define USE_MY_MEMMOVE 1
17829 EOF
17830
17831         fi
17832
17833 fi
17834
17835 echo "$as_me:17835: checking if poll really works" >&5
17836 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17837 if test "${cf_cv_working_poll+set}" = set; then
17838   echo $ECHO_N "(cached) $ECHO_C" >&6
17839 else
17840
17841 if test "$cross_compiling" = yes; then
17842   cf_cv_working_poll=unknown
17843 else
17844   cat >conftest.$ac_ext <<_ACEOF
17845 #line 17845 "configure"
17846 #include "confdefs.h"
17847
17848 #include <stdlib.h>
17849 #include <stdio.h>
17850 #include <unistd.h>
17851 #include <fcntl.h>
17852 #ifdef HAVE_POLL_H
17853 #include <poll.h>
17854 #else
17855 #include <sys/poll.h>
17856 #endif
17857 int main() {
17858         struct pollfd myfds;
17859         int ret;
17860
17861         /* check for Darwin bug with respect to "devices" */
17862         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17863         if (myfds.fd < 0)
17864                 myfds.fd = 0;
17865         myfds.events = POLLIN;
17866         myfds.revents = 0;
17867
17868         ret = poll(&myfds, 1, 100);
17869
17870         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17871                 ret = -1;
17872         } else {
17873                 int fd = 0;
17874                 if (!isatty(fd)) {
17875                         fd = open("/dev/tty", 2);       /* O_RDWR */
17876                 }
17877
17878                 if (fd >= 0) {
17879                         /* also check with standard input */
17880                         myfds.fd = fd;
17881                         myfds.events = POLLIN;
17882                         myfds.revents = 0;
17883                         ret = poll(&myfds, 1, 100);
17884                 } else {
17885                         ret = -1;
17886                 }
17887         }
17888         ${cf_cv_main_return:-return}(ret < 0);
17889 }
17890 _ACEOF
17891 rm -f conftest$ac_exeext
17892 if { (eval echo "$as_me:17892: \"$ac_link\"") >&5
17893   (eval $ac_link) 2>&5
17894   ac_status=$?
17895   echo "$as_me:17895: \$? = $ac_status" >&5
17896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17897   { (eval echo "$as_me:17897: \"$ac_try\"") >&5
17898   (eval $ac_try) 2>&5
17899   ac_status=$?
17900   echo "$as_me:17900: \$? = $ac_status" >&5
17901   (exit $ac_status); }; }; then
17902   cf_cv_working_poll=yes
17903 else
17904   echo "$as_me: program exited with status $ac_status" >&5
17905 echo "$as_me: failed program was:" >&5
17906 cat conftest.$ac_ext >&5
17907 cf_cv_working_poll=no
17908 fi
17909 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17910 fi
17911 fi
17912 echo "$as_me:17912: result: $cf_cv_working_poll" >&5
17913 echo "${ECHO_T}$cf_cv_working_poll" >&6
17914 test "$cf_cv_working_poll" = "yes" &&
17915 cat >>confdefs.h <<\EOF
17916 #define HAVE_WORKING_POLL 1
17917 EOF
17918
17919 echo "$as_me:17919: checking for va_copy" >&5
17920 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17921 if test "${cf_cv_have_va_copy+set}" = set; then
17922   echo $ECHO_N "(cached) $ECHO_C" >&6
17923 else
17924
17925 cat >conftest.$ac_ext <<_ACEOF
17926 #line 17926 "configure"
17927 #include "confdefs.h"
17928
17929 #include <stdarg.h>
17930
17931 int
17932 main ()
17933 {
17934
17935         static va_list dst;
17936         static va_list src;
17937         va_copy(dst, src)
17938   ;
17939   return 0;
17940 }
17941 _ACEOF
17942 rm -f conftest.$ac_objext conftest$ac_exeext
17943 if { (eval echo "$as_me:17943: \"$ac_link\"") >&5
17944   (eval $ac_link) 2>&5
17945   ac_status=$?
17946   echo "$as_me:17946: \$? = $ac_status" >&5
17947   (exit $ac_status); } &&
17948          { ac_try='test -s conftest$ac_exeext'
17949   { (eval echo "$as_me:17949: \"$ac_try\"") >&5
17950   (eval $ac_try) 2>&5
17951   ac_status=$?
17952   echo "$as_me:17952: \$? = $ac_status" >&5
17953   (exit $ac_status); }; }; then
17954   cf_cv_have_va_copy=yes
17955 else
17956   echo "$as_me: failed program was:" >&5
17957 cat conftest.$ac_ext >&5
17958 cf_cv_have_va_copy=no
17959 fi
17960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17961 fi
17962 echo "$as_me:17962: result: $cf_cv_have_va_copy" >&5
17963 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17964
17965 test "$cf_cv_have_va_copy" = yes &&
17966 cat >>confdefs.h <<\EOF
17967 #define HAVE_VA_COPY 1
17968 EOF
17969
17970 echo "$as_me:17970: checking for __va_copy" >&5
17971 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17972 if test "${cf_cv_have___va_copy+set}" = set; then
17973   echo $ECHO_N "(cached) $ECHO_C" >&6
17974 else
17975
17976 cat >conftest.$ac_ext <<_ACEOF
17977 #line 17977 "configure"
17978 #include "confdefs.h"
17979
17980 #include <stdarg.h>
17981
17982 int
17983 main ()
17984 {
17985
17986         static va_list dst;
17987         static va_list src;
17988         __va_copy(dst, src)
17989   ;
17990   return 0;
17991 }
17992 _ACEOF
17993 rm -f conftest.$ac_objext conftest$ac_exeext
17994 if { (eval echo "$as_me:17994: \"$ac_link\"") >&5
17995   (eval $ac_link) 2>&5
17996   ac_status=$?
17997   echo "$as_me:17997: \$? = $ac_status" >&5
17998   (exit $ac_status); } &&
17999          { ac_try='test -s conftest$ac_exeext'
18000   { (eval echo "$as_me:18000: \"$ac_try\"") >&5
18001   (eval $ac_try) 2>&5
18002   ac_status=$?
18003   echo "$as_me:18003: \$? = $ac_status" >&5
18004   (exit $ac_status); }; }; then
18005   cf_cv_have___va_copy=yes
18006 else
18007   echo "$as_me: failed program was:" >&5
18008 cat conftest.$ac_ext >&5
18009 cf_cv_have___va_copy=no
18010 fi
18011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18012 fi
18013 echo "$as_me:18013: result: $cf_cv_have___va_copy" >&5
18014 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18015
18016 test "$cf_cv_have___va_copy" = yes &&
18017 cat >>confdefs.h <<\EOF
18018 #define HAVE___VA_COPY 1
18019 EOF
18020
18021 echo "$as_me:18021: checking for pid_t" >&5
18022 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18023 if test "${ac_cv_type_pid_t+set}" = set; then
18024   echo $ECHO_N "(cached) $ECHO_C" >&6
18025 else
18026   cat >conftest.$ac_ext <<_ACEOF
18027 #line 18027 "configure"
18028 #include "confdefs.h"
18029 $ac_includes_default
18030 int
18031 main ()
18032 {
18033 if ((pid_t *) 0)
18034   return 0;
18035 if (sizeof (pid_t))
18036   return 0;
18037   ;
18038   return 0;
18039 }
18040 _ACEOF
18041 rm -f conftest.$ac_objext
18042 if { (eval echo "$as_me:18042: \"$ac_compile\"") >&5
18043   (eval $ac_compile) 2>&5
18044   ac_status=$?
18045   echo "$as_me:18045: \$? = $ac_status" >&5
18046   (exit $ac_status); } &&
18047          { ac_try='test -s conftest.$ac_objext'
18048   { (eval echo "$as_me:18048: \"$ac_try\"") >&5
18049   (eval $ac_try) 2>&5
18050   ac_status=$?
18051   echo "$as_me:18051: \$? = $ac_status" >&5
18052   (exit $ac_status); }; }; then
18053   ac_cv_type_pid_t=yes
18054 else
18055   echo "$as_me: failed program was:" >&5
18056 cat conftest.$ac_ext >&5
18057 ac_cv_type_pid_t=no
18058 fi
18059 rm -f conftest.$ac_objext conftest.$ac_ext
18060 fi
18061 echo "$as_me:18061: result: $ac_cv_type_pid_t" >&5
18062 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18063 if test $ac_cv_type_pid_t = yes; then
18064   :
18065 else
18066
18067 cat >>confdefs.h <<EOF
18068 #define pid_t int
18069 EOF
18070
18071 fi
18072
18073 for ac_header in unistd.h vfork.h
18074 do
18075 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18076 echo "$as_me:18076: checking for $ac_header" >&5
18077 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18078 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18079   echo $ECHO_N "(cached) $ECHO_C" >&6
18080 else
18081   cat >conftest.$ac_ext <<_ACEOF
18082 #line 18082 "configure"
18083 #include "confdefs.h"
18084 #include <$ac_header>
18085 _ACEOF
18086 if { (eval echo "$as_me:18086: \"$ac_cpp conftest.$ac_ext\"") >&5
18087   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18088   ac_status=$?
18089   egrep -v '^ *\+' conftest.er1 >conftest.err
18090   rm -f conftest.er1
18091   cat conftest.err >&5
18092   echo "$as_me:18092: \$? = $ac_status" >&5
18093   (exit $ac_status); } >/dev/null; then
18094   if test -s conftest.err; then
18095     ac_cpp_err=$ac_c_preproc_warn_flag
18096   else
18097     ac_cpp_err=
18098   fi
18099 else
18100   ac_cpp_err=yes
18101 fi
18102 if test -z "$ac_cpp_err"; then
18103   eval "$as_ac_Header=yes"
18104 else
18105   echo "$as_me: failed program was:" >&5
18106   cat conftest.$ac_ext >&5
18107   eval "$as_ac_Header=no"
18108 fi
18109 rm -f conftest.err conftest.$ac_ext
18110 fi
18111 echo "$as_me:18111: result: `eval echo '${'$as_ac_Header'}'`" >&5
18112 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18113 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18114   cat >>confdefs.h <<EOF
18115 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18116 EOF
18117
18118 fi
18119 done
18120
18121 for ac_func in fork vfork
18122 do
18123 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18124 echo "$as_me:18124: checking for $ac_func" >&5
18125 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18126 if eval "test \"\${$as_ac_var+set}\" = set"; then
18127   echo $ECHO_N "(cached) $ECHO_C" >&6
18128 else
18129   cat >conftest.$ac_ext <<_ACEOF
18130 #line 18130 "configure"
18131 #include "confdefs.h"
18132 /* System header to define __stub macros and hopefully few prototypes,
18133     which can conflict with char $ac_func (); below.  */
18134 #include <assert.h>
18135 /* Override any gcc2 internal prototype to avoid an error.  */
18136 #ifdef __cplusplus
18137 extern "C"
18138 #endif
18139 /* We use char because int might match the return type of a gcc2
18140    builtin and then its argument prototype would still apply.  */
18141 char $ac_func ();
18142 char (*f) ();
18143
18144 int
18145 main ()
18146 {
18147 /* The GNU C library defines this for functions which it implements
18148     to always fail with ENOSYS.  Some functions are actually named
18149     something starting with __ and the normal name is an alias.  */
18150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18151 choke me
18152 #else
18153 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18154 #endif
18155
18156   ;
18157   return 0;
18158 }
18159 _ACEOF
18160 rm -f conftest.$ac_objext conftest$ac_exeext
18161 if { (eval echo "$as_me:18161: \"$ac_link\"") >&5
18162   (eval $ac_link) 2>&5
18163   ac_status=$?
18164   echo "$as_me:18164: \$? = $ac_status" >&5
18165   (exit $ac_status); } &&
18166          { ac_try='test -s conftest$ac_exeext'
18167   { (eval echo "$as_me:18167: \"$ac_try\"") >&5
18168   (eval $ac_try) 2>&5
18169   ac_status=$?
18170   echo "$as_me:18170: \$? = $ac_status" >&5
18171   (exit $ac_status); }; }; then
18172   eval "$as_ac_var=yes"
18173 else
18174   echo "$as_me: failed program was:" >&5
18175 cat conftest.$ac_ext >&5
18176 eval "$as_ac_var=no"
18177 fi
18178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18179 fi
18180 echo "$as_me:18180: result: `eval echo '${'$as_ac_var'}'`" >&5
18181 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18182 if test `eval echo '${'$as_ac_var'}'` = yes; then
18183   cat >>confdefs.h <<EOF
18184 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18185 EOF
18186
18187 fi
18188 done
18189
18190 ac_cv_func_fork_works=$ac_cv_func_fork
18191 if test "x$ac_cv_func_fork" = xyes; then
18192   echo "$as_me:18192: checking for working fork" >&5
18193 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18194 if test "${ac_cv_func_fork_works+set}" = set; then
18195   echo $ECHO_N "(cached) $ECHO_C" >&6
18196 else
18197   if test "$cross_compiling" = yes; then
18198   ac_cv_func_fork_works=cross
18199 else
18200   cat >conftest.$ac_ext <<_ACEOF
18201 /* By Rüdiger Kuhlmann. */
18202       #include <sys/types.h>
18203       #if HAVE_UNISTD_H
18204       # include <unistd.h>
18205       #endif
18206       /* Some systems only have a dummy stub for fork() */
18207       int main ()
18208       {
18209         if (fork() < 0)
18210           $ac_main_return (1);
18211         $ac_main_return (0);
18212       }
18213 _ACEOF
18214 rm -f conftest$ac_exeext
18215 if { (eval echo "$as_me:18215: \"$ac_link\"") >&5
18216   (eval $ac_link) 2>&5
18217   ac_status=$?
18218   echo "$as_me:18218: \$? = $ac_status" >&5
18219   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18220   { (eval echo "$as_me:18220: \"$ac_try\"") >&5
18221   (eval $ac_try) 2>&5
18222   ac_status=$?
18223   echo "$as_me:18223: \$? = $ac_status" >&5
18224   (exit $ac_status); }; }; then
18225   ac_cv_func_fork_works=yes
18226 else
18227   echo "$as_me: program exited with status $ac_status" >&5
18228 echo "$as_me: failed program was:" >&5
18229 cat conftest.$ac_ext >&5
18230 ac_cv_func_fork_works=no
18231 fi
18232 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18233 fi
18234 fi
18235 echo "$as_me:18235: result: $ac_cv_func_fork_works" >&5
18236 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18237
18238 fi
18239 if test "x$ac_cv_func_fork_works" = xcross; then
18240   case $host in
18241     *-*-amigaos* | *-*-msdosdjgpp*)
18242       # Override, as these systems have only a dummy fork() stub
18243       ac_cv_func_fork_works=no
18244       ;;
18245     *)
18246       ac_cv_func_fork_works=yes
18247       ;;
18248   esac
18249   { echo "$as_me:18249: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18250 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18251 fi
18252 ac_cv_func_vfork_works=$ac_cv_func_vfork
18253 if test "x$ac_cv_func_vfork" = xyes; then
18254   echo "$as_me:18254: checking for working vfork" >&5
18255 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18256 if test "${ac_cv_func_vfork_works+set}" = set; then
18257   echo $ECHO_N "(cached) $ECHO_C" >&6
18258 else
18259   if test "$cross_compiling" = yes; then
18260   ac_cv_func_vfork_works=cross
18261 else
18262   cat >conftest.$ac_ext <<_ACEOF
18263 #line 18263 "configure"
18264 #include "confdefs.h"
18265 /* Thanks to Paul Eggert for this test.  */
18266 #include <stdio.h>
18267 #include <sys/types.h>
18268 #include <sys/stat.h>
18269 #if HAVE_UNISTD_H
18270 # include <unistd.h>
18271 #endif
18272 #if HAVE_VFORK_H
18273 # include <vfork.h>
18274 #endif
18275 /* On some sparc systems, changes by the child to local and incoming
18276    argument registers are propagated back to the parent.  The compiler
18277    is told about this with #include <vfork.h>, but some compilers
18278    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18279    static variable whose address is put into a register that is
18280    clobbered by the vfork.  */
18281 static
18282 #ifdef __cplusplus
18283 sparc_address_test (int arg)
18284 # else
18285 sparc_address_test (arg) int arg;
18286 #endif
18287 {
18288   static pid_t child;
18289   if (!child) {
18290     child = vfork ();
18291     if (child < 0) {
18292       perror ("vfork");
18293       _exit(2);
18294     }
18295     if (!child) {
18296       arg = getpid();
18297       write(-1, "", 0);
18298       _exit (arg);
18299     }
18300   }
18301 }
18302
18303 int
18304 main ()
18305 {
18306   pid_t parent = getpid ();
18307   pid_t child;
18308
18309   sparc_address_test ();
18310
18311   child = vfork ();
18312
18313   if (child == 0) {
18314     /* Here is another test for sparc vfork register problems.  This
18315        test uses lots of local variables, at least as many local
18316        variables as main has allocated so far including compiler
18317        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18318        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18319        reuse the register of parent for one of the local variables,
18320        since it will think that parent can't possibly be used any more
18321        in this routine.  Assigning to the local variable will thus
18322        munge parent in the parent process.  */
18323     pid_t
18324       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18325       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18326     /* Convince the compiler that p..p7 are live; otherwise, it might
18327        use the same hardware register for all 8 local variables.  */
18328     if (p != p1 || p != p2 || p != p3 || p != p4
18329         || p != p5 || p != p6 || p != p7)
18330       _exit(1);
18331
18332     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18333        from child file descriptors.  If the child closes a descriptor
18334        before it execs or exits, this munges the parent's descriptor
18335        as well.  Test for this by closing stdout in the child.  */
18336     _exit(close(fileno(stdout)) != 0);
18337   } else {
18338     int status;
18339     struct stat st;
18340
18341     while (wait(&status) != child)
18342       ;
18343     $ac_main_return(
18344          /* Was there some problem with vforking?  */
18345          child < 0
18346
18347          /* Did the child fail?  (This shouldn't happen.)  */
18348          || status
18349
18350          /* Did the vfork/compiler bug occur?  */
18351          || parent != getpid()
18352
18353          /* Did the file descriptor bug occur?  */
18354          || fstat(fileno(stdout), &st) != 0
18355          );
18356   }
18357 }
18358 _ACEOF
18359 rm -f conftest$ac_exeext
18360 if { (eval echo "$as_me:18360: \"$ac_link\"") >&5
18361   (eval $ac_link) 2>&5
18362   ac_status=$?
18363   echo "$as_me:18363: \$? = $ac_status" >&5
18364   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18365   { (eval echo "$as_me:18365: \"$ac_try\"") >&5
18366   (eval $ac_try) 2>&5
18367   ac_status=$?
18368   echo "$as_me:18368: \$? = $ac_status" >&5
18369   (exit $ac_status); }; }; then
18370   ac_cv_func_vfork_works=yes
18371 else
18372   echo "$as_me: program exited with status $ac_status" >&5
18373 echo "$as_me: failed program was:" >&5
18374 cat conftest.$ac_ext >&5
18375 ac_cv_func_vfork_works=no
18376 fi
18377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18378 fi
18379 fi
18380 echo "$as_me:18380: result: $ac_cv_func_vfork_works" >&5
18381 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18382
18383 fi;
18384 if test "x$ac_cv_func_fork_works" = xcross; then
18385   ac_cv_func_vfork_works=ac_cv_func_vfork
18386   { echo "$as_me:18386: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18387 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18388 fi
18389
18390 if test "x$ac_cv_func_vfork_works" = xyes; then
18391
18392 cat >>confdefs.h <<\EOF
18393 #define HAVE_WORKING_VFORK 1
18394 EOF
18395
18396 else
18397
18398 cat >>confdefs.h <<\EOF
18399 #define vfork fork
18400 EOF
18401
18402 fi
18403 if test "x$ac_cv_func_fork_works" = xyes; then
18404
18405 cat >>confdefs.h <<\EOF
18406 #define HAVE_WORKING_FORK 1
18407 EOF
18408
18409 fi
18410
18411 # special check for test/ditto.c
18412
18413 echo "$as_me:18413: checking for openpty in -lutil" >&5
18414 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18415 if test "${ac_cv_lib_util_openpty+set}" = set; then
18416   echo $ECHO_N "(cached) $ECHO_C" >&6
18417 else
18418   ac_check_lib_save_LIBS=$LIBS
18419 LIBS="-lutil  $LIBS"
18420 cat >conftest.$ac_ext <<_ACEOF
18421 #line 18421 "configure"
18422 #include "confdefs.h"
18423
18424 /* Override any gcc2 internal prototype to avoid an error.  */
18425 #ifdef __cplusplus
18426 extern "C"
18427 #endif
18428 /* We use char because int might match the return type of a gcc2
18429    builtin and then its argument prototype would still apply.  */
18430 char openpty ();
18431 int
18432 main ()
18433 {
18434 openpty ();
18435   ;
18436   return 0;
18437 }
18438 _ACEOF
18439 rm -f conftest.$ac_objext conftest$ac_exeext
18440 if { (eval echo "$as_me:18440: \"$ac_link\"") >&5
18441   (eval $ac_link) 2>&5
18442   ac_status=$?
18443   echo "$as_me:18443: \$? = $ac_status" >&5
18444   (exit $ac_status); } &&
18445          { ac_try='test -s conftest$ac_exeext'
18446   { (eval echo "$as_me:18446: \"$ac_try\"") >&5
18447   (eval $ac_try) 2>&5
18448   ac_status=$?
18449   echo "$as_me:18449: \$? = $ac_status" >&5
18450   (exit $ac_status); }; }; then
18451   ac_cv_lib_util_openpty=yes
18452 else
18453   echo "$as_me: failed program was:" >&5
18454 cat conftest.$ac_ext >&5
18455 ac_cv_lib_util_openpty=no
18456 fi
18457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18458 LIBS=$ac_check_lib_save_LIBS
18459 fi
18460 echo "$as_me:18460: result: $ac_cv_lib_util_openpty" >&5
18461 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18462 if test $ac_cv_lib_util_openpty = yes; then
18463   cf_cv_lib_util=yes
18464 else
18465   cf_cv_lib_util=no
18466 fi
18467
18468 echo "$as_me:18468: checking for openpty header" >&5
18469 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18470 if test "${cf_cv_func_openpty+set}" = set; then
18471   echo $ECHO_N "(cached) $ECHO_C" >&6
18472 else
18473
18474         cf_save_LIBS="$LIBS"
18475         test $cf_cv_lib_util = yes &&
18476 cf_add_libs="-lutil"
18477 # Filter out duplicates - this happens with badly-designed ".pc" files...
18478 for cf_add_1lib in $LIBS
18479 do
18480         for cf_add_2lib in $cf_add_libs
18481         do
18482                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18483                 then
18484                         cf_add_1lib=
18485                         break
18486                 fi
18487         done
18488         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18489 done
18490 LIBS="$cf_add_libs"
18491
18492         for cf_header in pty.h libutil.h util.h
18493         do
18494         cat >conftest.$ac_ext <<_ACEOF
18495 #line 18495 "configure"
18496 #include "confdefs.h"
18497
18498 #include <$cf_header>
18499
18500 int
18501 main ()
18502 {
18503
18504         int x = openpty((int *)0, (int *)0, (char *)0,
18505                                    (struct termios *)0, (struct winsize *)0);
18506
18507   ;
18508   return 0;
18509 }
18510 _ACEOF
18511 rm -f conftest.$ac_objext conftest$ac_exeext
18512 if { (eval echo "$as_me:18512: \"$ac_link\"") >&5
18513   (eval $ac_link) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit $ac_status); } &&
18517          { ac_try='test -s conftest$ac_exeext'
18518   { (eval echo "$as_me:18518: \"$ac_try\"") >&5
18519   (eval $ac_try) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); }; }; then
18523
18524                 cf_cv_func_openpty=$cf_header
18525                 break
18526
18527 else
18528   echo "$as_me: failed program was:" >&5
18529 cat conftest.$ac_ext >&5
18530
18531                 cf_cv_func_openpty=no
18532
18533 fi
18534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18535         done
18536         LIBS="$cf_save_LIBS"
18537
18538 fi
18539 echo "$as_me:18539: result: $cf_cv_func_openpty" >&5
18540 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18541
18542 if test "$cf_cv_func_openpty" != no ; then
18543
18544 cat >>confdefs.h <<EOF
18545 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18546 EOF
18547
18548 cat >>confdefs.h <<\EOF
18549 #define USE_XTERM_PTY 1
18550 EOF
18551
18552         if test "x$cf_cv_lib_util" = xyes ; then
18553
18554 cf_add_libs="-lutil"
18555 # Filter out duplicates - this happens with badly-designed ".pc" files...
18556 for cf_add_1lib in $TEST_LIBS
18557 do
18558         for cf_add_2lib in $cf_add_libs
18559         do
18560                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18561                 then
18562                         cf_add_1lib=
18563                         break
18564                 fi
18565         done
18566         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18567 done
18568 TEST_LIBS="$cf_add_libs"
18569
18570         fi
18571 fi
18572
18573 if test "$with_hashed_db" != no ; then
18574
18575 cat >>confdefs.h <<\EOF
18576 #define USE_HASHED_DB 1
18577 EOF
18578
18579 case $with_hashed_db in
18580 (yes|*able*)
18581         ;;
18582 (*)
18583         if test -d "$with_hashed_db" ; then
18584
18585 if test -n "$with_hashed_db/include" ; then
18586   for cf_add_incdir in $with_hashed_db/include
18587   do
18588         while test $cf_add_incdir != /usr/include
18589         do
18590           if test -d $cf_add_incdir
18591           then
18592                 cf_have_incdir=no
18593                 if test -n "$CFLAGS$CPPFLAGS" ; then
18594                   # a loop is needed to ensure we can add subdirs of existing dirs
18595                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18596                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18597                           cf_have_incdir=yes; break
18598                         fi
18599                   done
18600                 fi
18601
18602                 if test "$cf_have_incdir" = no ; then
18603                   if test "$cf_add_incdir" = /usr/local/include ; then
18604                         if test "$GCC" = yes
18605                         then
18606                           cf_save_CPPFLAGS=$CPPFLAGS
18607                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18608                           cat >conftest.$ac_ext <<_ACEOF
18609 #line 18609 "configure"
18610 #include "confdefs.h"
18611 #include <stdio.h>
18612 int
18613 main ()
18614 {
18615 printf("Hello")
18616   ;
18617   return 0;
18618 }
18619 _ACEOF
18620 rm -f conftest.$ac_objext
18621 if { (eval echo "$as_me:18621: \"$ac_compile\"") >&5
18622   (eval $ac_compile) 2>&5
18623   ac_status=$?
18624   echo "$as_me:18624: \$? = $ac_status" >&5
18625   (exit $ac_status); } &&
18626          { ac_try='test -s conftest.$ac_objext'
18627   { (eval echo "$as_me:18627: \"$ac_try\"") >&5
18628   (eval $ac_try) 2>&5
18629   ac_status=$?
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit $ac_status); }; }; then
18632   :
18633 else
18634   echo "$as_me: failed program was:" >&5
18635 cat conftest.$ac_ext >&5
18636 cf_have_incdir=yes
18637 fi
18638 rm -f conftest.$ac_objext conftest.$ac_ext
18639                           CPPFLAGS=$cf_save_CPPFLAGS
18640                         fi
18641                   fi
18642                 fi
18643
18644                 if test "$cf_have_incdir" = no ; then
18645                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18646
18647 echo "${as_me:-configure}:18647: testing adding $cf_add_incdir to include-path ..." 1>&5
18648
18649                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18650
18651                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18652                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18653                   cf_add_incdir="$cf_top_incdir"
18654                 else
18655                   break
18656                 fi
18657           else
18658                 break
18659           fi
18660         done
18661   done
18662 fi
18663
18664 if test -n "$with_hashed_db/lib" ; then
18665         for cf_add_libdir in $with_hashed_db/lib
18666         do
18667                 if test $cf_add_libdir = /usr/lib ; then
18668                         :
18669                 elif test -d $cf_add_libdir
18670                 then
18671                         cf_have_libdir=no
18672                         if test -n "$LDFLAGS$LIBS" ; then
18673                                 # a loop is needed to ensure we can add subdirs of existing dirs
18674                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18675                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18676                                                 cf_have_libdir=yes; break
18677                                         fi
18678                                 done
18679                         fi
18680                         if test "$cf_have_libdir" = no ; then
18681                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18682
18683 echo "${as_me:-configure}:18683: testing adding $cf_add_libdir to library-path ..." 1>&5
18684
18685                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18686                         fi
18687                 fi
18688         done
18689 fi
18690
18691         else
18692                 case "$with_hashed_db" in
18693                 (./*|../*|/*)
18694                         { echo "$as_me:18694: WARNING: no such directory $with_hashed_db" >&5
18695 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18696                         ;;
18697                 (*)
18698
18699 cf_search=
18700
18701 test "x$prefix" != "xNONE" && \
18702 test -d "$prefix" && \
18703  {
18704         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18705         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18706         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18707         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18708         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18709         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18710 }
18711
18712 for cf_subdir_prefix in \
18713         /usr \
18714         /usr/local \
18715         /usr/pkg \
18716         /opt \
18717         /opt/local \
18718         $HOME
18719 do
18720
18721 test "x$cf_subdir_prefix" != "x$prefix" && \
18722 test -d "$cf_subdir_prefix" && \
18723 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18724         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18725         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18726         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18727         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18728         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18729         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"
18730 }
18731
18732 done
18733
18734         for cf_item in $cf_search
18735         do
18736                 case $cf_item in
18737                 (*/$with_hashed_db)
18738
18739 if test -n "$cf_item" ; then
18740   for cf_add_incdir in $cf_item
18741   do
18742         while test $cf_add_incdir != /usr/include
18743         do
18744           if test -d $cf_add_incdir
18745           then
18746                 cf_have_incdir=no
18747                 if test -n "$CFLAGS$CPPFLAGS" ; then
18748                   # a loop is needed to ensure we can add subdirs of existing dirs
18749                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18750                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18751                           cf_have_incdir=yes; break
18752                         fi
18753                   done
18754                 fi
18755
18756                 if test "$cf_have_incdir" = no ; then
18757                   if test "$cf_add_incdir" = /usr/local/include ; then
18758                         if test "$GCC" = yes
18759                         then
18760                           cf_save_CPPFLAGS=$CPPFLAGS
18761                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18762                           cat >conftest.$ac_ext <<_ACEOF
18763 #line 18763 "configure"
18764 #include "confdefs.h"
18765 #include <stdio.h>
18766 int
18767 main ()
18768 {
18769 printf("Hello")
18770   ;
18771   return 0;
18772 }
18773 _ACEOF
18774 rm -f conftest.$ac_objext
18775 if { (eval echo "$as_me:18775: \"$ac_compile\"") >&5
18776   (eval $ac_compile) 2>&5
18777   ac_status=$?
18778   echo "$as_me:18778: \$? = $ac_status" >&5
18779   (exit $ac_status); } &&
18780          { ac_try='test -s conftest.$ac_objext'
18781   { (eval echo "$as_me:18781: \"$ac_try\"") >&5
18782   (eval $ac_try) 2>&5
18783   ac_status=$?
18784   echo "$as_me:18784: \$? = $ac_status" >&5
18785   (exit $ac_status); }; }; then
18786   :
18787 else
18788   echo "$as_me: failed program was:" >&5
18789 cat conftest.$ac_ext >&5
18790 cf_have_incdir=yes
18791 fi
18792 rm -f conftest.$ac_objext conftest.$ac_ext
18793                           CPPFLAGS=$cf_save_CPPFLAGS
18794                         fi
18795                   fi
18796                 fi
18797
18798                 if test "$cf_have_incdir" = no ; then
18799                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18800
18801 echo "${as_me:-configure}:18801: testing adding $cf_add_incdir to include-path ..." 1>&5
18802
18803                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18804
18805                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18806                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18807                   cf_add_incdir="$cf_top_incdir"
18808                 else
18809                   break
18810                 fi
18811           else
18812                 break
18813           fi
18814         done
18815   done
18816 fi
18817
18818                         ;;
18819                 esac
18820         done
18821
18822 cf_search=
18823
18824 test "x$prefix" != "xNONE" && \
18825 test -d "$prefix" && \
18826  {
18827         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18828         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18829         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18830         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18831         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18832         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18833 }
18834
18835 for cf_subdir_prefix in \
18836         /usr \
18837         /usr/local \
18838         /usr/pkg \
18839         /opt \
18840         /opt/local \
18841         $HOME
18842 do
18843
18844 test "x$cf_subdir_prefix" != "x$prefix" && \
18845 test -d "$cf_subdir_prefix" && \
18846 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18847         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18848         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18849         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18850         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18851         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18852         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"
18853 }
18854
18855 done
18856
18857         for cf_item in $cf_search
18858         do
18859                 case $cf_item in
18860                 (*/$with_hashed_db)
18861
18862 if test -n "$cf_item" ; then
18863         for cf_add_libdir in $cf_item
18864         do
18865                 if test $cf_add_libdir = /usr/lib ; then
18866                         :
18867                 elif test -d $cf_add_libdir
18868                 then
18869                         cf_have_libdir=no
18870                         if test -n "$LDFLAGS$LIBS" ; then
18871                                 # a loop is needed to ensure we can add subdirs of existing dirs
18872                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18873                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18874                                                 cf_have_libdir=yes; break
18875                                         fi
18876                                 done
18877                         fi
18878                         if test "$cf_have_libdir" = no ; then
18879                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18880
18881 echo "${as_me:-configure}:18881: testing adding $cf_add_libdir to library-path ..." 1>&5
18882
18883                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18884                         fi
18885                 fi
18886         done
18887 fi
18888
18889                         ;;
18890                 esac
18891         done
18892
18893                         ;;
18894                 esac
18895         fi
18896 esac
18897
18898 echo "$as_me:18898: checking for db.h" >&5
18899 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18900 if test "${ac_cv_header_db_h+set}" = set; then
18901   echo $ECHO_N "(cached) $ECHO_C" >&6
18902 else
18903   cat >conftest.$ac_ext <<_ACEOF
18904 #line 18904 "configure"
18905 #include "confdefs.h"
18906 #include <db.h>
18907 _ACEOF
18908 if { (eval echo "$as_me:18908: \"$ac_cpp conftest.$ac_ext\"") >&5
18909   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18910   ac_status=$?
18911   egrep -v '^ *\+' conftest.er1 >conftest.err
18912   rm -f conftest.er1
18913   cat conftest.err >&5
18914   echo "$as_me:18914: \$? = $ac_status" >&5
18915   (exit $ac_status); } >/dev/null; then
18916   if test -s conftest.err; then
18917     ac_cpp_err=$ac_c_preproc_warn_flag
18918   else
18919     ac_cpp_err=
18920   fi
18921 else
18922   ac_cpp_err=yes
18923 fi
18924 if test -z "$ac_cpp_err"; then
18925   ac_cv_header_db_h=yes
18926 else
18927   echo "$as_me: failed program was:" >&5
18928   cat conftest.$ac_ext >&5
18929   ac_cv_header_db_h=no
18930 fi
18931 rm -f conftest.err conftest.$ac_ext
18932 fi
18933 echo "$as_me:18933: result: $ac_cv_header_db_h" >&5
18934 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18935 if test $ac_cv_header_db_h = yes; then
18936
18937 echo "$as_me:18937: checking for version of db" >&5
18938 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18939 if test "${cf_cv_hashed_db_version+set}" = set; then
18940   echo $ECHO_N "(cached) $ECHO_C" >&6
18941 else
18942
18943 cf_cv_hashed_db_version=unknown
18944
18945 for cf_db_version in 1 2 3 4 5 6
18946 do
18947
18948 echo "${as_me:-configure}:18948: testing checking for db version $cf_db_version ..." 1>&5
18949
18950         cat >conftest.$ac_ext <<_ACEOF
18951 #line 18951 "configure"
18952 #include "confdefs.h"
18953
18954 $ac_includes_default
18955 #include <db.h>
18956
18957 #ifdef DB_VERSION_MAJOR
18958         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18959 #if $cf_db_version == DB_VERSION_MAJOR
18960         /* ok */
18961 #else
18962         make an error
18963 #endif
18964 #else
18965 #if $cf_db_version == 1
18966         /* ok: assuming this is DB 1.8.5 */
18967 #else
18968         make an error
18969 #endif
18970 #endif
18971
18972 int
18973 main ()
18974 {
18975 DBT *foo = 0
18976   ;
18977   return 0;
18978 }
18979 _ACEOF
18980 rm -f conftest.$ac_objext
18981 if { (eval echo "$as_me:18981: \"$ac_compile\"") >&5
18982   (eval $ac_compile) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit $ac_status); } &&
18986          { ac_try='test -s conftest.$ac_objext'
18987   { (eval echo "$as_me:18987: \"$ac_try\"") >&5
18988   (eval $ac_try) 2>&5
18989   ac_status=$?
18990   echo "$as_me:18990: \$? = $ac_status" >&5
18991   (exit $ac_status); }; }; then
18992
18993         cf_cv_hashed_db_version=$cf_db_version
18994         break
18995
18996 else
18997   echo "$as_me: failed program was:" >&5
18998 cat conftest.$ac_ext >&5
18999 fi
19000 rm -f conftest.$ac_objext conftest.$ac_ext
19001 done
19002
19003 fi
19004 echo "$as_me:19004: result: $cf_cv_hashed_db_version" >&5
19005 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19006
19007 if test "$cf_cv_hashed_db_version" = unknown ; then
19008         { { echo "$as_me:19008: error: Cannot determine version of db" >&5
19009 echo "$as_me: error: Cannot determine version of db" >&2;}
19010    { (exit 1); exit 1; }; }
19011 else
19012
19013 echo "$as_me:19013: checking for db libraries" >&5
19014 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19015 if test "${cf_cv_hashed_db_libs+set}" = set; then
19016   echo $ECHO_N "(cached) $ECHO_C" >&6
19017 else
19018
19019 cf_cv_hashed_db_libs=unknown
19020 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19021 do
19022         cf_save_libs="$LIBS"
19023         if test -n "$cf_db_libs"; then
19024
19025 cf_add_libs="-l$cf_db_libs"
19026 # Filter out duplicates - this happens with badly-designed ".pc" files...
19027 for cf_add_1lib in $LIBS
19028 do
19029         for cf_add_2lib in $cf_add_libs
19030         do
19031                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19032                 then
19033                         cf_add_1lib=
19034                         break
19035                 fi
19036         done
19037         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19038 done
19039 LIBS="$cf_add_libs"
19040
19041         fi
19042
19043 echo "${as_me:-configure}:19043: testing checking for library "$cf_db_libs" ..." 1>&5
19044
19045         cat >conftest.$ac_ext <<_ACEOF
19046 #line 19046 "configure"
19047 #include "confdefs.h"
19048
19049 $ac_includes_default
19050 #include <db.h>
19051
19052 int
19053 main ()
19054 {
19055
19056         char *path = "/tmp/foo";
19057 #ifdef DB_VERSION_MAJOR
19058 #if DB_VERSION_MAJOR >= 4
19059         DB *result = 0;
19060         db_create(&result, NULL, 0);
19061         result->open(result,
19062                 NULL,
19063                 path,
19064                 path,
19065                 DB_HASH,
19066                 DB_CREATE,
19067                 0644);
19068 #elif DB_VERSION_MAJOR >= 3
19069         DB *result = 0;
19070         db_create(&result, NULL, 0);
19071         result->open(result,
19072                 path,
19073                 path,
19074                 DB_HASH,
19075                 DB_CREATE,
19076                 0644);
19077 #elif DB_VERSION_MAJOR >= 2
19078         DB *result = 0;
19079         db_open(path,
19080                 DB_HASH,
19081                 DB_CREATE,
19082                 0644,
19083                 (DB_ENV *) 0,
19084                 (DB_INFO *) 0,
19085                 &result);
19086 #endif /* DB_VERSION_MAJOR */
19087 #else
19088         DB *result = dbopen(path,
19089                      2,
19090                      0644,
19091                      DB_HASH,
19092                      0);
19093 #endif
19094         ${cf_cv_main_return:-return}(result != 0)
19095
19096   ;
19097   return 0;
19098 }
19099 _ACEOF
19100 rm -f conftest.$ac_objext conftest$ac_exeext
19101 if { (eval echo "$as_me:19101: \"$ac_link\"") >&5
19102   (eval $ac_link) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit $ac_status); } &&
19106          { ac_try='test -s conftest$ac_exeext'
19107   { (eval echo "$as_me:19107: \"$ac_try\"") >&5
19108   (eval $ac_try) 2>&5
19109   ac_status=$?
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit $ac_status); }; }; then
19112
19113         if test -n "$cf_db_libs" ; then
19114                 cf_cv_hashed_db_libs=$cf_db_libs
19115         else
19116                 cf_cv_hashed_db_libs=default
19117         fi
19118         LIBS="$cf_save_libs"
19119         break
19120
19121 else
19122   echo "$as_me: failed program was:" >&5
19123 cat conftest.$ac_ext >&5
19124 fi
19125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19126         LIBS="$cf_save_libs"
19127 done
19128
19129 fi
19130 echo "$as_me:19130: result: $cf_cv_hashed_db_libs" >&5
19131 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19132
19133         if test "$cf_cv_hashed_db_libs" = unknown ; then
19134                 { { echo "$as_me:19134: error: Cannot determine library for db" >&5
19135 echo "$as_me: error: Cannot determine library for db" >&2;}
19136    { (exit 1); exit 1; }; }
19137         elif test "$cf_cv_hashed_db_libs" != default ; then
19138
19139 cf_add_libs="-l$cf_cv_hashed_db_libs"
19140 # Filter out duplicates - this happens with badly-designed ".pc" files...
19141 for cf_add_1lib in $LIBS
19142 do
19143         for cf_add_2lib in $cf_add_libs
19144         do
19145                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19146                 then
19147                         cf_add_1lib=
19148                         break
19149                 fi
19150         done
19151         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19152 done
19153 LIBS="$cf_add_libs"
19154
19155         fi
19156 fi
19157
19158 else
19159
19160         { { echo "$as_me:19160: error: Cannot find db.h" >&5
19161 echo "$as_me: error: Cannot find db.h" >&2;}
19162    { (exit 1); exit 1; }; }
19163
19164 fi
19165
19166 fi
19167
19168 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19169         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19170         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19171 fi
19172
19173 # Just in case, check if the C compiler has a bool type.
19174
19175 echo "$as_me:19175: checking if we should include stdbool.h" >&5
19176 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19177
19178 if test "${cf_cv_header_stdbool_h+set}" = set; then
19179   echo $ECHO_N "(cached) $ECHO_C" >&6
19180 else
19181
19182         cat >conftest.$ac_ext <<_ACEOF
19183 #line 19183 "configure"
19184 #include "confdefs.h"
19185
19186 int
19187 main ()
19188 {
19189 bool foo = false
19190   ;
19191   return 0;
19192 }
19193 _ACEOF
19194 rm -f conftest.$ac_objext
19195 if { (eval echo "$as_me:19195: \"$ac_compile\"") >&5
19196   (eval $ac_compile) 2>&5
19197   ac_status=$?
19198   echo "$as_me:19198: \$? = $ac_status" >&5
19199   (exit $ac_status); } &&
19200          { ac_try='test -s conftest.$ac_objext'
19201   { (eval echo "$as_me:19201: \"$ac_try\"") >&5
19202   (eval $ac_try) 2>&5
19203   ac_status=$?
19204   echo "$as_me:19204: \$? = $ac_status" >&5
19205   (exit $ac_status); }; }; then
19206   cf_cv_header_stdbool_h=0
19207 else
19208   echo "$as_me: failed program was:" >&5
19209 cat conftest.$ac_ext >&5
19210 cat >conftest.$ac_ext <<_ACEOF
19211 #line 19211 "configure"
19212 #include "confdefs.h"
19213
19214 #ifndef __BEOS__
19215 #include <stdbool.h>
19216 #endif
19217
19218 int
19219 main ()
19220 {
19221 bool foo = false
19222   ;
19223   return 0;
19224 }
19225 _ACEOF
19226 rm -f conftest.$ac_objext
19227 if { (eval echo "$as_me:19227: \"$ac_compile\"") >&5
19228   (eval $ac_compile) 2>&5
19229   ac_status=$?
19230   echo "$as_me:19230: \$? = $ac_status" >&5
19231   (exit $ac_status); } &&
19232          { ac_try='test -s conftest.$ac_objext'
19233   { (eval echo "$as_me:19233: \"$ac_try\"") >&5
19234   (eval $ac_try) 2>&5
19235   ac_status=$?
19236   echo "$as_me:19236: \$? = $ac_status" >&5
19237   (exit $ac_status); }; }; then
19238   cf_cv_header_stdbool_h=1
19239 else
19240   echo "$as_me: failed program was:" >&5
19241 cat conftest.$ac_ext >&5
19242 cf_cv_header_stdbool_h=0
19243 fi
19244 rm -f conftest.$ac_objext conftest.$ac_ext
19245 fi
19246 rm -f conftest.$ac_objext conftest.$ac_ext
19247 fi
19248
19249 if test "$cf_cv_header_stdbool_h" = 1
19250 then    echo "$as_me:19250: result: yes" >&5
19251 echo "${ECHO_T}yes" >&6
19252 else    echo "$as_me:19252: result: no" >&5
19253 echo "${ECHO_T}no" >&6
19254 fi
19255
19256 echo "$as_me:19256: checking for builtin bool type" >&5
19257 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19258
19259 if test "${cf_cv_cc_bool_type+set}" = set; then
19260   echo $ECHO_N "(cached) $ECHO_C" >&6
19261 else
19262
19263         cat >conftest.$ac_ext <<_ACEOF
19264 #line 19264 "configure"
19265 #include "confdefs.h"
19266
19267 #include <stdio.h>
19268 #include <sys/types.h>
19269
19270 int
19271 main ()
19272 {
19273 bool x = false
19274   ;
19275   return 0;
19276 }
19277 _ACEOF
19278 rm -f conftest.$ac_objext
19279 if { (eval echo "$as_me:19279: \"$ac_compile\"") >&5
19280   (eval $ac_compile) 2>&5
19281   ac_status=$?
19282   echo "$as_me:19282: \$? = $ac_status" >&5
19283   (exit $ac_status); } &&
19284          { ac_try='test -s conftest.$ac_objext'
19285   { (eval echo "$as_me:19285: \"$ac_try\"") >&5
19286   (eval $ac_try) 2>&5
19287   ac_status=$?
19288   echo "$as_me:19288: \$? = $ac_status" >&5
19289   (exit $ac_status); }; }; then
19290   cf_cv_cc_bool_type=1
19291 else
19292   echo "$as_me: failed program was:" >&5
19293 cat conftest.$ac_ext >&5
19294 cf_cv_cc_bool_type=0
19295 fi
19296 rm -f conftest.$ac_objext conftest.$ac_ext
19297
19298 fi
19299
19300 if test "$cf_cv_cc_bool_type" = 1
19301 then    echo "$as_me:19301: result: yes" >&5
19302 echo "${ECHO_T}yes" >&6
19303 else    echo "$as_me:19303: result: no" >&5
19304 echo "${ECHO_T}no" >&6
19305 fi
19306
19307 # Check for C++ compiler characteristics (and ensure that it's there!)
19308 if test -n "$CXX" ; then
19309         ac_ext=cc
19310 ac_cpp='$CXXCPP $CPPFLAGS'
19311 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19312 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19313 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19314 ac_main_return=return
19315
19316 if test -n "$GXX" ; then
19317 case $cf_cv_system_name in
19318 (os2*)
19319         cf_stdcpp_libname=stdcpp
19320         ;;
19321 (*)
19322         cf_stdcpp_libname=stdc++
19323         ;;
19324 esac
19325 echo "$as_me:19325: checking for library $cf_stdcpp_libname" >&5
19326 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19327 if test "${cf_cv_libstdcpp+set}" = set; then
19328   echo $ECHO_N "(cached) $ECHO_C" >&6
19329 else
19330
19331         cf_save="$LIBS"
19332
19333 cf_add_libs="-l$cf_stdcpp_libname"
19334 # Filter out duplicates - this happens with badly-designed ".pc" files...
19335 for cf_add_1lib in $LIBS
19336 do
19337         for cf_add_2lib in $cf_add_libs
19338         do
19339                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19340                 then
19341                         cf_add_1lib=
19342                         break
19343                 fi
19344         done
19345         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19346 done
19347 LIBS="$cf_add_libs"
19348
19349 cat >conftest.$ac_ext <<_ACEOF
19350 #line 19350 "configure"
19351 #include "confdefs.h"
19352
19353 #include <strstream.h>
19354 int
19355 main ()
19356 {
19357
19358 char buf[80];
19359 strstreambuf foo(buf, sizeof(buf))
19360
19361   ;
19362   return 0;
19363 }
19364 _ACEOF
19365 rm -f conftest.$ac_objext conftest$ac_exeext
19366 if { (eval echo "$as_me:19366: \"$ac_link\"") >&5
19367   (eval $ac_link) 2>&5
19368   ac_status=$?
19369   echo "$as_me:19369: \$? = $ac_status" >&5
19370   (exit $ac_status); } &&
19371          { ac_try='test -s conftest$ac_exeext'
19372   { (eval echo "$as_me:19372: \"$ac_try\"") >&5
19373   (eval $ac_try) 2>&5
19374   ac_status=$?
19375   echo "$as_me:19375: \$? = $ac_status" >&5
19376   (exit $ac_status); }; }; then
19377   cf_cv_libstdcpp=yes
19378 else
19379   echo "$as_me: failed program was:" >&5
19380 cat conftest.$ac_ext >&5
19381 cf_cv_libstdcpp=no
19382 fi
19383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19384         LIBS="$cf_save"
19385
19386 fi
19387 echo "$as_me:19387: result: $cf_cv_libstdcpp" >&5
19388 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19389 test "$cf_cv_libstdcpp" = yes &&
19390 cf_add_libs="-l$cf_stdcpp_libname"
19391 # Filter out duplicates - this happens with badly-designed ".pc" files...
19392 for cf_add_1lib in $CXXLIBS
19393 do
19394         for cf_add_2lib in $cf_add_libs
19395         do
19396                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19397                 then
19398                         cf_add_1lib=
19399                         break
19400                 fi
19401         done
19402         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19403 done
19404 CXXLIBS="$cf_add_libs"
19405
19406 fi
19407
19408         echo "$as_me:19408: checking whether $CXX understands -c and -o together" >&5
19409 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19410 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19411   echo $ECHO_N "(cached) $ECHO_C" >&6
19412 else
19413
19414 cat > conftest.$ac_ext <<CF_EOF
19415 #include <stdio.h>
19416 int main()
19417 {
19418         ${cf_cv_main_return:-return}(0);
19419 }
19420 CF_EOF
19421 # We do the test twice because some compilers refuse to overwrite an
19422 # existing .o file with -o, though they will create one.
19423 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19424 if { (eval echo "$as_me:19424: \"$ac_try\"") >&5
19425   (eval $ac_try) 2>&5
19426   ac_status=$?
19427   echo "$as_me:19427: \$? = $ac_status" >&5
19428   (exit $ac_status); } &&
19429   test -f conftest2.$ac_objext && { (eval echo "$as_me:19429: \"$ac_try\"") >&5
19430   (eval $ac_try) 2>&5
19431   ac_status=$?
19432   echo "$as_me:19432: \$? = $ac_status" >&5
19433   (exit $ac_status); };
19434 then
19435   eval cf_cv_prog_CXX_c_o=yes
19436 else
19437   eval cf_cv_prog_CXX_c_o=no
19438 fi
19439 rm -rf conftest*
19440
19441 fi
19442 if test $cf_cv_prog_CXX_c_o = yes; then
19443   echo "$as_me:19443: result: yes" >&5
19444 echo "${ECHO_T}yes" >&6
19445 else
19446   echo "$as_me:19446: result: no" >&5
19447 echo "${ECHO_T}no" >&6
19448 fi
19449
19450         case $GXX_VERSION in
19451         (1*|2.0-6*)
19452                 cf_cxx_library=yes
19453                 ;;
19454         (*-2.7*|2.7*)
19455
19456 cf_cxx_library=unknown
19457 case $cf_cv_system_name in
19458 (os2*)
19459         cf_gpp_libname=gpp
19460         ;;
19461 (*)
19462         cf_gpp_libname=g++
19463         ;;
19464 esac
19465 if test "$GXX" = yes; then
19466         echo "$as_me:19466: checking for lib$cf_gpp_libname" >&5
19467 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19468         cf_save="$LIBS"
19469
19470 cf_add_libs="-l$cf_gpp_libname"
19471 # Filter out duplicates - this happens with badly-designed ".pc" files...
19472 for cf_add_1lib in $LIBS
19473 do
19474         for cf_add_2lib in $cf_add_libs
19475         do
19476                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19477                 then
19478                         cf_add_1lib=
19479                         break
19480                 fi
19481         done
19482         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19483 done
19484 LIBS="$cf_add_libs"
19485
19486         cat >conftest.$ac_ext <<_ACEOF
19487 #line 19487 "configure"
19488 #include "confdefs.h"
19489
19490 #include <$cf_gpp_libname/builtin.h>
19491
19492 int
19493 main ()
19494 {
19495 two_arg_error_handler_t foo2 = lib_error_handler
19496   ;
19497   return 0;
19498 }
19499 _ACEOF
19500 rm -f conftest.$ac_objext conftest$ac_exeext
19501 if { (eval echo "$as_me:19501: \"$ac_link\"") >&5
19502   (eval $ac_link) 2>&5
19503   ac_status=$?
19504   echo "$as_me:19504: \$? = $ac_status" >&5
19505   (exit $ac_status); } &&
19506          { ac_try='test -s conftest$ac_exeext'
19507   { (eval echo "$as_me:19507: \"$ac_try\"") >&5
19508   (eval $ac_try) 2>&5
19509   ac_status=$?
19510   echo "$as_me:19510: \$? = $ac_status" >&5
19511   (exit $ac_status); }; }; then
19512   cf_cxx_library=yes
19513
19514 cf_add_libs="-l$cf_gpp_libname"
19515 # Filter out duplicates - this happens with badly-designed ".pc" files...
19516 for cf_add_1lib in $CXXLIBS
19517 do
19518         for cf_add_2lib in $cf_add_libs
19519         do
19520                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19521                 then
19522                         cf_add_1lib=
19523                         break
19524                 fi
19525         done
19526         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19527 done
19528 CXXLIBS="$cf_add_libs"
19529
19530          if test "$cf_gpp_libname" = cpp ; then
19531
19532 cat >>confdefs.h <<\EOF
19533 #define HAVE_GPP_BUILTIN_H 1
19534 EOF
19535
19536          else
19537
19538 cat >>confdefs.h <<\EOF
19539 #define HAVE_GXX_BUILTIN_H 1
19540 EOF
19541
19542          fi
19543 else
19544   echo "$as_me: failed program was:" >&5
19545 cat conftest.$ac_ext >&5
19546 cat >conftest.$ac_ext <<_ACEOF
19547 #line 19547 "configure"
19548 #include "confdefs.h"
19549
19550 #include <builtin.h>
19551
19552 int
19553 main ()
19554 {
19555 two_arg_error_handler_t foo2 = lib_error_handler
19556   ;
19557   return 0;
19558 }
19559 _ACEOF
19560 rm -f conftest.$ac_objext conftest$ac_exeext
19561 if { (eval echo "$as_me:19561: \"$ac_link\"") >&5
19562   (eval $ac_link) 2>&5
19563   ac_status=$?
19564   echo "$as_me:19564: \$? = $ac_status" >&5
19565   (exit $ac_status); } &&
19566          { ac_try='test -s conftest$ac_exeext'
19567   { (eval echo "$as_me:19567: \"$ac_try\"") >&5
19568   (eval $ac_try) 2>&5
19569   ac_status=$?
19570   echo "$as_me:19570: \$? = $ac_status" >&5
19571   (exit $ac_status); }; }; then
19572   cf_cxx_library=yes
19573
19574 cf_add_libs="-l$cf_gpp_libname"
19575 # Filter out duplicates - this happens with badly-designed ".pc" files...
19576 for cf_add_1lib in $CXXLIBS
19577 do
19578         for cf_add_2lib in $cf_add_libs
19579         do
19580                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19581                 then
19582                         cf_add_1lib=
19583                         break
19584                 fi
19585         done
19586         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19587 done
19588 CXXLIBS="$cf_add_libs"
19589
19590 cat >>confdefs.h <<\EOF
19591 #define HAVE_BUILTIN_H 1
19592 EOF
19593
19594 else
19595   echo "$as_me: failed program was:" >&5
19596 cat conftest.$ac_ext >&5
19597 cf_cxx_library=no
19598 fi
19599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19600 fi
19601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19602         LIBS="$cf_save"
19603         echo "$as_me:19603: result: $cf_cxx_library" >&5
19604 echo "${ECHO_T}$cf_cxx_library" >&6
19605 fi
19606
19607                 ;;
19608         (*)
19609                 cf_cxx_library=no
19610                 ;;
19611         esac
19612
19613         ac_ext=cc
19614 ac_cpp='$CXXCPP $CPPFLAGS'
19615 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19616 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19617 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19618 ac_main_return=return
19619 echo "$as_me:19619: checking how to run the C++ preprocessor" >&5
19620 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19621 if test -z "$CXXCPP"; then
19622   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19623   echo $ECHO_N "(cached) $ECHO_C" >&6
19624 else
19625       # Double quotes because CXXCPP needs to be expanded
19626     for CXXCPP in "$CXX -E" "/lib/cpp"
19627     do
19628       ac_preproc_ok=false
19629 for ac_cxx_preproc_warn_flag in '' yes
19630 do
19631   # Use a header file that comes with gcc, so configuring glibc
19632   # with a fresh cross-compiler works.
19633   # On the NeXT, cc -E runs the code through the compiler's parser,
19634   # not just through cpp. "Syntax error" is here to catch this case.
19635   cat >conftest.$ac_ext <<_ACEOF
19636 #line 19636 "configure"
19637 #include "confdefs.h"
19638 #include <assert.h>
19639                      Syntax error
19640 _ACEOF
19641 if { (eval echo "$as_me:19641: \"$ac_cpp conftest.$ac_ext\"") >&5
19642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19643   ac_status=$?
19644   egrep -v '^ *\+' conftest.er1 >conftest.err
19645   rm -f conftest.er1
19646   cat conftest.err >&5
19647   echo "$as_me:19647: \$? = $ac_status" >&5
19648   (exit $ac_status); } >/dev/null; then
19649   if test -s conftest.err; then
19650     ac_cpp_err=$ac_cxx_preproc_warn_flag
19651   else
19652     ac_cpp_err=
19653   fi
19654 else
19655   ac_cpp_err=yes
19656 fi
19657 if test -z "$ac_cpp_err"; then
19658   :
19659 else
19660   echo "$as_me: failed program was:" >&5
19661   cat conftest.$ac_ext >&5
19662   # Broken: fails on valid input.
19663 continue
19664 fi
19665 rm -f conftest.err conftest.$ac_ext
19666
19667   # OK, works on sane cases.  Now check whether non-existent headers
19668   # can be detected and how.
19669   cat >conftest.$ac_ext <<_ACEOF
19670 #line 19670 "configure"
19671 #include "confdefs.h"
19672 #include <ac_nonexistent.h>
19673 _ACEOF
19674 if { (eval echo "$as_me:19674: \"$ac_cpp conftest.$ac_ext\"") >&5
19675   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19676   ac_status=$?
19677   egrep -v '^ *\+' conftest.er1 >conftest.err
19678   rm -f conftest.er1
19679   cat conftest.err >&5
19680   echo "$as_me:19680: \$? = $ac_status" >&5
19681   (exit $ac_status); } >/dev/null; then
19682   if test -s conftest.err; then
19683     ac_cpp_err=$ac_cxx_preproc_warn_flag
19684   else
19685     ac_cpp_err=
19686   fi
19687 else
19688   ac_cpp_err=yes
19689 fi
19690 if test -z "$ac_cpp_err"; then
19691   # Broken: success on invalid input.
19692 continue
19693 else
19694   echo "$as_me: failed program was:" >&5
19695   cat conftest.$ac_ext >&5
19696   # Passes both tests.
19697 ac_preproc_ok=:
19698 break
19699 fi
19700 rm -f conftest.err conftest.$ac_ext
19701
19702 done
19703 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19704 rm -f conftest.err conftest.$ac_ext
19705 if $ac_preproc_ok; then
19706   break
19707 fi
19708
19709     done
19710     ac_cv_prog_CXXCPP=$CXXCPP
19711
19712 fi
19713   CXXCPP=$ac_cv_prog_CXXCPP
19714 else
19715   ac_cv_prog_CXXCPP=$CXXCPP
19716 fi
19717 echo "$as_me:19717: result: $CXXCPP" >&5
19718 echo "${ECHO_T}$CXXCPP" >&6
19719 ac_preproc_ok=false
19720 for ac_cxx_preproc_warn_flag in '' yes
19721 do
19722   # Use a header file that comes with gcc, so configuring glibc
19723   # with a fresh cross-compiler works.
19724   # On the NeXT, cc -E runs the code through the compiler's parser,
19725   # not just through cpp. "Syntax error" is here to catch this case.
19726   cat >conftest.$ac_ext <<_ACEOF
19727 #line 19727 "configure"
19728 #include "confdefs.h"
19729 #include <assert.h>
19730                      Syntax error
19731 _ACEOF
19732 if { (eval echo "$as_me:19732: \"$ac_cpp conftest.$ac_ext\"") >&5
19733   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19734   ac_status=$?
19735   egrep -v '^ *\+' conftest.er1 >conftest.err
19736   rm -f conftest.er1
19737   cat conftest.err >&5
19738   echo "$as_me:19738: \$? = $ac_status" >&5
19739   (exit $ac_status); } >/dev/null; then
19740   if test -s conftest.err; then
19741     ac_cpp_err=$ac_cxx_preproc_warn_flag
19742   else
19743     ac_cpp_err=
19744   fi
19745 else
19746   ac_cpp_err=yes
19747 fi
19748 if test -z "$ac_cpp_err"; then
19749   :
19750 else
19751   echo "$as_me: failed program was:" >&5
19752   cat conftest.$ac_ext >&5
19753   # Broken: fails on valid input.
19754 continue
19755 fi
19756 rm -f conftest.err conftest.$ac_ext
19757
19758   # OK, works on sane cases.  Now check whether non-existent headers
19759   # can be detected and how.
19760   cat >conftest.$ac_ext <<_ACEOF
19761 #line 19761 "configure"
19762 #include "confdefs.h"
19763 #include <ac_nonexistent.h>
19764 _ACEOF
19765 if { (eval echo "$as_me:19765: \"$ac_cpp conftest.$ac_ext\"") >&5
19766   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19767   ac_status=$?
19768   egrep -v '^ *\+' conftest.er1 >conftest.err
19769   rm -f conftest.er1
19770   cat conftest.err >&5
19771   echo "$as_me:19771: \$? = $ac_status" >&5
19772   (exit $ac_status); } >/dev/null; then
19773   if test -s conftest.err; then
19774     ac_cpp_err=$ac_cxx_preproc_warn_flag
19775   else
19776     ac_cpp_err=
19777   fi
19778 else
19779   ac_cpp_err=yes
19780 fi
19781 if test -z "$ac_cpp_err"; then
19782   # Broken: success on invalid input.
19783 continue
19784 else
19785   echo "$as_me: failed program was:" >&5
19786   cat conftest.$ac_ext >&5
19787   # Passes both tests.
19788 ac_preproc_ok=:
19789 break
19790 fi
19791 rm -f conftest.err conftest.$ac_ext
19792
19793 done
19794 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19795 rm -f conftest.err conftest.$ac_ext
19796 if $ac_preproc_ok; then
19797   :
19798 else
19799   { { echo "$as_me:19799: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19800 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19801    { (exit 1); exit 1; }; }
19802 fi
19803
19804 ac_ext=cc
19805 ac_cpp='$CXXCPP $CPPFLAGS'
19806 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19807 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19808 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19809 ac_main_return=return
19810
19811 for ac_header in typeinfo
19812 do
19813 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19814 echo "$as_me:19814: checking for $ac_header" >&5
19815 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19816 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19817   echo $ECHO_N "(cached) $ECHO_C" >&6
19818 else
19819   cat >conftest.$ac_ext <<_ACEOF
19820 #line 19820 "configure"
19821 #include "confdefs.h"
19822 #include <$ac_header>
19823 _ACEOF
19824 if { (eval echo "$as_me:19824: \"$ac_cpp conftest.$ac_ext\"") >&5
19825   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19826   ac_status=$?
19827   egrep -v '^ *\+' conftest.er1 >conftest.err
19828   rm -f conftest.er1
19829   cat conftest.err >&5
19830   echo "$as_me:19830: \$? = $ac_status" >&5
19831   (exit $ac_status); } >/dev/null; then
19832   if test -s conftest.err; then
19833     ac_cpp_err=$ac_cxx_preproc_warn_flag
19834   else
19835     ac_cpp_err=
19836   fi
19837 else
19838   ac_cpp_err=yes
19839 fi
19840 if test -z "$ac_cpp_err"; then
19841   eval "$as_ac_Header=yes"
19842 else
19843   echo "$as_me: failed program was:" >&5
19844   cat conftest.$ac_ext >&5
19845   eval "$as_ac_Header=no"
19846 fi
19847 rm -f conftest.err conftest.$ac_ext
19848 fi
19849 echo "$as_me:19849: result: `eval echo '${'$as_ac_Header'}'`" >&5
19850 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19851 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19852   cat >>confdefs.h <<EOF
19853 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19854 EOF
19855
19856 fi
19857 done
19858
19859 for ac_header in iostream
19860 do
19861 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19862 echo "$as_me:19862: checking for $ac_header" >&5
19863 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19864 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19865   echo $ECHO_N "(cached) $ECHO_C" >&6
19866 else
19867   cat >conftest.$ac_ext <<_ACEOF
19868 #line 19868 "configure"
19869 #include "confdefs.h"
19870 #include <$ac_header>
19871 _ACEOF
19872 if { (eval echo "$as_me:19872: \"$ac_cpp conftest.$ac_ext\"") >&5
19873   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19874   ac_status=$?
19875   egrep -v '^ *\+' conftest.er1 >conftest.err
19876   rm -f conftest.er1
19877   cat conftest.err >&5
19878   echo "$as_me:19878: \$? = $ac_status" >&5
19879   (exit $ac_status); } >/dev/null; then
19880   if test -s conftest.err; then
19881     ac_cpp_err=$ac_cxx_preproc_warn_flag
19882   else
19883     ac_cpp_err=
19884   fi
19885 else
19886   ac_cpp_err=yes
19887 fi
19888 if test -z "$ac_cpp_err"; then
19889   eval "$as_ac_Header=yes"
19890 else
19891   echo "$as_me: failed program was:" >&5
19892   cat conftest.$ac_ext >&5
19893   eval "$as_ac_Header=no"
19894 fi
19895 rm -f conftest.err conftest.$ac_ext
19896 fi
19897 echo "$as_me:19897: result: `eval echo '${'$as_ac_Header'}'`" >&5
19898 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19899 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19900   cat >>confdefs.h <<EOF
19901 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19902 EOF
19903
19904 fi
19905 done
19906
19907 if test x"$ac_cv_header_iostream" = xyes ; then
19908         echo "$as_me:19908: checking if iostream uses std-namespace" >&5
19909 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19910         cat >conftest.$ac_ext <<_ACEOF
19911 #line 19911 "configure"
19912 #include "confdefs.h"
19913
19914 #include <iostream>
19915 using std::endl;
19916 using std::cerr;
19917 int
19918 main ()
19919 {
19920
19921 cerr << "testing" << endl;
19922
19923   ;
19924   return 0;
19925 }
19926 _ACEOF
19927 rm -f conftest.$ac_objext
19928 if { (eval echo "$as_me:19928: \"$ac_compile\"") >&5
19929   (eval $ac_compile) 2>&5
19930   ac_status=$?
19931   echo "$as_me:19931: \$? = $ac_status" >&5
19932   (exit $ac_status); } &&
19933          { ac_try='test -s conftest.$ac_objext'
19934   { (eval echo "$as_me:19934: \"$ac_try\"") >&5
19935   (eval $ac_try) 2>&5
19936   ac_status=$?
19937   echo "$as_me:19937: \$? = $ac_status" >&5
19938   (exit $ac_status); }; }; then
19939   cf_iostream_namespace=yes
19940 else
19941   echo "$as_me: failed program was:" >&5
19942 cat conftest.$ac_ext >&5
19943 cf_iostream_namespace=no
19944 fi
19945 rm -f conftest.$ac_objext conftest.$ac_ext
19946         echo "$as_me:19946: result: $cf_iostream_namespace" >&5
19947 echo "${ECHO_T}$cf_iostream_namespace" >&6
19948         if test "$cf_iostream_namespace" = yes ; then
19949
19950 cat >>confdefs.h <<\EOF
19951 #define IOSTREAM_NAMESPACE 1
19952 EOF
19953
19954         fi
19955 fi
19956
19957 echo "$as_me:19957: checking if we should include stdbool.h" >&5
19958 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19959
19960 if test "${cf_cv_header_stdbool_h+set}" = set; then
19961   echo $ECHO_N "(cached) $ECHO_C" >&6
19962 else
19963
19964         cat >conftest.$ac_ext <<_ACEOF
19965 #line 19965 "configure"
19966 #include "confdefs.h"
19967
19968 int
19969 main ()
19970 {
19971 bool foo = false
19972   ;
19973   return 0;
19974 }
19975 _ACEOF
19976 rm -f conftest.$ac_objext
19977 if { (eval echo "$as_me:19977: \"$ac_compile\"") >&5
19978   (eval $ac_compile) 2>&5
19979   ac_status=$?
19980   echo "$as_me:19980: \$? = $ac_status" >&5
19981   (exit $ac_status); } &&
19982          { ac_try='test -s conftest.$ac_objext'
19983   { (eval echo "$as_me:19983: \"$ac_try\"") >&5
19984   (eval $ac_try) 2>&5
19985   ac_status=$?
19986   echo "$as_me:19986: \$? = $ac_status" >&5
19987   (exit $ac_status); }; }; then
19988   cf_cv_header_stdbool_h=0
19989 else
19990   echo "$as_me: failed program was:" >&5
19991 cat conftest.$ac_ext >&5
19992 cat >conftest.$ac_ext <<_ACEOF
19993 #line 19993 "configure"
19994 #include "confdefs.h"
19995
19996 #ifndef __BEOS__
19997 #include <stdbool.h>
19998 #endif
19999
20000 int
20001 main ()
20002 {
20003 bool foo = false
20004   ;
20005   return 0;
20006 }
20007 _ACEOF
20008 rm -f conftest.$ac_objext
20009 if { (eval echo "$as_me:20009: \"$ac_compile\"") >&5
20010   (eval $ac_compile) 2>&5
20011   ac_status=$?
20012   echo "$as_me:20012: \$? = $ac_status" >&5
20013   (exit $ac_status); } &&
20014          { ac_try='test -s conftest.$ac_objext'
20015   { (eval echo "$as_me:20015: \"$ac_try\"") >&5
20016   (eval $ac_try) 2>&5
20017   ac_status=$?
20018   echo "$as_me:20018: \$? = $ac_status" >&5
20019   (exit $ac_status); }; }; then
20020   cf_cv_header_stdbool_h=1
20021 else
20022   echo "$as_me: failed program was:" >&5
20023 cat conftest.$ac_ext >&5
20024 cf_cv_header_stdbool_h=0
20025 fi
20026 rm -f conftest.$ac_objext conftest.$ac_ext
20027 fi
20028 rm -f conftest.$ac_objext conftest.$ac_ext
20029 fi
20030
20031 if test "$cf_cv_header_stdbool_h" = 1
20032 then    echo "$as_me:20032: result: yes" >&5
20033 echo "${ECHO_T}yes" >&6
20034 else    echo "$as_me:20034: result: no" >&5
20035 echo "${ECHO_T}no" >&6
20036 fi
20037
20038 echo "$as_me:20038: checking for builtin bool type" >&5
20039 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20040
20041 if test "${cf_cv_builtin_bool+set}" = set; then
20042   echo $ECHO_N "(cached) $ECHO_C" >&6
20043 else
20044
20045         cat >conftest.$ac_ext <<_ACEOF
20046 #line 20046 "configure"
20047 #include "confdefs.h"
20048
20049 #include <stdio.h>
20050 #include <sys/types.h>
20051
20052 int
20053 main ()
20054 {
20055 bool x = false
20056   ;
20057   return 0;
20058 }
20059 _ACEOF
20060 rm -f conftest.$ac_objext
20061 if { (eval echo "$as_me:20061: \"$ac_compile\"") >&5
20062   (eval $ac_compile) 2>&5
20063   ac_status=$?
20064   echo "$as_me:20064: \$? = $ac_status" >&5
20065   (exit $ac_status); } &&
20066          { ac_try='test -s conftest.$ac_objext'
20067   { (eval echo "$as_me:20067: \"$ac_try\"") >&5
20068   (eval $ac_try) 2>&5
20069   ac_status=$?
20070   echo "$as_me:20070: \$? = $ac_status" >&5
20071   (exit $ac_status); }; }; then
20072   cf_cv_builtin_bool=1
20073 else
20074   echo "$as_me: failed program was:" >&5
20075 cat conftest.$ac_ext >&5
20076 cf_cv_builtin_bool=0
20077 fi
20078 rm -f conftest.$ac_objext conftest.$ac_ext
20079
20080 fi
20081
20082 if test "$cf_cv_builtin_bool" = 1
20083 then    echo "$as_me:20083: result: yes" >&5
20084 echo "${ECHO_T}yes" >&6
20085 else    echo "$as_me:20085: result: no" >&5
20086 echo "${ECHO_T}no" >&6
20087 fi
20088
20089 echo "$as_me:20089: checking for size of bool" >&5
20090 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20091 if test "${cf_cv_type_of_bool+set}" = set; then
20092   echo $ECHO_N "(cached) $ECHO_C" >&6
20093 else
20094
20095         rm -f cf_test.out
20096         if test "$cross_compiling" = yes; then
20097   cf_cv_type_of_bool=unknown
20098 else
20099   cat >conftest.$ac_ext <<_ACEOF
20100 #line 20100 "configure"
20101 #include "confdefs.h"
20102
20103 #include <stdlib.h>
20104 #include <stdio.h>
20105
20106 #if defined(__cplusplus)
20107
20108 #ifdef HAVE_GXX_BUILTIN_H
20109 #include <g++/builtin.h>
20110 #elif HAVE_GPP_BUILTIN_H
20111 #include <gpp/builtin.h>
20112 #elif HAVE_BUILTIN_H
20113 #include <builtin.h>
20114 #endif
20115
20116 #else
20117
20118 #if $cf_cv_header_stdbool_h
20119 #include <stdbool.h>
20120 #endif
20121
20122 #endif
20123
20124 int main()
20125 {
20126         FILE *fp = fopen("cf_test.out", "w");
20127         if (fp != 0) {
20128                 bool x = true;
20129                 if ((bool)(-x) >= 0)
20130                         fputs("unsigned ", fp);
20131                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20132                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20133                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20134                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20135                 fclose(fp);
20136         }
20137         ${cf_cv_main_return:-return}(0);
20138 }
20139
20140 _ACEOF
20141 rm -f conftest$ac_exeext
20142 if { (eval echo "$as_me:20142: \"$ac_link\"") >&5
20143   (eval $ac_link) 2>&5
20144   ac_status=$?
20145   echo "$as_me:20145: \$? = $ac_status" >&5
20146   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20147   { (eval echo "$as_me:20147: \"$ac_try\"") >&5
20148   (eval $ac_try) 2>&5
20149   ac_status=$?
20150   echo "$as_me:20150: \$? = $ac_status" >&5
20151   (exit $ac_status); }; }; then
20152   cf_cv_type_of_bool=`cat cf_test.out`
20153                  if test -z "$cf_cv_type_of_bool"; then
20154                    cf_cv_type_of_bool=unknown
20155                  fi
20156 else
20157   echo "$as_me: program exited with status $ac_status" >&5
20158 echo "$as_me: failed program was:" >&5
20159 cat conftest.$ac_ext >&5
20160 cf_cv_type_of_bool=unknown
20161 fi
20162 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20163 fi
20164
20165 fi
20166
20167         rm -f cf_test.out
20168 echo "$as_me:20168: result: $cf_cv_type_of_bool" >&5
20169 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20170 if test "$cf_cv_type_of_bool" = unknown ; then
20171         case .$NCURSES_BOOL in
20172         (.auto|.) NCURSES_BOOL=unsigned;;
20173         esac
20174         { echo "$as_me:20174: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20175 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20176         cf_cv_type_of_bool=$NCURSES_BOOL
20177 fi
20178
20179 echo "$as_me:20179: checking for special defines needed for etip.h" >&5
20180 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20181 cf_save_CXXFLAGS="$CXXFLAGS"
20182 cf_result="none"
20183
20184 # etip.h includes ncurses.h which includes ncurses_dll.h
20185 # But ncurses_dll.h is generated - fix here.
20186 test -d include || mkdir include
20187 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
20188
20189 for cf_math in "" MATH_H
20190 do
20191 for cf_excp in "" MATH_EXCEPTION
20192 do
20193         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20194         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20195         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20196 cat >conftest.$ac_ext <<_ACEOF
20197 #line 20197 "configure"
20198 #include "confdefs.h"
20199
20200 #include <etip.h.in>
20201
20202 int
20203 main ()
20204 {
20205
20206   ;
20207   return 0;
20208 }
20209 _ACEOF
20210 rm -f conftest.$ac_objext
20211 if { (eval echo "$as_me:20211: \"$ac_compile\"") >&5
20212   (eval $ac_compile) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit $ac_status); } &&
20216          { ac_try='test -s conftest.$ac_objext'
20217   { (eval echo "$as_me:20217: \"$ac_try\"") >&5
20218   (eval $ac_try) 2>&5
20219   ac_status=$?
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit $ac_status); }; }; then
20222
20223         test -n "$cf_math" && cat >>confdefs.h <<EOF
20224 #define ETIP_NEEDS_${cf_math} 1
20225 EOF
20226
20227         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20228 #define ETIP_NEEDS_${cf_excp} 1
20229 EOF
20230
20231         cf_result="$cf_math $cf_excp"
20232         break 2
20233
20234 else
20235   echo "$as_me: failed program was:" >&5
20236 cat conftest.$ac_ext >&5
20237 fi
20238 rm -f conftest.$ac_objext conftest.$ac_ext
20239 done
20240 done
20241 echo "$as_me:20241: result: $cf_result" >&5
20242 echo "${ECHO_T}$cf_result" >&6
20243 CXXFLAGS="$cf_save_CXXFLAGS"
20244
20245 if test -n "$CXX"; then
20246 echo "$as_me:20246: checking if $CXX accepts parameter initialization" >&5
20247 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20248 if test "${cf_cv_cpp_param_init+set}" = set; then
20249   echo $ECHO_N "(cached) $ECHO_C" >&6
20250 else
20251
20252         ac_ext=cc
20253 ac_cpp='$CXXCPP $CPPFLAGS'
20254 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20255 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20256 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20257 ac_main_return=return
20258
20259         if test "$cross_compiling" = yes; then
20260   cf_cv_cpp_param_init=unknown
20261 else
20262   cat >conftest.$ac_ext <<_ACEOF
20263 #line 20263 "configure"
20264 #include "confdefs.h"
20265
20266 class TEST {
20267 private:
20268         int value;
20269 public:
20270         TEST(int x = 1);
20271         ~TEST();
20272 };
20273
20274 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20275 {
20276         value = x;
20277 }
20278 int main() { }
20279
20280 _ACEOF
20281 rm -f conftest$ac_exeext
20282 if { (eval echo "$as_me:20282: \"$ac_link\"") >&5
20283   (eval $ac_link) 2>&5
20284   ac_status=$?
20285   echo "$as_me:20285: \$? = $ac_status" >&5
20286   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20287   { (eval echo "$as_me:20287: \"$ac_try\"") >&5
20288   (eval $ac_try) 2>&5
20289   ac_status=$?
20290   echo "$as_me:20290: \$? = $ac_status" >&5
20291   (exit $ac_status); }; }; then
20292   cf_cv_cpp_param_init=yes
20293 else
20294   echo "$as_me: program exited with status $ac_status" >&5
20295 echo "$as_me: failed program was:" >&5
20296 cat conftest.$ac_ext >&5
20297 cf_cv_cpp_param_init=no
20298 fi
20299 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20300 fi
20301         ac_ext=cc
20302 ac_cpp='$CXXCPP $CPPFLAGS'
20303 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20304 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20305 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20306 ac_main_return=return
20307
20308 fi
20309 echo "$as_me:20309: result: $cf_cv_cpp_param_init" >&5
20310 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20311 fi
20312 test "$cf_cv_cpp_param_init" = yes &&
20313 cat >>confdefs.h <<\EOF
20314 #define CPP_HAS_PARAM_INIT 1
20315 EOF
20316
20317 if test -n "$CXX"; then
20318
20319 echo "$as_me:20319: checking if $CXX accepts static_cast" >&5
20320 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20321 if test "${cf_cv_cpp_static_cast+set}" = set; then
20322   echo $ECHO_N "(cached) $ECHO_C" >&6
20323 else
20324
20325         ac_ext=cc
20326 ac_cpp='$CXXCPP $CPPFLAGS'
20327 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20328 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20329 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20330 ac_main_return=return
20331
20332         cat >conftest.$ac_ext <<_ACEOF
20333 #line 20333 "configure"
20334 #include "confdefs.h"
20335
20336 class NCursesPanel
20337 {
20338 public:
20339   NCursesPanel(int nlines,
20340                int ncols,
20341                int begin_y = 0,
20342                int begin_x = 0)
20343   {
20344   }
20345   NCursesPanel();
20346   ~NCursesPanel();
20347 };
20348
20349 template<class T> class NCursesUserPanel : public NCursesPanel
20350 {
20351 public:
20352   NCursesUserPanel (int nlines,
20353                     int ncols,
20354                     int begin_y = 0,
20355                     int begin_x = 0,
20356                     const T* p_UserData = static_cast<T*>(0))
20357     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20358   {
20359   };
20360   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20361   {
20362   };
20363
20364   virtual ~NCursesUserPanel() {};
20365 };
20366
20367 int
20368 main ()
20369 {
20370
20371         const char* p_UserData = static_cast<char*>(0)
20372   ;
20373   return 0;
20374 }
20375 _ACEOF
20376 rm -f conftest.$ac_objext
20377 if { (eval echo "$as_me:20377: \"$ac_compile\"") >&5
20378   (eval $ac_compile) 2>&5
20379   ac_status=$?
20380   echo "$as_me:20380: \$? = $ac_status" >&5
20381   (exit $ac_status); } &&
20382          { ac_try='test -s conftest.$ac_objext'
20383   { (eval echo "$as_me:20383: \"$ac_try\"") >&5
20384   (eval $ac_try) 2>&5
20385   ac_status=$?
20386   echo "$as_me:20386: \$? = $ac_status" >&5
20387   (exit $ac_status); }; }; then
20388   cf_cv_cpp_static_cast=yes
20389 else
20390   echo "$as_me: failed program was:" >&5
20391 cat conftest.$ac_ext >&5
20392 cf_cv_cpp_static_cast=no
20393 fi
20394 rm -f conftest.$ac_objext conftest.$ac_ext
20395
20396         ac_ext=cc
20397 ac_cpp='$CXXCPP $CPPFLAGS'
20398 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20399 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20400 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20401 ac_main_return=return
20402
20403 fi
20404 echo "$as_me:20404: result: $cf_cv_cpp_static_cast" >&5
20405 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20406
20407 fi
20408
20409 test "$cf_cv_cpp_static_cast" = yes &&
20410 cat >>confdefs.h <<\EOF
20411 #define CPP_HAS_STATIC_CAST 1
20412 EOF
20413
20414         CXX_AR='$(AR)'
20415         CXX_ARFLAGS='$(ARFLAGS)'
20416         case $cf_cv_system_name in
20417         (irix*)
20418             if test "$GXX" != yes ; then
20419                 CXX_AR='$(CXX)'
20420                 CXX_ARFLAGS='-ar -o'
20421             fi
20422             ;;
20423         (sco3.2v5*)
20424             CXXLDFLAGS="-u main"
20425             ;;
20426         (solaris2*)
20427             if test "$GXX" != yes ; then
20428                 CXX_AR='$(CXX)'
20429                 CXX_ARFLAGS='-xar -o'
20430             fi
20431             ;;
20432         esac
20433
20434 else
20435         cf_cxx_library=no
20436         cf_cv_builtin_bool=1
20437
20438         # Just because we are not configuring against C++ right now does not
20439         # mean that a user will not want to use C++.  Some distributors disable
20440         # the C++ portion of this configuration as a shortcut (or just to avoid
20441         # compiling the demo in the c++ directory).  So we need a reasonable
20442         # default for the 'bool' type.
20443         #
20444         # Caveat: since the storage of the bool type is not standardized, it
20445         # may change.
20446
20447         if test "$NCURSES_BOOL" != auto ; then
20448                 cf_cv_type_of_bool=$NCURSES_BOOL
20449                 cf_cv_header_stdbool_h=0
20450         else
20451                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20452
20453 echo "$as_me:20453: checking for size of bool" >&5
20454 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20455 if test "${cf_cv_type_of_bool+set}" = set; then
20456   echo $ECHO_N "(cached) $ECHO_C" >&6
20457 else
20458
20459         rm -f cf_test.out
20460         if test "$cross_compiling" = yes; then
20461   cf_cv_type_of_bool=unknown
20462 else
20463   cat >conftest.$ac_ext <<_ACEOF
20464 #line 20464 "configure"
20465 #include "confdefs.h"
20466
20467 #include <stdlib.h>
20468 #include <stdio.h>
20469
20470 #if defined(__cplusplus)
20471
20472 #ifdef HAVE_GXX_BUILTIN_H
20473 #include <g++/builtin.h>
20474 #elif HAVE_GPP_BUILTIN_H
20475 #include <gpp/builtin.h>
20476 #elif HAVE_BUILTIN_H
20477 #include <builtin.h>
20478 #endif
20479
20480 #else
20481
20482 #if $cf_cv_header_stdbool_h
20483 #include <stdbool.h>
20484 #endif
20485
20486 #endif
20487
20488 int main()
20489 {
20490         FILE *fp = fopen("cf_test.out", "w");
20491         if (fp != 0) {
20492                 bool x = true;
20493                 if ((bool)(-x) >= 0)
20494                         fputs("unsigned ", fp);
20495                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20496                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20497                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20498                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20499                 fclose(fp);
20500         }
20501         ${cf_cv_main_return:-return}(0);
20502 }
20503
20504 _ACEOF
20505 rm -f conftest$ac_exeext
20506 if { (eval echo "$as_me:20506: \"$ac_link\"") >&5
20507   (eval $ac_link) 2>&5
20508   ac_status=$?
20509   echo "$as_me:20509: \$? = $ac_status" >&5
20510   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20511   { (eval echo "$as_me:20511: \"$ac_try\"") >&5
20512   (eval $ac_try) 2>&5
20513   ac_status=$?
20514   echo "$as_me:20514: \$? = $ac_status" >&5
20515   (exit $ac_status); }; }; then
20516   cf_cv_type_of_bool=`cat cf_test.out`
20517                  if test -z "$cf_cv_type_of_bool"; then
20518                    cf_cv_type_of_bool=unknown
20519                  fi
20520 else
20521   echo "$as_me: program exited with status $ac_status" >&5
20522 echo "$as_me: failed program was:" >&5
20523 cat conftest.$ac_ext >&5
20524 cf_cv_type_of_bool=unknown
20525 fi
20526 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20527 fi
20528
20529 fi
20530
20531         rm -f cf_test.out
20532 echo "$as_me:20532: result: $cf_cv_type_of_bool" >&5
20533 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20534 if test "$cf_cv_type_of_bool" = unknown ; then
20535         case .$NCURSES_BOOL in
20536         (.auto|.) NCURSES_BOOL=unsigned;;
20537         esac
20538         { echo "$as_me:20538: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20539 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20540         cf_cv_type_of_bool=$NCURSES_BOOL
20541 fi
20542
20543                 else
20544                         echo "$as_me:20544: checking for fallback type of bool" >&5
20545 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20546                         case "$host_cpu" in
20547                         (i?86)  cf_cv_type_of_bool=char ;;
20548                         (*)     cf_cv_type_of_bool=int  ;;
20549                         esac
20550                         echo "$as_me:20550: result: $cf_cv_type_of_bool" >&5
20551 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20552                 fi
20553         fi
20554 fi
20555
20556 # If the C compiler did not declare bool, and we did not determine that the C++
20557 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20558 # ncurses library use the same type as C++ bool.  Note that this allows one to
20559 # specify the type of bool in a configure-script option and postpone
20560 # integration with the C++ compiler provided that the types are compatible.
20561 USE_CXX_BOOL=1
20562 if test $cf_cv_cc_bool_type = 1
20563 then
20564         # oops: C has a bool.  Unlikely, but C++ could differ.
20565         USE_CXX_BOOL=0
20566 elif test $cf_cv_builtin_bool = 0
20567 then
20568         # C++ has no bool
20569         USE_CXX_BOOL=0
20570 else
20571         # this is the normal case
20572         USE_CXX_BOOL='defined(__cplusplus)'
20573 fi
20574
20575 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20576
20577         if test "$cf_with_ada" != "no" ; then
20578                 if test "$with_libtool" != "no"; then
20579                         { echo "$as_me:20579: WARNING: libtool does not support Ada - disabling feature" >&5
20580 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20581                         cf_with_ada=no
20582                 fi
20583         fi
20584
20585         if test "$cf_with_ada" != "no" ; then
20586
20587 cf_ada_make=gnatmake
20588 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20589 set dummy $cf_ada_make; ac_word=$2
20590 echo "$as_me:20590: checking for $ac_word" >&5
20591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20592 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20593   echo $ECHO_N "(cached) $ECHO_C" >&6
20594 else
20595   if test -n "$gnat_exists"; then
20596   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20597 else
20598   ac_save_IFS=$IFS; IFS=$ac_path_separator
20599 ac_dummy="$PATH"
20600 for ac_dir in $ac_dummy; do
20601   IFS=$ac_save_IFS
20602   test -z "$ac_dir" && ac_dir=.
20603   $as_executable_p "$ac_dir/$ac_word" || continue
20604 ac_cv_prog_gnat_exists="yes"
20605 echo "$as_me:20605: found $ac_dir/$ac_word" >&5
20606 break
20607 done
20608
20609   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20610 fi
20611 fi
20612 gnat_exists=$ac_cv_prog_gnat_exists
20613 if test -n "$gnat_exists"; then
20614   echo "$as_me:20614: result: $gnat_exists" >&5
20615 echo "${ECHO_T}$gnat_exists" >&6
20616 else
20617   echo "$as_me:20617: result: no" >&5
20618 echo "${ECHO_T}no" >&6
20619 fi
20620
20621 if test "$ac_cv_prog_gnat_exists" = no; then
20622         cf_ada_make=
20623         cf_cv_prog_gnat_correct=no
20624 else
20625
20626 echo "$as_me:20626: checking for gnat version" >&5
20627 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20628 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20629         grep '[0-9].[0-9][0-9]*' |\
20630         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20631 echo "$as_me:20631: result: $cf_gnat_version" >&5
20632 echo "${ECHO_T}$cf_gnat_version" >&6
20633
20634 case $cf_gnat_version in
20635 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20636         cf_cv_prog_gnat_correct=yes
20637         ;;
20638 (*)
20639         { echo "$as_me:20639: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20640 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20641         cf_cv_prog_gnat_correct=no
20642         ;;
20643 esac
20644
20645         # Extract the first word of "m4", so it can be a program name with args.
20646 set dummy m4; ac_word=$2
20647 echo "$as_me:20647: checking for $ac_word" >&5
20648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20649 if test "${ac_cv_prog_M4_exists+set}" = set; then
20650   echo $ECHO_N "(cached) $ECHO_C" >&6
20651 else
20652   if test -n "$M4_exists"; then
20653   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20654 else
20655   ac_save_IFS=$IFS; IFS=$ac_path_separator
20656 ac_dummy="$PATH"
20657 for ac_dir in $ac_dummy; do
20658   IFS=$ac_save_IFS
20659   test -z "$ac_dir" && ac_dir=.
20660   $as_executable_p "$ac_dir/$ac_word" || continue
20661 ac_cv_prog_M4_exists="yes"
20662 echo "$as_me:20662: found $ac_dir/$ac_word" >&5
20663 break
20664 done
20665
20666   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20667 fi
20668 fi
20669 M4_exists=$ac_cv_prog_M4_exists
20670 if test -n "$M4_exists"; then
20671   echo "$as_me:20671: result: $M4_exists" >&5
20672 echo "${ECHO_T}$M4_exists" >&6
20673 else
20674   echo "$as_me:20674: result: no" >&5
20675 echo "${ECHO_T}no" >&6
20676 fi
20677
20678         if test "$ac_cv_prog_M4_exists" = no; then
20679                 cf_cv_prog_gnat_correct=no
20680                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20681         fi
20682         if test "$cf_cv_prog_gnat_correct" = yes; then
20683                 echo "$as_me:20683: checking if GNAT works" >&5
20684 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20685
20686 rm -rf conftest* *~conftest*
20687 cat >>conftest.ads <<CF_EOF
20688 procedure conftest;
20689 CF_EOF
20690 cat >>conftest.adb <<CF_EOF
20691 with Text_IO;
20692 with GNAT.OS_Lib;
20693 procedure conftest is
20694 begin
20695    Text_IO.Put ("Hello World");
20696    Text_IO.New_Line;
20697    GNAT.OS_Lib.OS_Exit (0);
20698 end conftest;
20699 CF_EOF
20700 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20701    if ( ./conftest 1>&5 2>&1 ) ; then
20702       cf_cv_prog_gnat_correct=yes
20703    else
20704       cf_cv_prog_gnat_correct=no
20705    fi
20706 else
20707    cf_cv_prog_gnat_correct=no
20708 fi
20709 rm -rf conftest* *~conftest*
20710
20711                 echo "$as_me:20711: result: $cf_cv_prog_gnat_correct" >&5
20712 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20713         fi
20714 fi
20715
20716                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20717
20718         ADAFLAGS="$ADAFLAGS -gnatpn"
20719
20720         echo "$as_me:20720: checking optimization options for ADAFLAGS" >&5
20721 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20722         case "$CFLAGS" in
20723         (*-g*)
20724
20725         ADAFLAGS="$ADAFLAGS -g"
20726
20727                 ;;
20728         esac
20729         case "$CFLAGS" in
20730         (*-O*)
20731                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20732
20733         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20734
20735                 ;;
20736         esac
20737         echo "$as_me:20737: result: $ADAFLAGS" >&5
20738 echo "${ECHO_T}$ADAFLAGS" >&6
20739
20740 echo "$as_me:20740: checking if GNATPREP supports -T option" >&5
20741 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20742 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20743   echo $ECHO_N "(cached) $ECHO_C" >&6
20744 else
20745
20746 cf_cv_gnatprep_opt_t=no
20747 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20748
20749 fi
20750 echo "$as_me:20750: result: $cf_cv_gnatprep_opt_t" >&5
20751 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20752 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20753
20754 echo "$as_me:20754: checking if GNAT supports generics" >&5
20755 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20756 case $cf_gnat_version in
20757 (3.[1-9]*|[4-9].*)
20758         cf_gnat_generics=yes
20759         ;;
20760 (*)
20761         cf_gnat_generics=no
20762         ;;
20763 esac
20764 echo "$as_me:20764: result: $cf_gnat_generics" >&5
20765 echo "${ECHO_T}$cf_gnat_generics" >&6
20766
20767 if test "$cf_gnat_generics" = yes
20768 then
20769         cf_compile_generics=generics
20770         cf_generic_objects="\${GENOBJS}"
20771 else
20772         cf_compile_generics=
20773         cf_generic_objects=
20774 fi
20775
20776 echo "$as_me:20776: checking if GNAT supports SIGINT" >&5
20777 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20778 if test "${cf_cv_gnat_sigint+set}" = set; then
20779   echo $ECHO_N "(cached) $ECHO_C" >&6
20780 else
20781
20782 rm -rf conftest* *~conftest*
20783 cat >>conftest.ads <<CF_EOF
20784 with Ada.Interrupts.Names;
20785
20786 package ConfTest is
20787
20788    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20789    pragma Unreserve_All_Interrupts;
20790    pragma Warnings (On);
20791
20792    protected Process is
20793       procedure Stop;
20794       function Continue return Boolean;
20795       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20796    private
20797       Done : Boolean := False;
20798    end Process;
20799
20800 end ConfTest;
20801 CF_EOF
20802 cat >>conftest.adb <<CF_EOF
20803 package body ConfTest is
20804    protected body Process is
20805       procedure Stop is
20806       begin
20807          Done := True;
20808       end Stop;
20809       function Continue return Boolean is
20810       begin
20811          return not Done;
20812       end Continue;
20813    end Process;
20814 end ConfTest;
20815 CF_EOF
20816 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20817       cf_cv_gnat_sigint=yes
20818 else
20819    cf_cv_gnat_sigint=no
20820 fi
20821 rm -rf conftest* *~conftest*
20822
20823 fi
20824 echo "$as_me:20824: result: $cf_cv_gnat_sigint" >&5
20825 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20826
20827 if test $cf_cv_gnat_sigint = yes ; then
20828         USE_GNAT_SIGINT=""
20829 else
20830         USE_GNAT_SIGINT="#"
20831 fi
20832
20833 cf_gnat_libraries=no
20834 cf_gnat_projects=no
20835
20836 if test "$enable_gnat_projects" != no ; then
20837 echo "$as_me:20837: checking if GNAT supports project files" >&5
20838 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20839 case $cf_gnat_version in
20840 (3.[0-9]*)
20841         ;;
20842 (*)
20843         case $cf_cv_system_name in
20844         (cygwin*|msys*)
20845                 ;;
20846         (*)
20847                 mkdir conftest.src conftest.bin conftest.lib
20848                 cd conftest.src
20849                 rm -rf conftest* *~conftest*
20850                 cat >>library.gpr <<CF_EOF
20851 project Library is
20852   Kind := External ("LIB_KIND");
20853   for Library_Name use "ConfTest";
20854   for Object_Dir use ".";
20855   for Library_ALI_Dir use External("LIBRARY_DIR");
20856   for Library_Version use External ("SONAME");
20857   for Library_Kind use Kind;
20858   for Library_Dir use External("BUILD_DIR");
20859   Source_Dir := External ("SOURCE_DIR");
20860   for Source_Dirs use (Source_Dir);
20861 end Library;
20862 CF_EOF
20863                 cat >>confpackage.ads <<CF_EOF
20864 package ConfPackage is
20865    procedure conftest;
20866 end ConfPackage;
20867 CF_EOF
20868                 cat >>confpackage.adb <<CF_EOF
20869 with Text_IO;
20870 package body ConfPackage is
20871    procedure conftest is
20872    begin
20873       Text_IO.Put ("Hello World");
20874       Text_IO.New_Line;
20875    end conftest;
20876 end ConfPackage;
20877 CF_EOF
20878                 if ( $cf_ada_make $ADAFLAGS \
20879                                 -Plibrary.gpr \
20880                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20881                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20882                                 -XSOURCE_DIR=`pwd` \
20883                                 -XSONAME=libConfTest.so.1 \
20884                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20885                         cf_gnat_projects=yes
20886                 fi
20887                 cd ..
20888                 if test -f conftest.lib/confpackage.ali
20889                 then
20890                         cf_gnat_libraries=yes
20891                 fi
20892                 rm -rf conftest* *~conftest*
20893                 ;;
20894         esac
20895         ;;
20896 esac
20897 echo "$as_me:20897: result: $cf_gnat_projects" >&5
20898 echo "${ECHO_T}$cf_gnat_projects" >&6
20899 fi # enable_gnat_projects
20900
20901 if test $cf_gnat_projects = yes
20902 then
20903         echo "$as_me:20903: checking if GNAT supports libraries" >&5
20904 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20905         echo "$as_me:20905: result: $cf_gnat_libraries" >&5
20906 echo "${ECHO_T}$cf_gnat_libraries" >&6
20907 fi
20908
20909 if test "$cf_gnat_projects" = yes
20910 then
20911         USE_OLD_MAKERULES="#"
20912         USE_GNAT_PROJECTS=""
20913 else
20914         USE_OLD_MAKERULES=""
20915         USE_GNAT_PROJECTS="#"
20916 fi
20917
20918 if test "$cf_gnat_libraries" = yes
20919 then
20920         USE_GNAT_LIBRARIES=""
20921 else
20922         USE_GNAT_LIBRARIES="#"
20923 fi
20924
20925 echo "$as_me:20925: checking for ada-compiler" >&5
20926 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20927
20928 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20929 if test "${with_ada_compiler+set}" = set; then
20930   withval="$with_ada_compiler"
20931   cf_ada_compiler=$withval
20932 else
20933   cf_ada_compiler=gnatmake
20934 fi;
20935
20936 echo "$as_me:20936: result: $cf_ada_compiler" >&5
20937 echo "${ECHO_T}$cf_ada_compiler" >&6
20938
20939                         cf_ada_package=terminal_interface
20940
20941 echo "$as_me:20941: checking for ada-include" >&5
20942 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20943
20944 # Check whether --with-ada-include or --without-ada-include was given.
20945 if test "${with_ada_include+set}" = set; then
20946   withval="$with_ada_include"
20947
20948 else
20949   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20950 fi; if test -n "$prefix/share/ada/adainclude" ; then
20951
20952 if test "x$prefix" != xNONE; then
20953         cf_path_syntax="$prefix"
20954 else
20955         cf_path_syntax="$ac_default_prefix"
20956 fi
20957
20958 case ".$withval" in
20959 (.\$\(*\)*|.\'*\'*)
20960         ;;
20961 (..|./*|.\\*)
20962         ;;
20963 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20964         ;;
20965 (.\${*prefix}*|.\${*dir}*)
20966         eval withval="$withval"
20967         case ".$withval" in
20968         (.NONE/*)
20969                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20970                 ;;
20971         esac
20972         ;;
20973 (.no|.NONE/*)
20974         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20975         ;;
20976 (*)
20977         { { echo "$as_me:20977: error: expected a pathname, not \"$withval\"" >&5
20978 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20979    { (exit 1); exit 1; }; }
20980         ;;
20981 esac
20982
20983 fi
20984 eval ADA_INCLUDE="$withval"
20985
20986 echo "$as_me:20986: result: $ADA_INCLUDE" >&5
20987 echo "${ECHO_T}$ADA_INCLUDE" >&6
20988
20989 echo "$as_me:20989: checking for ada-objects" >&5
20990 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20991
20992 # Check whether --with-ada-objects or --without-ada-objects was given.
20993 if test "${with_ada_objects+set}" = set; then
20994   withval="$with_ada_objects"
20995
20996 else
20997   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20998 fi; if test -n "$prefix/lib/ada/adalib" ; then
20999
21000 if test "x$prefix" != xNONE; then
21001         cf_path_syntax="$prefix"
21002 else
21003         cf_path_syntax="$ac_default_prefix"
21004 fi
21005
21006 case ".$withval" in
21007 (.\$\(*\)*|.\'*\'*)
21008         ;;
21009 (..|./*|.\\*)
21010         ;;
21011 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21012         ;;
21013 (.\${*prefix}*|.\${*dir}*)
21014         eval withval="$withval"
21015         case ".$withval" in
21016         (.NONE/*)
21017                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21018                 ;;
21019         esac
21020         ;;
21021 (.no|.NONE/*)
21022         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21023         ;;
21024 (*)
21025         { { echo "$as_me:21025: error: expected a pathname, not \"$withval\"" >&5
21026 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21027    { (exit 1); exit 1; }; }
21028         ;;
21029 esac
21030
21031 fi
21032 eval ADA_OBJECTS="$withval"
21033
21034 echo "$as_me:21034: result: $ADA_OBJECTS" >&5
21035 echo "${ECHO_T}$ADA_OBJECTS" >&6
21036
21037 echo "$as_me:21037: checking if an Ada95 shared-library should be built" >&5
21038 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21039
21040 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21041 if test "${with_ada_sharedlib+set}" = set; then
21042   withval="$with_ada_sharedlib"
21043   with_ada_sharedlib=$withval
21044 else
21045   with_ada_sharedlib=no
21046 fi;
21047 echo "$as_me:21047: result: $with_ada_sharedlib" >&5
21048 echo "${ECHO_T}$with_ada_sharedlib" >&6
21049
21050 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21051 MAKE_ADA_SHAREDLIB="#"
21052
21053 if test "x$with_ada_sharedlib" != xno
21054 then
21055         MAKE_ADA_SHAREDLIB=
21056         if test "x$with_ada_sharedlib" != xyes
21057         then
21058                 ADA_SHAREDLIB="$with_ada_sharedlib"
21059         fi
21060 fi
21061
21062                 fi
21063         fi
21064 else
21065         cf_with_ada=no
21066 fi
21067
21068 # do this "late" to avoid conflict with header-checks
21069 if test "x$with_widec" = xyes ; then
21070         echo "$as_me:21070: checking for wchar_t" >&5
21071 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21072 if test "${ac_cv_type_wchar_t+set}" = set; then
21073   echo $ECHO_N "(cached) $ECHO_C" >&6
21074 else
21075   cat >conftest.$ac_ext <<_ACEOF
21076 #line 21076 "configure"
21077 #include "confdefs.h"
21078 $ac_includes_default
21079 int
21080 main ()
21081 {
21082 if ((wchar_t *) 0)
21083   return 0;
21084 if (sizeof (wchar_t))
21085   return 0;
21086   ;
21087   return 0;
21088 }
21089 _ACEOF
21090 rm -f conftest.$ac_objext
21091 if { (eval echo "$as_me:21091: \"$ac_compile\"") >&5
21092   (eval $ac_compile) 2>&5
21093   ac_status=$?
21094   echo "$as_me:21094: \$? = $ac_status" >&5
21095   (exit $ac_status); } &&
21096          { ac_try='test -s conftest.$ac_objext'
21097   { (eval echo "$as_me:21097: \"$ac_try\"") >&5
21098   (eval $ac_try) 2>&5
21099   ac_status=$?
21100   echo "$as_me:21100: \$? = $ac_status" >&5
21101   (exit $ac_status); }; }; then
21102   ac_cv_type_wchar_t=yes
21103 else
21104   echo "$as_me: failed program was:" >&5
21105 cat conftest.$ac_ext >&5
21106 ac_cv_type_wchar_t=no
21107 fi
21108 rm -f conftest.$ac_objext conftest.$ac_ext
21109 fi
21110 echo "$as_me:21110: result: $ac_cv_type_wchar_t" >&5
21111 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21112
21113 echo "$as_me:21113: checking size of wchar_t" >&5
21114 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21115 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21116   echo $ECHO_N "(cached) $ECHO_C" >&6
21117 else
21118   if test "$ac_cv_type_wchar_t" = yes; then
21119   if test "$cross_compiling" = yes; then
21120   # Depending upon the size, compute the lo and hi bounds.
21121 cat >conftest.$ac_ext <<_ACEOF
21122 #line 21122 "configure"
21123 #include "confdefs.h"
21124 $ac_includes_default
21125 int
21126 main ()
21127 {
21128 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21129   ;
21130   return 0;
21131 }
21132 _ACEOF
21133 rm -f conftest.$ac_objext
21134 if { (eval echo "$as_me:21134: \"$ac_compile\"") >&5
21135   (eval $ac_compile) 2>&5
21136   ac_status=$?
21137   echo "$as_me:21137: \$? = $ac_status" >&5
21138   (exit $ac_status); } &&
21139          { ac_try='test -s conftest.$ac_objext'
21140   { (eval echo "$as_me:21140: \"$ac_try\"") >&5
21141   (eval $ac_try) 2>&5
21142   ac_status=$?
21143   echo "$as_me:21143: \$? = $ac_status" >&5
21144   (exit $ac_status); }; }; then
21145   ac_lo=0 ac_mid=0
21146   while :; do
21147     cat >conftest.$ac_ext <<_ACEOF
21148 #line 21148 "configure"
21149 #include "confdefs.h"
21150 $ac_includes_default
21151 int
21152 main ()
21153 {
21154 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21155   ;
21156   return 0;
21157 }
21158 _ACEOF
21159 rm -f conftest.$ac_objext
21160 if { (eval echo "$as_me:21160: \"$ac_compile\"") >&5
21161   (eval $ac_compile) 2>&5
21162   ac_status=$?
21163   echo "$as_me:21163: \$? = $ac_status" >&5
21164   (exit $ac_status); } &&
21165          { ac_try='test -s conftest.$ac_objext'
21166   { (eval echo "$as_me:21166: \"$ac_try\"") >&5
21167   (eval $ac_try) 2>&5
21168   ac_status=$?
21169   echo "$as_me:21169: \$? = $ac_status" >&5
21170   (exit $ac_status); }; }; then
21171   ac_hi=$ac_mid; break
21172 else
21173   echo "$as_me: failed program was:" >&5
21174 cat conftest.$ac_ext >&5
21175 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21176 fi
21177 rm -f conftest.$ac_objext conftest.$ac_ext
21178   done
21179 else
21180   echo "$as_me: failed program was:" >&5
21181 cat conftest.$ac_ext >&5
21182 ac_hi=-1 ac_mid=-1
21183   while :; do
21184     cat >conftest.$ac_ext <<_ACEOF
21185 #line 21185 "configure"
21186 #include "confdefs.h"
21187 $ac_includes_default
21188 int
21189 main ()
21190 {
21191 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21192   ;
21193   return 0;
21194 }
21195 _ACEOF
21196 rm -f conftest.$ac_objext
21197 if { (eval echo "$as_me:21197: \"$ac_compile\"") >&5
21198   (eval $ac_compile) 2>&5
21199   ac_status=$?
21200   echo "$as_me:21200: \$? = $ac_status" >&5
21201   (exit $ac_status); } &&
21202          { ac_try='test -s conftest.$ac_objext'
21203   { (eval echo "$as_me:21203: \"$ac_try\"") >&5
21204   (eval $ac_try) 2>&5
21205   ac_status=$?
21206   echo "$as_me:21206: \$? = $ac_status" >&5
21207   (exit $ac_status); }; }; then
21208   ac_lo=$ac_mid; break
21209 else
21210   echo "$as_me: failed program was:" >&5
21211 cat conftest.$ac_ext >&5
21212 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21213 fi
21214 rm -f conftest.$ac_objext conftest.$ac_ext
21215   done
21216 fi
21217 rm -f conftest.$ac_objext conftest.$ac_ext
21218 # Binary search between lo and hi bounds.
21219 while test "x$ac_lo" != "x$ac_hi"; do
21220   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21221   cat >conftest.$ac_ext <<_ACEOF
21222 #line 21222 "configure"
21223 #include "confdefs.h"
21224 $ac_includes_default
21225 int
21226 main ()
21227 {
21228 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21229   ;
21230   return 0;
21231 }
21232 _ACEOF
21233 rm -f conftest.$ac_objext
21234 if { (eval echo "$as_me:21234: \"$ac_compile\"") >&5
21235   (eval $ac_compile) 2>&5
21236   ac_status=$?
21237   echo "$as_me:21237: \$? = $ac_status" >&5
21238   (exit $ac_status); } &&
21239          { ac_try='test -s conftest.$ac_objext'
21240   { (eval echo "$as_me:21240: \"$ac_try\"") >&5
21241   (eval $ac_try) 2>&5
21242   ac_status=$?
21243   echo "$as_me:21243: \$? = $ac_status" >&5
21244   (exit $ac_status); }; }; then
21245   ac_hi=$ac_mid
21246 else
21247   echo "$as_me: failed program was:" >&5
21248 cat conftest.$ac_ext >&5
21249 ac_lo=`expr $ac_mid + 1`
21250 fi
21251 rm -f conftest.$ac_objext conftest.$ac_ext
21252 done
21253 ac_cv_sizeof_wchar_t=$ac_lo
21254 else
21255   if test "$cross_compiling" = yes; then
21256   { { echo "$as_me:21256: error: cannot run test program while cross compiling" >&5
21257 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21258    { (exit 1); exit 1; }; }
21259 else
21260   cat >conftest.$ac_ext <<_ACEOF
21261 #line 21261 "configure"
21262 #include "confdefs.h"
21263 $ac_includes_default
21264 int
21265 main ()
21266 {
21267 FILE *f = fopen ("conftest.val", "w");
21268 if (!f)
21269   $ac_main_return (1);
21270 fprintf (f, "%d", (sizeof (wchar_t)));
21271 fclose (f);
21272   ;
21273   return 0;
21274 }
21275 _ACEOF
21276 rm -f conftest$ac_exeext
21277 if { (eval echo "$as_me:21277: \"$ac_link\"") >&5
21278   (eval $ac_link) 2>&5
21279   ac_status=$?
21280   echo "$as_me:21280: \$? = $ac_status" >&5
21281   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21282   { (eval echo "$as_me:21282: \"$ac_try\"") >&5
21283   (eval $ac_try) 2>&5
21284   ac_status=$?
21285   echo "$as_me:21285: \$? = $ac_status" >&5
21286   (exit $ac_status); }; }; then
21287   ac_cv_sizeof_wchar_t=`cat conftest.val`
21288 else
21289   echo "$as_me: program exited with status $ac_status" >&5
21290 echo "$as_me: failed program was:" >&5
21291 cat conftest.$ac_ext >&5
21292 fi
21293 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21294 fi
21295 fi
21296 rm -f conftest.val
21297 else
21298   ac_cv_sizeof_wchar_t=0
21299 fi
21300 fi
21301 echo "$as_me:21301: result: $ac_cv_sizeof_wchar_t" >&5
21302 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21303 cat >>confdefs.h <<EOF
21304 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21305 EOF
21306
21307 fi
21308
21309 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21310 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21311 ###
21312 ### ticlib modules may be a separate library, otherwise contained in termlib.
21313 ### termlib modules may be a separate library, otherwise contained in ncurses.
21314 ###
21315 ### The of "+" or " " between the tokens controls the way the script
21316 ### chooses to split module lists into libraries.
21317 ###
21318 ### (see CF_LIB_RULES).
21319 echo "$as_me:21319: checking for library subsets" >&5
21320 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21321 LIB_SUBSETS=
21322
21323 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21324         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21325         if test "$with_ticlib" != no ; then
21326                 LIB_SUBSETS="${LIB_SUBSETS} "
21327         else
21328                 LIB_SUBSETS="${LIB_SUBSETS}+"
21329         fi
21330 fi
21331
21332 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21333 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21334
21335 if test "$with_termlib" != no ; then
21336         LIB_SUBSETS="${LIB_SUBSETS} "
21337 else
21338         LIB_SUBSETS="${LIB_SUBSETS}+"
21339 fi
21340
21341 LIB_SUBSETS="${LIB_SUBSETS}base"
21342
21343 # Most term-driver calls are to tinfo, but some like init_pair are to the
21344 # base library (so it resides in base).
21345 if test "$with_term_driver" != no ; then
21346         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21347         case $cf_cv_system_name in
21348         (*mingw32*|*mingw64*)
21349                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21350                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21351                 ;;
21352         (*)
21353                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21354                 ;;
21355         esac
21356 fi
21357
21358 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21359 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21360
21361 echo "$as_me:21361: result: $LIB_SUBSETS" >&5
21362 echo "${ECHO_T}$LIB_SUBSETS" >&6
21363
21364 ### Construct the list of include-directories to be generated
21365
21366 if test "$srcdir" != "."; then
21367         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21368 fi
21369 CPPFLAGS="-I../include $CPPFLAGS"
21370 if test "$srcdir" != "."; then
21371         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21372 fi
21373 CPPFLAGS="-I. $CPPFLAGS"
21374
21375 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21376 if test "$srcdir" != "."; then
21377         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21378 fi
21379 if test "$GCC" != yes; then
21380         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21381 elif test "$includedir" != "/usr/include"; then
21382         if test "$includedir" = '${prefix}/include' ; then
21383                 if test x$prefix != x/usr ; then
21384                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21385                 fi
21386         else
21387                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21388         fi
21389 fi
21390
21391 ### Build up pieces for makefile rules
21392 echo "$as_me:21392: checking default library suffix" >&5
21393 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21394
21395         case $DFT_LWR_MODEL in
21396         (libtool) DFT_ARG_SUFFIX=''   ;;
21397         (normal)  DFT_ARG_SUFFIX=''   ;;
21398         (debug)   DFT_ARG_SUFFIX='_g' ;;
21399         (profile) DFT_ARG_SUFFIX='_p' ;;
21400         (shared)  DFT_ARG_SUFFIX=''   ;;
21401         esac
21402         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21403 echo "$as_me:21403: result: $DFT_ARG_SUFFIX" >&5
21404 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21405
21406 echo "$as_me:21406: checking default library-dependency suffix" >&5
21407 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21408
21409         case X$DFT_LWR_MODEL in
21410         (Xlibtool)
21411                 DFT_LIB_SUFFIX='.la'
21412                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21413                 ;;
21414         (Xdebug)
21415                 DFT_LIB_SUFFIX='_g.a'
21416                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21417                 ;;
21418         (Xprofile)
21419                 DFT_LIB_SUFFIX='_p.a'
21420                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21421                 ;;
21422         (Xshared)
21423                 case $cf_cv_system_name in
21424                 (aix[5-7]*)
21425                         DFT_LIB_SUFFIX='.so'
21426                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21427                         ;;
21428                 (cygwin*|msys*|mingw*)
21429                         DFT_LIB_SUFFIX='.dll'
21430                         DFT_DEP_SUFFIX='.dll.a'
21431                         ;;
21432                 (darwin*)
21433                         DFT_LIB_SUFFIX='.dylib'
21434                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21435                         ;;
21436                 (hpux*)
21437                         case $target in
21438                         (ia64*)
21439                                 DFT_LIB_SUFFIX='.so'
21440                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21441                                 ;;
21442                         (*)
21443                                 DFT_LIB_SUFFIX='.sl'
21444                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21445                                 ;;
21446                         esac
21447                         ;;
21448                 (*)
21449                         DFT_LIB_SUFFIX='.so'
21450                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21451                         ;;
21452                 esac
21453                 ;;
21454         (*)
21455                 DFT_LIB_SUFFIX='.a'
21456                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21457                 ;;
21458         esac
21459         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21460         then
21461                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21462                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21463         fi
21464 echo "$as_me:21464: result: $DFT_DEP_SUFFIX" >&5
21465 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21466
21467 echo "$as_me:21467: checking default object directory" >&5
21468 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21469
21470         case $DFT_LWR_MODEL in
21471         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21472         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21473         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21474         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21475         (shared)
21476                 case $cf_cv_system_name in
21477                 (cygwin|msys)
21478                         DFT_OBJ_SUBDIR='objects' ;;
21479                 (*)
21480                         DFT_OBJ_SUBDIR='obj_s' ;;
21481                 esac
21482         esac
21483 echo "$as_me:21483: result: $DFT_OBJ_SUBDIR" >&5
21484 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21485
21486 if test "x$cf_with_cxx" = xyes ; then
21487 echo "$as_me:21487: checking c++ library-dependency suffix" >&5
21488 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21489 if test "$with_libtool" != "no"; then
21490         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21491         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21492 elif test "$with_shared_cxx" != "no"; then
21493         # also for g++ users...
21494         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21495 else
21496         # we normally make a static library because C/C++ library rules differ
21497
21498         case Xnormal in
21499         (Xlibtool)
21500                 CXX_LIB_SUFFIX='.la'
21501                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21502                 ;;
21503         (Xdebug)
21504                 CXX_LIB_SUFFIX='_g.a'
21505                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21506                 ;;
21507         (Xprofile)
21508                 CXX_LIB_SUFFIX='_p.a'
21509                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21510                 ;;
21511         (Xshared)
21512                 case $cf_cv_system_name in
21513                 (aix[5-7]*)
21514                         CXX_LIB_SUFFIX='.so'
21515                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21516                         ;;
21517                 (cygwin*|msys*|mingw*)
21518                         CXX_LIB_SUFFIX='.dll'
21519                         CXX_DEP_SUFFIX='.dll.a'
21520                         ;;
21521                 (darwin*)
21522                         CXX_LIB_SUFFIX='.dylib'
21523                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21524                         ;;
21525                 (hpux*)
21526                         case $target in
21527                         (ia64*)
21528                                 CXX_LIB_SUFFIX='.so'
21529                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21530                                 ;;
21531                         (*)
21532                                 CXX_LIB_SUFFIX='.sl'
21533                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21534                                 ;;
21535                         esac
21536                         ;;
21537                 (*)
21538                         CXX_LIB_SUFFIX='.so'
21539                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21540                         ;;
21541                 esac
21542                 ;;
21543         (*)
21544                 CXX_LIB_SUFFIX='.a'
21545                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21546                 ;;
21547         esac
21548         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21549         then
21550                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21551                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21552         fi
21553
21554 fi
21555 echo "$as_me:21555: result: $CXX_LIB_SUFFIX" >&5
21556 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21557
21558 fi
21559
21560 # do not want -ldl in build except as needed for -lncurses dependency
21561 if test "x$with_dlsym" = xyes ; then
21562 if test $DFT_LWR_MODEL = shared || \
21563    test $DFT_LWR_MODEL = libtool ; then
21564
21565 # remove dl library from $LIBS
21566 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21567
21568 fi
21569 fi
21570 ### Set up low-level terminfo dependencies for makefiles.
21571
21572 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21573 # do not need libdl
21574 TICS_LIST=
21575 if test "x$with_dlsym" = xyes ; then
21576
21577 # remove dl library from $SHLIB_LIST
21578 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21579
21580 fi
21581
21582 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21583 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21584 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21585 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21586 then
21587         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21588 fi
21589
21590 if test "$with_ticlib" != no ; then
21591
21592         if test "x$with_ticlib" != xyes ; then
21593                 TICS_NAME=$with_ticlib
21594                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21595                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21596                 TICS_LIB_SUFFIX="${with_ticlib}"
21597         else
21598                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21599                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21600                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21601         fi
21602         TICS_LDFLAGS="-L${LIB_DIR}"
21603         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21604 else
21605         TICS_LDFLAGS="-L${LIB_DIR}"
21606         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21607 fi
21608
21609 if test "$with_termlib" != no ; then
21610
21611         if test "x$with_termlib" != xyes ; then
21612                 TINFO_NAME=$with_termlib
21613                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21614                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21615                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21616                 TINFO_LIB_SUFFIX="${with_termlib}"
21617         else
21618                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21619                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21620                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21621                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21622         fi
21623
21624         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21625         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21626         if test "$DFT_LWR_MODEL" = "libtool"; then
21627                 TEST_ARGS="${TEST_DEPS}"
21628                 TEST_ARG2="${TEST_DEP2}"
21629                 TINFO_LDFLAGS="-L${LIB_DIR}"
21630                 TINFO_LIBS="$TEST_ARGS"
21631                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21632                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21633         else
21634                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21635                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21636                 if test "x$with_term_driver" != xno ; then
21637                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21638                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21639                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21640                 else
21641                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21642                         TINFO_LIBS="$TEST_ARGS"
21643                 fi
21644                 TINFO_LDFLAGS="-L${LIB_DIR}"
21645                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21646         fi
21647 else
21648         # the next lines are needed for linking libtic over libncurses
21649         TINFO_NAME=${LIB_NAME}
21650         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21651         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21652         if test "x$with_tic_depends" = xyes ; then
21653                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21654         else
21655                 TICS_LIST="$SHLIB_LIST"
21656         fi
21657
21658         TINFO_LDFLAGS="-L${LIB_DIR}"
21659         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21660 fi
21661
21662 if test "$DFT_LWR_MODEL" = shared ; then
21663         case $cf_cv_system_name in
21664         (cygwin*|msys*)
21665                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21666                 TINFO_SUFFIX=.dll
21667                 ;;
21668         esac
21669 fi
21670
21671 if test "x$with_dlsym" = xyes ; then
21672
21673 # remove dl library from $TICS_LIST
21674 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21675
21676 fi
21677
21678 if test "$DFT_LWR_MODEL" = "libtool"; then
21679         OBJEXT=lo
21680 fi
21681
21682 # needed for Ada95
21683 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21684
21685 case $DFT_LWR_MODEL in
21686 (normal|debug|profile)
21687
21688 if test "$GCC" = yes ; then
21689         case $cf_cv_system_name in
21690         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21691                 LDFLAGS_STATIC=
21692                 LDFLAGS_SHARED=
21693                 ;;
21694         (*)     # normally, except when broken
21695                 LDFLAGS_STATIC=-static
21696                 LDFLAGS_SHARED=-dynamic
21697                 ;;
21698         esac
21699 else
21700         case $cf_cv_system_name in
21701         (aix[4-7]*)     # from ld manpage
21702                 LDFLAGS_STATIC=-bstatic
21703                 LDFLAGS_SHARED=-bdynamic
21704                 ;;
21705         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21706                 # We could also use just "archive" and "shared".
21707                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21708                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21709                 ;;
21710         (irix*)         # from ld manpage IRIX64
21711                 LDFLAGS_STATIC=-Bstatic
21712                 LDFLAGS_SHARED=-Bdynamic
21713                 ;;
21714         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21715                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21716                 LDFLAGS_STATIC=-noso
21717                 LDFLAGS_SHARED=-so_archive
21718                 ;;
21719         (solaris2*)
21720                 LDFLAGS_STATIC=-Bstatic
21721                 LDFLAGS_SHARED=-Bdynamic
21722                 ;;
21723         esac
21724 fi
21725
21726 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21727 then
21728         echo "$as_me:21728: checking if linker supports switching between static/dynamic" >&5
21729 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21730
21731         rm -f libconftest.a
21732         cat >conftest.$ac_ext <<EOF
21733 #line 21733 "configure"
21734 #include <stdio.h>
21735 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21736 EOF
21737         if { (eval echo "$as_me:21737: \"$ac_compile\"") >&5
21738   (eval $ac_compile) 2>&5
21739   ac_status=$?
21740   echo "$as_me:21740: \$? = $ac_status" >&5
21741   (exit $ac_status); } ; then
21742                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21743                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21744         fi
21745         rm -f conftest.*
21746
21747         cf_save_LIBS="$LIBS"
21748
21749         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21750         cat >conftest.$ac_ext <<_ACEOF
21751 #line 21751 "configure"
21752 #include "confdefs.h"
21753
21754 #line 21754 "configure"
21755 #include <stdio.h>
21756 int cf_ldflags_static(FILE *fp);
21757
21758 int
21759 main ()
21760 {
21761
21762         return cf_ldflags_static(stdin);
21763
21764   ;
21765   return 0;
21766 }
21767 _ACEOF
21768 rm -f conftest.$ac_objext conftest$ac_exeext
21769 if { (eval echo "$as_me:21769: \"$ac_link\"") >&5
21770   (eval $ac_link) 2>&5
21771   ac_status=$?
21772   echo "$as_me:21772: \$? = $ac_status" >&5
21773   (exit $ac_status); } &&
21774          { ac_try='test -s conftest$ac_exeext'
21775   { (eval echo "$as_me:21775: \"$ac_try\"") >&5
21776   (eval $ac_try) 2>&5
21777   ac_status=$?
21778   echo "$as_me:21778: \$? = $ac_status" >&5
21779   (exit $ac_status); }; }; then
21780
21781         # some linkers simply ignore the -dynamic
21782         case x`file conftest$ac_exeext 2>/dev/null` in
21783         (*static*)
21784                 cf_ldflags_static=no
21785                 ;;
21786         (*)
21787                 cf_ldflags_static=yes
21788                 ;;
21789         esac
21790
21791 else
21792   echo "$as_me: failed program was:" >&5
21793 cat conftest.$ac_ext >&5
21794 cf_ldflags_static=no
21795 fi
21796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21797
21798         rm -f libconftest.*
21799         LIBS="$cf_save_LIBS"
21800
21801         echo "$as_me:21801: result: $cf_ldflags_static" >&5
21802 echo "${ECHO_T}$cf_ldflags_static" >&6
21803
21804         if test $cf_ldflags_static != yes
21805         then
21806                 LDFLAGS_STATIC=
21807                 LDFLAGS_SHARED=
21808         fi
21809 else
21810         LDFLAGS_STATIC=
21811         LDFLAGS_SHARED=
21812 fi
21813
21814         ;;
21815 esac
21816
21817 echo "$as_me:21817: checking where we will install curses.h" >&5
21818 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21819
21820 includesubdir=
21821 if test "$with_overwrite" = no && \
21822  ( test "x$includedir" = 'x${prefix}/include' || \
21823    test "x$includedir" = "x${prefix}/include" )
21824 then
21825         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21826 fi
21827 echo "$as_me:21827: result: ${includedir}${includesubdir}" >&5
21828 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21829
21830 ### Resolve a conflict between normal and wide-curses by forcing applications
21831 ### that will need libutf8 to add it to their configure script.
21832 if test "$with_overwrite" != no ; then
21833 if test "$NCURSES_LIBUTF8" = 1 ; then
21834         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21835         { echo "$as_me:21835: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21836 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21837 fi
21838 fi
21839 WITH_OVERWRITE=$with_overwrite
21840
21841 # used to separate tack out of the tree
21842 NCURSES_TREE=
21843
21844 ### predefined stuff for the test programs
21845
21846 cat >>confdefs.h <<\EOF
21847 #define HAVE_SLK_COLOR 1
21848 EOF
21849
21850 ### Construct the list of subdirectories for which we'll customize makefiles
21851 ### with the appropriate compile-rules.
21852
21853 echo "$as_me:21853: checking for src modules" >&5
21854 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21855
21856 # dependencies and linker-arguments for test-programs
21857 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21858 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21859 if test "$DFT_LWR_MODEL" = "libtool"; then
21860         TEST_ARGS="${TEST_DEPS}"
21861         TEST_ARG2="${TEST_DEP2}"
21862 else
21863         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21864         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21865 fi
21866
21867 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21868 cf_cv_src_modules=
21869 for cf_dir in $modules_to_build
21870 do
21871         if test -f $srcdir/$cf_dir/modules; then
21872
21873                 # We may/may not have tack in the distribution, though the
21874                 # makefile is.
21875                 if test $cf_dir = tack ; then
21876                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21877                                 continue
21878                         fi
21879                 fi
21880
21881                 if test -z "$cf_cv_src_modules"; then
21882                         cf_cv_src_modules=$cf_dir
21883                 else
21884                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21885                 fi
21886
21887                 # Make the ncurses_cfg.h file record the library interface files as
21888                 # well.  These are header files that are the same name as their
21889                 # directory.  Ncurses is the only library that does not follow
21890                 # that pattern.
21891                 if test $cf_dir = tack ; then
21892                         continue
21893                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21894
21895 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21896
21897                         cat >>confdefs.h <<EOF
21898 #define HAVE_${cf_have_include}_H 1
21899 EOF
21900
21901                         cat >>confdefs.h <<EOF
21902 #define HAVE_LIB${cf_have_include} 1
21903 EOF
21904
21905                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21906                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21907                         if test "$DFT_LWR_MODEL" = "libtool"; then
21908                                 TEST_ARGS="${TEST_DEPS}"
21909                                 TEST_ARG2="${TEST_DEP2}"
21910                         else
21911                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21912                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
21913                         fi
21914                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
21915                 fi
21916         fi
21917 done
21918 echo "$as_me:21918: result: $cf_cv_src_modules" >&5
21919 echo "${ECHO_T}$cf_cv_src_modules" >&6
21920
21921 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21922 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21923
21924 SRC_SUBDIRS=
21925 if test "x$cf_with_manpages" != xno ; then
21926         SRC_SUBDIRS="$SRC_SUBDIRS man"
21927 fi
21928 SRC_SUBDIRS="$SRC_SUBDIRS include"
21929 for cf_dir in $cf_cv_src_modules
21930 do
21931         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21932 done
21933 if test "x$cf_with_tests" != "xno" ; then
21934         SRC_SUBDIRS="$SRC_SUBDIRS test"
21935 fi
21936 # always make this, to install the ncurses-config script
21937 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21938 if test "$cf_with_cxx_binding" != no; then
21939         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
21940         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21941 fi
21942
21943 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21944 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21945
21946 ADA_SUBDIRS=
21947 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21948         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21949         ADA_SUBDIRS="gen src"
21950         if test "x$cf_with_tests" != "xno" ; then
21951                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21952         fi
21953 fi
21954
21955 SUB_MAKEFILES=
21956 for cf_dir in $SRC_SUBDIRS
21957 do
21958         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21959 done
21960
21961 if test -n "$ADA_SUBDIRS"; then
21962         for cf_dir in $ADA_SUBDIRS
21963         do
21964                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21965         done
21966
21967 fi
21968
21969 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21970    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21971    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
21972 fi
21973
21974 DIRS_TO_MAKE="lib"
21975 for cf_item in $cf_list_models
21976 do
21977
21978         case $cf_item in
21979         (libtool) cf_subdir='obj_lo'  ;;
21980         (normal)  cf_subdir='objects' ;;
21981         (debug)   cf_subdir='obj_g' ;;
21982         (profile) cf_subdir='obj_p' ;;
21983         (shared)
21984                 case $cf_cv_system_name in
21985                 (cygwin|msys)
21986                         cf_subdir='objects' ;;
21987                 (*)
21988                         cf_subdir='obj_s' ;;
21989                 esac
21990         esac
21991
21992         for cf_item2 in $DIRS_TO_MAKE
21993         do
21994                 test $cf_item2 = $cf_subdir && break
21995         done
21996         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21997 done
21998 for cf_dir in $DIRS_TO_MAKE
21999 do
22000         test ! -d $cf_dir && mkdir $cf_dir
22001 done
22002
22003 # symbols that differ when compiling Ada95 by itself.
22004 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22005
22006 # values to use as strings
22007
22008 cat >>confdefs.h <<EOF
22009 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22010 EOF
22011
22012 cat >>confdefs.h <<EOF
22013 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22014 EOF
22015
22016 ### Now that we're done running tests, add the compiler-warnings, if any
22017
22018 cf_fix_cppflags=no
22019 cf_new_cflags=
22020 cf_new_cppflags=
22021 cf_new_extra_cppflags=
22022
22023 for cf_add_cflags in $EXTRA_CFLAGS
22024 do
22025 case $cf_fix_cppflags in
22026 (no)
22027         case $cf_add_cflags in
22028         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22029                 case $cf_add_cflags in
22030                 (-D*)
22031                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22032
22033                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22034                                 && test -z "${cf_tst_cflags}" \
22035                                 && cf_fix_cppflags=yes
22036
22037                         if test $cf_fix_cppflags = yes ; then
22038                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22039                                 continue
22040                         elif test "${cf_tst_cflags}" = "\"'" ; then
22041                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22042                                 continue
22043                         fi
22044                         ;;
22045                 esac
22046                 case "$CPPFLAGS" in
22047                 (*$cf_add_cflags)
22048                         ;;
22049                 (*)
22050                         case $cf_add_cflags in
22051                         (-D*)
22052                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22053
22054 CPPFLAGS=`echo "$CPPFLAGS" | \
22055         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22056                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22057
22058                                 ;;
22059                         esac
22060                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22061                         ;;
22062                 esac
22063                 ;;
22064         (*)
22065                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22066                 ;;
22067         esac
22068         ;;
22069 (yes)
22070         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22071
22072         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22073
22074         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22075                 && test -z "${cf_tst_cflags}" \
22076                 && cf_fix_cppflags=no
22077         ;;
22078 esac
22079 done
22080
22081 if test -n "$cf_new_cflags" ; then
22082
22083         CFLAGS="$CFLAGS $cf_new_cflags"
22084 fi
22085
22086 if test -n "$cf_new_cppflags" ; then
22087
22088         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22089 fi
22090
22091 if test -n "$cf_new_extra_cppflags" ; then
22092
22093         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22094 fi
22095
22096 ### Define substitutions for header files to avoid name-pollution
22097
22098 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22099         HAVE_TCGETATTR=1
22100 else
22101         HAVE_TCGETATTR=0
22102 fi
22103
22104 if test "x$ac_cv_header_stdint_h" = xyes ; then
22105         HAVE_STDINT_H=1
22106 else
22107         HAVE_STDINT_H=0
22108 fi
22109
22110 if test "x$ac_cv_header_termio_h" = xyes ; then
22111         HAVE_TERMIO_H=1
22112 else
22113         HAVE_TERMIO_H=0
22114 fi
22115
22116 if test "x$ac_cv_header_termios_h" = xyes ; then
22117         HAVE_TERMIOS_H=1
22118 else
22119         HAVE_TERMIOS_H=0
22120 fi
22121
22122 ################################################################################
22123 test "x$use_database" = xyes && \
22124 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22125
22126 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22127 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22128
22129 if test "x$enable_pc_files" = xyes ; then \
22130 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22131 MAKE_PC_FILES=
22132 else
22133 MAKE_PC_FILES="#"
22134 fi
22135
22136 # Extract the first word of "tic", so it can be a program name with args.
22137 set dummy tic; ac_word=$2
22138 echo "$as_me:22138: checking for $ac_word" >&5
22139 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22140 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22141   echo $ECHO_N "(cached) $ECHO_C" >&6
22142 else
22143   case $TIC_PATH in
22144   [\\/]* | ?:[\\/]*)
22145   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22146   ;;
22147   *)
22148   ac_save_IFS=$IFS; IFS=$ac_path_separator
22149 ac_dummy="$PATH:/usr/local/ncurses/bin"
22150 for ac_dir in $ac_dummy; do
22151   IFS=$ac_save_IFS
22152   test -z "$ac_dir" && ac_dir=.
22153   if $as_executable_p "$ac_dir/$ac_word"; then
22154    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22155    echo "$as_me:22155: found $ac_dir/$ac_word" >&5
22156    break
22157 fi
22158 done
22159
22160   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22161   ;;
22162 esac
22163 fi
22164 TIC_PATH=$ac_cv_path_TIC_PATH
22165
22166 if test -n "$TIC_PATH"; then
22167   echo "$as_me:22167: result: $TIC_PATH" >&5
22168 echo "${ECHO_T}$TIC_PATH" >&6
22169 else
22170   echo "$as_me:22170: result: no" >&5
22171 echo "${ECHO_T}no" >&6
22172 fi
22173
22174 if test -n "$FALLBACK_LIST"
22175 then
22176         if test "$TIC_PATH" = unknown
22177         then
22178                 { echo "$as_me:22178: WARNING: no tic program found for fallbacks" >&5
22179 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22180         fi
22181 fi
22182
22183 if test "x$cf_with_tests" != xno ; then
22184         MAKE_TESTS=
22185 else
22186         MAKE_TESTS="#"
22187 fi
22188
22189 ADAHTML_DIR=../../doc/html/ada
22190
22191 # these could be configurable, but are not currently
22192 PANEL_NAME=panel
22193 MENU_NAME=menu
22194 FORM_NAME=form
22195 CXX_NAME=ncurses++
22196
22197 # workaround for g++ versus Solaris (20131116)
22198 case $cf_cv_system_name in
22199 (solaris2*)
22200         case "x$CPPFLAGS" in
22201         (*-D_XOPEN_SOURCE_EXTENDED*)
22202                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22203
22204 echo "${as_me:-configure}:22204: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22205
22206                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22207                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22208                 ;;
22209         esac
22210         ;;
22211 esac
22212
22213 # Help to automatically enable the extended curses features when using either
22214 # the *-config or the ".pc" files by adding defines.
22215 echo "$as_me:22215: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22216 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22217 PKG_CFLAGS=
22218 for cf_loop1 in $CPPFLAGS_after_XOPEN
22219 do
22220         cf_found=no
22221         for cf_loop2 in $CPPFLAGS_before_XOPEN
22222         do
22223                 if test "x$cf_loop1" = "x$cf_loop2"
22224                 then
22225                         cf_found=yes
22226                         break
22227                 fi
22228         done
22229         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22230 done
22231 echo "$as_me:22231: result: $PKG_CFLAGS" >&5
22232 echo "${ECHO_T}$PKG_CFLAGS" >&6
22233
22234 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22235 case "x$NCURSES_OSPEED" in
22236 (*short*)
22237         cf_compatible=1
22238         ;;
22239 (*)
22240         cf_compatible=0
22241         ;;
22242 esac
22243
22244 cat >>confdefs.h <<EOF
22245 #define NCURSES_OSPEED_COMPAT $cf_compatible
22246 EOF
22247
22248 case "x$cf_cv_typeof_chtype" in
22249 (xshort|xint|xlong)
22250         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22251         ;;
22252 esac
22253
22254 case "x$cf_cv_typeof_mmask_t" in
22255 (xshort|xint|xlong)
22256         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22257         ;;
22258 esac
22259
22260 # substitute into misc/Makefile to suppress
22261 # (un)install.data from the
22262 # (un)install rules.
22263 if test "x$cf_with_db_install" = "xno"; then
22264         MISC_INSTALL_DATA=
22265         MISC_UNINSTALL_DATA=
22266 else
22267         MISC_INSTALL_DATA=install.data
22268         MISC_UNINSTALL_DATA=uninstall.data
22269 fi
22270
22271 SUB_SCRIPTS=
22272
22273 if test -n "$PACKAGE"
22274 then
22275         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22276         export PACKAGE
22277         echo "package: $PACKAGE"
22278 fi
22279
22280 UNALTERED_SYMS=
22281 cf_filter_syms=no
22282
22283 if test -n "$RESULTING_SYMS"
22284 then
22285         cf_filter_syms=$cf_dft_filter_syms
22286         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22287
22288 echo "${as_me:-configure}:22288: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22289
22290 fi
22291
22292 if test "x$WILDCARD_SYMS" = xno
22293 then
22294         cf_filter_syms=yes
22295 fi
22296
22297 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22298 if test $cf_filter_syms = yes
22299 then
22300         RESULTING_SYMS=resulting.map
22301 fi
22302
22303 if test "x$cross_compiling" = xyes ; then
22304         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22305 else
22306         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22307 fi
22308
22309 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"
22310 ac_config_commands="$ac_config_commands default"
22311 cat >confcache <<\_ACEOF
22312 # This file is a shell script that caches the results of configure
22313 # tests run on this system so they can be shared between configure
22314 # scripts and configure runs, see configure's option --config-cache.
22315 # It is not useful on other systems.  If it contains results you don't
22316 # want to keep, you may remove or edit it.
22317 #
22318 # config.status only pays attention to the cache file if you give it
22319 # the --recheck option to rerun configure.
22320 #
22321 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22322 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22323 # following values.
22324
22325 _ACEOF
22326
22327 # The following way of writing the cache mishandles newlines in values,
22328 # but we know of no workaround that is simple, portable, and efficient.
22329 # So, don't put newlines in cache variables' values.
22330 # Ultrix sh set writes to stderr and can't be redirected directly,
22331 # and sets the high bit in the cache file unless we assign to the vars.
22332 {
22333   (set) 2>&1 |
22334     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22335     *ac_space=\ *)
22336       # `set' does not quote correctly, so add quotes (double-quote
22337       # substitution turns \\\\ into \\, and sed turns \\ into \).
22338       sed -n \
22339         "s/'/'\\\\''/g;
22340           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22341       ;;
22342     *)
22343       # `set' quotes correctly as required by POSIX, so do not add quotes.
22344       sed -n \
22345         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22346       ;;
22347     esac;
22348 } |
22349   sed '
22350      t clear
22351      : clear
22352      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22353      t end
22354      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22355      : end' >>confcache
22356 if cmp -s $cache_file confcache; then :; else
22357   if test -w $cache_file; then
22358     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22359     cat confcache >$cache_file
22360   else
22361     echo "not updating unwritable cache $cache_file"
22362   fi
22363 fi
22364 rm -f confcache
22365
22366 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22367 # Let make expand exec_prefix.
22368 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22369
22370 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22371 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22372 # trailing colons and then remove the whole line if VPATH becomes empty
22373 # (actually we leave an empty line to preserve line numbers).
22374 if test "x$srcdir" = x.; then
22375   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22376 s/:*\$(srcdir):*/:/;
22377 s/:*\${srcdir}:*/:/;
22378 s/:*@srcdir@:*/:/;
22379 s/^\([^=]*=[    ]*\):*/\1/;
22380 s/:*$//;
22381 s/^[^=]*=[      ]*$//;
22382 }'
22383 fi
22384
22385 DEFS=-DHAVE_CONFIG_H
22386
22387 : ${CONFIG_STATUS=./config.status}
22388 ac_clean_files_save=$ac_clean_files
22389 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22390 { echo "$as_me:22390: creating $CONFIG_STATUS" >&5
22391 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22392 cat >$CONFIG_STATUS <<_ACEOF
22393 #! $SHELL
22394 # Generated automatically by configure.
22395 # Run this file to recreate the current configuration.
22396 # Compiler output produced by configure, useful for debugging
22397 # configure, is in config.log if it exists.
22398
22399 debug=false
22400 SHELL=\${CONFIG_SHELL-$SHELL}
22401 ac_cs_invocation="\$0 \$@"
22402
22403 _ACEOF
22404
22405 cat >>$CONFIG_STATUS <<\_ACEOF
22406 # Be Bourne compatible
22407 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22408   emulate sh
22409   NULLCMD=:
22410 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22411   set -o posix
22412 fi
22413
22414 # Name of the executable.
22415 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22416
22417 if expr a : '\(a\)' >/dev/null 2>&1; then
22418   as_expr=expr
22419 else
22420   as_expr=false
22421 fi
22422
22423 rm -f conf$$ conf$$.exe conf$$.file
22424 echo >conf$$.file
22425 if ln -s conf$$.file conf$$ 2>/dev/null; then
22426   # We could just check for DJGPP; but this test a) works b) is more generic
22427   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22428   if test -f conf$$.exe; then
22429     # Don't use ln at all; we don't have any links
22430     as_ln_s='cp -p'
22431   else
22432     as_ln_s='ln -s'
22433   fi
22434 elif ln conf$$.file conf$$ 2>/dev/null; then
22435   as_ln_s=ln
22436 else
22437   as_ln_s='cp -p'
22438 fi
22439 rm -f conf$$ conf$$.exe conf$$.file
22440
22441 as_executable_p="test -f"
22442
22443 # Support unset when possible.
22444 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22445   as_unset=unset
22446 else
22447   as_unset=false
22448 fi
22449
22450 # NLS nuisances.
22451 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22452 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22453 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22454 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22455 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22456 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22457 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22458 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22459
22460 # IFS
22461 # We need space, tab and new line, in precisely that order.
22462 as_nl='
22463 '
22464 IFS="   $as_nl"
22465
22466 # CDPATH.
22467 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22468
22469 exec 6>&1
22470
22471 _ACEOF
22472
22473 # Files that config.status was made for.
22474 if test -n "$ac_config_files"; then
22475   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22476 fi
22477
22478 if test -n "$ac_config_headers"; then
22479   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22480 fi
22481
22482 if test -n "$ac_config_links"; then
22483   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22484 fi
22485
22486 if test -n "$ac_config_commands"; then
22487   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22488 fi
22489
22490 cat >>$CONFIG_STATUS <<\EOF
22491
22492 ac_cs_usage="\
22493 \`$as_me' instantiates files from templates according to the
22494 current configuration.
22495
22496 Usage: $0 [OPTIONS] [FILE]...
22497
22498   -h, --help       print this help, then exit
22499   -V, --version    print version number, then exit
22500   -d, --debug      don't remove temporary files
22501       --recheck    update $as_me by reconfiguring in the same conditions
22502   --file=FILE[:TEMPLATE]
22503                    instantiate the configuration file FILE
22504   --header=FILE[:TEMPLATE]
22505                    instantiate the configuration header FILE
22506
22507 Configuration files:
22508 $config_files
22509
22510 Configuration headers:
22511 $config_headers
22512
22513 Configuration commands:
22514 $config_commands
22515
22516 Report bugs to <dickey@invisible-island.net>."
22517 EOF
22518
22519 cat >>$CONFIG_STATUS <<EOF
22520 ac_cs_version="\\
22521 config.status
22522 configured by $0, generated by GNU Autoconf 2.52.20141204,
22523   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22524
22525 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22526 Free Software Foundation, Inc.
22527 This config.status script is free software; the Free Software Foundation
22528 gives unlimited permission to copy, distribute and modify it."
22529 srcdir=$srcdir
22530 INSTALL="$INSTALL"
22531 EOF
22532
22533 cat >>$CONFIG_STATUS <<\EOF
22534 # If no file are specified by the user, then we need to provide default
22535 # value.  By we need to know if files were specified by the user.
22536 ac_need_defaults=:
22537 while test $# != 0
22538 do
22539   case $1 in
22540   --*=*)
22541     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22542     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22543     shift
22544     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22545     shift
22546     ;;
22547   -*);;
22548   *) # This is not an option, so the user has probably given explicit
22549      # arguments.
22550      ac_need_defaults=false;;
22551   esac
22552
22553   case $1 in
22554   # Handling of the options.
22555 EOF
22556 cat >>$CONFIG_STATUS <<EOF
22557   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22558     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22559     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22560 EOF
22561 cat >>$CONFIG_STATUS <<\EOF
22562   --version | --vers* | -V )
22563     echo "$ac_cs_version"; exit 0 ;;
22564   --he | --h)
22565     # Conflict between --help and --header
22566     { { echo "$as_me:22566: error: ambiguous option: $1
22567 Try \`$0 --help' for more information." >&5
22568 echo "$as_me: error: ambiguous option: $1
22569 Try \`$0 --help' for more information." >&2;}
22570    { (exit 1); exit 1; }; };;
22571   --help | --hel | -h )
22572     echo "$ac_cs_usage"; exit 0 ;;
22573   --debug | --d* | -d )
22574     debug=: ;;
22575   --file | --fil | --fi | --f )
22576     shift
22577     CONFIG_FILES="$CONFIG_FILES $1"
22578     ac_need_defaults=false;;
22579   --header | --heade | --head | --hea )
22580     shift
22581     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22582     ac_need_defaults=false;;
22583
22584   # This is an error.
22585   -*) { { echo "$as_me:22585: error: unrecognized option: $1
22586 Try \`$0 --help' for more information." >&5
22587 echo "$as_me: error: unrecognized option: $1
22588 Try \`$0 --help' for more information." >&2;}
22589    { (exit 1); exit 1; }; } ;;
22590
22591   *) ac_config_targets="$ac_config_targets $1" ;;
22592
22593   esac
22594   shift
22595 done
22596
22597 exec 5>>config.log
22598 cat >&5 << _ACEOF
22599
22600 ## ----------------------- ##
22601 ## Running config.status.  ##
22602 ## ----------------------- ##
22603
22604 This file was extended by $as_me 2.52.20141204, executed with
22605   CONFIG_FILES    = $CONFIG_FILES
22606   CONFIG_HEADERS  = $CONFIG_HEADERS
22607   CONFIG_LINKS    = $CONFIG_LINKS
22608   CONFIG_COMMANDS = $CONFIG_COMMANDS
22609   > $ac_cs_invocation
22610 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22611
22612 _ACEOF
22613 EOF
22614
22615 cat >>$CONFIG_STATUS <<EOF
22616 #
22617 # INIT-COMMANDS section.
22618 #
22619
22620 ### Special initialization commands, used to pass information from the
22621 ### configuration-run into config.status
22622
22623 AWK="$AWK"
22624 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22625 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22626 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22627 ECHO_LD="$ECHO_LD"
22628 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22629 LDCONFIG="$LDCONFIG"
22630 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22631 LIB_NAME="$LIB_NAME"
22632 LIB_PREFIX="$LIB_PREFIX"
22633 LIB_SUBSETS="$LIB_SUBSETS"
22634 LIB_SUFFIX="$LIB_SUFFIX"
22635 LIB_TRACING="$LIB_TRACING"
22636 LN_S="$LN_S"
22637 MAKE_TERMINFO="$MAKE_TERMINFO"
22638 NCURSES_MAJOR="$NCURSES_MAJOR"
22639 NCURSES_MINOR="$NCURSES_MINOR"
22640 NCURSES_OSPEED="$NCURSES_OSPEED"
22641 NCURSES_PATCH="$NCURSES_PATCH"
22642 SRC_SUBDIRS="$SRC_SUBDIRS"
22643 TERMINFO="$TERMINFO"
22644 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22645 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22646 TICS_NAME="$TICS_NAME"
22647 TIC_PATH="$TIC_PATH"
22648 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22649 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22650 TINFO_NAME="$TINFO_NAME"
22651 TINFO_SUFFIX="$TINFO_SUFFIX"
22652 UNALTERED_SYMS="$UNALTERED_SYMS"
22653 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22654 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22655 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22656 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22657 WILDCARD_SYMS="$WILDCARD_SYMS"
22658 WITH_CURSES_H="$with_curses_h"
22659 WITH_ECHO="${enable_echo:=yes}"
22660 WITH_OVERWRITE="$with_overwrite"
22661 cf_LIST_MODELS="$cf_list_models"
22662 cf_cv_abi_version="$cf_cv_abi_version"
22663 cf_cv_do_relink="$cf_cv_do_relink"
22664 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22665 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22666 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22667 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22668 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22669 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22670 cf_cv_rel_version="$cf_cv_rel_version"
22671 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22672 cf_cv_shared_soname='$cf_cv_shared_soname'
22673 cf_cv_shlib_version="$cf_cv_shlib_version"
22674 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22675 cf_cv_system_name="$cf_cv_system_name"
22676 cf_cv_term_driver="$with_term_driver"
22677 cf_with_ada="$cf_with_ada"
22678 cf_with_cxx_binding="$cf_with_cxx_binding"
22679 cf_with_db_install="$cf_with_db_install"
22680 cf_with_manpages="$cf_with_manpages"
22681 cf_with_tests="$cf_with_tests"
22682 host="$host"
22683 target="$target"
22684 with_shared_cxx="$with_shared_cxx"
22685
22686 EOF
22687
22688 cat >>$CONFIG_STATUS <<\EOF
22689 for ac_config_target in $ac_config_targets
22690 do
22691   case "$ac_config_target" in
22692   # Handling of arguments.
22693   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22694   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22695   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22696   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22697   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22698   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22699   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22700   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22701   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22702   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22703   *) { { echo "$as_me:22703: error: invalid argument: $ac_config_target" >&5
22704 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22705    { (exit 1); exit 1; }; };;
22706   esac
22707 done
22708
22709 # If the user did not use the arguments to specify the items to instantiate,
22710 # then the envvar interface is used.  Set only those that are not.
22711 # We use the long form for the default assignment because of an extremely
22712 # bizarre bug on SunOS 4.1.3.
22713 if $ac_need_defaults; then
22714   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22715   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22716   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22717 fi
22718
22719 # Create a temporary directory, and hook for its removal unless debugging.
22720 $debug ||
22721 {
22722   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22723   trap '{ (exit 1); exit 1; }' 1 2 13 15
22724 }
22725
22726 # Create a (secure) tmp directory for tmp files.
22727 : ${TMPDIR=/tmp}
22728 {
22729   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22730   test -n "$tmp" && test -d "$tmp"
22731 }  ||
22732 {
22733   tmp=$TMPDIR/cs$$-$RANDOM
22734   (umask 077 && mkdir $tmp)
22735 } ||
22736 {
22737    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22738    { (exit 1); exit 1; }
22739 }
22740
22741 EOF
22742
22743 cat >>$CONFIG_STATUS <<EOF
22744
22745 #
22746 # CONFIG_FILES section.
22747 #
22748
22749 # No need to generate the scripts if there are no CONFIG_FILES.
22750 # This happens for instance when ./config.status config.h
22751 if test -n "\$CONFIG_FILES"; then
22752   # Protect against being on the right side of a sed subst in config.status.
22753   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22754    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22755 s,@SHELL@,$SHELL,;t t
22756 s,@exec_prefix@,$exec_prefix,;t t
22757 s,@prefix@,$prefix,;t t
22758 s,@program_transform_name@,$program_transform_name,;t t
22759 s,@bindir@,$bindir,;t t
22760 s,@sbindir@,$sbindir,;t t
22761 s,@libexecdir@,$libexecdir,;t t
22762 s,@datarootdir@,$datarootdir,;t t
22763 s,@datadir@,$datadir,;t t
22764 s,@sysconfdir@,$sysconfdir,;t t
22765 s,@sharedstatedir@,$sharedstatedir,;t t
22766 s,@localstatedir@,$localstatedir,;t t
22767 s,@libdir@,$libdir,;t t
22768 s,@includedir@,$includedir,;t t
22769 s,@oldincludedir@,$oldincludedir,;t t
22770 s,@infodir@,$infodir,;t t
22771 s,@mandir@,$mandir,;t t
22772 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22773 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22774 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22775 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22776 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22777 s,@build_alias@,$build_alias,;t t
22778 s,@host_alias@,$host_alias,;t t
22779 s,@target_alias@,$target_alias,;t t
22780 s,@ECHO_C@,$ECHO_C,;t t
22781 s,@ECHO_N@,$ECHO_N,;t t
22782 s,@ECHO_T@,$ECHO_T,;t t
22783 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22784 s,@DEFS@,$DEFS,;t t
22785 s,@LIBS@,$LIBS,;t t
22786 s,@top_builddir@,$top_builddir,;t t
22787 s,@EGREP@,$EGREP,;t t
22788 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22789 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22790 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22791 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22792 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22793 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22794 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22795 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22796 s,@VERSION@,$VERSION,;t t
22797 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22798 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22799 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22800 s,@PACKAGE@,$PACKAGE,;t t
22801 s,@build@,$build,;t t
22802 s,@build_cpu@,$build_cpu,;t t
22803 s,@build_vendor@,$build_vendor,;t t
22804 s,@build_os@,$build_os,;t t
22805 s,@host@,$host,;t t
22806 s,@host_cpu@,$host_cpu,;t t
22807 s,@host_vendor@,$host_vendor,;t t
22808 s,@host_os@,$host_os,;t t
22809 s,@target@,$target,;t t
22810 s,@target_cpu@,$target_cpu,;t t
22811 s,@target_vendor@,$target_vendor,;t t
22812 s,@target_os@,$target_os,;t t
22813 s,@CC@,$CC,;t t
22814 s,@CFLAGS@,$CFLAGS,;t t
22815 s,@LDFLAGS@,$LDFLAGS,;t t
22816 s,@CPPFLAGS@,$CPPFLAGS,;t t
22817 s,@ac_ct_CC@,$ac_ct_CC,;t t
22818 s,@EXEEXT@,$EXEEXT,;t t
22819 s,@OBJEXT@,$OBJEXT,;t t
22820 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22821 s,@CPP@,$CPP,;t t
22822 s,@LDCONFIG@,$LDCONFIG,;t t
22823 s,@CXX@,$CXX,;t t
22824 s,@CXXFLAGS@,$CXXFLAGS,;t t
22825 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22826 s,@AWK@,$AWK,;t t
22827 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22828 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22829 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22830 s,@LINT@,$LINT,;t t
22831 s,@LINT_OPTS@,$LINT_OPTS,;t t
22832 s,@LN_S@,$LN_S,;t t
22833 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22834 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22835 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22836 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22837 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22838 s,@SET_MAKE@,$SET_MAKE,;t t
22839 s,@CTAGS@,$CTAGS,;t t
22840 s,@ETAGS@,$ETAGS,;t t
22841 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22842 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22843 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22844 s,@RANLIB@,$RANLIB,;t t
22845 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22846 s,@LD@,$LD,;t t
22847 s,@ac_ct_LD@,$ac_ct_LD,;t t
22848 s,@AR@,$AR,;t t
22849 s,@ac_ct_AR@,$ac_ct_AR,;t t
22850 s,@NM@,$NM,;t t
22851 s,@ac_ct_NM@,$ac_ct_NM,;t t
22852 s,@ARFLAGS@,$ARFLAGS,;t t
22853 s,@DESTDIR@,$DESTDIR,;t t
22854 s,@BUILD_CC@,$BUILD_CC,;t t
22855 s,@BUILD_CPP@,$BUILD_CPP,;t t
22856 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22857 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22858 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22859 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22860 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22861 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22862 s,@cf_list_models@,$cf_list_models,;t t
22863 s,@ABI_VERSION@,$ABI_VERSION,;t t
22864 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22865 s,@LIBTOOL@,$LIBTOOL,;t t
22866 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22867 s,@LT_UNDEF@,$LT_UNDEF,;t t
22868 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22869 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22870 s,@LIB_CREATE@,$LIB_CREATE,;t t
22871 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22872 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22873 s,@LIB_PREP@,$LIB_PREP,;t t
22874 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22875 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22876 s,@LIB_LINK@,$LIB_LINK,;t t
22877 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22878 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22879 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22880 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22881 s,@TICS_NAME@,$TICS_NAME,;t t
22882 s,@TINFO_NAME@,$TINFO_NAME,;t t
22883 s,@LIB_NAME@,$LIB_NAME,;t t
22884 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22885 s,@CC_G_OPT@,$CC_G_OPT,;t t
22886 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22887 s,@LD_MODEL@,$LD_MODEL,;t t
22888 s,@shlibdir@,$shlibdir,;t t
22889 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22890 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22891 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22892 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22893 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22894 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22895 s,@LINK_PROGS@,$LINK_PROGS,;t t
22896 s,@LINK_TESTS@,$LINK_TESTS,;t t
22897 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22898 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22899 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22900 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22901 s,@RPATH_LIST@,$RPATH_LIST,;t t
22902 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22903 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22904 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22905 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22906 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22907 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
22908 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22909 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22910 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22911 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22912 s,@XTERM_KBS@,$XTERM_KBS,;t t
22913 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22914 s,@TERMINFO@,$TERMINFO,;t t
22915 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22916 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22917 s,@TERMPATH@,$TERMPATH,;t t
22918 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22919 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22920 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22921 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22922 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22923 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22924 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22925 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22926 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22927 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22928 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22929 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22930 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22931 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22932 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22933 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22934 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22935 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22936 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22937 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22938 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22939 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22940 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22941 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22942 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22943 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22944 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22945 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22946 s,@PTHREAD@,$PTHREAD,;t t
22947 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22948 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22949 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22950 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22951 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22952 s,@ECHO_LT@,$ECHO_LT,;t t
22953 s,@ECHO_LD@,$ECHO_LD,;t t
22954 s,@RULE_CC@,$RULE_CC,;t t
22955 s,@SHOW_CC@,$SHOW_CC,;t t
22956 s,@ECHO_CC@,$ECHO_CC,;t t
22957 s,@ECHO_LINK@,$ECHO_LINK,;t t
22958 s,@ADAFLAGS@,$ADAFLAGS,;t t
22959 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22960 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22961 s,@ADA_TRACE@,$ADA_TRACE,;t t
22962 s,@MATH_LIB@,$MATH_LIB,;t t
22963 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22964 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22965 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22966 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22967 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22968 s,@TEST_LIBS@,$TEST_LIBS,;t t
22969 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22970 s,@CXXCPP@,$CXXCPP,;t t
22971 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22972 s,@CXX_AR@,$CXX_AR,;t t
22973 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22974 s,@CXXLIBS@,$CXXLIBS,;t t
22975 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22976 s,@gnat_exists@,$gnat_exists,;t t
22977 s,@M4_exists@,$M4_exists,;t t
22978 s,@cf_ada_make@,$cf_ada_make,;t t
22979 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22980 s,@cf_compile_generics@,$cf_compile_generics,;t t
22981 s,@cf_generic_objects@,$cf_generic_objects,;t t
22982 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22983 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22984 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22985 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22986 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22987 s,@cf_ada_package@,$cf_ada_package,;t t
22988 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22989 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22990 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22991 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22992 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22993 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22994 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22995 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22996 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22997 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
22998 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
22999 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23000 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23001 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23002 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23003 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23004 s,@TICS_LIBS@,$TICS_LIBS,;t t
23005 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23006 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23007 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23008 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23009 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23010 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23011 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23012 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23013 s,@includesubdir@,$includesubdir,;t t
23014 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23015 s,@TICS_LIST@,$TICS_LIST,;t t
23016 s,@TINFO_LIST@,$TINFO_LIST,;t t
23017 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23018 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23019 s,@TEST_ARGS@,$TEST_ARGS,;t t
23020 s,@TEST_DEPS@,$TEST_DEPS,;t t
23021 s,@TEST_ARG2@,$TEST_ARG2,;t t
23022 s,@TEST_DEP2@,$TEST_DEP2,;t t
23023 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23024 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23025 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23026 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23027 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23028 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23029 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23030 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23031 s,@cross_compiling@,$cross_compiling,;t t
23032 s,@TIC_PATH@,$TIC_PATH,;t t
23033 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23034 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23035 s,@PANEL_NAME@,$PANEL_NAME,;t t
23036 s,@MENU_NAME@,$MENU_NAME,;t t
23037 s,@FORM_NAME@,$FORM_NAME,;t t
23038 s,@CXX_NAME@,$CXX_NAME,;t t
23039 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23040 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23041 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23042 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23043 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23044 CEOF
23045
23046 EOF
23047
23048   cat >>$CONFIG_STATUS <<\EOF
23049   # Split the substitutions into bite-sized pieces for seds with
23050   # small command number limits, like on Digital OSF/1 and HP-UX.
23051   ac_max_sed_lines=48
23052   ac_sed_frag=1 # Number of current file.
23053   ac_beg=1 # First line for current file.
23054   ac_end=$ac_max_sed_lines # Line after last line for current file.
23055   ac_more_lines=:
23056   ac_sed_cmds=
23057   while $ac_more_lines; do
23058     if test $ac_beg -gt 1; then
23059       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23060     else
23061       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23062     fi
23063     if test ! -s $tmp/subs.frag; then
23064       ac_more_lines=false
23065     else
23066       # The purpose of the label and of the branching condition is to
23067       # speed up the sed processing (if there are no `@' at all, there
23068       # is no need to browse any of the substitutions).
23069       # These are the two extra sed commands mentioned above.
23070       (echo ':t
23071   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23072       if test -z "$ac_sed_cmds"; then
23073         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23074       else
23075         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23076       fi
23077       ac_sed_frag=`expr $ac_sed_frag + 1`
23078       ac_beg=$ac_end
23079       ac_end=`expr $ac_end + $ac_max_sed_lines`
23080     fi
23081   done
23082   if test -z "$ac_sed_cmds"; then
23083     ac_sed_cmds=cat
23084   fi
23085 fi # test -n "$CONFIG_FILES"
23086
23087 EOF
23088 cat >>$CONFIG_STATUS <<\EOF
23089 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23090   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23091   case $ac_file in
23092   - | *:- | *:-:* ) # input from stdin
23093         cat >$tmp/stdin
23094         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23095         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23096   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23097         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23098   * )   ac_file_in=$ac_file.in ;;
23099   esac
23100
23101   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23102   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23103          X"$ac_file" : 'X\(//\)[^/]' \| \
23104          X"$ac_file" : 'X\(//\)$' \| \
23105          X"$ac_file" : 'X\(/\)' \| \
23106          .     : '\(.\)' 2>/dev/null ||
23107 echo X"$ac_file" |
23108     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23109           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23110           /^X\(\/\/\)$/{ s//\1/; q; }
23111           /^X\(\/\).*/{ s//\1/; q; }
23112           s/.*/./; q'`
23113   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23114     { case "$ac_dir" in
23115   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23116   *)                      as_incr_dir=.;;
23117 esac
23118 as_dummy="$ac_dir"
23119 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23120   case $as_mkdir_dir in
23121     # Skip DOS drivespec
23122     ?:) as_incr_dir=$as_mkdir_dir ;;
23123     *)
23124       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23125       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23126     ;;
23127   esac
23128 done; }
23129
23130     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23131     # A "../" for each directory in $ac_dir_suffix.
23132     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23133   else
23134     ac_dir_suffix= ac_dots=
23135   fi
23136
23137   case $srcdir in
23138   .)  ac_srcdir=.
23139       if test -z "$ac_dots"; then
23140          ac_top_srcdir=.
23141       else
23142          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23143       fi ;;
23144   [\\/]* | ?:[\\/]* )
23145       ac_srcdir=$srcdir$ac_dir_suffix;
23146       ac_top_srcdir=$srcdir ;;
23147   *) # Relative path.
23148     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23149     ac_top_srcdir=$ac_dots$srcdir ;;
23150   esac
23151
23152   case $INSTALL in
23153   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23154   *) ac_INSTALL=$ac_dots$INSTALL ;;
23155   esac
23156
23157   if test x"$ac_file" != x-; then
23158     { echo "$as_me:23158: creating $ac_file" >&5
23159 echo "$as_me: creating $ac_file" >&6;}
23160     rm -f "$ac_file"
23161   fi
23162   # Let's still pretend it is `configure' which instantiates (i.e., don't
23163   # use $as_me), people would be surprised to read:
23164   #    /* config.h.  Generated automatically by config.status.  */
23165   configure_input="Generated automatically from `echo $ac_file_in |
23166                                                  sed 's,.*/,,'` by configure."
23167
23168   # First look for the input files in the build tree, otherwise in the
23169   # src tree.
23170   ac_file_inputs=`IFS=:
23171     for f in $ac_file_in; do
23172       case $f in
23173       -) echo $tmp/stdin ;;
23174       [\\/$]*)
23175          # Absolute (can't be DOS-style, as IFS=:)
23176          test -f "$f" || { { echo "$as_me:23176: error: cannot find input file: $f" >&5
23177 echo "$as_me: error: cannot find input file: $f" >&2;}
23178    { (exit 1); exit 1; }; }
23179          echo $f;;
23180       *) # Relative
23181          if test -f "$f"; then
23182            # Build tree
23183            echo $f
23184          elif test -f "$srcdir/$f"; then
23185            # Source tree
23186            echo $srcdir/$f
23187          else
23188            # /dev/null tree
23189            { { echo "$as_me:23189: error: cannot find input file: $f" >&5
23190 echo "$as_me: error: cannot find input file: $f" >&2;}
23191    { (exit 1); exit 1; }; }
23192          fi;;
23193       esac
23194     done` || { (exit 1); exit 1; }
23195 EOF
23196 cat >>$CONFIG_STATUS <<\EOF
23197   ac_warn_datarootdir=no
23198   if test x"$ac_file" != x-; then
23199     for ac_item in $ac_file_inputs
23200     do
23201       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23202       if test -n "$ac_seen"; then
23203         ac_used=`grep '@datarootdir@' $ac_item`
23204         if test -z "$ac_used"; then
23205           { echo "$as_me:23205: WARNING: datarootdir was used implicitly but not set:
23206 $ac_seen" >&5
23207 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23208 $ac_seen" >&2;}
23209           ac_warn_datarootdir=yes
23210         fi
23211       fi
23212       ac_seen=`grep '${datarootdir}' $ac_item`
23213       if test -n "$ac_seen"; then
23214         { echo "$as_me:23214: WARNING: datarootdir was used explicitly but not set:
23215 $ac_seen" >&5
23216 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23217 $ac_seen" >&2;}
23218         ac_warn_datarootdir=yes
23219       fi
23220     done
23221   fi
23222
23223 if test "x$ac_warn_datarootdir" = xyes; then
23224   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23225 fi
23226
23227 EOF
23228 cat >>$CONFIG_STATUS <<EOF
23229   sed "$ac_vpsub
23230 $extrasub
23231 EOF
23232 cat >>$CONFIG_STATUS <<\EOF
23233 :t
23234 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23235 s,@configure_input@,$configure_input,;t t
23236 s,@srcdir@,$ac_srcdir,;t t
23237 s,@top_srcdir@,$ac_top_srcdir,;t t
23238 s,@INSTALL@,$ac_INSTALL,;t t
23239 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23240   rm -f $tmp/stdin
23241   if test x"$ac_file" != x-; then
23242     cp $tmp/out $ac_file
23243
23244     for ac_name in prefix exec_prefix datarootdir
23245     do
23246         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23247         if test -n "$ac_seen"; then
23248             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23249             if test -z "$ac_init"; then
23250               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23251               { echo "$as_me:23251: WARNING: Variable $ac_name is used but was not set:
23252 $ac_seen" >&5
23253 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23254 $ac_seen" >&2;}
23255             fi
23256         fi
23257     done
23258     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23259     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23260     if test -s $tmp/out; then
23261       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23262       { echo "$as_me:23262: WARNING: Some variables may not be substituted:
23263 $ac_seen" >&5
23264 echo "$as_me: WARNING: Some variables may not be substituted:
23265 $ac_seen" >&2;}
23266     fi
23267   else
23268     cat $tmp/out
23269   fi
23270   rm -f $tmp/out
23271
23272 done
23273 EOF
23274 cat >>$CONFIG_STATUS <<\EOF
23275
23276 #
23277 # CONFIG_HEADER section.
23278 #
23279
23280 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23281 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23282 #
23283 # ac_d sets the value in "#define NAME VALUE" lines.
23284 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23285 ac_dB='[        ].*$,\1#\2'
23286 ac_dC=' '
23287 ac_dD=',;t'
23288 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23289 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23290 ac_iB='\([      ]\),\1#\2define\3'
23291 ac_iC=' '
23292 ac_iD='\4,;t'
23293 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23294 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23295 ac_uB='$,\1#\2define\3'
23296 ac_uC=' '
23297 ac_uD=',;t'
23298
23299 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23300   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23301   case $ac_file in
23302   - | *:- | *:-:* ) # input from stdin
23303         cat >$tmp/stdin
23304         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23305         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23306   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23307         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23308   * )   ac_file_in=$ac_file.in ;;
23309   esac
23310
23311   test x"$ac_file" != x- && { echo "$as_me:23311: creating $ac_file" >&5
23312 echo "$as_me: creating $ac_file" >&6;}
23313
23314   # First look for the input files in the build tree, otherwise in the
23315   # src tree.
23316   ac_file_inputs=`IFS=:
23317     for f in $ac_file_in; do
23318       case $f in
23319       -) echo $tmp/stdin ;;
23320       [\\/$]*)
23321          # Absolute (can't be DOS-style, as IFS=:)
23322          test -f "$f" || { { echo "$as_me:23322: error: cannot find input file: $f" >&5
23323 echo "$as_me: error: cannot find input file: $f" >&2;}
23324    { (exit 1); exit 1; }; }
23325          echo $f;;
23326       *) # Relative
23327          if test -f "$f"; then
23328            # Build tree
23329            echo $f
23330          elif test -f "$srcdir/$f"; then
23331            # Source tree
23332            echo $srcdir/$f
23333          else
23334            # /dev/null tree
23335            { { echo "$as_me:23335: error: cannot find input file: $f" >&5
23336 echo "$as_me: error: cannot find input file: $f" >&2;}
23337    { (exit 1); exit 1; }; }
23338          fi;;
23339       esac
23340     done` || { (exit 1); exit 1; }
23341   # Remove the trailing spaces.
23342   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23343
23344 EOF
23345
23346 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23347 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23348 # be either 'cat' or 'sort'.
23349 cat confdefs.h | uniq >conftest.vals
23350
23351 # Break up conftest.vals because some shells have a limit on
23352 # the size of here documents, and old seds have small limits too.
23353
23354 rm -f conftest.tail
23355 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23356 while grep . conftest.vals >/dev/null
23357 do
23358   # Write chunks of a limited-size here document to conftest.frag.
23359   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23360   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23361   echo 'CEOF' >> $CONFIG_STATUS
23362   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23363   rm -f conftest.vals
23364   mv conftest.tail conftest.vals
23365 done
23366 rm -f conftest.vals
23367
23368 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23369 # marker @DEFS@.
23370 echo '  cat >> conftest.edit <<CEOF
23371 /@DEFS@/r conftest.frag
23372 /@DEFS@/d
23373 CEOF
23374 sed -f conftest.edit $tmp/in > $tmp/out
23375 rm -f $tmp/in
23376 mv $tmp/out $tmp/in
23377 rm -f conftest.edit conftest.frag
23378 ' >> $CONFIG_STATUS
23379
23380 cat >>$CONFIG_STATUS <<\EOF
23381   # Let's still pretend it is `configure' which instantiates (i.e., don't
23382   # use $as_me), people would be surprised to read:
23383   #    /* config.h.  Generated automatically by config.status.  */
23384   if test x"$ac_file" = x-; then
23385     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23386   else
23387     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23388   fi
23389   cat $tmp/in >>$tmp/config.h
23390   rm -f $tmp/in
23391   if test x"$ac_file" != x-; then
23392     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23393       { echo "$as_me:23393: $ac_file is unchanged" >&5
23394 echo "$as_me: $ac_file is unchanged" >&6;}
23395     else
23396       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23397          X"$ac_file" : 'X\(//\)[^/]' \| \
23398          X"$ac_file" : 'X\(//\)$' \| \
23399          X"$ac_file" : 'X\(/\)' \| \
23400          .     : '\(.\)' 2>/dev/null ||
23401 echo X"$ac_file" |
23402     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23403           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23404           /^X\(\/\/\)$/{ s//\1/; q; }
23405           /^X\(\/\).*/{ s//\1/; q; }
23406           s/.*/./; q'`
23407       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23408         { case "$ac_dir" in
23409   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23410   *)                      as_incr_dir=.;;
23411 esac
23412 as_dummy="$ac_dir"
23413 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23414   case $as_mkdir_dir in
23415     # Skip DOS drivespec
23416     ?:) as_incr_dir=$as_mkdir_dir ;;
23417     *)
23418       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23419       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23420     ;;
23421   esac
23422 done; }
23423
23424       fi
23425       rm -f $ac_file
23426       mv $tmp/config.h $ac_file
23427     fi
23428   else
23429     cat $tmp/config.h
23430     rm -f $tmp/config.h
23431   fi
23432 done
23433 EOF
23434 cat >>$CONFIG_STATUS <<\EOF
23435 #
23436 # CONFIG_COMMANDS section.
23437 #
23438 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23439   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23440   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23441
23442   case $ac_dest in
23443     default )
23444 if test "x$cf_with_tests" != xno ; then
23445
23446 for cf_dir in test
23447 do
23448         if test ! -d $srcdir/$cf_dir; then
23449                 continue
23450         elif test -f $srcdir/$cf_dir/programs; then
23451                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23452         fi
23453 done
23454
23455 fi
23456
23457 cf_prefix=$LIB_PREFIX
23458
23459 case $cf_cv_shlib_version in
23460 (cygdll|msysdll|mingw)
23461         TINFO_NAME=$TINFO_ARG_SUFFIX
23462         TINFO_SUFFIX=.dll
23463         ;;
23464 esac
23465
23466 if test -n "$TINFO_SUFFIX" ; then
23467         case $TINFO_SUFFIX in
23468         (tw*)
23469                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23470                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23471                 ;;
23472         (t*)
23473                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23474                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23475                 ;;
23476         (w*)
23477                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23478                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23479                 ;;
23480         esac
23481 fi
23482
23483 for cf_dir in $SRC_SUBDIRS
23484 do
23485         if test ! -d $srcdir/$cf_dir ; then
23486                 continue
23487         elif test -f $srcdir/$cf_dir/modules; then
23488
23489                 SHARED_LIB=
23490                 Libs_To_Make=
23491
23492                 cf_sed_options=
23493                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23494                 then
23495                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23496                         cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
23497                 fi
23498
23499                 if test "x$WILDCARD_SYMS" = xno
23500                 then
23501                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23502                 fi
23503
23504                 if test "x$cf_sed_options" != "x"
23505                 then
23506                         cat >>$cf_dir/Makefile <<CF_EOF
23507
23508 # Generated by CF_LIB_RULES
23509 resulting.map: $UNALTERED_SYMS
23510         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23511
23512 clean::
23513         rm -f resulting.map
23514 CF_EOF
23515                 fi
23516
23517                 for cf_item in $cf_LIST_MODELS
23518                 do
23519
23520         case X$cf_item in
23521         (Xlibtool)
23522                 cf_suffix='.la'
23523                 cf_depsuf=$cf_suffix
23524                 ;;
23525         (Xdebug)
23526                 cf_suffix='_g.a'
23527                 cf_depsuf=$cf_suffix
23528                 ;;
23529         (Xprofile)
23530                 cf_suffix='_p.a'
23531                 cf_depsuf=$cf_suffix
23532                 ;;
23533         (Xshared)
23534                 case $cf_cv_system_name in
23535                 (aix[5-7]*)
23536                         cf_suffix='.so'
23537                         cf_depsuf=$cf_suffix
23538                         ;;
23539                 (cygwin*|msys*|mingw*)
23540                         cf_suffix='.dll'
23541                         cf_depsuf='.dll.a'
23542                         ;;
23543                 (darwin*)
23544                         cf_suffix='.dylib'
23545                         cf_depsuf=$cf_suffix
23546                         ;;
23547                 (hpux*)
23548                         case $target in
23549                         (ia64*)
23550                                 cf_suffix='.so'
23551                                 cf_depsuf=$cf_suffix
23552                                 ;;
23553                         (*)
23554                                 cf_suffix='.sl'
23555                                 cf_depsuf=$cf_suffix
23556                                 ;;
23557                         esac
23558                         ;;
23559                 (*)
23560                         cf_suffix='.so'
23561                         cf_depsuf=$cf_suffix
23562                         ;;
23563                 esac
23564                 ;;
23565         (*)
23566                 cf_suffix='.a'
23567                 cf_depsuf=$cf_suffix
23568                 ;;
23569         esac
23570         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23571         then
23572                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23573                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23574         fi
23575
23576                         cf_libname=$cf_dir
23577                         test "$cf_dir" = c++ && cf_libname=ncurses++
23578                         if test $cf_item = shared ; then
23579                                 if test -n "${LIB_SUFFIX}"
23580                                 then
23581                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23582                                 else
23583                                         cf_shared_suffix="$cf_suffix"
23584                                 fi
23585                                 if test "$cf_cv_do_symlinks" = yes ; then
23586                                         cf_version_name=
23587
23588                                         case "$cf_cv_shlib_version" in
23589                                         (rel)
23590                                                 cf_version_name=REL_VERSION
23591                                                 ;;
23592                                         (abi)
23593                                                 cf_version_name=ABI_VERSION
23594                                                 ;;
23595                                         esac
23596
23597                                         if test -n "$cf_version_name"
23598                                         then
23599                                                 case "$cf_cv_system_name" in
23600                                                 (darwin*)
23601                                                         # "w", etc?
23602                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23603                                                         ;;
23604                                                 (*)
23605                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23606                                                         ;;
23607                                                 esac
23608                                         fi
23609                                         if test -n "${USE_LIB_SUFFIX}"
23610                                         then
23611                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23612                                         else
23613                                                 cf_shared_suffix="$cf_suffix"
23614                                         fi
23615                                 fi
23616                                 # cygwin needs import library, and has unique naming convention
23617                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23618                                 # use 'cyg' prefix for shared lib.
23619                                 case $cf_cv_shlib_version in
23620                                 (cygdll)
23621                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23622                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23623                                         ;;
23624                                 (msysdll)
23625                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23626                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23627                                         ;;
23628                                 (mingw)
23629                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23630                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23631                                         ;;
23632                                 (*)
23633                                         cf_add_lib=
23634                                         ;;
23635                                 esac
23636                                 if test -n "$cf_add_lib"
23637                                 then
23638                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23639                                         continue
23640                                 fi
23641                         fi
23642                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23643                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23644                 done
23645
23646                 if test $cf_dir = ncurses ; then
23647                         cf_subsets="$LIB_SUBSETS"
23648                         cf_r_parts="$cf_subsets"
23649                         cf_liblist="$Libs_To_Make"
23650
23651                         while test -n "$cf_r_parts"
23652                         do
23653                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23654                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23655                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23656                                         cf_add_lib=
23657                                         case $cf_l_parts in
23658                                         (*termlib*)
23659                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23660                                                 ;;
23661                                         (*ticlib*)
23662                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23663                                                 ;;
23664                                         (*)
23665                                                 break
23666                                                 ;;
23667                                         esac
23668                                         if test -n "$cf_add_lib"; then
23669                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23670                                         fi
23671                                 else
23672                                         break
23673                                 fi
23674                         done
23675                 else
23676                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23677                 fi
23678
23679                 if test $cf_dir = c++; then
23680                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23681                                 cf_list=
23682                                 for cf_item in $Libs_To_Make
23683                                 do
23684                                         case $cf_item in
23685                                         (*.a)
23686                                                 ;;
23687                                         (*)
23688                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23689                                                 ;;
23690                                         esac
23691                                         for cf_test in $cf_list
23692                                         do
23693                                                 if test "$cf_test" = "$cf_item"
23694                                                 then
23695                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23696                                                         cf_item=
23697                                                         break
23698                                                 fi
23699                                         done
23700                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23701                                 done
23702                                 Libs_To_Make="$cf_list"
23703                         fi
23704                 fi
23705
23706                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23707                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23708                         $cf_dir/Makefile >$cf_dir/Makefile.out
23709                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23710
23711                 $AWK -f $srcdir/mk-0th.awk \
23712                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23713                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23714
23715                 for cf_subset in $cf_subsets
23716                 do
23717                         cf_subdirs=
23718                         for cf_item in $cf_LIST_MODELS
23719                         do
23720
23721                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23722
23723 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23724
23725                         CXX_MODEL=$cf_ITEM
23726                         if test "$CXX_MODEL" = SHARED; then
23727                                 case $cf_cv_shlib_version in
23728                                 (cygdll|msysdll|mingw)
23729                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23730
23731 echo "${as_me:-configure}:23731: testing overriding CXX_MODEL to SHARED ..." 1>&5
23732
23733                                         with_shared_cxx=yes
23734                                         ;;
23735                                 (*)
23736                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23737                                         ;;
23738                                 esac
23739                         fi
23740
23741         case X$cf_item in
23742         (Xlibtool)
23743                 cf_suffix='.la'
23744                 cf_depsuf=$cf_suffix
23745                 ;;
23746         (Xdebug)
23747                 cf_suffix='_g.a'
23748                 cf_depsuf=$cf_suffix
23749                 ;;
23750         (Xprofile)
23751                 cf_suffix='_p.a'
23752                 cf_depsuf=$cf_suffix
23753                 ;;
23754         (Xshared)
23755                 case $cf_cv_system_name in
23756                 (aix[5-7]*)
23757                         cf_suffix='.so'
23758                         cf_depsuf=$cf_suffix
23759                         ;;
23760                 (cygwin*|msys*|mingw*)
23761                         cf_suffix='.dll'
23762                         cf_depsuf='.dll.a'
23763                         ;;
23764                 (darwin*)
23765                         cf_suffix='.dylib'
23766                         cf_depsuf=$cf_suffix
23767                         ;;
23768                 (hpux*)
23769                         case $target in
23770                         (ia64*)
23771                                 cf_suffix='.so'
23772                                 cf_depsuf=$cf_suffix
23773                                 ;;
23774                         (*)
23775                                 cf_suffix='.sl'
23776                                 cf_depsuf=$cf_suffix
23777                                 ;;
23778                         esac
23779                         ;;
23780                 (*)
23781                         cf_suffix='.so'
23782                         cf_depsuf=$cf_suffix
23783                         ;;
23784                 esac
23785                 ;;
23786         (*)
23787                 cf_suffix='.a'
23788                 cf_depsuf=$cf_suffix
23789                 ;;
23790         esac
23791         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23792         then
23793                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23794                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23795         fi
23796
23797         case $cf_item in
23798         (libtool) cf_subdir='obj_lo'  ;;
23799         (normal)  cf_subdir='objects' ;;
23800         (debug)   cf_subdir='obj_g' ;;
23801         (profile) cf_subdir='obj_p' ;;
23802         (shared)
23803                 case $cf_cv_system_name in
23804                 (cygwin|msys)
23805                         cf_subdir='objects' ;;
23806                 (*)
23807                         cf_subdir='obj_s' ;;
23808                 esac
23809         esac
23810
23811                         # Test for case where we build libtinfo with a different name.
23812                         cf_libname=$cf_dir
23813                         if test $cf_dir = ncurses ; then
23814                                 case $cf_subset in
23815                                 (*base*)
23816                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23817                                         ;;
23818                                 (*termlib*)
23819                                         cf_libname=$TINFO_LIB_SUFFIX
23820                                         ;;
23821                                 (ticlib*)
23822                                         cf_libname=$TICS_LIB_SUFFIX
23823                                         ;;
23824                                 esac
23825                         elif test $cf_dir = c++ ; then
23826                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23827                         else
23828                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23829                         fi
23830                         if test -n "${USE_ARG_SUFFIX}" ; then
23831                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23832                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23833                         fi
23834
23835                         # These dependencies really are for development, not
23836                         # builds, but they are useful in porting, too.
23837                         cf_depend="../include/ncurses_cfg.h"
23838                         if test "$srcdir" = "."; then
23839                                 cf_reldir="."
23840                         else
23841                                 cf_reldir="\${srcdir}"
23842                         fi
23843
23844                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23845                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23846                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23847                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23848                         fi
23849
23850                         cf_dir_suffix=
23851                         old_cf_suffix="$cf_suffix"
23852                         if test "$cf_cv_shlib_version_infix" = yes ; then
23853                         if test -n "$USE_LIB_SUFFIX" ; then
23854                                 case $USE_LIB_SUFFIX in
23855                                 (tw*)
23856                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
23857                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23858                                         cf_dir_suffix=tw$EXTRA_SUFFIX
23859                                         ;;
23860                                 (t*)
23861                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
23862                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
23863                                         cf_dir_suffix=t$EXTRA_SUFFIX
23864                                         ;;
23865                                 (w*)
23866                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
23867                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
23868                                         cf_dir_suffix=w$EXTRA_SUFFIX
23869                                         ;;
23870                                 (*)
23871                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
23872                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
23873                                         cf_dir_suffix=$EXTRA_SUFFIX
23874                                         ;;
23875                                 esac
23876                         fi
23877                         fi
23878
23879                         $AWK -f $srcdir/mk-1st.awk \
23880                                 name=${cf_libname}${cf_dir_suffix} \
23881                                 traces=$LIB_TRACING \
23882                                 MODEL=$cf_ITEM \
23883                                 CXX_MODEL=$CXX_MODEL \
23884                                 model=$cf_subdir \
23885                                 prefix=$cf_prefix \
23886                                 suffix=$cf_suffix \
23887                                 subset=$cf_subset \
23888                                 driver=$cf_cv_term_driver \
23889                                 SymLink="$LN_S" \
23890                                 TermlibRoot=$TINFO_NAME \
23891                                 TermlibSuffix=$TINFO_SUFFIX \
23892                                 ShlibVer=$cf_cv_shlib_version \
23893                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23894                                 ReLink=${cf_cv_do_relink:-no} \
23895                                 DoLinks=$cf_cv_do_symlinks \
23896                                 rmSoLocs=$cf_cv_rm_so_locs \
23897                                 ldconfig="$LDCONFIG" \
23898                                 overwrite=$WITH_OVERWRITE \
23899                                 depend="$cf_depend" \
23900                                 host="$host" \
23901                                 libtool_version="$LIBTOOL_VERSION" \
23902                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23903
23904                         cf_suffix="$old_cf_suffix"
23905
23906                         for cf_subdir2 in $cf_subdirs lib
23907                         do
23908                                 test $cf_subdir = $cf_subdir2 && break
23909                         done
23910                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23911                         $AWK -f $srcdir/mk-2nd.awk \
23912                                 name=$cf_dir \
23913                                 traces=$LIB_TRACING \
23914                                 MODEL=$cf_ITEM \
23915                                 model=$cf_subdir \
23916                                 subset=$cf_subset \
23917                                 srcdir=$srcdir \
23918                                 echo=$WITH_ECHO \
23919                                 crenames=$cf_cv_prog_CC_c_o \
23920                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23921                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23922                         cf_subdirs="$cf_subdirs $cf_subdir"
23923                         done
23924                 done
23925         fi
23926
23927         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23928 done
23929
23930 for cf_dir in $SRC_SUBDIRS
23931 do
23932         if test ! -d $srcdir/$cf_dir ; then
23933                 continue
23934         fi
23935
23936         if test -f $cf_dir/Makefile ; then
23937                 case "$cf_dir" in
23938                 (Ada95)
23939                         echo 'libs \' >> Makefile
23940                         echo 'install.libs \' >> Makefile
23941                         echo 'uninstall.libs ::' >> Makefile
23942                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23943                         ;;
23944                 esac
23945         fi
23946
23947         if test -f $srcdir/$cf_dir/modules; then
23948                 echo >> Makefile
23949                 if test -f $srcdir/$cf_dir/headers; then
23950 cat >> Makefile <<CF_EOF
23951 install.includes \\
23952 uninstall.includes \\
23953 CF_EOF
23954                 fi
23955 if test "$cf_dir" != "c++" ; then
23956 echo 'lint \' >> Makefile
23957 fi
23958 cat >> Makefile <<CF_EOF
23959 libs \\
23960 lintlib \\
23961 install.libs \\
23962 uninstall.libs \\
23963 install.$cf_dir \\
23964 uninstall.$cf_dir ::
23965         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23966 CF_EOF
23967         elif test -f $srcdir/$cf_dir/headers; then
23968 cat >> Makefile <<CF_EOF
23969
23970 libs \\
23971 install.libs \\
23972 uninstall.libs \\
23973 install.includes \\
23974 uninstall.includes ::
23975         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23976 CF_EOF
23977 fi
23978 done
23979
23980 if test "x$cf_with_db_install" = xyes; then
23981 cat >> Makefile <<CF_EOF
23982
23983 install.libs uninstall.libs \\
23984 install.data uninstall.data ::
23985 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23986 CF_EOF
23987 else
23988 cat >> Makefile <<CF_EOF
23989
23990 install.libs uninstall.libs ::
23991         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23992 CF_EOF
23993 fi
23994
23995 if test "x$cf_with_manpages" = xyes; then
23996 cat >> Makefile <<CF_EOF
23997
23998 install.man \\
23999 uninstall.man ::
24000         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24001 CF_EOF
24002 fi
24003
24004 cat >> Makefile <<CF_EOF
24005
24006 distclean ::
24007         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24008         rm -f headers.sh headers.sed mk_shared_lib.sh
24009         rm -f edit_man.* man_alias.*
24010         rm -rf \${DIRS_TO_MAKE}
24011 CF_EOF
24012
24013 # Special case: tack's manpage lives in its own directory.
24014 if test "x$cf_with_manpages" = xyes; then
24015 if test -d tack ; then
24016 if test -f $srcdir/$tack.h; then
24017 cat >> Makefile <<CF_EOF
24018
24019 install.man \\
24020 uninstall.man ::
24021         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24022 CF_EOF
24023 fi
24024 fi
24025 fi
24026
24027 rm -f headers.sed headers.sh
24028
24029 echo creating headers.sh
24030 cat >headers.sh <<CF_EOF
24031 #! $SHELL
24032 # This shell script is generated by the 'configure' script.  It is invoked in a
24033 # subdirectory of the build tree.  It generates a sed-script in the parent
24034 # directory that is used to adjust includes for header files that reside in a
24035 # subdirectory of /usr/include, etc.
24036 PRG=""
24037 while test \$# != 3
24038 do
24039 PRG="\$PRG \$1"; shift
24040 done
24041 DST=\$1
24042 REF=\$2
24043 SRC=\$3
24044 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24045 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24046 echo installing \$SRC in \$DST
24047 CF_EOF
24048
24049 if test $WITH_CURSES_H = yes; then
24050         cat >>headers.sh <<CF_EOF
24051 case \$DST in
24052 (/*/include/*)
24053         END=\`basename \$DST\`
24054         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24055         do
24056                 NAME=\`basename \$i\`
24057                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24058         done
24059         ;;
24060 (*)
24061         echo "" >> \$TMPSED
24062         ;;
24063 esac
24064 CF_EOF
24065
24066 else
24067         cat >>headers.sh <<CF_EOF
24068 case \$DST in
24069 (/*/include/*)
24070         END=\`basename \$DST\`
24071         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24072         do
24073                 NAME=\`basename \$i\`
24074                 if test "\$NAME" = "curses.h"
24075                 then
24076                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24077                         NAME=ncurses.h
24078                 fi
24079                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24080         done
24081         ;;
24082 (*)
24083         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24084         ;;
24085 esac
24086 CF_EOF
24087 fi
24088 cat >>headers.sh <<CF_EOF
24089 rm -f \$TMPSRC
24090 sed -f \$TMPSED \$SRC > \$TMPSRC
24091 NAME=\`basename \$SRC\`
24092 CF_EOF
24093 if test $WITH_CURSES_H != yes; then
24094         cat >>headers.sh <<CF_EOF
24095 test "\$NAME" = "curses.h" && NAME=ncurses.h
24096 CF_EOF
24097 fi
24098 cat >>headers.sh <<CF_EOF
24099 # Just in case someone gzip'd manpages, remove the conflicting copy.
24100 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24101
24102 eval \$PRG \$TMPSRC \$DST/\$NAME
24103 rm -f \$TMPSRC \$TMPSED
24104 CF_EOF
24105
24106 chmod 0755 headers.sh
24107
24108 for cf_dir in $SRC_SUBDIRS
24109 do
24110         if test ! -d $srcdir/$cf_dir ; then
24111                 continue
24112         fi
24113
24114         if test -f $srcdir/$cf_dir/headers; then
24115                 $AWK -f $srcdir/mk-hdr.awk \
24116                         subset="$LIB_SUBSETS" \
24117                         compat="$WITH_CURSES_H" \
24118                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24119         fi
24120
24121         if test -f $srcdir/$cf_dir/modules; then
24122                 if test "$cf_dir" != "c++" ; then
24123                         cat >>$cf_dir/Makefile <<"CF_EOF"
24124 depend : ${AUTO_SRC}
24125         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24126
24127 # DO NOT DELETE THIS LINE -- make depend depends on it.
24128 CF_EOF
24129                 fi
24130         fi
24131 done
24132
24133 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24134 if test -z "$USE_OLD_MAKERULES" ; then
24135         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24136 fi
24137 fi
24138  ;;
24139   esac
24140 done
24141 EOF
24142
24143 cat >>$CONFIG_STATUS <<\EOF
24144
24145 { (exit 0); exit 0; }
24146 EOF
24147 chmod +x $CONFIG_STATUS
24148 ac_clean_files=$ac_clean_files_save
24149
24150 # configure is writing to config.log, and then calls config.status.
24151 # config.status does its own redirection, appending to config.log.
24152 # Unfortunately, on DOS this fails, as config.log is still kept open
24153 # by configure, so config.status won't be able to write to it; its
24154 # output is simply discarded.  So we exec the FD to /dev/null,
24155 # effectively closing config.log, so it can be properly (re)opened and
24156 # appended to by config.status.  When coming back to configure, we
24157 # need to make the FD available again.
24158 if test "$no_create" != yes; then
24159   ac_cs_success=:
24160   exec 5>/dev/null
24161   $SHELL $CONFIG_STATUS || ac_cs_success=false
24162   exec 5>>config.log
24163   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24164   # would make configure fail if this is the last instruction.
24165   $ac_cs_success || { (exit 1); exit 1; }
24166 fi
24167 ${MAKE:-make} preinstall