]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20130218
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.562 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
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   --without-manpages      suppress install of manpages
710   --without-progs         suppress build with programs (e.g., tic)
711   --without-tests         suppress build with test-programs
712   --without-curses-h      install curses.h as ncurses.h only
713   --with-pkg-config{=path} enable/disable use of pkg-config
714   --with-pkg-config-libdir=XXX use given directory for installing pc-files
715   --enable-pc-files       generate and install .pc files for pkg-config
716   --enable-mixed-case     tic should assume mixed-case filenames
717   --with-install-prefix   prefixes actual install-location ($DESTDIR)
718 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
719   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
720   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
721   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
725 Options to Specify the Libraries Built/Used:
726   --disable-libtool-version  enable to use libtool's incompatible naming scheme
727   --with-libtool          generate libraries with libtool
728   --with-shared           generate shared-libraries
729   --with-normal           generate normal-libraries (default)
730   --with-debug            generate debug-libraries (default)
731   --with-profile          generate profile-libraries
732   --with-lib-prefix       override library-prefix
733   --with-termlib          generate separate terminfo library
734   --with-ticlib           generate separate tic library
735   --with-gpm              use Alessandro Rubini's GPM library
736   --without-dlsym         do not use dlsym() to load GPM dynamically
737   --with-sysmouse         use sysmouse (FreeBSD console)
738   --enable-rpath          use rpath option when generating shared libraries
739   --disable-relink        relink shared libraries during install
740   --with-shlib-version=X  Specify rel or abi version for shared libs
741   --disable-rpath-hack    don't add rpath options for additional libraries
742 Fine-Tuning Your Configuration:
743   --disable-overwrite     leave out the link to -lcurses
744   --disable-database      do not use terminfo, only fallbacks/termcap
745   --with-database=XXX     specify terminfo source to install
746   --with-hashed-db        specify hashed-database library
747   --with-fallbacks=XXX    specify list of fallback terminal descriptions
748   --without-xterm-new     specify if xterm terminfo should be old version
749   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
750   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
751   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
752   --disable-big-core      assume machine has little memory
753   --disable-big-strings   assume compiler has only standard-size strings
754   --enable-termcap        compile in termcap fallback support
755   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
756   --enable-getcap         fast termcap load, no xrefs to terminfo
757   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
758   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
759   --disable-root-environ  restrict environment when running as root
760   --enable-symlinks       make tic use symbolic links not hard links
761   --enable-broken_linker  compile with broken-linker support code
762   --enable-bsdpad         recognize BSD-style prefix padding
763   --enable-widec          compile with wide-char/UTF-8 code
764   --disable-lp64          allow chtype to be long (ignore _LP64)
765   --disable-largefile     omit support for large files
766   --disable-tparm-varargs compile tparm() without varargs interface
767   --disable-tic-depends   link tic library without explicit dependency on ncurses library
768   --with-bool=TYPE        override fallback type of bool variable
769   --with-caps=alt         compile with alternate Caps file
770   --with-chtype=TYPE      override type of chtype
771   --with-ospeed=TYPE      override type of ospeed variable
772   --with-mmask-t=TYPE     override type of mmask_t
773   --with-ccharw-max=XXX   override size CCHARW_MAX
774   --with-tparm-arg=TYPE   override parameter type of tparm
775   --with-rcs-ids          compile-in RCS identifiers
776 Options to Specify How Manpages are Installed:
777   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
778                           optionally formatted/catonly, e.g., gzip,formatted
779   --with-manpage-renames  specify manpage-renaming
780   --with-manpage-aliases  specify manpage-aliases using .so
781   --with-manpage-symlinks specify manpage-aliases using symlinks
782   --with-manpage-tbl      specify manpage processing with tbl
783 Extensions:
784   --disable-ext-funcs     disable function-extensions
785   --enable-sp-funcs       enable experimental SCREEN-extensions
786   --enable-term-driver    enable experimental terminal-driver
787   --enable-const          compile with extra/non-standard const
788   --enable-ext-colors     compile for 256-color support
789   --enable-ext-mouse      compile for extended mouse-encoding
790   --enable-no-padding     compile with $NCURSES_NO_PADDING code
791   --enable-signed-char    compile using signed Boolean's in term.h
792   --enable-sigwinch       compile with SIGWINCH handler
793   --enable-tcap-names     compile with user-definable terminal capabilities
794 Development Code:
795   --without-develop       disable development options
796   --enable-hard-tabs      compile with hard-tabs code
797   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
798 Experimental Code:
799   --disable-assumed-color do not assume anything about default-colors
800   --disable-hashmap       compile without hashmap scrolling-optimization
801   --enable-colorfgbg      compile-in experimental $COLORFGBG code
802   --enable-interop        compile-in experimental interop bindings
803   --with-pthread          use POSIX thread library
804   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
805   --enable-weak-symbols   enable weak-symbols for pthreads
806   --enable-reentrant      compile with experimental reentrant code
807   --with-wrap-prefix=XXX  override prefix used for public variables
808   --enable-safe-sprintf   compile with experimental safe-sprintf code
809   --disable-scroll-hints  compile without scroll-hints code
810   --enable-wgetch-events  compile with experimental wgetch-events code
811 Testing/development Options:
812   --disable-echo          do not display "compiling" commands
813   --enable-warnings       build: turn on GCC compiler warnings
814   --enable-string-hacks   work around bogus compiler/loader warnings
815   --enable-assertions     test: turn on generation of assertion code
816   --with-dmalloc          test: use Gray Watson's dmalloc library
817   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
818   --with-valgrind         test: use valgrind
819   --disable-leaks         test: free permanent memory, analyze leaks
820   --enable-expanded       test: generate functions for certain macros
821   --disable-macros        test: use functions rather than macros
822   --with-trace            test: add trace() function to all models of ncurses
823 Ada95 Binding Options:
824   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
825   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
826   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
827   --with-ada-sharedlib=XX build Ada95 shared-library
828
829 Some influential environment variables:
830   CC          C compiler command
831   CFLAGS      C compiler flags
832   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
833               nonstandard directory <lib dir>
834   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
835               headers in a nonstandard directory <include dir>
836   CPP         C preprocessor
837   CXX         C++ compiler command
838   CXXFLAGS    C++ compiler flags
839   CXXCPP      C++ preprocessor
840
841 Use these variables to override the choices made by `configure' or to help
842 it to find libraries and programs with nonstandard names/locations.
843
844 EOF
845 fi
846
847 if test "$ac_init_help" = "recursive"; then
848   # If there are subdirs, report their specific --help.
849   ac_popdir=`pwd`
850   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
851     cd $ac_subdir
852     # A "../" for each directory in /$ac_subdir.
853     ac_dots=`echo $ac_subdir |
854              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
855
856     case $srcdir in
857     .) # No --srcdir option.  We are building in place.
858       ac_sub_srcdir=$srcdir ;;
859     [\\/]* | ?:[\\/]* ) # Absolute path.
860       ac_sub_srcdir=$srcdir/$ac_subdir ;;
861     *) # Relative path.
862       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
863     esac
864
865     # Check for guested configure; otherwise get Cygnus style configure.
866     if test -f $ac_sub_srcdir/configure.gnu; then
867       echo
868       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
869     elif test -f $ac_sub_srcdir/configure; then
870       echo
871       $SHELL $ac_sub_srcdir/configure  --help=recursive
872     elif test -f $ac_sub_srcdir/configure.ac ||
873            test -f $ac_sub_srcdir/configure.in; then
874       echo
875       $ac_configure --help
876     else
877       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
878     fi
879     cd $ac_popdir
880   done
881 fi
882
883 test -n "$ac_init_help" && exit 0
884 if $ac_init_version; then
885   cat <<\EOF
886
887 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
888 Free Software Foundation, Inc.
889 This configure script is free software; the Free Software Foundation
890 gives unlimited permission to copy, distribute and modify it.
891 EOF
892   exit 0
893 fi
894 exec 5>config.log
895 cat >&5 <<EOF
896 This file contains any messages produced by compilers while
897 running configure, to aid debugging if configure makes a mistake.
898
899 It was created by $as_me, which was
900 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
901
902   $ $0 $@
903
904 EOF
905 {
906 cat <<_ASUNAME
907 ## ---------- ##
908 ## Platform.  ##
909 ## ---------- ##
910
911 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
912 uname -m = `(uname -m) 2>/dev/null || echo unknown`
913 uname -r = `(uname -r) 2>/dev/null || echo unknown`
914 uname -s = `(uname -s) 2>/dev/null || echo unknown`
915 uname -v = `(uname -v) 2>/dev/null || echo unknown`
916
917 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
918 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
919
920 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
921 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
922 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
923 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
924 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
925 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
926 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
927
928 PATH = $PATH
929
930 _ASUNAME
931 } >&5
932
933 cat >&5 <<EOF
934 ## ------------ ##
935 ## Core tests.  ##
936 ## ------------ ##
937
938 EOF
939
940 # Keep a trace of the command line.
941 # Strip out --no-create and --no-recursion so they do not pile up.
942 # Also quote any args containing shell meta-characters.
943 ac_configure_args=
944 ac_sep=
945 for ac_arg
946 do
947   case $ac_arg in
948   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
949   | --no-cr | --no-c) ;;
950   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
952   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
953     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
954     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
955     ac_sep=" " ;;
956   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
957      ac_sep=" " ;;
958   esac
959   # Get rid of the leading space.
960 done
961
962 # When interrupted or exit'd, cleanup temporary files, and complete
963 # config.log.  We remove comments because anyway the quotes in there
964 # would cause problems or look ugly.
965 trap 'exit_status=$?
966   # Save into config.log some information that might help in debugging.
967   echo >&5
968   echo "## ----------------- ##" >&5
969   echo "## Cache variables.  ##" >&5
970   echo "## ----------------- ##" >&5
971   echo >&5
972   # The following way of writing the cache mishandles newlines in values,
973 {
974   (set) 2>&1 |
975     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
976     *ac_space=\ *)
977       sed -n \
978         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
979           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
980       ;;
981     *)
982       sed -n \
983         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
984       ;;
985     esac;
986 } >&5
987   sed "/^$/d" confdefs.h >conftest.log
988   if test -s conftest.log; then
989     echo >&5
990     echo "## ------------ ##" >&5
991     echo "## confdefs.h.  ##" >&5
992     echo "## ------------ ##" >&5
993     echo >&5
994     cat conftest.log >&5
995   fi
996   (echo; echo) >&5
997   test "$ac_signal" != 0 &&
998     echo "$as_me: caught signal $ac_signal" >&5
999   echo "$as_me: exit $exit_status" >&5
1000   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1001     exit $exit_status
1002      ' 0
1003 for ac_signal in 1 2 13 15; do
1004   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1005 done
1006 ac_signal=0
1007
1008 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1009 rm -rf conftest* confdefs.h
1010 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1011 echo >confdefs.h
1012
1013 # Let the site file select an alternate cache file if it wants to.
1014 # Prefer explicitly selected file to automatically selected ones.
1015 if test -z "$CONFIG_SITE"; then
1016   if test "x$prefix" != xNONE; then
1017     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1018   else
1019     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1020   fi
1021 fi
1022 for ac_site_file in $CONFIG_SITE; do
1023   if test -r "$ac_site_file"; then
1024     { echo "$as_me:1024: loading site script $ac_site_file" >&5
1025 echo "$as_me: loading site script $ac_site_file" >&6;}
1026     cat "$ac_site_file" >&5
1027     . "$ac_site_file"
1028   fi
1029 done
1030
1031 if test -r "$cache_file"; then
1032   # Some versions of bash will fail to source /dev/null (special
1033   # files actually), so we avoid doing that.
1034   if test -f "$cache_file"; then
1035     { echo "$as_me:1035: loading cache $cache_file" >&5
1036 echo "$as_me: loading cache $cache_file" >&6;}
1037     case $cache_file in
1038       [\\/]* | ?:[\\/]* ) . $cache_file;;
1039       *)                      . ./$cache_file;;
1040     esac
1041   fi
1042 else
1043   { echo "$as_me:1043: creating cache $cache_file" >&5
1044 echo "$as_me: creating cache $cache_file" >&6;}
1045   >$cache_file
1046 fi
1047
1048 # Check that the precious variables saved in the cache have kept the same
1049 # value.
1050 ac_cache_corrupted=false
1051 for ac_var in `(set) 2>&1 |
1052                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1053   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1054   eval ac_new_set=\$ac_env_${ac_var}_set
1055   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1056   eval ac_new_val="\$ac_env_${ac_var}_value"
1057   case $ac_old_set,$ac_new_set in
1058     set,)
1059       { echo "$as_me:1059: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1060 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1061       ac_cache_corrupted=: ;;
1062     ,set)
1063       { echo "$as_me:1063: error: \`$ac_var' was not set in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,);;
1067     *)
1068       if test "x$ac_old_val" != "x$ac_new_val"; then
1069         { echo "$as_me:1069: error: \`$ac_var' has changed since the previous run:" >&5
1070 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1071         { echo "$as_me:1071:   former value:  $ac_old_val" >&5
1072 echo "$as_me:   former value:  $ac_old_val" >&2;}
1073         { echo "$as_me:1073:   current value: $ac_new_val" >&5
1074 echo "$as_me:   current value: $ac_new_val" >&2;}
1075         ac_cache_corrupted=:
1076       fi;;
1077   esac
1078   # Pass precious variables to config.status.  It doesn't matter if
1079   # we pass some twice (in addition to the command line arguments).
1080   if test "$ac_new_set" = set; then
1081     case $ac_new_val in
1082     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1083       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1084       ac_configure_args="$ac_configure_args '$ac_arg'"
1085       ;;
1086     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1087        ;;
1088     esac
1089   fi
1090 done
1091 if $ac_cache_corrupted; then
1092   { echo "$as_me:1092: error: changes in the environment can compromise the build" >&5
1093 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1094   { { echo "$as_me:1094: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1095 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1096    { (exit 1); exit 1; }; }
1097 fi
1098
1099 ac_ext=c
1100 ac_cpp='$CPP $CPPFLAGS'
1101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1104 ac_main_return=return
1105
1106 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1107   *c*,-n*) ECHO_N= ECHO_C='
1108 ' ECHO_T='      ' ;;
1109   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1110   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1111 esac
1112 echo "#! $SHELL" >conftest.sh
1113 echo  "exit 0"   >>conftest.sh
1114 chmod +x conftest.sh
1115 if { (echo "$as_me:1115: PATH=\".;.\"; conftest.sh") >&5
1116   (PATH=".;."; conftest.sh) 2>&5
1117   ac_status=$?
1118   echo "$as_me:1118: \$? = $ac_status" >&5
1119   (exit $ac_status); }; then
1120   ac_path_separator=';'
1121 else
1122   ac_path_separator=:
1123 fi
1124 PATH_SEPARATOR="$ac_path_separator"
1125 rm -f conftest.sh
1126
1127 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1128
1129 top_builddir=`pwd`
1130
1131 echo "$as_me:1131: checking for egrep" >&5
1132 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1133 if test "${ac_cv_prog_egrep+set}" = set; then
1134   echo $ECHO_N "(cached) $ECHO_C" >&6
1135 else
1136   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1137     then ac_cv_prog_egrep='grep -E'
1138     else ac_cv_prog_egrep='egrep'
1139     fi
1140 fi
1141 echo "$as_me:1141: result: $ac_cv_prog_egrep" >&5
1142 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1143  EGREP=$ac_cv_prog_egrep
1144
1145 test -z "$EGREP" && { { echo "$as_me:1145: error: No egrep program found" >&5
1146 echo "$as_me: error: No egrep program found" >&2;}
1147    { (exit 1); exit 1; }; }
1148
1149 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1150 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 cf_cv_abi_version=${NCURSES_MAJOR}
1153 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1154 cf_cv_timestamp=`date`
1155 echo "$as_me:1155: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1156 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1157
1158 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1159
1160 # Check whether --with-rel-version or --without-rel-version was given.
1161 if test "${with_rel_version+set}" = set; then
1162   withval="$with_rel_version"
1163   { echo "$as_me:1163: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1164 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1165  cf_cv_rel_version=$withval
1166 fi;
1167
1168  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1169  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1170
1171 if test -n "$NCURSES_MAJOR" ; then
1172   case $NCURSES_MAJOR in #(vi
1173   [0-9]*) #(vi
1174         ;;
1175   *)
1176         { { echo "$as_me:1176: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1177 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1178    { (exit 1); exit 1; }; }
1179         ;;
1180   esac
1181 else
1182   { { echo "$as_me:1182: error: Release major-version value is empty" >&5
1183 echo "$as_me: error: Release major-version value is empty" >&2;}
1184    { (exit 1); exit 1; }; }
1185 fi
1186
1187 if test -n "$NCURSES_MINOR" ; then
1188   case $NCURSES_MINOR in #(vi
1189   [0-9]*) #(vi
1190         ;;
1191   *)
1192         { { echo "$as_me:1192: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1193 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1194    { (exit 1); exit 1; }; }
1195         ;;
1196   esac
1197 else
1198   { { echo "$as_me:1198: error: Release minor-version value is empty" >&5
1199 echo "$as_me: error: Release minor-version value is empty" >&2;}
1200    { (exit 1); exit 1; }; }
1201 fi
1202
1203 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1204
1205 # Check whether --with-abi-version or --without-abi-version was given.
1206 if test "${with_abi_version+set}" = set; then
1207   withval="$with_abi_version"
1208   { echo "$as_me:1208: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1209 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1210  cf_cv_abi_version=$withval
1211 fi;
1212
1213 if test -n "$cf_cv_abi_version" ; then
1214   case $cf_cv_abi_version in #(vi
1215   [0-9]*) #(vi
1216         ;;
1217   *)
1218         { { echo "$as_me:1218: error: ABI version is not a number: $cf_cv_abi_version" >&5
1219 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1220    { (exit 1); exit 1; }; }
1221         ;;
1222   esac
1223 else
1224   { { echo "$as_me:1224: error: ABI version value is empty" >&5
1225 echo "$as_me: error: ABI version value is empty" >&2;}
1226    { (exit 1); exit 1; }; }
1227 fi
1228
1229 ac_aux_dir=
1230 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1231   if test -f $ac_dir/install-sh; then
1232     ac_aux_dir=$ac_dir
1233     ac_install_sh="$ac_aux_dir/install-sh -c"
1234     break
1235   elif test -f $ac_dir/install.sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install.sh -c"
1238     break
1239   elif test -f $ac_dir/shtool; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/shtool install -c"
1242     break
1243   fi
1244 done
1245 if test -z "$ac_aux_dir"; then
1246   { { echo "$as_me:1246: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1247 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1248    { (exit 1); exit 1; }; }
1249 fi
1250 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1251 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1252 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1253
1254 # Make sure we can run config.sub.
1255 $ac_config_sub sun4 >/dev/null 2>&1 ||
1256   { { echo "$as_me:1256: error: cannot run $ac_config_sub" >&5
1257 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1258    { (exit 1); exit 1; }; }
1259
1260 echo "$as_me:1260: checking build system type" >&5
1261 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1262 if test "${ac_cv_build+set}" = set; then
1263   echo $ECHO_N "(cached) $ECHO_C" >&6
1264 else
1265   ac_cv_build_alias=$build_alias
1266 test -z "$ac_cv_build_alias" &&
1267   ac_cv_build_alias=`$ac_config_guess`
1268 test -z "$ac_cv_build_alias" &&
1269   { { echo "$as_me:1269: error: cannot guess build type; you must specify one" >&5
1270 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1271    { (exit 1); exit 1; }; }
1272 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1273   { { echo "$as_me:1273: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1274 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1275    { (exit 1); exit 1; }; }
1276
1277 fi
1278 echo "$as_me:1278: result: $ac_cv_build" >&5
1279 echo "${ECHO_T}$ac_cv_build" >&6
1280 build=$ac_cv_build
1281 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1282 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1283 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1284
1285 echo "$as_me:1285: checking host system type" >&5
1286 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1287 if test "${ac_cv_host+set}" = set; then
1288   echo $ECHO_N "(cached) $ECHO_C" >&6
1289 else
1290   ac_cv_host_alias=$host_alias
1291 test -z "$ac_cv_host_alias" &&
1292   ac_cv_host_alias=$ac_cv_build_alias
1293 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1294   { { echo "$as_me:1294: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1295 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1296    { (exit 1); exit 1; }; }
1297
1298 fi
1299 echo "$as_me:1299: result: $ac_cv_host" >&5
1300 echo "${ECHO_T}$ac_cv_host" >&6
1301 host=$ac_cv_host
1302 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1303 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1304 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1305
1306 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1307         echo "$as_me:1307: checking target system type" >&5
1308 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1309 if test "${ac_cv_target+set}" = set; then
1310   echo $ECHO_N "(cached) $ECHO_C" >&6
1311 else
1312   ac_cv_target_alias=$target_alias
1313 test "x$ac_cv_target_alias" = "x" &&
1314   ac_cv_target_alias=$ac_cv_host_alias
1315 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1316   { { echo "$as_me:1316: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1317 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1318    { (exit 1); exit 1; }; }
1319
1320 fi
1321 echo "$as_me:1321: result: $ac_cv_target" >&5
1322 echo "${ECHO_T}$ac_cv_target" >&6
1323 target=$ac_cv_target
1324 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1325 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1326 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1327
1328 # The aliases save the names the user supplied, while $host etc.
1329 # will get canonicalized.
1330 test -n "$target_alias" &&
1331   test "$program_prefix$program_suffix$program_transform_name" = \
1332     NONENONEs,x,x, &&
1333   program_prefix=${target_alias}-
1334         system_name="$host_os"
1335 else
1336         system_name="`(uname -s -r) 2>/dev/null`"
1337         if test -z "$system_name" ; then
1338                 system_name="`(hostname) 2>/dev/null`"
1339         fi
1340 fi
1341 test -n "$system_name" &&
1342 cat >>confdefs.h <<EOF
1343 #define SYSTEM_NAME "$system_name"
1344 EOF
1345
1346 if test "${cf_cv_system_name+set}" = set; then
1347   echo $ECHO_N "(cached) $ECHO_C" >&6
1348 else
1349   cf_cv_system_name="$system_name"
1350 fi
1351
1352 test -z "$system_name" && system_name="$cf_cv_system_name"
1353 test -n "$cf_cv_system_name" && echo "$as_me:1353: result: Configuring for $cf_cv_system_name" >&5
1354 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1355
1356 if test ".$system_name" != ".$cf_cv_system_name" ; then
1357         echo "$as_me:1357: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1358 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1359         { { echo "$as_me:1359: error: \"Please remove config.cache and try again.\"" >&5
1360 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1361    { (exit 1); exit 1; }; }
1362 fi
1363
1364 # Check whether --with-system-type or --without-system-type was given.
1365 if test "${with_system_type+set}" = set; then
1366   withval="$with_system_type"
1367   { echo "$as_me:1367: WARNING: overriding system type to $withval" >&5
1368 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1369         cf_cv_system_name=$withval
1370         host_os=$withval
1371
1372 fi;
1373
1374 ###     Save the given $CFLAGS to allow user-override.
1375 cf_user_CFLAGS="$CFLAGS"
1376
1377 ###     Default install-location
1378
1379 echo "$as_me:1379: checking for prefix" >&5
1380 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1381 if test "x$prefix" = "xNONE" ; then
1382         case "$cf_cv_system_name" in
1383                 # non-vendor systems don't have a conflict
1384         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1385                 prefix=/usr
1386                 ;;
1387         *)      prefix=$ac_default_prefix
1388                 ;;
1389         esac
1390 fi
1391 echo "$as_me:1391: result: $prefix" >&5
1392 echo "${ECHO_T}$prefix" >&6
1393
1394 if test "x$prefix" = "xNONE" ; then
1395 echo "$as_me:1395: checking for default include-directory" >&5
1396 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1397 test -n "$verbose" && echo 1>&6
1398 for cf_symbol in \
1399         $includedir \
1400         $includedir/ncurses \
1401         $prefix/include \
1402         $prefix/include/ncurses \
1403         /usr/local/include \
1404         /usr/local/include/ncurses \
1405         /usr/include \
1406         /usr/include/ncurses
1407 do
1408         cf_dir=`eval echo $cf_symbol`
1409         if test -f $cf_dir/curses.h ; then
1410         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1411                 includedir="$cf_symbol"
1412                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1413                 break
1414         fi
1415         fi
1416         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1417 done
1418 echo "$as_me:1418: result: $includedir" >&5
1419 echo "${ECHO_T}$includedir" >&6
1420 fi
1421
1422 ###     Checks for programs.
1423
1424 # Check whether --with-ada or --without-ada was given.
1425 if test "${with_ada+set}" = set; then
1426   withval="$with_ada"
1427   cf_with_ada=$withval
1428 else
1429   cf_with_ada=yes
1430 fi;
1431 if test "x$cf_with_ada" = xyes
1432 then
1433         cf_PROG_CC="gnatgcc gcc cc"
1434 else
1435         cf_PROG_CC="gcc cc"
1436 fi
1437
1438 ac_ext=c
1439 ac_cpp='$CPP $CPPFLAGS'
1440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1443 ac_main_return=return
1444 if test -n "$ac_tool_prefix"; then
1445   for ac_prog in $cf_PROG_CC
1446   do
1447     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1448 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1449 echo "$as_me:1449: checking for $ac_word" >&5
1450 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1451 if test "${ac_cv_prog_CC+set}" = set; then
1452   echo $ECHO_N "(cached) $ECHO_C" >&6
1453 else
1454   if test -n "$CC"; then
1455   ac_cv_prog_CC="$CC" # Let the user override the test.
1456 else
1457   ac_save_IFS=$IFS; IFS=$ac_path_separator
1458 ac_dummy="$PATH"
1459 for ac_dir in $ac_dummy; do
1460   IFS=$ac_save_IFS
1461   test -z "$ac_dir" && ac_dir=.
1462   $as_executable_p "$ac_dir/$ac_word" || continue
1463 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1464 echo "$as_me:1464: found $ac_dir/$ac_word" >&5
1465 break
1466 done
1467
1468 fi
1469 fi
1470 CC=$ac_cv_prog_CC
1471 if test -n "$CC"; then
1472   echo "$as_me:1472: result: $CC" >&5
1473 echo "${ECHO_T}$CC" >&6
1474 else
1475   echo "$as_me:1475: result: no" >&5
1476 echo "${ECHO_T}no" >&6
1477 fi
1478
1479     test -n "$CC" && break
1480   done
1481 fi
1482 if test -z "$CC"; then
1483   ac_ct_CC=$CC
1484   for ac_prog in $cf_PROG_CC
1485 do
1486   # Extract the first word of "$ac_prog", so it can be a program name with args.
1487 set dummy $ac_prog; ac_word=$2
1488 echo "$as_me:1488: checking for $ac_word" >&5
1489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1490 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1491   echo $ECHO_N "(cached) $ECHO_C" >&6
1492 else
1493   if test -n "$ac_ct_CC"; then
1494   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1495 else
1496   ac_save_IFS=$IFS; IFS=$ac_path_separator
1497 ac_dummy="$PATH"
1498 for ac_dir in $ac_dummy; do
1499   IFS=$ac_save_IFS
1500   test -z "$ac_dir" && ac_dir=.
1501   $as_executable_p "$ac_dir/$ac_word" || continue
1502 ac_cv_prog_ac_ct_CC="$ac_prog"
1503 echo "$as_me:1503: found $ac_dir/$ac_word" >&5
1504 break
1505 done
1506
1507 fi
1508 fi
1509 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1510 if test -n "$ac_ct_CC"; then
1511   echo "$as_me:1511: result: $ac_ct_CC" >&5
1512 echo "${ECHO_T}$ac_ct_CC" >&6
1513 else
1514   echo "$as_me:1514: result: no" >&5
1515 echo "${ECHO_T}no" >&6
1516 fi
1517
1518   test -n "$ac_ct_CC" && break
1519 done
1520
1521   CC=$ac_ct_CC
1522 fi
1523
1524 test -z "$CC" && { { echo "$as_me:1524: error: no acceptable cc found in \$PATH" >&5
1525 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1526    { (exit 1); exit 1; }; }
1527
1528 # Provide some information about the compiler.
1529 echo "$as_me:1529:" \
1530      "checking for C compiler version" >&5
1531 ac_compiler=`set X $ac_compile; echo $2`
1532 { (eval echo "$as_me:1532: \"$ac_compiler --version </dev/null >&5\"") >&5
1533   (eval $ac_compiler --version </dev/null >&5) 2>&5
1534   ac_status=$?
1535   echo "$as_me:1535: \$? = $ac_status" >&5
1536   (exit $ac_status); }
1537 { (eval echo "$as_me:1537: \"$ac_compiler -v </dev/null >&5\"") >&5
1538   (eval $ac_compiler -v </dev/null >&5) 2>&5
1539   ac_status=$?
1540   echo "$as_me:1540: \$? = $ac_status" >&5
1541   (exit $ac_status); }
1542 { (eval echo "$as_me:1542: \"$ac_compiler -V </dev/null >&5\"") >&5
1543   (eval $ac_compiler -V </dev/null >&5) 2>&5
1544   ac_status=$?
1545   echo "$as_me:1545: \$? = $ac_status" >&5
1546   (exit $ac_status); }
1547
1548 cat >conftest.$ac_ext <<_ACEOF
1549 #line 1549 "configure"
1550 #include "confdefs.h"
1551
1552 int
1553 main ()
1554 {
1555
1556   ;
1557   return 0;
1558 }
1559 _ACEOF
1560 ac_clean_files_save=$ac_clean_files
1561 ac_clean_files="$ac_clean_files a.out a.exe"
1562 # Try to create an executable without -o first, disregard a.out.
1563 # It will help us diagnose broken compilers, and finding out an intuition
1564 # of exeext.
1565 echo "$as_me:1565: checking for C compiler default output" >&5
1566 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1567 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1568 if { (eval echo "$as_me:1568: \"$ac_link_default\"") >&5
1569   (eval $ac_link_default) 2>&5
1570   ac_status=$?
1571   echo "$as_me:1571: \$? = $ac_status" >&5
1572   (exit $ac_status); }; then
1573   # Find the output, starting from the most likely.  This scheme is
1574 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1575 # resort.
1576 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1577                 ls a.out conftest 2>/dev/null;
1578                 ls a.* conftest.* 2>/dev/null`; do
1579   case $ac_file in
1580     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1581     a.out ) # We found the default executable, but exeext='' is most
1582             # certainly right.
1583             break;;
1584     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1585           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1586           export ac_cv_exeext
1587           break;;
1588     * ) break;;
1589   esac
1590 done
1591 else
1592   echo "$as_me: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1594 { { echo "$as_me:1594: error: C compiler cannot create executables" >&5
1595 echo "$as_me: error: C compiler cannot create executables" >&2;}
1596    { (exit 77); exit 77; }; }
1597 fi
1598
1599 ac_exeext=$ac_cv_exeext
1600 echo "$as_me:1600: result: $ac_file" >&5
1601 echo "${ECHO_T}$ac_file" >&6
1602
1603 # Check the compiler produces executables we can run.  If not, either
1604 # the compiler is broken, or we cross compile.
1605 echo "$as_me:1605: checking whether the C compiler works" >&5
1606 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1607 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1608 # If not cross compiling, check that we can run a simple program.
1609 if test "$cross_compiling" != yes; then
1610   if { ac_try='./$ac_file'
1611   { (eval echo "$as_me:1611: \"$ac_try\"") >&5
1612   (eval $ac_try) 2>&5
1613   ac_status=$?
1614   echo "$as_me:1614: \$? = $ac_status" >&5
1615   (exit $ac_status); }; }; then
1616     cross_compiling=no
1617   else
1618     if test "$cross_compiling" = maybe; then
1619         cross_compiling=yes
1620     else
1621         { { echo "$as_me:1621: error: cannot run C compiled programs.
1622 If you meant to cross compile, use \`--host'." >&5
1623 echo "$as_me: error: cannot run C compiled programs.
1624 If you meant to cross compile, use \`--host'." >&2;}
1625    { (exit 1); exit 1; }; }
1626     fi
1627   fi
1628 fi
1629 echo "$as_me:1629: result: yes" >&5
1630 echo "${ECHO_T}yes" >&6
1631
1632 rm -f a.out a.exe conftest$ac_cv_exeext
1633 ac_clean_files=$ac_clean_files_save
1634 # Check the compiler produces executables we can run.  If not, either
1635 # the compiler is broken, or we cross compile.
1636 echo "$as_me:1636: checking whether we are cross compiling" >&5
1637 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1638 echo "$as_me:1638: result: $cross_compiling" >&5
1639 echo "${ECHO_T}$cross_compiling" >&6
1640
1641 echo "$as_me:1641: checking for executable suffix" >&5
1642 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1643 if { (eval echo "$as_me:1643: \"$ac_link\"") >&5
1644   (eval $ac_link) 2>&5
1645   ac_status=$?
1646   echo "$as_me:1646: \$? = $ac_status" >&5
1647   (exit $ac_status); }; then
1648   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1649 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1650 # work properly (i.e., refer to `conftest.exe'), while it won't with
1651 # `rm'.
1652 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1653   case $ac_file in
1654     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1655     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1656           export ac_cv_exeext
1657           break;;
1658     * ) break;;
1659   esac
1660 done
1661 else
1662   { { echo "$as_me:1662: error: cannot compute EXEEXT: cannot compile and link" >&5
1663 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1664    { (exit 1); exit 1; }; }
1665 fi
1666
1667 rm -f conftest$ac_cv_exeext
1668 echo "$as_me:1668: result: $ac_cv_exeext" >&5
1669 echo "${ECHO_T}$ac_cv_exeext" >&6
1670
1671 rm -f conftest.$ac_ext
1672 EXEEXT=$ac_cv_exeext
1673 ac_exeext=$EXEEXT
1674 echo "$as_me:1674: checking for object suffix" >&5
1675 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1676 if test "${ac_cv_objext+set}" = set; then
1677   echo $ECHO_N "(cached) $ECHO_C" >&6
1678 else
1679   cat >conftest.$ac_ext <<_ACEOF
1680 #line 1680 "configure"
1681 #include "confdefs.h"
1682
1683 int
1684 main ()
1685 {
1686
1687   ;
1688   return 0;
1689 }
1690 _ACEOF
1691 rm -f conftest.o conftest.obj
1692 if { (eval echo "$as_me:1692: \"$ac_compile\"") >&5
1693   (eval $ac_compile) 2>&5
1694   ac_status=$?
1695   echo "$as_me:1695: \$? = $ac_status" >&5
1696   (exit $ac_status); }; then
1697   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1698   case $ac_file in
1699     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1700     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1701        break;;
1702   esac
1703 done
1704 else
1705   echo "$as_me: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1707 { { echo "$as_me:1707: error: cannot compute OBJEXT: cannot compile" >&5
1708 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1709    { (exit 1); exit 1; }; }
1710 fi
1711
1712 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1713 fi
1714 echo "$as_me:1714: result: $ac_cv_objext" >&5
1715 echo "${ECHO_T}$ac_cv_objext" >&6
1716 OBJEXT=$ac_cv_objext
1717 ac_objext=$OBJEXT
1718 echo "$as_me:1718: checking whether we are using the GNU C compiler" >&5
1719 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1720 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1721   echo $ECHO_N "(cached) $ECHO_C" >&6
1722 else
1723   cat >conftest.$ac_ext <<_ACEOF
1724 #line 1724 "configure"
1725 #include "confdefs.h"
1726
1727 int
1728 main ()
1729 {
1730 #ifndef __GNUC__
1731        choke me
1732 #endif
1733
1734   ;
1735   return 0;
1736 }
1737 _ACEOF
1738 rm -f conftest.$ac_objext
1739 if { (eval echo "$as_me:1739: \"$ac_compile\"") >&5
1740   (eval $ac_compile) 2>&5
1741   ac_status=$?
1742   echo "$as_me:1742: \$? = $ac_status" >&5
1743   (exit $ac_status); } &&
1744          { ac_try='test -s conftest.$ac_objext'
1745   { (eval echo "$as_me:1745: \"$ac_try\"") >&5
1746   (eval $ac_try) 2>&5
1747   ac_status=$?
1748   echo "$as_me:1748: \$? = $ac_status" >&5
1749   (exit $ac_status); }; }; then
1750   ac_compiler_gnu=yes
1751 else
1752   echo "$as_me: failed program was:" >&5
1753 cat conftest.$ac_ext >&5
1754 ac_compiler_gnu=no
1755 fi
1756 rm -f conftest.$ac_objext conftest.$ac_ext
1757 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1758
1759 fi
1760 echo "$as_me:1760: result: $ac_cv_c_compiler_gnu" >&5
1761 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1762 GCC=`test $ac_compiler_gnu = yes && echo yes`
1763 ac_test_CFLAGS=${CFLAGS+set}
1764 ac_save_CFLAGS=$CFLAGS
1765 CFLAGS="-g"
1766 echo "$as_me:1766: checking whether $CC accepts -g" >&5
1767 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1768 if test "${ac_cv_prog_cc_g+set}" = set; then
1769   echo $ECHO_N "(cached) $ECHO_C" >&6
1770 else
1771   cat >conftest.$ac_ext <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1774
1775 int
1776 main ()
1777 {
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 rm -f conftest.$ac_objext
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785   (eval $ac_compile) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); } &&
1789          { ac_try='test -s conftest.$ac_objext'
1790   { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1791   (eval $ac_try) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit $ac_status); }; }; then
1795   ac_cv_prog_cc_g=yes
1796 else
1797   echo "$as_me: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 ac_cv_prog_cc_g=no
1800 fi
1801 rm -f conftest.$ac_objext conftest.$ac_ext
1802 fi
1803 echo "$as_me:1803: result: $ac_cv_prog_cc_g" >&5
1804 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1805 if test "$ac_test_CFLAGS" = set; then
1806   CFLAGS=$ac_save_CFLAGS
1807 elif test $ac_cv_prog_cc_g = yes; then
1808   if test "$GCC" = yes; then
1809     CFLAGS="-g -O2"
1810   else
1811     CFLAGS="-g"
1812   fi
1813 else
1814   if test "$GCC" = yes; then
1815     CFLAGS="-O2"
1816   else
1817     CFLAGS=
1818   fi
1819 fi
1820 # Some people use a C++ compiler to compile C.  Since we use `exit',
1821 # in C++ we need to declare it.  In case someone uses the same compiler
1822 # for both compiling C and C++ we need to have the C++ compiler decide
1823 # the declaration of exit, since it's the most demanding environment.
1824 cat >conftest.$ac_ext <<_ACEOF
1825 #ifndef __cplusplus
1826   choke me
1827 #endif
1828 _ACEOF
1829 rm -f conftest.$ac_objext
1830 if { (eval echo "$as_me:1830: \"$ac_compile\"") >&5
1831   (eval $ac_compile) 2>&5
1832   ac_status=$?
1833   echo "$as_me:1833: \$? = $ac_status" >&5
1834   (exit $ac_status); } &&
1835          { ac_try='test -s conftest.$ac_objext'
1836   { (eval echo "$as_me:1836: \"$ac_try\"") >&5
1837   (eval $ac_try) 2>&5
1838   ac_status=$?
1839   echo "$as_me:1839: \$? = $ac_status" >&5
1840   (exit $ac_status); }; }; then
1841   for ac_declaration in \
1842    ''\
1843    '#include <stdlib.h>' \
1844    'extern "C" void std::exit (int) throw (); using std::exit;' \
1845    'extern "C" void std::exit (int); using std::exit;' \
1846    'extern "C" void exit (int) throw ();' \
1847    'extern "C" void exit (int);' \
1848    'void exit (int);'
1849 do
1850   cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853 #include <stdlib.h>
1854 $ac_declaration
1855 int
1856 main ()
1857 {
1858 exit (42);
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.$ac_objext
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); } &&
1869          { ac_try='test -s conftest.$ac_objext'
1870   { (eval echo "$as_me:1870: \"$ac_try\"") >&5
1871   (eval $ac_try) 2>&5
1872   ac_status=$?
1873   echo "$as_me:1873: \$? = $ac_status" >&5
1874   (exit $ac_status); }; }; then
1875   :
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 continue
1880 fi
1881 rm -f conftest.$ac_objext conftest.$ac_ext
1882   cat >conftest.$ac_ext <<_ACEOF
1883 #line 1883 "configure"
1884 #include "confdefs.h"
1885 $ac_declaration
1886 int
1887 main ()
1888 {
1889 exit (42);
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   break
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 fi
1911 rm -f conftest.$ac_objext conftest.$ac_ext
1912 done
1913 rm -rf conftest*
1914 if test -n "$ac_declaration"; then
1915   echo '#ifdef __cplusplus' >>confdefs.h
1916   echo $ac_declaration      >>confdefs.h
1917   echo '#endif'             >>confdefs.h
1918 fi
1919
1920 else
1921   echo "$as_me: failed program was:" >&5
1922 cat conftest.$ac_ext >&5
1923 fi
1924 rm -f conftest.$ac_objext conftest.$ac_ext
1925 ac_ext=c
1926 ac_cpp='$CPP $CPPFLAGS'
1927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1930 ac_main_return=return
1931
1932 GCC_VERSION=none
1933 if test "$GCC" = yes ; then
1934         echo "$as_me:1934: checking version of $CC" >&5
1935 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1936         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.].*//'`"
1937         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1938         echo "$as_me:1938: result: $GCC_VERSION" >&5
1939 echo "${ECHO_T}$GCC_VERSION" >&6
1940 fi
1941
1942 echo "$as_me:1942: checking for $CC option to accept ANSI C" >&5
1943 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1944 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1945   echo $ECHO_N "(cached) $ECHO_C" >&6
1946 else
1947   ac_cv_prog_cc_stdc=no
1948 ac_save_CC=$CC
1949 cat >conftest.$ac_ext <<_ACEOF
1950 #line 1950 "configure"
1951 #include "confdefs.h"
1952 #include <stdarg.h>
1953 #include <stdio.h>
1954 #include <sys/types.h>
1955 #include <sys/stat.h>
1956 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1957 struct buf { int x; };
1958 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1959 static char *e (p, i)
1960      char **p;
1961      int i;
1962 {
1963   return p[i];
1964 }
1965 static char *f (char * (*g) (char **, int), char **p, ...)
1966 {
1967   char *s;
1968   va_list v;
1969   va_start (v,p);
1970   s = g (p, va_arg (v,int));
1971   va_end (v);
1972   return s;
1973 }
1974 int test (int i, double x);
1975 struct s1 {int (*f) (int a);};
1976 struct s2 {int (*f) (double a);};
1977 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1978 int argc;
1979 char **argv;
1980 int
1981 main ()
1982 {
1983 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1984   ;
1985   return 0;
1986 }
1987 _ACEOF
1988 # Don't try gcc -ansi; that turns off useful extensions and
1989 # breaks some systems' header files.
1990 # AIX                   -qlanglvl=ansi
1991 # Ultrix and OSF/1      -std1
1992 # HP-UX 10.20 and later -Ae
1993 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1994 # SVR4                  -Xc -D__EXTENSIONS__
1995 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1996 do
1997   CC="$ac_save_CC $ac_arg"
1998   rm -f conftest.$ac_objext
1999 if { (eval echo "$as_me:1999: \"$ac_compile\"") >&5
2000   (eval $ac_compile) 2>&5
2001   ac_status=$?
2002   echo "$as_me:2002: \$? = $ac_status" >&5
2003   (exit $ac_status); } &&
2004          { ac_try='test -s conftest.$ac_objext'
2005   { (eval echo "$as_me:2005: \"$ac_try\"") >&5
2006   (eval $ac_try) 2>&5
2007   ac_status=$?
2008   echo "$as_me:2008: \$? = $ac_status" >&5
2009   (exit $ac_status); }; }; then
2010   ac_cv_prog_cc_stdc=$ac_arg
2011 break
2012 else
2013   echo "$as_me: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 fi
2016 rm -f conftest.$ac_objext
2017 done
2018 rm -f conftest.$ac_ext conftest.$ac_objext
2019 CC=$ac_save_CC
2020
2021 fi
2022
2023 case "x$ac_cv_prog_cc_stdc" in
2024   x|xno)
2025     echo "$as_me:2025: result: none needed" >&5
2026 echo "${ECHO_T}none needed" >&6 ;;
2027   *)
2028     echo "$as_me:2028: result: $ac_cv_prog_cc_stdc" >&5
2029 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2030     CC="$CC $ac_cv_prog_cc_stdc" ;;
2031 esac
2032
2033 # This should have been defined by AC_PROG_CC
2034 : ${CC:=cc}
2035
2036 echo "$as_me:2036: checking \$CC variable" >&5
2037 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2038 case "$CC" in #(vi
2039 *[\ \   ]-[IUD]*)
2040         echo "$as_me:2040: result: broken" >&5
2041 echo "${ECHO_T}broken" >&6
2042         { echo "$as_me:2042: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2043 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2044         # humor him...
2045         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2046         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2047
2048 cf_fix_cppflags=no
2049 cf_new_cflags=
2050 cf_new_cppflags=
2051 cf_new_extra_cppflags=
2052
2053 for cf_add_cflags in $cf_flags
2054 do
2055 case $cf_fix_cppflags in
2056 no)
2057         case $cf_add_cflags in #(vi
2058         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2059                 case $cf_add_cflags in
2060                 -D*)
2061                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2062
2063                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2064                                 && test -z "${cf_tst_cflags}" \
2065                                 && cf_fix_cppflags=yes
2066
2067                         if test $cf_fix_cppflags = yes ; then
2068                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2069                                 continue
2070                         elif test "${cf_tst_cflags}" = "\"'" ; then
2071                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2072                                 continue
2073                         fi
2074                         ;;
2075                 esac
2076                 case "$CPPFLAGS" in
2077                 *$cf_add_cflags) #(vi
2078                         ;;
2079                 *) #(vi
2080                         case $cf_add_cflags in #(vi
2081                         -D*)
2082                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2083
2084 CPPFLAGS=`echo "$CPPFLAGS" | \
2085         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2086                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2087
2088                                 ;;
2089                         esac
2090                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2091                         ;;
2092                 esac
2093                 ;;
2094         *)
2095                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2096                 ;;
2097         esac
2098         ;;
2099 yes)
2100         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2101
2102         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2103
2104         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2105                 && test -z "${cf_tst_cflags}" \
2106                 && cf_fix_cppflags=no
2107         ;;
2108 esac
2109 done
2110
2111 if test -n "$cf_new_cflags" ; then
2112
2113         CFLAGS="$CFLAGS $cf_new_cflags"
2114 fi
2115
2116 if test -n "$cf_new_cppflags" ; then
2117
2118         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2119 fi
2120
2121 if test -n "$cf_new_extra_cppflags" ; then
2122
2123         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2124 fi
2125
2126         ;;
2127 *)
2128         echo "$as_me:2128: result: ok" >&5
2129 echo "${ECHO_T}ok" >&6
2130         ;;
2131 esac
2132
2133 ac_ext=c
2134 ac_cpp='$CPP $CPPFLAGS'
2135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2138 ac_main_return=return
2139 echo "$as_me:2139: checking how to run the C preprocessor" >&5
2140 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2141 # On Suns, sometimes $CPP names a directory.
2142 if test -n "$CPP" && test -d "$CPP"; then
2143   CPP=
2144 fi
2145 if test -z "$CPP"; then
2146   if test "${ac_cv_prog_CPP+set}" = set; then
2147   echo $ECHO_N "(cached) $ECHO_C" >&6
2148 else
2149       # Double quotes because CPP needs to be expanded
2150     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2151     do
2152       ac_preproc_ok=false
2153 for ac_c_preproc_warn_flag in '' yes
2154 do
2155   # Use a header file that comes with gcc, so configuring glibc
2156   # with a fresh cross-compiler works.
2157   # On the NeXT, cc -E runs the code through the compiler's parser,
2158   # not just through cpp. "Syntax error" is here to catch this case.
2159   cat >conftest.$ac_ext <<_ACEOF
2160 #line 2160 "configure"
2161 #include "confdefs.h"
2162 #include <assert.h>
2163                      Syntax error
2164 _ACEOF
2165 if { (eval echo "$as_me:2165: \"$ac_cpp conftest.$ac_ext\"") >&5
2166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2167   ac_status=$?
2168   egrep -v '^ *\+' conftest.er1 >conftest.err
2169   rm -f conftest.er1
2170   cat conftest.err >&5
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } >/dev/null; then
2173   if test -s conftest.err; then
2174     ac_cpp_err=$ac_c_preproc_warn_flag
2175   else
2176     ac_cpp_err=
2177   fi
2178 else
2179   ac_cpp_err=yes
2180 fi
2181 if test -z "$ac_cpp_err"; then
2182   :
2183 else
2184   echo "$as_me: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   # Broken: fails on valid input.
2187 continue
2188 fi
2189 rm -f conftest.err conftest.$ac_ext
2190
2191   # OK, works on sane cases.  Now check whether non-existent headers
2192   # can be detected and how.
2193   cat >conftest.$ac_ext <<_ACEOF
2194 #line 2194 "configure"
2195 #include "confdefs.h"
2196 #include <ac_nonexistent.h>
2197 _ACEOF
2198 if { (eval echo "$as_me:2198: \"$ac_cpp conftest.$ac_ext\"") >&5
2199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2200   ac_status=$?
2201   egrep -v '^ *\+' conftest.er1 >conftest.err
2202   rm -f conftest.er1
2203   cat conftest.err >&5
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit $ac_status); } >/dev/null; then
2206   if test -s conftest.err; then
2207     ac_cpp_err=$ac_c_preproc_warn_flag
2208   else
2209     ac_cpp_err=
2210   fi
2211 else
2212   ac_cpp_err=yes
2213 fi
2214 if test -z "$ac_cpp_err"; then
2215   # Broken: success on invalid input.
2216 continue
2217 else
2218   echo "$as_me: failed program was:" >&5
2219   cat conftest.$ac_ext >&5
2220   # Passes both tests.
2221 ac_preproc_ok=:
2222 break
2223 fi
2224 rm -f conftest.err conftest.$ac_ext
2225
2226 done
2227 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2228 rm -f conftest.err conftest.$ac_ext
2229 if $ac_preproc_ok; then
2230   break
2231 fi
2232
2233     done
2234     ac_cv_prog_CPP=$CPP
2235
2236 fi
2237   CPP=$ac_cv_prog_CPP
2238 else
2239   ac_cv_prog_CPP=$CPP
2240 fi
2241 echo "$as_me:2241: result: $CPP" >&5
2242 echo "${ECHO_T}$CPP" >&6
2243 ac_preproc_ok=false
2244 for ac_c_preproc_warn_flag in '' yes
2245 do
2246   # Use a header file that comes with gcc, so configuring glibc
2247   # with a fresh cross-compiler works.
2248   # On the NeXT, cc -E runs the code through the compiler's parser,
2249   # not just through cpp. "Syntax error" is here to catch this case.
2250   cat >conftest.$ac_ext <<_ACEOF
2251 #line 2251 "configure"
2252 #include "confdefs.h"
2253 #include <assert.h>
2254                      Syntax error
2255 _ACEOF
2256 if { (eval echo "$as_me:2256: \"$ac_cpp conftest.$ac_ext\"") >&5
2257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2258   ac_status=$?
2259   egrep -v '^ *\+' conftest.er1 >conftest.err
2260   rm -f conftest.er1
2261   cat conftest.err >&5
2262   echo "$as_me:2262: \$? = $ac_status" >&5
2263   (exit $ac_status); } >/dev/null; then
2264   if test -s conftest.err; then
2265     ac_cpp_err=$ac_c_preproc_warn_flag
2266   else
2267     ac_cpp_err=
2268   fi
2269 else
2270   ac_cpp_err=yes
2271 fi
2272 if test -z "$ac_cpp_err"; then
2273   :
2274 else
2275   echo "$as_me: failed program was:" >&5
2276   cat conftest.$ac_ext >&5
2277   # Broken: fails on valid input.
2278 continue
2279 fi
2280 rm -f conftest.err conftest.$ac_ext
2281
2282   # OK, works on sane cases.  Now check whether non-existent headers
2283   # can be detected and how.
2284   cat >conftest.$ac_ext <<_ACEOF
2285 #line 2285 "configure"
2286 #include "confdefs.h"
2287 #include <ac_nonexistent.h>
2288 _ACEOF
2289 if { (eval echo "$as_me:2289: \"$ac_cpp conftest.$ac_ext\"") >&5
2290   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2291   ac_status=$?
2292   egrep -v '^ *\+' conftest.er1 >conftest.err
2293   rm -f conftest.er1
2294   cat conftest.err >&5
2295   echo "$as_me:2295: \$? = $ac_status" >&5
2296   (exit $ac_status); } >/dev/null; then
2297   if test -s conftest.err; then
2298     ac_cpp_err=$ac_c_preproc_warn_flag
2299   else
2300     ac_cpp_err=
2301   fi
2302 else
2303   ac_cpp_err=yes
2304 fi
2305 if test -z "$ac_cpp_err"; then
2306   # Broken: success on invalid input.
2307 continue
2308 else
2309   echo "$as_me: failed program was:" >&5
2310   cat conftest.$ac_ext >&5
2311   # Passes both tests.
2312 ac_preproc_ok=:
2313 break
2314 fi
2315 rm -f conftest.err conftest.$ac_ext
2316
2317 done
2318 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2319 rm -f conftest.err conftest.$ac_ext
2320 if $ac_preproc_ok; then
2321   :
2322 else
2323   { { echo "$as_me:2323: error: C preprocessor \"$CPP\" fails sanity check" >&5
2324 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2325    { (exit 1); exit 1; }; }
2326 fi
2327
2328 ac_ext=c
2329 ac_cpp='$CPP $CPPFLAGS'
2330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2333 ac_main_return=return
2334
2335 if test $ac_cv_c_compiler_gnu = yes; then
2336     echo "$as_me:2336: checking whether $CC needs -traditional" >&5
2337 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2338 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2339   echo $ECHO_N "(cached) $ECHO_C" >&6
2340 else
2341     ac_pattern="Autoconf.*'x'"
2342   cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <sgtty.h>
2346 int Autoconf = TIOCGETP;
2347 _ACEOF
2348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2349   egrep "$ac_pattern" >/dev/null 2>&1; then
2350   ac_cv_prog_gcc_traditional=yes
2351 else
2352   ac_cv_prog_gcc_traditional=no
2353 fi
2354 rm -rf conftest*
2355
2356   if test $ac_cv_prog_gcc_traditional = no; then
2357     cat >conftest.$ac_ext <<_ACEOF
2358 #line 2358 "configure"
2359 #include "confdefs.h"
2360 #include <termio.h>
2361 int Autoconf = TCGETA;
2362 _ACEOF
2363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2364   egrep "$ac_pattern" >/dev/null 2>&1; then
2365   ac_cv_prog_gcc_traditional=yes
2366 fi
2367 rm -rf conftest*
2368
2369   fi
2370 fi
2371 echo "$as_me:2371: result: $ac_cv_prog_gcc_traditional" >&5
2372 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2373   if test $ac_cv_prog_gcc_traditional = yes; then
2374     CC="$CC -traditional"
2375   fi
2376 fi
2377
2378 echo "$as_me:2378: checking whether $CC understands -c and -o together" >&5
2379 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2380 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2381   echo $ECHO_N "(cached) $ECHO_C" >&6
2382 else
2383
2384 cat > conftest.$ac_ext <<CF_EOF
2385 #include <stdio.h>
2386 int main()
2387 {
2388         ${cf_cv_main_return:-return}(0);
2389 }
2390 CF_EOF
2391 # We do the test twice because some compilers refuse to overwrite an
2392 # existing .o file with -o, though they will create one.
2393 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2394 if { (eval echo "$as_me:2394: \"$ac_try\"") >&5
2395   (eval $ac_try) 2>&5
2396   ac_status=$?
2397   echo "$as_me:2397: \$? = $ac_status" >&5
2398   (exit $ac_status); } &&
2399   test -f conftest2.$ac_objext && { (eval echo "$as_me:2399: \"$ac_try\"") >&5
2400   (eval $ac_try) 2>&5
2401   ac_status=$?
2402   echo "$as_me:2402: \$? = $ac_status" >&5
2403   (exit $ac_status); };
2404 then
2405   eval cf_cv_prog_CC_c_o=yes
2406 else
2407   eval cf_cv_prog_CC_c_o=no
2408 fi
2409 rm -rf conftest*
2410
2411 fi
2412 if test $cf_cv_prog_CC_c_o = yes; then
2413   echo "$as_me:2413: result: yes" >&5
2414 echo "${ECHO_T}yes" >&6
2415 else
2416   echo "$as_me:2416: result: no" >&5
2417 echo "${ECHO_T}no" >&6
2418 fi
2419
2420 if test "$cross_compiling" = yes ; then
2421   LDCONFIG=:
2422 else
2423 case "$cf_cv_system_name" in #(vi
2424 dragonfly*|mirbsd*|freebsd*) #(vi
2425   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2426   ;;
2427 *) LDPATH=$PATH:/sbin:/usr/sbin
2428   # Extract the first word of "ldconfig", so it can be a program name with args.
2429 set dummy ldconfig; ac_word=$2
2430 echo "$as_me:2430: checking for $ac_word" >&5
2431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2432 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2433   echo $ECHO_N "(cached) $ECHO_C" >&6
2434 else
2435   case $LDCONFIG in
2436   [\\/]* | ?:[\\/]*)
2437   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2438   ;;
2439   *)
2440   ac_save_IFS=$IFS; IFS=$ac_path_separator
2441 ac_dummy="$LDPATH"
2442 for ac_dir in $ac_dummy; do
2443   IFS=$ac_save_IFS
2444   test -z "$ac_dir" && ac_dir=.
2445   if $as_executable_p "$ac_dir/$ac_word"; then
2446    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2447    echo "$as_me:2447: found $ac_dir/$ac_word" >&5
2448    break
2449 fi
2450 done
2451
2452   ;;
2453 esac
2454 fi
2455 LDCONFIG=$ac_cv_path_LDCONFIG
2456
2457 if test -n "$LDCONFIG"; then
2458   echo "$as_me:2458: result: $LDCONFIG" >&5
2459 echo "${ECHO_T}$LDCONFIG" >&6
2460 else
2461   echo "$as_me:2461: result: no" >&5
2462 echo "${ECHO_T}no" >&6
2463 fi
2464
2465   ;;
2466 esac
2467 fi
2468
2469 echo "$as_me:2469: checking if you want to ensure bool is consistent with C++" >&5
2470 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2471
2472 # Check whether --with-cxx or --without-cxx was given.
2473 if test "${with_cxx+set}" = set; then
2474   withval="$with_cxx"
2475   cf_with_cxx=$withval
2476 else
2477   cf_with_cxx=yes
2478 fi;
2479 echo "$as_me:2479: result: $cf_with_cxx" >&5
2480 echo "${ECHO_T}$cf_with_cxx" >&6
2481 if test "X$cf_with_cxx" = Xno ; then
2482         CXX=""
2483         GXX=""
2484 else
2485         # with autoconf 2.13, we can change the error to a warning:
2486                 ac_ext=cc
2487 ac_cpp='$CXXCPP $CPPFLAGS'
2488 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2491 ac_main_return=return
2492 if test -n "$ac_tool_prefix"; then
2493   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2494   do
2495     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2496 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2497 echo "$as_me:2497: checking for $ac_word" >&5
2498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2499 if test "${ac_cv_prog_CXX+set}" = set; then
2500   echo $ECHO_N "(cached) $ECHO_C" >&6
2501 else
2502   if test -n "$CXX"; then
2503   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2504 else
2505   ac_save_IFS=$IFS; IFS=$ac_path_separator
2506 ac_dummy="$PATH"
2507 for ac_dir in $ac_dummy; do
2508   IFS=$ac_save_IFS
2509   test -z "$ac_dir" && ac_dir=.
2510   $as_executable_p "$ac_dir/$ac_word" || continue
2511 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2512 echo "$as_me:2512: found $ac_dir/$ac_word" >&5
2513 break
2514 done
2515
2516 fi
2517 fi
2518 CXX=$ac_cv_prog_CXX
2519 if test -n "$CXX"; then
2520   echo "$as_me:2520: result: $CXX" >&5
2521 echo "${ECHO_T}$CXX" >&6
2522 else
2523   echo "$as_me:2523: result: no" >&5
2524 echo "${ECHO_T}no" >&6
2525 fi
2526
2527     test -n "$CXX" && break
2528   done
2529 fi
2530 if test -z "$CXX"; then
2531   ac_ct_CXX=$CXX
2532   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2533 do
2534   # Extract the first word of "$ac_prog", so it can be a program name with args.
2535 set dummy $ac_prog; ac_word=$2
2536 echo "$as_me:2536: checking for $ac_word" >&5
2537 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2538 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2539   echo $ECHO_N "(cached) $ECHO_C" >&6
2540 else
2541   if test -n "$ac_ct_CXX"; then
2542   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2543 else
2544   ac_save_IFS=$IFS; IFS=$ac_path_separator
2545 ac_dummy="$PATH"
2546 for ac_dir in $ac_dummy; do
2547   IFS=$ac_save_IFS
2548   test -z "$ac_dir" && ac_dir=.
2549   $as_executable_p "$ac_dir/$ac_word" || continue
2550 ac_cv_prog_ac_ct_CXX="$ac_prog"
2551 echo "$as_me:2551: found $ac_dir/$ac_word" >&5
2552 break
2553 done
2554
2555 fi
2556 fi
2557 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2558 if test -n "$ac_ct_CXX"; then
2559   echo "$as_me:2559: result: $ac_ct_CXX" >&5
2560 echo "${ECHO_T}$ac_ct_CXX" >&6
2561 else
2562   echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2564 fi
2565
2566   test -n "$ac_ct_CXX" && break
2567 done
2568 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2569
2570   CXX=$ac_ct_CXX
2571 fi
2572
2573 # Provide some information about the compiler.
2574 echo "$as_me:2574:" \
2575      "checking for C++ compiler version" >&5
2576 ac_compiler=`set X $ac_compile; echo $2`
2577 { (eval echo "$as_me:2577: \"$ac_compiler --version </dev/null >&5\"") >&5
2578   (eval $ac_compiler --version </dev/null >&5) 2>&5
2579   ac_status=$?
2580   echo "$as_me:2580: \$? = $ac_status" >&5
2581   (exit $ac_status); }
2582 { (eval echo "$as_me:2582: \"$ac_compiler -v </dev/null >&5\"") >&5
2583   (eval $ac_compiler -v </dev/null >&5) 2>&5
2584   ac_status=$?
2585   echo "$as_me:2585: \$? = $ac_status" >&5
2586   (exit $ac_status); }
2587 { (eval echo "$as_me:2587: \"$ac_compiler -V </dev/null >&5\"") >&5
2588   (eval $ac_compiler -V </dev/null >&5) 2>&5
2589   ac_status=$?
2590   echo "$as_me:2590: \$? = $ac_status" >&5
2591   (exit $ac_status); }
2592
2593 echo "$as_me:2593: checking whether we are using the GNU C++ compiler" >&5
2594 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2595 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2596   echo $ECHO_N "(cached) $ECHO_C" >&6
2597 else
2598   cat >conftest.$ac_ext <<_ACEOF
2599 #line 2599 "configure"
2600 #include "confdefs.h"
2601
2602 int
2603 main ()
2604 {
2605 #ifndef __GNUC__
2606        choke me
2607 #endif
2608
2609   ;
2610   return 0;
2611 }
2612 _ACEOF
2613 rm -f conftest.$ac_objext
2614 if { (eval echo "$as_me:2614: \"$ac_compile\"") >&5
2615   (eval $ac_compile) 2>&5
2616   ac_status=$?
2617   echo "$as_me:2617: \$? = $ac_status" >&5
2618   (exit $ac_status); } &&
2619          { ac_try='test -s conftest.$ac_objext'
2620   { (eval echo "$as_me:2620: \"$ac_try\"") >&5
2621   (eval $ac_try) 2>&5
2622   ac_status=$?
2623   echo "$as_me:2623: \$? = $ac_status" >&5
2624   (exit $ac_status); }; }; then
2625   ac_compiler_gnu=yes
2626 else
2627   echo "$as_me: failed program was:" >&5
2628 cat conftest.$ac_ext >&5
2629 ac_compiler_gnu=no
2630 fi
2631 rm -f conftest.$ac_objext conftest.$ac_ext
2632 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2633
2634 fi
2635 echo "$as_me:2635: result: $ac_cv_cxx_compiler_gnu" >&5
2636 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2637 GXX=`test $ac_compiler_gnu = yes && echo yes`
2638 ac_test_CXXFLAGS=${CXXFLAGS+set}
2639 ac_save_CXXFLAGS=$CXXFLAGS
2640 CXXFLAGS="-g"
2641 echo "$as_me:2641: checking whether $CXX accepts -g" >&5
2642 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2643 if test "${ac_cv_prog_cxx_g+set}" = set; then
2644   echo $ECHO_N "(cached) $ECHO_C" >&6
2645 else
2646   cat >conftest.$ac_ext <<_ACEOF
2647 #line 2647 "configure"
2648 #include "confdefs.h"
2649
2650 int
2651 main ()
2652 {
2653
2654   ;
2655   return 0;
2656 }
2657 _ACEOF
2658 rm -f conftest.$ac_objext
2659 if { (eval echo "$as_me:2659: \"$ac_compile\"") >&5
2660   (eval $ac_compile) 2>&5
2661   ac_status=$?
2662   echo "$as_me:2662: \$? = $ac_status" >&5
2663   (exit $ac_status); } &&
2664          { ac_try='test -s conftest.$ac_objext'
2665   { (eval echo "$as_me:2665: \"$ac_try\"") >&5
2666   (eval $ac_try) 2>&5
2667   ac_status=$?
2668   echo "$as_me:2668: \$? = $ac_status" >&5
2669   (exit $ac_status); }; }; then
2670   ac_cv_prog_cxx_g=yes
2671 else
2672   echo "$as_me: failed program was:" >&5
2673 cat conftest.$ac_ext >&5
2674 ac_cv_prog_cxx_g=no
2675 fi
2676 rm -f conftest.$ac_objext conftest.$ac_ext
2677 fi
2678 echo "$as_me:2678: result: $ac_cv_prog_cxx_g" >&5
2679 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2680 if test "$ac_test_CXXFLAGS" = set; then
2681   CXXFLAGS=$ac_save_CXXFLAGS
2682 elif test $ac_cv_prog_cxx_g = yes; then
2683   if test "$GXX" = yes; then
2684     CXXFLAGS="-g -O2"
2685   else
2686     CXXFLAGS="-g"
2687   fi
2688 else
2689   if test "$GXX" = yes; then
2690     CXXFLAGS="-O2"
2691   else
2692     CXXFLAGS=
2693   fi
2694 fi
2695 for ac_declaration in \
2696    ''\
2697    '#include <stdlib.h>' \
2698    'extern "C" void std::exit (int) throw (); using std::exit;' \
2699    'extern "C" void std::exit (int); using std::exit;' \
2700    'extern "C" void exit (int) throw ();' \
2701    'extern "C" void exit (int);' \
2702    'void exit (int);'
2703 do
2704   cat >conftest.$ac_ext <<_ACEOF
2705 #line 2705 "configure"
2706 #include "confdefs.h"
2707 #include <stdlib.h>
2708 $ac_declaration
2709 int
2710 main ()
2711 {
2712 exit (42);
2713   ;
2714   return 0;
2715 }
2716 _ACEOF
2717 rm -f conftest.$ac_objext
2718 if { (eval echo "$as_me:2718: \"$ac_compile\"") >&5
2719   (eval $ac_compile) 2>&5
2720   ac_status=$?
2721   echo "$as_me:2721: \$? = $ac_status" >&5
2722   (exit $ac_status); } &&
2723          { ac_try='test -s conftest.$ac_objext'
2724   { (eval echo "$as_me:2724: \"$ac_try\"") >&5
2725   (eval $ac_try) 2>&5
2726   ac_status=$?
2727   echo "$as_me:2727: \$? = $ac_status" >&5
2728   (exit $ac_status); }; }; then
2729   :
2730 else
2731   echo "$as_me: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2733 continue
2734 fi
2735 rm -f conftest.$ac_objext conftest.$ac_ext
2736   cat >conftest.$ac_ext <<_ACEOF
2737 #line 2737 "configure"
2738 #include "confdefs.h"
2739 $ac_declaration
2740 int
2741 main ()
2742 {
2743 exit (42);
2744   ;
2745   return 0;
2746 }
2747 _ACEOF
2748 rm -f conftest.$ac_objext
2749 if { (eval echo "$as_me:2749: \"$ac_compile\"") >&5
2750   (eval $ac_compile) 2>&5
2751   ac_status=$?
2752   echo "$as_me:2752: \$? = $ac_status" >&5
2753   (exit $ac_status); } &&
2754          { ac_try='test -s conftest.$ac_objext'
2755   { (eval echo "$as_me:2755: \"$ac_try\"") >&5
2756   (eval $ac_try) 2>&5
2757   ac_status=$?
2758   echo "$as_me:2758: \$? = $ac_status" >&5
2759   (exit $ac_status); }; }; then
2760   break
2761 else
2762   echo "$as_me: failed program was:" >&5
2763 cat conftest.$ac_ext >&5
2764 fi
2765 rm -f conftest.$ac_objext conftest.$ac_ext
2766 done
2767 rm -rf conftest*
2768 if test -n "$ac_declaration"; then
2769   echo '#ifdef __cplusplus' >>confdefs.h
2770   echo $ac_declaration      >>confdefs.h
2771   echo '#endif'             >>confdefs.h
2772 fi
2773
2774 ac_ext=c
2775 ac_cpp='$CPP $CPPFLAGS'
2776 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2777 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2778 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2779 ac_main_return=return
2780
2781                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2782         if test "$CXX" = "g++" ; then
2783                 # Extract the first word of "g++", so it can be a program name with args.
2784 set dummy g++; ac_word=$2
2785 echo "$as_me:2785: checking for $ac_word" >&5
2786 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2787 if test "${ac_cv_path_CXX+set}" = set; then
2788   echo $ECHO_N "(cached) $ECHO_C" >&6
2789 else
2790   case $CXX in
2791   [\\/]* | ?:[\\/]*)
2792   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2793   ;;
2794   *)
2795   ac_save_IFS=$IFS; IFS=$ac_path_separator
2796 ac_dummy="$PATH"
2797 for ac_dir in $ac_dummy; do
2798   IFS=$ac_save_IFS
2799   test -z "$ac_dir" && ac_dir=.
2800   if $as_executable_p "$ac_dir/$ac_word"; then
2801    ac_cv_path_CXX="$ac_dir/$ac_word"
2802    echo "$as_me:2802: found $ac_dir/$ac_word" >&5
2803    break
2804 fi
2805 done
2806
2807   ;;
2808 esac
2809 fi
2810 CXX=$ac_cv_path_CXX
2811
2812 if test -n "$CXX"; then
2813   echo "$as_me:2813: result: $CXX" >&5
2814 echo "${ECHO_T}$CXX" >&6
2815 else
2816   echo "$as_me:2816: result: no" >&5
2817 echo "${ECHO_T}no" >&6
2818 fi
2819
2820         fi
2821         case "x$CXX" in #(vi
2822         x|xg++)
2823                 { echo "$as_me:2823: WARNING: You don't have any C++ compiler, too bad" >&5
2824 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2825                 cf_with_cxx=no; CXX=""; GXX="";
2826                 ;;
2827         esac
2828 fi
2829
2830 GXX_VERSION=none
2831 if test "$GXX" = yes; then
2832         echo "$as_me:2832: checking version of ${CXX:-g++}" >&5
2833 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2834         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2835         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2836         echo "$as_me:2836: result: $GXX_VERSION" >&5
2837 echo "${ECHO_T}$GXX_VERSION" >&6
2838 fi
2839
2840 case $GXX_VERSION in
2841 1*|2.[0-6]*)
2842         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2843         # cf_cxx_library=no
2844         { echo "$as_me:2844: WARNING: templates do not work" >&5
2845 echo "$as_me: WARNING: templates do not work" >&2;}
2846         ;;
2847 esac
2848
2849 echo "$as_me:2849: checking if you want to build C++ binding and demo" >&5
2850 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2851
2852 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2853 if test "${with_cxx_binding+set}" = set; then
2854   withval="$with_cxx_binding"
2855   cf_with_cxx_binding=$withval
2856 else
2857   cf_with_cxx_binding=$cf_with_cxx
2858 fi;
2859 echo "$as_me:2859: result: $cf_with_cxx_binding" >&5
2860 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2861
2862 echo "$as_me:2862: checking if you want to build with Ada95" >&5
2863 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2864 echo "$as_me:2864: result: $cf_with_ada" >&5
2865 echo "${ECHO_T}$cf_with_ada" >&6
2866
2867 echo "$as_me:2867: checking if you want to install manpages" >&5
2868 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2869
2870 # Check whether --with-manpages or --without-manpages was given.
2871 if test "${with_manpages+set}" = set; then
2872   withval="$with_manpages"
2873   cf_with_manpages=$withval
2874 else
2875   cf_with_manpages=yes
2876 fi;
2877 echo "$as_me:2877: result: $cf_with_manpages" >&5
2878 echo "${ECHO_T}$cf_with_manpages" >&6
2879
2880 echo "$as_me:2880: checking if you want to build programs such as tic" >&5
2881 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2882
2883 # Check whether --with-progs or --without-progs was given.
2884 if test "${with_progs+set}" = set; then
2885   withval="$with_progs"
2886   cf_with_progs=$withval
2887 else
2888   cf_with_progs=yes
2889 fi;
2890 echo "$as_me:2890: result: $cf_with_progs" >&5
2891 echo "${ECHO_T}$cf_with_progs" >&6
2892
2893 echo "$as_me:2893: checking if you want to build test-programs" >&5
2894 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2895
2896 # Check whether --with-tests or --without-tests was given.
2897 if test "${with_tests+set}" = set; then
2898   withval="$with_tests"
2899   cf_with_tests=$withval
2900 else
2901   cf_with_tests=yes
2902 fi;
2903 echo "$as_me:2903: result: $cf_with_tests" >&5
2904 echo "${ECHO_T}$cf_with_tests" >&6
2905
2906 echo "$as_me:2906: checking if you wish to install curses.h" >&5
2907 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2908
2909 # Check whether --with-curses-h or --without-curses-h was given.
2910 if test "${with_curses_h+set}" = set; then
2911   withval="$with_curses_h"
2912   with_curses_h=$withval
2913 else
2914   with_curses_h=yes
2915 fi;
2916 echo "$as_me:2916: result: $with_curses_h" >&5
2917 echo "${ECHO_T}$with_curses_h" >&6
2918
2919 modules_to_build="ncurses"
2920 if test "X$cf_with_progs" != Xno ; then
2921 modules_to_build="$modules_to_build progs tack"
2922 fi
2923 modules_to_build="$modules_to_build panel menu form"
2924
2925 test "$program_prefix" != NONE &&
2926   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2927 # Use a double $ so make ignores it.
2928 test "$program_suffix" != NONE &&
2929   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2930 # Double any \ or $.  echo might interpret backslashes.
2931 # By default was `s,x,x', remove it if useless.
2932 cat <<\_ACEOF >conftest.sed
2933 s/[\\$]/&&/g;s/;s,x,x,$//
2934 _ACEOF
2935 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2936 rm conftest.sed
2937
2938 for ac_prog in mawk gawk nawk awk
2939 do
2940   # Extract the first word of "$ac_prog", so it can be a program name with args.
2941 set dummy $ac_prog; ac_word=$2
2942 echo "$as_me:2942: checking for $ac_word" >&5
2943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2944 if test "${ac_cv_prog_AWK+set}" = set; then
2945   echo $ECHO_N "(cached) $ECHO_C" >&6
2946 else
2947   if test -n "$AWK"; then
2948   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2949 else
2950   ac_save_IFS=$IFS; IFS=$ac_path_separator
2951 ac_dummy="$PATH"
2952 for ac_dir in $ac_dummy; do
2953   IFS=$ac_save_IFS
2954   test -z "$ac_dir" && ac_dir=.
2955   $as_executable_p "$ac_dir/$ac_word" || continue
2956 ac_cv_prog_AWK="$ac_prog"
2957 echo "$as_me:2957: found $ac_dir/$ac_word" >&5
2958 break
2959 done
2960
2961 fi
2962 fi
2963 AWK=$ac_cv_prog_AWK
2964 if test -n "$AWK"; then
2965   echo "$as_me:2965: result: $AWK" >&5
2966 echo "${ECHO_T}$AWK" >&6
2967 else
2968   echo "$as_me:2968: result: no" >&5
2969 echo "${ECHO_T}no" >&6
2970 fi
2971
2972   test -n "$AWK" && break
2973 done
2974
2975 test -z "$AWK" && { { echo "$as_me:2975: error: No awk program found" >&5
2976 echo "$as_me: error: No awk program found" >&2;}
2977    { (exit 1); exit 1; }; }
2978
2979 echo "$as_me:2979: checking for egrep" >&5
2980 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2981 if test "${ac_cv_prog_egrep+set}" = set; then
2982   echo $ECHO_N "(cached) $ECHO_C" >&6
2983 else
2984   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2985     then ac_cv_prog_egrep='grep -E'
2986     else ac_cv_prog_egrep='egrep'
2987     fi
2988 fi
2989 echo "$as_me:2989: result: $ac_cv_prog_egrep" >&5
2990 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2991  EGREP=$ac_cv_prog_egrep
2992
2993 test -z "$EGREP" && { { echo "$as_me:2993: error: No egrep program found" >&5
2994 echo "$as_me: error: No egrep program found" >&2;}
2995    { (exit 1); exit 1; }; }
2996
2997 # Find a good install program.  We prefer a C program (faster),
2998 # so one script is as good as another.  But avoid the broken or
2999 # incompatible versions:
3000 # SysV /etc/install, /usr/sbin/install
3001 # SunOS /usr/etc/install
3002 # IRIX /sbin/install
3003 # AIX /bin/install
3004 # AmigaOS /C/install, which installs bootblocks on floppy discs
3005 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3006 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3007 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3008 # ./install, which can be erroneously created by make from ./install.sh.
3009 echo "$as_me:3009: checking for a BSD compatible install" >&5
3010 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3011 if test -z "$INSTALL"; then
3012 if test "${ac_cv_path_install+set}" = set; then
3013   echo $ECHO_N "(cached) $ECHO_C" >&6
3014 else
3015     ac_save_IFS=$IFS; IFS=$ac_path_separator
3016   for ac_dir in $PATH; do
3017     IFS=$ac_save_IFS
3018     # Account for people who put trailing slashes in PATH elements.
3019     case $ac_dir/ in
3020     / | ./ | .// | /cC/* \
3021     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3022     | /usr/ucb/* ) ;;
3023     *)
3024       # OSF1 and SCO ODT 3.0 have their own names for install.
3025       # Don't use installbsd from OSF since it installs stuff as root
3026       # by default.
3027       for ac_prog in ginstall scoinst install; do
3028         if $as_executable_p "$ac_dir/$ac_prog"; then
3029           if test $ac_prog = install &&
3030             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3031             # AIX install.  It has an incompatible calling convention.
3032             :
3033           elif test $ac_prog = install &&
3034             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3035             # program-specific install script used by HP pwplus--don't use.
3036             :
3037           else
3038             ac_cv_path_install="$ac_dir/$ac_prog -c"
3039             break 2
3040           fi
3041         fi
3042       done
3043       ;;
3044     esac
3045   done
3046
3047 fi
3048   if test "${ac_cv_path_install+set}" = set; then
3049     INSTALL=$ac_cv_path_install
3050   else
3051     # As a last resort, use the slow shell script.  We don't cache a
3052     # path for INSTALL within a source directory, because that will
3053     # break other packages using the cache if that directory is
3054     # removed, or if the path is relative.
3055     INSTALL=$ac_install_sh
3056   fi
3057 fi
3058 echo "$as_me:3058: result: $INSTALL" >&5
3059 echo "${ECHO_T}$INSTALL" >&6
3060
3061 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3062 # It thinks the first close brace ends the variable substitution.
3063 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3064
3065 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3066
3067 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3068
3069 case $INSTALL in
3070 /*)
3071   ;;
3072 *)
3073   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3074   test -z "$cf_dir" && cf_dir=.
3075   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3076   ;;
3077 esac
3078
3079 for ac_prog in tdlint lint alint splint lclint
3080 do
3081   # Extract the first word of "$ac_prog", so it can be a program name with args.
3082 set dummy $ac_prog; ac_word=$2
3083 echo "$as_me:3083: checking for $ac_word" >&5
3084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3085 if test "${ac_cv_prog_LINT+set}" = set; then
3086   echo $ECHO_N "(cached) $ECHO_C" >&6
3087 else
3088   if test -n "$LINT"; then
3089   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3090 else
3091   ac_save_IFS=$IFS; IFS=$ac_path_separator
3092 ac_dummy="$PATH"
3093 for ac_dir in $ac_dummy; do
3094   IFS=$ac_save_IFS
3095   test -z "$ac_dir" && ac_dir=.
3096   $as_executable_p "$ac_dir/$ac_word" || continue
3097 ac_cv_prog_LINT="$ac_prog"
3098 echo "$as_me:3098: found $ac_dir/$ac_word" >&5
3099 break
3100 done
3101
3102 fi
3103 fi
3104 LINT=$ac_cv_prog_LINT
3105 if test -n "$LINT"; then
3106   echo "$as_me:3106: result: $LINT" >&5
3107 echo "${ECHO_T}$LINT" >&6
3108 else
3109   echo "$as_me:3109: result: no" >&5
3110 echo "${ECHO_T}no" >&6
3111 fi
3112
3113   test -n "$LINT" && break
3114 done
3115
3116 echo "$as_me:3116: checking whether ln -s works" >&5
3117 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3118 LN_S=$as_ln_s
3119 if test "$LN_S" = "ln -s"; then
3120   echo "$as_me:3120: result: yes" >&5
3121 echo "${ECHO_T}yes" >&6
3122 else
3123   echo "$as_me:3123: result: no, using $LN_S" >&5
3124 echo "${ECHO_T}no, using $LN_S" >&6
3125 fi
3126
3127 echo "$as_me:3127: checking if $LN_S -f options work" >&5
3128 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3129
3130 rm -f conf$$.src conf$$dst
3131 echo >conf$$.dst
3132 echo first >conf$$.src
3133 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3134         cf_prog_ln_sf=yes
3135 else
3136         cf_prog_ln_sf=no
3137 fi
3138 rm -f conf$$.dst conf$$src
3139 echo "$as_me:3139: result: $cf_prog_ln_sf" >&5
3140 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3141
3142 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3143
3144 echo "$as_me:3144: checking for long file names" >&5
3145 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3146 if test "${ac_cv_sys_long_file_names+set}" = set; then
3147   echo $ECHO_N "(cached) $ECHO_C" >&6
3148 else
3149   ac_cv_sys_long_file_names=yes
3150 # Test for long file names in all the places we know might matter:
3151 #      .                the current directory, where building will happen
3152 #      $prefix/lib      where we will be installing things
3153 #      $exec_prefix/lib likewise
3154 # eval it to expand exec_prefix.
3155 #      $TMPDIR          if set, where it might want to write temporary files
3156 # if $TMPDIR is not set:
3157 #      /tmp             where it might want to write temporary files
3158 #      /var/tmp         likewise
3159 #      /usr/tmp         likewise
3160 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3161   ac_tmpdirs=$TMPDIR
3162 else
3163   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3164 fi
3165 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3166   test -d $ac_dir || continue
3167   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3168   ac_xdir=$ac_dir/cf$$
3169   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3170   ac_tf1=$ac_xdir/conftest9012345
3171   ac_tf2=$ac_xdir/conftest9012346
3172   (echo 1 >$ac_tf1) 2>/dev/null
3173   (echo 2 >$ac_tf2) 2>/dev/null
3174   ac_val=`cat $ac_tf1 2>/dev/null`
3175   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3176     ac_cv_sys_long_file_names=no
3177     rm -rf $ac_xdir 2>/dev/null
3178     break
3179   fi
3180   rm -rf $ac_xdir 2>/dev/null
3181 done
3182 fi
3183 echo "$as_me:3183: result: $ac_cv_sys_long_file_names" >&5
3184 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3185 if test $ac_cv_sys_long_file_names = yes; then
3186
3187 cat >>confdefs.h <<\EOF
3188 #define HAVE_LONG_FILE_NAMES 1
3189 EOF
3190
3191 fi
3192
3193 # if we find pkg-config, check if we should install the ".pc" files.
3194
3195 echo "$as_me:3195: checking if you want to use pkg-config" >&5
3196 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3197
3198 # Check whether --with-pkg-config or --without-pkg-config was given.
3199 if test "${with_pkg_config+set}" = set; then
3200   withval="$with_pkg_config"
3201   cf_pkg_config=$withval
3202 else
3203   cf_pkg_config=yes
3204 fi;
3205 echo "$as_me:3205: result: $cf_pkg_config" >&5
3206 echo "${ECHO_T}$cf_pkg_config" >&6
3207
3208 case $cf_pkg_config in #(vi
3209 no) #(vi
3210         PKG_CONFIG=none
3211         ;;
3212 yes) #(vi
3213
3214 if test -n "$ac_tool_prefix"; then
3215   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3216 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3217 echo "$as_me:3217: checking for $ac_word" >&5
3218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3219 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3220   echo $ECHO_N "(cached) $ECHO_C" >&6
3221 else
3222   case $PKG_CONFIG in
3223   [\\/]* | ?:[\\/]*)
3224   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3225   ;;
3226   *)
3227   ac_save_IFS=$IFS; IFS=$ac_path_separator
3228 ac_dummy="$PATH"
3229 for ac_dir in $ac_dummy; do
3230   IFS=$ac_save_IFS
3231   test -z "$ac_dir" && ac_dir=.
3232   if $as_executable_p "$ac_dir/$ac_word"; then
3233    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3234    echo "$as_me:3234: found $ac_dir/$ac_word" >&5
3235    break
3236 fi
3237 done
3238
3239   ;;
3240 esac
3241 fi
3242 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3243
3244 if test -n "$PKG_CONFIG"; then
3245   echo "$as_me:3245: result: $PKG_CONFIG" >&5
3246 echo "${ECHO_T}$PKG_CONFIG" >&6
3247 else
3248   echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252 fi
3253 if test -z "$ac_cv_path_PKG_CONFIG"; then
3254   ac_pt_PKG_CONFIG=$PKG_CONFIG
3255   # Extract the first word of "pkg-config", so it can be a program name with args.
3256 set dummy pkg-config; ac_word=$2
3257 echo "$as_me:3257: checking for $ac_word" >&5
3258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3259 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3260   echo $ECHO_N "(cached) $ECHO_C" >&6
3261 else
3262   case $ac_pt_PKG_CONFIG in
3263   [\\/]* | ?:[\\/]*)
3264   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3265   ;;
3266   *)
3267   ac_save_IFS=$IFS; IFS=$ac_path_separator
3268 ac_dummy="$PATH"
3269 for ac_dir in $ac_dummy; do
3270   IFS=$ac_save_IFS
3271   test -z "$ac_dir" && ac_dir=.
3272   if $as_executable_p "$ac_dir/$ac_word"; then
3273    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3274    echo "$as_me:3274: found $ac_dir/$ac_word" >&5
3275    break
3276 fi
3277 done
3278
3279   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3280   ;;
3281 esac
3282 fi
3283 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3284
3285 if test -n "$ac_pt_PKG_CONFIG"; then
3286   echo "$as_me:3286: result: $ac_pt_PKG_CONFIG" >&5
3287 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3288 else
3289   echo "$as_me:3289: result: no" >&5
3290 echo "${ECHO_T}no" >&6
3291 fi
3292
3293   PKG_CONFIG=$ac_pt_PKG_CONFIG
3294 else
3295   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3296 fi
3297
3298         ;;
3299 *)
3300         PKG_CONFIG=$withval
3301         ;;
3302 esac
3303
3304 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3305 if test "$PKG_CONFIG" != none ; then
3306
3307 if test "x$prefix" != xNONE; then
3308   cf_path_syntax="$prefix"
3309 else
3310   cf_path_syntax="$ac_default_prefix"
3311 fi
3312
3313 case ".$PKG_CONFIG" in #(vi
3314 .\$\(*\)*|.\'*\'*) #(vi
3315   ;;
3316 ..|./*|.\\*) #(vi
3317   ;;
3318 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3319   ;;
3320 .\${*prefix}*|.\${*dir}*) #(vi
3321   eval PKG_CONFIG="$PKG_CONFIG"
3322   case ".$PKG_CONFIG" in #(vi
3323   .NONE/*)
3324     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3325     ;;
3326   esac
3327   ;; #(vi
3328 .no|.NONE/*)
3329   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3330   ;;
3331 *)
3332   { { echo "$as_me:3332: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3333 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3334    { (exit 1); exit 1; }; }
3335   ;;
3336 esac
3337
3338 fi
3339
3340 if test "$PKG_CONFIG" != none ; then
3341         echo "$as_me:3341: checking for $PKG_CONFIG library directory" >&5
3342 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3343
3344 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3345 if test "${with_pkg_config_libdir+set}" = set; then
3346   withval="$with_pkg_config_libdir"
3347   PKG_CONFIG_LIBDIR=$withval
3348 else
3349   PKG_CONFIG_LIBDIR=yes
3350 fi;
3351
3352         case x$PKG_CONFIG_LIBDIR in #(vi
3353         x/*) #(vi
3354                 ;;
3355         xyes) #(vi
3356                 # look for the library directory using the same prefix as the executable
3357                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3358                 case x`(arch) 2>/dev/null` in #(vi
3359                 *64) #(vi
3360                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3361                         do
3362                                 if test -d $cf_config/pkgconfig
3363                                 then
3364                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3365                                         break
3366                                 fi
3367                         done
3368                         ;;
3369                 *)
3370                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3371                         ;;
3372                 esac
3373                 ;;
3374         *)
3375                 ;;
3376         esac
3377
3378         echo "$as_me:3378: result: $PKG_CONFIG_LIBDIR" >&5
3379 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3380 fi
3381
3382 if test "$PKG_CONFIG" != none ; then
3383         echo "$as_me:3383: checking if we should install .pc files for $PKG_CONFIG" >&5
3384 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3385
3386 # Check whether --enable-pc-files or --disable-pc-files was given.
3387 if test "${enable_pc_files+set}" = set; then
3388   enableval="$enable_pc_files"
3389   enable_pc_files=$enableval
3390 else
3391   enable_pc_files=no
3392 fi;
3393         echo "$as_me:3393: result: $enable_pc_files" >&5
3394 echo "${ECHO_T}$enable_pc_files" >&6
3395         if test "$enable_pc_files" != no
3396         then
3397
3398 if test "x$prefix" != xNONE; then
3399   cf_path_syntax="$prefix"
3400 else
3401   cf_path_syntax="$ac_default_prefix"
3402 fi
3403
3404 case ".$PKG_CONFIG_LIBDIR" in #(vi
3405 .\$\(*\)*|.\'*\'*) #(vi
3406   ;;
3407 ..|./*|.\\*) #(vi
3408   ;;
3409 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3410   ;;
3411 .\${*prefix}*|.\${*dir}*) #(vi
3412   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3413   case ".$PKG_CONFIG_LIBDIR" in #(vi
3414   .NONE/*)
3415     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3416     ;;
3417   esac
3418   ;; #(vi
3419 .no|.NONE/*)
3420   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3421   ;;
3422 *)
3423   { { echo "$as_me:3423: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3424 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3425    { (exit 1); exit 1; }; }
3426   ;;
3427 esac
3428
3429         fi
3430 else
3431         enable_pc_files=no
3432 fi
3433
3434 echo "$as_me:3434: checking if we should assume mixed-case filenames" >&5
3435 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3436
3437 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3438 if test "${enable_mixed_case+set}" = set; then
3439   enableval="$enable_mixed_case"
3440   enable_mixedcase=$enableval
3441 else
3442   enable_mixedcase=auto
3443 fi;
3444 echo "$as_me:3444: result: $enable_mixedcase" >&5
3445 echo "${ECHO_T}$enable_mixedcase" >&6
3446 if test "$enable_mixedcase" = "auto" ; then
3447
3448 echo "$as_me:3448: checking if filesystem supports mixed-case filenames" >&5
3449 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3450 if test "${cf_cv_mixedcase+set}" = set; then
3451   echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453
3454 if test "$cross_compiling" = yes ; then
3455         case $target_alias in #(vi
3456         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3457                 cf_cv_mixedcase=no
3458                 ;;
3459         *)
3460                 cf_cv_mixedcase=yes
3461                 ;;
3462         esac
3463 else
3464         rm -f conftest CONFTEST
3465         echo test >conftest
3466         if test -f CONFTEST ; then
3467                 cf_cv_mixedcase=no
3468         else
3469                 cf_cv_mixedcase=yes
3470         fi
3471         rm -f conftest CONFTEST
3472 fi
3473
3474 fi
3475 echo "$as_me:3475: result: $cf_cv_mixedcase" >&5
3476 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3477 test "$cf_cv_mixedcase" = yes &&
3478 cat >>confdefs.h <<\EOF
3479 #define MIXEDCASE_FILENAMES 1
3480 EOF
3481
3482 else
3483     cf_cv_mixedcase=$enable_mixedcase
3484     if test "x$enable_mixedcase" = "xyes" ; then
3485
3486 cat >>confdefs.h <<\EOF
3487 #define MIXEDCASE_FILENAMES 1
3488 EOF
3489
3490     fi
3491 fi
3492
3493 # do this after mixed-case option (tags/TAGS is not as important as tic).
3494 echo "$as_me:3494: checking whether ${MAKE-make} sets \${MAKE}" >&5
3495 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3496 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3497 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3498   echo $ECHO_N "(cached) $ECHO_C" >&6
3499 else
3500   cat >conftest.make <<\EOF
3501 all:
3502         @echo 'ac_maketemp="${MAKE}"'
3503 EOF
3504 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3505 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3506 if test -n "$ac_maketemp"; then
3507   eval ac_cv_prog_make_${ac_make}_set=yes
3508 else
3509   eval ac_cv_prog_make_${ac_make}_set=no
3510 fi
3511 rm -f conftest.make
3512 fi
3513 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3514   echo "$as_me:3514: result: yes" >&5
3515 echo "${ECHO_T}yes" >&6
3516   SET_MAKE=
3517 else
3518   echo "$as_me:3518: result: no" >&5
3519 echo "${ECHO_T}no" >&6
3520   SET_MAKE="MAKE=${MAKE-make}"
3521 fi
3522
3523 for ac_prog in exctags ctags
3524 do
3525   # Extract the first word of "$ac_prog", so it can be a program name with args.
3526 set dummy $ac_prog; ac_word=$2
3527 echo "$as_me:3527: checking for $ac_word" >&5
3528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3529 if test "${ac_cv_prog_CTAGS+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if test -n "$CTAGS"; then
3533   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3534 else
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   $as_executable_p "$ac_dir/$ac_word" || continue
3541 ac_cv_prog_CTAGS="$ac_prog"
3542 echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543 break
3544 done
3545
3546 fi
3547 fi
3548 CTAGS=$ac_cv_prog_CTAGS
3549 if test -n "$CTAGS"; then
3550   echo "$as_me:3550: result: $CTAGS" >&5
3551 echo "${ECHO_T}$CTAGS" >&6
3552 else
3553   echo "$as_me:3553: result: no" >&5
3554 echo "${ECHO_T}no" >&6
3555 fi
3556
3557   test -n "$CTAGS" && break
3558 done
3559
3560 for ac_prog in exetags etags
3561 do
3562   # Extract the first word of "$ac_prog", so it can be a program name with args.
3563 set dummy $ac_prog; ac_word=$2
3564 echo "$as_me:3564: checking for $ac_word" >&5
3565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3566 if test "${ac_cv_prog_ETAGS+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569   if test -n "$ETAGS"; then
3570   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3571 else
3572   ac_save_IFS=$IFS; IFS=$ac_path_separator
3573 ac_dummy="$PATH"
3574 for ac_dir in $ac_dummy; do
3575   IFS=$ac_save_IFS
3576   test -z "$ac_dir" && ac_dir=.
3577   $as_executable_p "$ac_dir/$ac_word" || continue
3578 ac_cv_prog_ETAGS="$ac_prog"
3579 echo "$as_me:3579: found $ac_dir/$ac_word" >&5
3580 break
3581 done
3582
3583 fi
3584 fi
3585 ETAGS=$ac_cv_prog_ETAGS
3586 if test -n "$ETAGS"; then
3587   echo "$as_me:3587: result: $ETAGS" >&5
3588 echo "${ECHO_T}$ETAGS" >&6
3589 else
3590   echo "$as_me:3590: result: no" >&5
3591 echo "${ECHO_T}no" >&6
3592 fi
3593
3594   test -n "$ETAGS" && break
3595 done
3596
3597 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3598 set dummy ${CTAGS:-ctags}; ac_word=$2
3599 echo "$as_me:3599: checking for $ac_word" >&5
3600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3601 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3602   echo $ECHO_N "(cached) $ECHO_C" >&6
3603 else
3604   if test -n "$MAKE_LOWER_TAGS"; then
3605   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3606 else
3607   ac_save_IFS=$IFS; IFS=$ac_path_separator
3608 ac_dummy="$PATH"
3609 for ac_dir in $ac_dummy; do
3610   IFS=$ac_save_IFS
3611   test -z "$ac_dir" && ac_dir=.
3612   $as_executable_p "$ac_dir/$ac_word" || continue
3613 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3614 echo "$as_me:3614: found $ac_dir/$ac_word" >&5
3615 break
3616 done
3617
3618   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3619 fi
3620 fi
3621 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3622 if test -n "$MAKE_LOWER_TAGS"; then
3623   echo "$as_me:3623: result: $MAKE_LOWER_TAGS" >&5
3624 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3625 else
3626   echo "$as_me:3626: result: no" >&5
3627 echo "${ECHO_T}no" >&6
3628 fi
3629
3630 if test "$cf_cv_mixedcase" = yes ; then
3631         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3632 set dummy ${ETAGS:-etags}; ac_word=$2
3633 echo "$as_me:3633: checking for $ac_word" >&5
3634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3635 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3636   echo $ECHO_N "(cached) $ECHO_C" >&6
3637 else
3638   if test -n "$MAKE_UPPER_TAGS"; then
3639   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3640 else
3641   ac_save_IFS=$IFS; IFS=$ac_path_separator
3642 ac_dummy="$PATH"
3643 for ac_dir in $ac_dummy; do
3644   IFS=$ac_save_IFS
3645   test -z "$ac_dir" && ac_dir=.
3646   $as_executable_p "$ac_dir/$ac_word" || continue
3647 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3648 echo "$as_me:3648: found $ac_dir/$ac_word" >&5
3649 break
3650 done
3651
3652   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3653 fi
3654 fi
3655 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3656 if test -n "$MAKE_UPPER_TAGS"; then
3657   echo "$as_me:3657: result: $MAKE_UPPER_TAGS" >&5
3658 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3659 else
3660   echo "$as_me:3660: result: no" >&5
3661 echo "${ECHO_T}no" >&6
3662 fi
3663
3664 else
3665         MAKE_UPPER_TAGS=no
3666 fi
3667
3668 if test "$MAKE_UPPER_TAGS" = yes ; then
3669         MAKE_UPPER_TAGS=
3670 else
3671         MAKE_UPPER_TAGS="#"
3672 fi
3673
3674 if test "$MAKE_LOWER_TAGS" = yes ; then
3675         MAKE_LOWER_TAGS=
3676 else
3677         MAKE_LOWER_TAGS="#"
3678 fi
3679
3680 echo "$as_me:3680: checking for makeflags variable" >&5
3681 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3682 if test "${cf_cv_makeflags+set}" = set; then
3683   echo $ECHO_N "(cached) $ECHO_C" >&6
3684 else
3685
3686         cf_cv_makeflags=''
3687         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3688         do
3689                 cat >cf_makeflags.tmp <<CF_EOF
3690 SHELL = /bin/sh
3691 all :
3692         @ echo '.$cf_option'
3693 CF_EOF
3694                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3695                 case "$cf_result" in
3696                 .*k)
3697                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3698                         case "$cf_result" in
3699                         .*CC=*) cf_cv_makeflags=
3700                                 ;;
3701                         *)      cf_cv_makeflags=$cf_option
3702                                 ;;
3703                         esac
3704                         break
3705                         ;;
3706                 .-)     ;;
3707                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3708                         ;;
3709                 esac
3710         done
3711         rm -f cf_makeflags.tmp
3712
3713 fi
3714 echo "$as_me:3714: result: $cf_cv_makeflags" >&5
3715 echo "${ECHO_T}$cf_cv_makeflags" >&6
3716
3717 if test -n "$ac_tool_prefix"; then
3718   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3719 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3720 echo "$as_me:3720: checking for $ac_word" >&5
3721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3722 if test "${ac_cv_prog_RANLIB+set}" = set; then
3723   echo $ECHO_N "(cached) $ECHO_C" >&6
3724 else
3725   if test -n "$RANLIB"; then
3726   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3727 else
3728   ac_save_IFS=$IFS; IFS=$ac_path_separator
3729 ac_dummy="$PATH"
3730 for ac_dir in $ac_dummy; do
3731   IFS=$ac_save_IFS
3732   test -z "$ac_dir" && ac_dir=.
3733   $as_executable_p "$ac_dir/$ac_word" || continue
3734 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3735 echo "$as_me:3735: found $ac_dir/$ac_word" >&5
3736 break
3737 done
3738
3739 fi
3740 fi
3741 RANLIB=$ac_cv_prog_RANLIB
3742 if test -n "$RANLIB"; then
3743   echo "$as_me:3743: result: $RANLIB" >&5
3744 echo "${ECHO_T}$RANLIB" >&6
3745 else
3746   echo "$as_me:3746: result: no" >&5
3747 echo "${ECHO_T}no" >&6
3748 fi
3749
3750 fi
3751 if test -z "$ac_cv_prog_RANLIB"; then
3752   ac_ct_RANLIB=$RANLIB
3753   # Extract the first word of "ranlib", so it can be a program name with args.
3754 set dummy ranlib; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$ac_ct_RANLIB"; then
3761   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_ac_ct_RANLIB="ranlib"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3775 fi
3776 fi
3777 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3778 if test -n "$ac_ct_RANLIB"; then
3779   echo "$as_me:3779: result: $ac_ct_RANLIB" >&5
3780 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3781 else
3782   echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784 fi
3785
3786   RANLIB=$ac_ct_RANLIB
3787 else
3788   RANLIB="$ac_cv_prog_RANLIB"
3789 fi
3790
3791 if test -n "$ac_tool_prefix"; then
3792   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3793 set dummy ${ac_tool_prefix}ld; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_prog_LD+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   if test -n "$LD"; then
3800   ac_cv_prog_LD="$LD" # Let the user override the test.
3801 else
3802   ac_save_IFS=$IFS; IFS=$ac_path_separator
3803 ac_dummy="$PATH"
3804 for ac_dir in $ac_dummy; do
3805   IFS=$ac_save_IFS
3806   test -z "$ac_dir" && ac_dir=.
3807   $as_executable_p "$ac_dir/$ac_word" || continue
3808 ac_cv_prog_LD="${ac_tool_prefix}ld"
3809 echo "$as_me:3809: found $ac_dir/$ac_word" >&5
3810 break
3811 done
3812
3813 fi
3814 fi
3815 LD=$ac_cv_prog_LD
3816 if test -n "$LD"; then
3817   echo "$as_me:3817: result: $LD" >&5
3818 echo "${ECHO_T}$LD" >&6
3819 else
3820   echo "$as_me:3820: result: no" >&5
3821 echo "${ECHO_T}no" >&6
3822 fi
3823
3824 fi
3825 if test -z "$ac_cv_prog_LD"; then
3826   ac_ct_LD=$LD
3827   # Extract the first word of "ld", so it can be a program name with args.
3828 set dummy ld; ac_word=$2
3829 echo "$as_me:3829: checking for $ac_word" >&5
3830 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3831 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3832   echo $ECHO_N "(cached) $ECHO_C" >&6
3833 else
3834   if test -n "$ac_ct_LD"; then
3835   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3836 else
3837   ac_save_IFS=$IFS; IFS=$ac_path_separator
3838 ac_dummy="$PATH"
3839 for ac_dir in $ac_dummy; do
3840   IFS=$ac_save_IFS
3841   test -z "$ac_dir" && ac_dir=.
3842   $as_executable_p "$ac_dir/$ac_word" || continue
3843 ac_cv_prog_ac_ct_LD="ld"
3844 echo "$as_me:3844: found $ac_dir/$ac_word" >&5
3845 break
3846 done
3847
3848   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3849 fi
3850 fi
3851 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3852 if test -n "$ac_ct_LD"; then
3853   echo "$as_me:3853: result: $ac_ct_LD" >&5
3854 echo "${ECHO_T}$ac_ct_LD" >&6
3855 else
3856   echo "$as_me:3856: result: no" >&5
3857 echo "${ECHO_T}no" >&6
3858 fi
3859
3860   LD=$ac_ct_LD
3861 else
3862   LD="$ac_cv_prog_LD"
3863 fi
3864
3865 if test -n "$ac_tool_prefix"; then
3866   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3867 set dummy ${ac_tool_prefix}ar; ac_word=$2
3868 echo "$as_me:3868: checking for $ac_word" >&5
3869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3870 if test "${ac_cv_prog_AR+set}" = set; then
3871   echo $ECHO_N "(cached) $ECHO_C" >&6
3872 else
3873   if test -n "$AR"; then
3874   ac_cv_prog_AR="$AR" # Let the user override the test.
3875 else
3876   ac_save_IFS=$IFS; IFS=$ac_path_separator
3877 ac_dummy="$PATH"
3878 for ac_dir in $ac_dummy; do
3879   IFS=$ac_save_IFS
3880   test -z "$ac_dir" && ac_dir=.
3881   $as_executable_p "$ac_dir/$ac_word" || continue
3882 ac_cv_prog_AR="${ac_tool_prefix}ar"
3883 echo "$as_me:3883: found $ac_dir/$ac_word" >&5
3884 break
3885 done
3886
3887 fi
3888 fi
3889 AR=$ac_cv_prog_AR
3890 if test -n "$AR"; then
3891   echo "$as_me:3891: result: $AR" >&5
3892 echo "${ECHO_T}$AR" >&6
3893 else
3894   echo "$as_me:3894: result: no" >&5
3895 echo "${ECHO_T}no" >&6
3896 fi
3897
3898 fi
3899 if test -z "$ac_cv_prog_AR"; then
3900   ac_ct_AR=$AR
3901   # Extract the first word of "ar", so it can be a program name with args.
3902 set dummy ar; ac_word=$2
3903 echo "$as_me:3903: checking for $ac_word" >&5
3904 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3905 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3906   echo $ECHO_N "(cached) $ECHO_C" >&6
3907 else
3908   if test -n "$ac_ct_AR"; then
3909   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3910 else
3911   ac_save_IFS=$IFS; IFS=$ac_path_separator
3912 ac_dummy="$PATH"
3913 for ac_dir in $ac_dummy; do
3914   IFS=$ac_save_IFS
3915   test -z "$ac_dir" && ac_dir=.
3916   $as_executable_p "$ac_dir/$ac_word" || continue
3917 ac_cv_prog_ac_ct_AR="ar"
3918 echo "$as_me:3918: found $ac_dir/$ac_word" >&5
3919 break
3920 done
3921
3922   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3923 fi
3924 fi
3925 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3926 if test -n "$ac_ct_AR"; then
3927   echo "$as_me:3927: result: $ac_ct_AR" >&5
3928 echo "${ECHO_T}$ac_ct_AR" >&6
3929 else
3930   echo "$as_me:3930: result: no" >&5
3931 echo "${ECHO_T}no" >&6
3932 fi
3933
3934   AR=$ac_ct_AR
3935 else
3936   AR="$ac_cv_prog_AR"
3937 fi
3938
3939 if test -n "$ac_tool_prefix"; then
3940   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3941 set dummy ${ac_tool_prefix}ar; ac_word=$2
3942 echo "$as_me:3942: checking for $ac_word" >&5
3943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3944 if test "${ac_cv_prog_AR+set}" = set; then
3945   echo $ECHO_N "(cached) $ECHO_C" >&6
3946 else
3947   if test -n "$AR"; then
3948   ac_cv_prog_AR="$AR" # Let the user override the test.
3949 else
3950   ac_save_IFS=$IFS; IFS=$ac_path_separator
3951 ac_dummy="$PATH"
3952 for ac_dir in $ac_dummy; do
3953   IFS=$ac_save_IFS
3954   test -z "$ac_dir" && ac_dir=.
3955   $as_executable_p "$ac_dir/$ac_word" || continue
3956 ac_cv_prog_AR="${ac_tool_prefix}ar"
3957 echo "$as_me:3957: found $ac_dir/$ac_word" >&5
3958 break
3959 done
3960
3961 fi
3962 fi
3963 AR=$ac_cv_prog_AR
3964 if test -n "$AR"; then
3965   echo "$as_me:3965: result: $AR" >&5
3966 echo "${ECHO_T}$AR" >&6
3967 else
3968   echo "$as_me:3968: result: no" >&5
3969 echo "${ECHO_T}no" >&6
3970 fi
3971
3972 fi
3973 if test -z "$ac_cv_prog_AR"; then
3974   ac_ct_AR=$AR
3975   # Extract the first word of "ar", so it can be a program name with args.
3976 set dummy ar; ac_word=$2
3977 echo "$as_me:3977: checking for $ac_word" >&5
3978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3979 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3980   echo $ECHO_N "(cached) $ECHO_C" >&6
3981 else
3982   if test -n "$ac_ct_AR"; then
3983   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3984 else
3985   ac_save_IFS=$IFS; IFS=$ac_path_separator
3986 ac_dummy="$PATH"
3987 for ac_dir in $ac_dummy; do
3988   IFS=$ac_save_IFS
3989   test -z "$ac_dir" && ac_dir=.
3990   $as_executable_p "$ac_dir/$ac_word" || continue
3991 ac_cv_prog_ac_ct_AR="ar"
3992 echo "$as_me:3992: found $ac_dir/$ac_word" >&5
3993 break
3994 done
3995
3996   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3997 fi
3998 fi
3999 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4000 if test -n "$ac_ct_AR"; then
4001   echo "$as_me:4001: result: $ac_ct_AR" >&5
4002 echo "${ECHO_T}$ac_ct_AR" >&6
4003 else
4004   echo "$as_me:4004: result: no" >&5
4005 echo "${ECHO_T}no" >&6
4006 fi
4007
4008   AR=$ac_ct_AR
4009 else
4010   AR="$ac_cv_prog_AR"
4011 fi
4012
4013 echo "$as_me:4013: checking for options to update archives" >&5
4014 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4015 if test "${cf_cv_ar_flags+set}" = set; then
4016   echo $ECHO_N "(cached) $ECHO_C" >&6
4017 else
4018
4019         cf_cv_ar_flags=unknown
4020         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4021         do
4022
4023                 # check if $ARFLAGS already contains this choice
4024                 if test "x$ARFLAGS" != "x" ; then
4025                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4026                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4027                                 cf_cv_ar_flags=
4028                                 break
4029                         fi
4030                 fi
4031
4032                 rm -f conftest.$ac_cv_objext
4033                 rm -f conftest.a
4034
4035                 cat >conftest.$ac_ext <<EOF
4036 #line 4036 "configure"
4037 int     testdata[3] = { 123, 456, 789 };
4038 EOF
4039                 if { (eval echo "$as_me:4039: \"$ac_compile\"") >&5
4040   (eval $ac_compile) 2>&5
4041   ac_status=$?
4042   echo "$as_me:4042: \$? = $ac_status" >&5
4043   (exit $ac_status); } ; then
4044                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4045                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4046                         if test -f conftest.a ; then
4047                                 cf_cv_ar_flags=$cf_ar_flags
4048                                 break
4049                         fi
4050                 else
4051                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4052
4053 echo "${as_me:-configure}:4053: testing cannot compile test-program ..." 1>&5
4054
4055                         break
4056                 fi
4057         done
4058         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4059
4060 fi
4061 echo "$as_me:4061: result: $cf_cv_ar_flags" >&5
4062 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4063
4064 if test -n "$ARFLAGS" ; then
4065         if test -n "$cf_cv_ar_flags" ; then
4066                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4067         fi
4068 else
4069         ARFLAGS=$cf_cv_ar_flags
4070 fi
4071
4072 echo "$as_me:4072: checking if you have specified an install-prefix" >&5
4073 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4074
4075 # Check whether --with-install-prefix or --without-install-prefix was given.
4076 if test "${with_install_prefix+set}" = set; then
4077   withval="$with_install_prefix"
4078   case "x$withval" in #(vi
4079         xyes|xno) #(vi
4080                 ;;
4081         *)      DESTDIR="$withval"
4082                 ;;
4083         esac
4084 fi;
4085 echo "$as_me:4085: result: $DESTDIR" >&5
4086 echo "${ECHO_T}$DESTDIR" >&6
4087
4088 ###############################################################################
4089
4090 # If we're cross-compiling, allow the user to override the tools and their
4091 # options.  The configure script is oriented toward identifying the host
4092 # compiler, etc., but we need a build compiler to generate parts of the source.
4093
4094 if test "$cross_compiling" = yes ; then
4095
4096         # defaults that we might want to override
4097         : ${BUILD_CFLAGS:=''}
4098         : ${BUILD_CPPFLAGS:=''}
4099         : ${BUILD_LDFLAGS:=''}
4100         : ${BUILD_LIBS:=''}
4101         : ${BUILD_EXEEXT:='$x'}
4102         : ${BUILD_OBJEXT:='o'}
4103
4104 # Check whether --with-build-cc or --without-build-cc was given.
4105 if test "${with_build_cc+set}" = set; then
4106   withval="$with_build_cc"
4107   BUILD_CC="$withval"
4108 else
4109   for ac_prog in gcc cc cl
4110 do
4111   # Extract the first word of "$ac_prog", so it can be a program name with args.
4112 set dummy $ac_prog; ac_word=$2
4113 echo "$as_me:4113: checking for $ac_word" >&5
4114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4115 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4116   echo $ECHO_N "(cached) $ECHO_C" >&6
4117 else
4118   if test -n "$BUILD_CC"; then
4119   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4120 else
4121   ac_save_IFS=$IFS; IFS=$ac_path_separator
4122 ac_dummy="$PATH"
4123 for ac_dir in $ac_dummy; do
4124   IFS=$ac_save_IFS
4125   test -z "$ac_dir" && ac_dir=.
4126   $as_executable_p "$ac_dir/$ac_word" || continue
4127 ac_cv_prog_BUILD_CC="$ac_prog"
4128 echo "$as_me:4128: found $ac_dir/$ac_word" >&5
4129 break
4130 done
4131
4132 fi
4133 fi
4134 BUILD_CC=$ac_cv_prog_BUILD_CC
4135 if test -n "$BUILD_CC"; then
4136   echo "$as_me:4136: result: $BUILD_CC" >&5
4137 echo "${ECHO_T}$BUILD_CC" >&6
4138 else
4139   echo "$as_me:4139: result: no" >&5
4140 echo "${ECHO_T}no" >&6
4141 fi
4142
4143   test -n "$BUILD_CC" && break
4144 done
4145
4146 fi;
4147         echo "$as_me:4147: checking for native build C compiler" >&5
4148 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4149         echo "$as_me:4149: result: $BUILD_CC" >&5
4150 echo "${ECHO_T}$BUILD_CC" >&6
4151
4152         echo "$as_me:4152: checking for native build C preprocessor" >&5
4153 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4154
4155 # Check whether --with-build-cpp or --without-build-cpp was given.
4156 if test "${with_build_cpp+set}" = set; then
4157   withval="$with_build_cpp"
4158   BUILD_CPP="$withval"
4159 else
4160   BUILD_CPP='${BUILD_CC} -E'
4161 fi;
4162         echo "$as_me:4162: result: $BUILD_CPP" >&5
4163 echo "${ECHO_T}$BUILD_CPP" >&6
4164
4165         echo "$as_me:4165: checking for native build C flags" >&5
4166 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4167
4168 # Check whether --with-build-cflags or --without-build-cflags was given.
4169 if test "${with_build_cflags+set}" = set; then
4170   withval="$with_build_cflags"
4171   BUILD_CFLAGS="$withval"
4172 fi;
4173         echo "$as_me:4173: result: $BUILD_CFLAGS" >&5
4174 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4175
4176         echo "$as_me:4176: checking for native build C preprocessor-flags" >&5
4177 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4178
4179 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4180 if test "${with_build_cppflags+set}" = set; then
4181   withval="$with_build_cppflags"
4182   BUILD_CPPFLAGS="$withval"
4183 fi;
4184         echo "$as_me:4184: result: $BUILD_CPPFLAGS" >&5
4185 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4186
4187         echo "$as_me:4187: checking for native build linker-flags" >&5
4188 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4189
4190 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4191 if test "${with_build_ldflags+set}" = set; then
4192   withval="$with_build_ldflags"
4193   BUILD_LDFLAGS="$withval"
4194 fi;
4195         echo "$as_me:4195: result: $BUILD_LDFLAGS" >&5
4196 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4197
4198         echo "$as_me:4198: checking for native build linker-libraries" >&5
4199 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4200
4201 # Check whether --with-build-libs or --without-build-libs was given.
4202 if test "${with_build_libs+set}" = set; then
4203   withval="$with_build_libs"
4204   BUILD_LIBS="$withval"
4205 fi;
4206         echo "$as_me:4206: result: $BUILD_LIBS" >&5
4207 echo "${ECHO_T}$BUILD_LIBS" >&6
4208
4209         # this assumes we're on Unix.
4210         BUILD_EXEEXT=
4211         BUILD_OBJEXT=o
4212
4213         : ${BUILD_CC:='${CC}'}
4214
4215         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4216                 { { echo "$as_me:4216: error: Cross-build requires two compilers.
4217 Use --with-build-cc to specify the native compiler." >&5
4218 echo "$as_me: error: Cross-build requires two compilers.
4219 Use --with-build-cc to specify the native compiler." >&2;}
4220    { (exit 1); exit 1; }; }
4221         fi
4222
4223 else
4224         : ${BUILD_CC:='${CC}'}
4225         : ${BUILD_CPP:='${CPP}'}
4226         : ${BUILD_CFLAGS:='${CFLAGS}'}
4227         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4228         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4229         : ${BUILD_LIBS:='${LIBS}'}
4230         : ${BUILD_EXEEXT:='$x'}
4231         : ${BUILD_OBJEXT:='o'}
4232 fi
4233
4234 ###############################################################################
4235
4236 ### Options to allow the user to specify the set of libraries which are used.
4237 ### Use "--without-normal --with-shared" to allow the default model to be
4238 ### shared, for example.
4239 cf_list_models=""
4240
4241 echo "$as_me:4241: checking if libtool -version-number should be used" >&5
4242 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4243
4244 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4245 if test "${enable_libtool_version+set}" = set; then
4246   enableval="$enable_libtool_version"
4247   test "$enableval" != no && enableval=yes
4248   if test "$enableval" != "yes" ; then
4249     cf_libtool_version=no
4250   else
4251     cf_libtool_version=yes
4252   fi
4253 else
4254   enableval=yes
4255   cf_libtool_version=yes
4256
4257 fi;
4258 echo "$as_me:4258: result: $cf_libtool_version" >&5
4259 echo "${ECHO_T}$cf_libtool_version" >&6
4260
4261 if test "$cf_libtool_version" = yes ; then
4262         LIBTOOL_VERSION="-version-number"
4263 else
4264         LIBTOOL_VERSION="-version-info"
4265 fi
4266
4267 LIBTOOL=
4268
4269 # common library maintenance symbols that are convenient for libtool scripts:
4270 LIB_CREATE='${AR} -cr'
4271 LIB_OBJECT='${OBJECTS}'
4272 LIB_SUFFIX=.a
4273 LIB_PREP="$RANLIB"
4274
4275 # symbols used to prop libtool up to enable it to determine what it should be
4276 # doing:
4277 LIB_CLEAN=
4278 LIB_COMPILE=
4279 LIB_LINK='${CC}'
4280 LIB_INSTALL=
4281 LIB_UNINSTALL=
4282
4283 echo "$as_me:4283: checking if you want to build libraries with libtool" >&5
4284 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4285
4286 # Check whether --with-libtool or --without-libtool was given.
4287 if test "${with_libtool+set}" = set; then
4288   withval="$with_libtool"
4289   with_libtool=$withval
4290 else
4291   with_libtool=no
4292 fi;
4293 echo "$as_me:4293: result: $with_libtool" >&5
4294 echo "${ECHO_T}$with_libtool" >&6
4295 if test "$with_libtool" != "no"; then
4296
4297         if test "$with_libtool" != "yes" ; then
4298
4299 if test "x$prefix" != xNONE; then
4300   cf_path_syntax="$prefix"
4301 else
4302   cf_path_syntax="$ac_default_prefix"
4303 fi
4304
4305 case ".$with_libtool" in #(vi
4306 .\$\(*\)*|.\'*\'*) #(vi
4307   ;;
4308 ..|./*|.\\*) #(vi
4309   ;;
4310 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4311   ;;
4312 .\${*prefix}*|.\${*dir}*) #(vi
4313   eval with_libtool="$with_libtool"
4314   case ".$with_libtool" in #(vi
4315   .NONE/*)
4316     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4317     ;;
4318   esac
4319   ;; #(vi
4320 .no|.NONE/*)
4321   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4322   ;;
4323 *)
4324   { { echo "$as_me:4324: error: expected a pathname, not \"$with_libtool\"" >&5
4325 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4326    { (exit 1); exit 1; }; }
4327   ;;
4328 esac
4329
4330                 LIBTOOL=$with_libtool
4331         else
4332                 # Extract the first word of "libtool", so it can be a program name with args.
4333 set dummy libtool; ac_word=$2
4334 echo "$as_me:4334: checking for $ac_word" >&5
4335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4336 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4337   echo $ECHO_N "(cached) $ECHO_C" >&6
4338 else
4339   case $LIBTOOL in
4340   [\\/]* | ?:[\\/]*)
4341   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4342   ;;
4343   *)
4344   ac_save_IFS=$IFS; IFS=$ac_path_separator
4345 ac_dummy="$PATH"
4346 for ac_dir in $ac_dummy; do
4347   IFS=$ac_save_IFS
4348   test -z "$ac_dir" && ac_dir=.
4349   if $as_executable_p "$ac_dir/$ac_word"; then
4350    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4351    echo "$as_me:4351: found $ac_dir/$ac_word" >&5
4352    break
4353 fi
4354 done
4355
4356   ;;
4357 esac
4358 fi
4359 LIBTOOL=$ac_cv_path_LIBTOOL
4360
4361 if test -n "$LIBTOOL"; then
4362   echo "$as_me:4362: result: $LIBTOOL" >&5
4363 echo "${ECHO_T}$LIBTOOL" >&6
4364 else
4365   echo "$as_me:4365: result: no" >&5
4366 echo "${ECHO_T}no" >&6
4367 fi
4368
4369         fi
4370         if test -z "$LIBTOOL" ; then
4371                 { { echo "$as_me:4371: error: Cannot find libtool" >&5
4372 echo "$as_me: error: Cannot find libtool" >&2;}
4373    { (exit 1); exit 1; }; }
4374         fi
4375         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4376         LIB_OBJECT='${OBJECTS:.o=.lo}'
4377         LIB_SUFFIX=.la
4378         LIB_CLEAN='${LIBTOOL} --mode=clean'
4379         LIB_COMPILE='${LIBTOOL} --mode=compile'
4380         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4381         LIB_INSTALL='${LIBTOOL} --mode=install'
4382         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4383         LIB_PREP=:
4384
4385         # Show the version of libtool
4386         echo "$as_me:4386: checking version of libtool" >&5
4387 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4388
4389         # Save the version in a cache variable - this is not entirely a good
4390         # thing, but the version string from libtool is very ugly, and for
4391         # bug reports it might be useful to have the original string. "("
4392         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.].*//'`
4393         echo "$as_me:4393: result: $cf_cv_libtool_version" >&5
4394 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4395         if test -z "$cf_cv_libtool_version" ; then
4396                 { { echo "$as_me:4396: error: This is not GNU libtool" >&5
4397 echo "$as_me: error: This is not GNU libtool" >&2;}
4398    { (exit 1); exit 1; }; }
4399         fi
4400
4401         # special hack to add -no-undefined (which libtool should do for itself)
4402         LT_UNDEF=
4403         case "$cf_cv_system_name" in #(vi
4404         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4405                 LT_UNDEF=-no-undefined
4406                 ;;
4407         esac
4408
4409         # special hack to add --tag option for C++ compiler
4410         case $cf_cv_libtool_version in #(vi
4411         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4412                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4413                 LIBTOOL="$LIBTOOL --tag=CC"
4414                 ;;
4415         *)
4416                 LIBTOOL_CXX="$LIBTOOL"
4417                 ;;
4418         esac
4419 else
4420         LIBTOOL=""
4421         LIBTOOL_CXX=""
4422 fi
4423
4424 test -z "$LIBTOOL" && ECHO_LT=
4425
4426 if test "$with_libtool" != "no" ; then
4427
4428 cf_list_models="$cf_list_models libtool"
4429
4430 else
4431
4432 echo "$as_me:4432: checking if you want to build shared libraries" >&5
4433 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4434
4435 # Check whether --with-shared or --without-shared was given.
4436 if test "${with_shared+set}" = set; then
4437   withval="$with_shared"
4438   with_shared=$withval
4439 else
4440   with_shared=no
4441 fi;
4442 echo "$as_me:4442: result: $with_shared" >&5
4443 echo "${ECHO_T}$with_shared" >&6
4444 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4445
4446 echo "$as_me:4446: checking if you want to build static libraries" >&5
4447 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4448
4449 # Check whether --with-normal or --without-normal was given.
4450 if test "${with_normal+set}" = set; then
4451   withval="$with_normal"
4452   with_normal=$withval
4453 else
4454   with_normal=yes
4455 fi;
4456 echo "$as_me:4456: result: $with_normal" >&5
4457 echo "${ECHO_T}$with_normal" >&6
4458 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4459
4460 echo "$as_me:4460: checking if you want to build debug libraries" >&5
4461 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4462
4463 # Check whether --with-debug or --without-debug was given.
4464 if test "${with_debug+set}" = set; then
4465   withval="$with_debug"
4466   with_debug=$withval
4467 else
4468   with_debug=yes
4469 fi;
4470 echo "$as_me:4470: result: $with_debug" >&5
4471 echo "${ECHO_T}$with_debug" >&6
4472 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4473
4474 echo "$as_me:4474: checking if you want to build profiling libraries" >&5
4475 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4476
4477 # Check whether --with-profile or --without-profile was given.
4478 if test "${with_profile+set}" = set; then
4479   withval="$with_profile"
4480   with_profile=$withval
4481 else
4482   with_profile=no
4483 fi;
4484 echo "$as_me:4484: result: $with_profile" >&5
4485 echo "${ECHO_T}$with_profile" >&6
4486 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4487
4488 fi
4489
4490 ###############################################################################
4491
4492 echo "$as_me:4492: checking for specified models" >&5
4493 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4494 test -z "$cf_list_models" && cf_list_models=normal
4495 test "$with_libtool" != "no" && cf_list_models=libtool
4496 echo "$as_me:4496: result: $cf_list_models" >&5
4497 echo "${ECHO_T}$cf_list_models" >&6
4498
4499 ### Use the first model as the default, and save its suffix for use in building
4500 ### up test-applications.
4501 echo "$as_me:4501: checking for default model" >&5
4502 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4503 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4504 echo "$as_me:4504: result: $DFT_LWR_MODEL" >&5
4505 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4506
4507 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4508
4509 TICS_NAME=tic
4510
4511 TINFO_NAME=tinfo
4512
4513 LIB_NAME=ncurses
4514
4515 LIB_DIR=../lib
4516 LIB_2ND=../../lib
4517
4518 echo "$as_me:4518: checking if you want to have a library-prefix" >&5
4519 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4520
4521 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4522 if test "${with_lib_prefix+set}" = set; then
4523   withval="$with_lib_prefix"
4524   with_lib_prefix=$withval
4525 else
4526   with_lib_prefix=auto
4527 fi;
4528 echo "$as_me:4528: result: $with_lib_prefix" >&5
4529 echo "${ECHO_T}$with_lib_prefix" >&6
4530
4531 if test $with_lib_prefix = auto
4532 then
4533
4534         case $cf_cv_system_name in #(vi
4535         OS/2*|os2*) #(vi
4536         LIB_PREFIX=''
4537         ;;
4538         *)      LIB_PREFIX='lib'
4539         ;;
4540         esac
4541 cf_prefix=$LIB_PREFIX
4542
4543 elif test $with_lib_prefix = no
4544 then
4545         LIB_PREFIX=
4546 else
4547         LIB_PREFIX=$with_lib_prefix
4548 fi
4549
4550 LIB_SUFFIX=
4551
4552         echo "$as_me:4552: checking for PATH separator" >&5
4553 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4554         case $cf_cv_system_name in
4555         os2*)   PATH_SEPARATOR=';'  ;;
4556         *)      ${PATH_SEPARATOR:=':'}  ;;
4557         esac
4558
4559         echo "$as_me:4559: result: $PATH_SEPARATOR" >&5
4560 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4561
4562 ###############################################################################
4563
4564 echo "$as_me:4564: checking if you want to build a separate terminfo library" >&5
4565 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4566
4567 # Check whether --with-termlib or --without-termlib was given.
4568 if test "${with_termlib+set}" = set; then
4569   withval="$with_termlib"
4570   with_termlib=$withval
4571 else
4572   with_termlib=no
4573 fi;
4574 echo "$as_me:4574: result: $with_termlib" >&5
4575 echo "${ECHO_T}$with_termlib" >&6
4576
4577 echo "$as_me:4577: checking if you want to build a separate tic library" >&5
4578 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4579
4580 # Check whether --with-ticlib or --without-ticlib was given.
4581 if test "${with_ticlib+set}" = set; then
4582   withval="$with_ticlib"
4583   with_ticlib=$withval
4584 else
4585   with_ticlib=no
4586 fi;
4587 echo "$as_me:4587: result: $with_ticlib" >&5
4588 echo "${ECHO_T}$with_ticlib" >&6
4589
4590 ### Checks for special libraries, must be done up-front.
4591 SHLIB_LIST=""
4592
4593 echo "$as_me:4593: checking if you want to link with the GPM mouse library" >&5
4594 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4595
4596 # Check whether --with-gpm or --without-gpm was given.
4597 if test "${with_gpm+set}" = set; then
4598   withval="$with_gpm"
4599   with_gpm=$withval
4600 else
4601   with_gpm=maybe
4602 fi;
4603 echo "$as_me:4603: result: $with_gpm" >&5
4604 echo "${ECHO_T}$with_gpm" >&6
4605
4606 if test "$with_gpm" != no ; then
4607         echo "$as_me:4607: checking for gpm.h" >&5
4608 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4609 if test "${ac_cv_header_gpm_h+set}" = set; then
4610   echo $ECHO_N "(cached) $ECHO_C" >&6
4611 else
4612   cat >conftest.$ac_ext <<_ACEOF
4613 #line 4613 "configure"
4614 #include "confdefs.h"
4615 #include <gpm.h>
4616 _ACEOF
4617 if { (eval echo "$as_me:4617: \"$ac_cpp conftest.$ac_ext\"") >&5
4618   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4619   ac_status=$?
4620   egrep -v '^ *\+' conftest.er1 >conftest.err
4621   rm -f conftest.er1
4622   cat conftest.err >&5
4623   echo "$as_me:4623: \$? = $ac_status" >&5
4624   (exit $ac_status); } >/dev/null; then
4625   if test -s conftest.err; then
4626     ac_cpp_err=$ac_c_preproc_warn_flag
4627   else
4628     ac_cpp_err=
4629   fi
4630 else
4631   ac_cpp_err=yes
4632 fi
4633 if test -z "$ac_cpp_err"; then
4634   ac_cv_header_gpm_h=yes
4635 else
4636   echo "$as_me: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   ac_cv_header_gpm_h=no
4639 fi
4640 rm -f conftest.err conftest.$ac_ext
4641 fi
4642 echo "$as_me:4642: result: $ac_cv_header_gpm_h" >&5
4643 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4644 if test $ac_cv_header_gpm_h = yes; then
4645
4646 cat >>confdefs.h <<\EOF
4647 #define HAVE_GPM_H 1
4648 EOF
4649
4650                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4651                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4652
4653 echo "${as_me:-configure}:4653: testing assuming we really have GPM library ..." 1>&5
4654
4655 cat >>confdefs.h <<\EOF
4656 #define HAVE_LIBGPM 1
4657 EOF
4658
4659                 else
4660                         echo "$as_me:4660: checking for Gpm_Open in -lgpm" >&5
4661 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4662 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4663   echo $ECHO_N "(cached) $ECHO_C" >&6
4664 else
4665   ac_check_lib_save_LIBS=$LIBS
4666 LIBS="-lgpm  $LIBS"
4667 cat >conftest.$ac_ext <<_ACEOF
4668 #line 4668 "configure"
4669 #include "confdefs.h"
4670
4671 /* Override any gcc2 internal prototype to avoid an error.  */
4672 #ifdef __cplusplus
4673 extern "C"
4674 #endif
4675 /* We use char because int might match the return type of a gcc2
4676    builtin and then its argument prototype would still apply.  */
4677 char Gpm_Open ();
4678 int
4679 main ()
4680 {
4681 Gpm_Open ();
4682   ;
4683   return 0;
4684 }
4685 _ACEOF
4686 rm -f conftest.$ac_objext conftest$ac_exeext
4687 if { (eval echo "$as_me:4687: \"$ac_link\"") >&5
4688   (eval $ac_link) 2>&5
4689   ac_status=$?
4690   echo "$as_me:4690: \$? = $ac_status" >&5
4691   (exit $ac_status); } &&
4692          { ac_try='test -s conftest$ac_exeext'
4693   { (eval echo "$as_me:4693: \"$ac_try\"") >&5
4694   (eval $ac_try) 2>&5
4695   ac_status=$?
4696   echo "$as_me:4696: \$? = $ac_status" >&5
4697   (exit $ac_status); }; }; then
4698   ac_cv_lib_gpm_Gpm_Open=yes
4699 else
4700   echo "$as_me: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 ac_cv_lib_gpm_Gpm_Open=no
4703 fi
4704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4705 LIBS=$ac_check_lib_save_LIBS
4706 fi
4707 echo "$as_me:4707: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4708 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4709 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4710   :
4711 else
4712
4713                                 { { echo "$as_me:4713: error: Cannot link with GPM library" >&5
4714 echo "$as_me: error: Cannot link with GPM library" >&2;}
4715    { (exit 1); exit 1; }; }
4716                 fi
4717                 with_gpm=yes
4718
4719 fi
4720
4721 else
4722
4723                 test "$with_gpm" != maybe && { echo "$as_me:4723: WARNING: Cannot find GPM header" >&5
4724 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4725                 with_gpm=no
4726
4727 fi
4728
4729 fi
4730
4731 if test "$with_gpm" != no ; then
4732         echo "$as_me:4732: checking if you want to load GPM dynamically" >&5
4733 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4734
4735 # Check whether --with-dlsym or --without-dlsym was given.
4736 if test "${with_dlsym+set}" = set; then
4737   withval="$with_dlsym"
4738   with_dlsym=$withval
4739 else
4740   with_dlsym=yes
4741 fi;
4742         echo "$as_me:4742: result: $with_dlsym" >&5
4743 echo "${ECHO_T}$with_dlsym" >&6
4744         if test "x$with_dlsym" = xyes ; then
4745
4746 cf_have_dlsym=no
4747 echo "$as_me:4747: checking for dlsym" >&5
4748 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4749 if test "${ac_cv_func_dlsym+set}" = set; then
4750   echo $ECHO_N "(cached) $ECHO_C" >&6
4751 else
4752   cat >conftest.$ac_ext <<_ACEOF
4753 #line 4753 "configure"
4754 #include "confdefs.h"
4755 /* System header to define __stub macros and hopefully few prototypes,
4756     which can conflict with char dlsym (); below.  */
4757 #include <assert.h>
4758 /* Override any gcc2 internal prototype to avoid an error.  */
4759 #ifdef __cplusplus
4760 extern "C"
4761 #endif
4762 /* We use char because int might match the return type of a gcc2
4763    builtin and then its argument prototype would still apply.  */
4764 char dlsym ();
4765 char (*f) ();
4766
4767 int
4768 main ()
4769 {
4770 /* The GNU C library defines this for functions which it implements
4771     to always fail with ENOSYS.  Some functions are actually named
4772     something starting with __ and the normal name is an alias.  */
4773 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4774 choke me
4775 #else
4776 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4777 #endif
4778
4779   ;
4780   return 0;
4781 }
4782 _ACEOF
4783 rm -f conftest.$ac_objext conftest$ac_exeext
4784 if { (eval echo "$as_me:4784: \"$ac_link\"") >&5
4785   (eval $ac_link) 2>&5
4786   ac_status=$?
4787   echo "$as_me:4787: \$? = $ac_status" >&5
4788   (exit $ac_status); } &&
4789          { ac_try='test -s conftest$ac_exeext'
4790   { (eval echo "$as_me:4790: \"$ac_try\"") >&5
4791   (eval $ac_try) 2>&5
4792   ac_status=$?
4793   echo "$as_me:4793: \$? = $ac_status" >&5
4794   (exit $ac_status); }; }; then
4795   ac_cv_func_dlsym=yes
4796 else
4797   echo "$as_me: failed program was:" >&5
4798 cat conftest.$ac_ext >&5
4799 ac_cv_func_dlsym=no
4800 fi
4801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4802 fi
4803 echo "$as_me:4803: result: $ac_cv_func_dlsym" >&5
4804 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4805 if test $ac_cv_func_dlsym = yes; then
4806   cf_have_dlsym=yes
4807 else
4808
4809 cf_have_libdl=no
4810 echo "$as_me:4810: checking for dlsym in -ldl" >&5
4811 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4812 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4813   echo $ECHO_N "(cached) $ECHO_C" >&6
4814 else
4815   ac_check_lib_save_LIBS=$LIBS
4816 LIBS="-ldl  $LIBS"
4817 cat >conftest.$ac_ext <<_ACEOF
4818 #line 4818 "configure"
4819 #include "confdefs.h"
4820
4821 /* Override any gcc2 internal prototype to avoid an error.  */
4822 #ifdef __cplusplus
4823 extern "C"
4824 #endif
4825 /* We use char because int might match the return type of a gcc2
4826    builtin and then its argument prototype would still apply.  */
4827 char dlsym ();
4828 int
4829 main ()
4830 {
4831 dlsym ();
4832   ;
4833   return 0;
4834 }
4835 _ACEOF
4836 rm -f conftest.$ac_objext conftest$ac_exeext
4837 if { (eval echo "$as_me:4837: \"$ac_link\"") >&5
4838   (eval $ac_link) 2>&5
4839   ac_status=$?
4840   echo "$as_me:4840: \$? = $ac_status" >&5
4841   (exit $ac_status); } &&
4842          { ac_try='test -s conftest$ac_exeext'
4843   { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4844   (eval $ac_try) 2>&5
4845   ac_status=$?
4846   echo "$as_me:4846: \$? = $ac_status" >&5
4847   (exit $ac_status); }; }; then
4848   ac_cv_lib_dl_dlsym=yes
4849 else
4850   echo "$as_me: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 ac_cv_lib_dl_dlsym=no
4853 fi
4854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4855 LIBS=$ac_check_lib_save_LIBS
4856 fi
4857 echo "$as_me:4857: result: $ac_cv_lib_dl_dlsym" >&5
4858 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4859 if test $ac_cv_lib_dl_dlsym = yes; then
4860
4861         cf_have_dlsym=yes
4862         cf_have_libdl=yes
4863 fi
4864
4865 fi
4866
4867 if test "$cf_have_dlsym" = yes ; then
4868         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4869
4870         echo "$as_me:4870: checking whether able to link to dl*() functions" >&5
4871 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4872         cat >conftest.$ac_ext <<_ACEOF
4873 #line 4873 "configure"
4874 #include "confdefs.h"
4875 #include <dlfcn.h>
4876 int
4877 main ()
4878 {
4879
4880                 void *obj;
4881                 if ((obj = dlopen("filename", 0)) != 0) {
4882                         if (dlsym(obj, "symbolname") == 0) {
4883                         dlclose(obj);
4884                         }
4885                 }
4886   ;
4887   return 0;
4888 }
4889 _ACEOF
4890 rm -f conftest.$ac_objext conftest$ac_exeext
4891 if { (eval echo "$as_me:4891: \"$ac_link\"") >&5
4892   (eval $ac_link) 2>&5
4893   ac_status=$?
4894   echo "$as_me:4894: \$? = $ac_status" >&5
4895   (exit $ac_status); } &&
4896          { ac_try='test -s conftest$ac_exeext'
4897   { (eval echo "$as_me:4897: \"$ac_try\"") >&5
4898   (eval $ac_try) 2>&5
4899   ac_status=$?
4900   echo "$as_me:4900: \$? = $ac_status" >&5
4901   (exit $ac_status); }; }; then
4902
4903 cat >>confdefs.h <<\EOF
4904 #define HAVE_LIBDL 1
4905 EOF
4906
4907 else
4908   echo "$as_me: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
4910
4911                 { { echo "$as_me:4911: error: Cannot link test program for libdl" >&5
4912 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4913    { (exit 1); exit 1; }; }
4914 fi
4915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4916         echo "$as_me:4916: result: ok" >&5
4917 echo "${ECHO_T}ok" >&6
4918 else
4919         { { echo "$as_me:4919: error: Cannot find dlsym function" >&5
4920 echo "$as_me: error: Cannot find dlsym function" >&2;}
4921    { (exit 1); exit 1; }; }
4922 fi
4923
4924                 if test "x$with_gpm" != xyes ; then
4925                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4926
4927 echo "${as_me:-configure}:4927: testing assuming soname for gpm is $with_gpm ..." 1>&5
4928
4929                         cf_cv_gpm_soname="$with_gpm"
4930                 else
4931
4932 echo "$as_me:4932: checking for soname of gpm library" >&5
4933 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4934 if test "${cf_cv_gpm_soname+set}" = set; then
4935   echo $ECHO_N "(cached) $ECHO_C" >&6
4936 else
4937
4938 cf_cv_gpm_soname=unknown
4939 if test "$cross_compiling" != yes ; then
4940 cat >conftest.$ac_ext <<CF_EOF
4941 #include <gpm.h>
4942 int main()
4943 {
4944 if (Gpm_Open(0,0)) Gpm_Close();
4945         ${cf_cv_main_return:-return}(0);
4946 }
4947 CF_EOF
4948 cf_save_LIBS="$LIBS"
4949         LIBS="-lgpm $LIBS"
4950         if { (eval echo "$as_me:4950: \"$ac_compile\"") >&5
4951   (eval $ac_compile) 2>&5
4952   ac_status=$?
4953   echo "$as_me:4953: \$? = $ac_status" >&5
4954   (exit $ac_status); } ; then
4955                 if { (eval echo "$as_me:4955: \"$ac_link\"") >&5
4956   (eval $ac_link) 2>&5
4957   ac_status=$?
4958   echo "$as_me:4958: \$? = $ac_status" >&5
4959   (exit $ac_status); } ; then
4960                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4961                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4962                 fi
4963         fi
4964 rm -rf conftest*
4965 LIBS="$cf_save_LIBS"
4966 fi
4967
4968 fi
4969 echo "$as_me:4969: result: $cf_cv_gpm_soname" >&5
4970 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4971
4972                 fi
4973                 test "$cf_cv_gpm_soname" != "unknown" &&
4974 cat >>confdefs.h <<EOF
4975 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4976 EOF
4977
4978                 SHLIB_LIST="-ldl $SHLIB_LIST"
4979         else
4980                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4981                 TEST_LIBS="-lgpm $TEST_LIBS"
4982         fi
4983
4984 cat >>confdefs.h <<\EOF
4985 #define HAVE_LIBGPM 1
4986 EOF
4987
4988 echo "$as_me:4988: checking for Gpm_Wgetch in -lgpm" >&5
4989 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4990 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4991   echo $ECHO_N "(cached) $ECHO_C" >&6
4992 else
4993   ac_check_lib_save_LIBS=$LIBS
4994 LIBS="-lgpm  $LIBS"
4995 cat >conftest.$ac_ext <<_ACEOF
4996 #line 4996 "configure"
4997 #include "confdefs.h"
4998
4999 /* Override any gcc2 internal prototype to avoid an error.  */
5000 #ifdef __cplusplus
5001 extern "C"
5002 #endif
5003 /* We use char because int might match the return type of a gcc2
5004    builtin and then its argument prototype would still apply.  */
5005 char Gpm_Wgetch ();
5006 int
5007 main ()
5008 {
5009 Gpm_Wgetch ();
5010   ;
5011   return 0;
5012 }
5013 _ACEOF
5014 rm -f conftest.$ac_objext conftest$ac_exeext
5015 if { (eval echo "$as_me:5015: \"$ac_link\"") >&5
5016   (eval $ac_link) 2>&5
5017   ac_status=$?
5018   echo "$as_me:5018: \$? = $ac_status" >&5
5019   (exit $ac_status); } &&
5020          { ac_try='test -s conftest$ac_exeext'
5021   { (eval echo "$as_me:5021: \"$ac_try\"") >&5
5022   (eval $ac_try) 2>&5
5023   ac_status=$?
5024   echo "$as_me:5024: \$? = $ac_status" >&5
5025   (exit $ac_status); }; }; then
5026   ac_cv_lib_gpm_Gpm_Wgetch=yes
5027 else
5028   echo "$as_me: failed program was:" >&5
5029 cat conftest.$ac_ext >&5
5030 ac_cv_lib_gpm_Gpm_Wgetch=no
5031 fi
5032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5033 LIBS=$ac_check_lib_save_LIBS
5034 fi
5035 echo "$as_me:5035: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5036 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5037 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5038
5039 echo "$as_me:5039: checking if GPM is weakly bound to curses library" >&5
5040 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5041 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5042   echo $ECHO_N "(cached) $ECHO_C" >&6
5043 else
5044
5045 cf_cv_check_gpm_wgetch=unknown
5046 if test "$cross_compiling" != yes ; then
5047
5048 cat >conftest.$ac_ext <<CF_EOF
5049 #include <gpm.h>
5050 int main()
5051 {
5052         Gpm_Wgetch();
5053         ${cf_cv_main_return:-return}(0);
5054 }
5055 CF_EOF
5056
5057         cf_save_LIBS="$LIBS"
5058         # This only works if we can look at the symbol table.  If a shared
5059         # library is stripped for install, we cannot use that.  So we're forced
5060         # to rely on the static library, noting that some packagers may not
5061         # include it.
5062         LIBS="-static -lgpm -dynamic $LIBS"
5063         if { (eval echo "$as_me:5063: \"$ac_compile\"") >&5
5064   (eval $ac_compile) 2>&5
5065   ac_status=$?
5066   echo "$as_me:5066: \$? = $ac_status" >&5
5067   (exit $ac_status); } ; then
5068                 if { (eval echo "$as_me:5068: \"$ac_link\"") >&5
5069   (eval $ac_link) 2>&5
5070   ac_status=$?
5071   echo "$as_me:5071: \$? = $ac_status" >&5
5072   (exit $ac_status); } ; then
5073                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5074                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5075                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5076                 fi
5077         fi
5078         rm -rf conftest*
5079         LIBS="$cf_save_LIBS"
5080 fi
5081
5082 fi
5083 echo "$as_me:5083: result: $cf_cv_check_gpm_wgetch" >&5
5084 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5085
5086 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5087         { echo "$as_me:5087: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5088 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5089 fi
5090
5091 fi
5092
5093 fi
5094
5095 # not everyone has "test -c"
5096 if test -c /dev/sysmouse 2>/dev/null ; then
5097 echo "$as_me:5097: checking if you want to use sysmouse" >&5
5098 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5099
5100 # Check whether --with-sysmouse or --without-sysmouse was given.
5101 if test "${with_sysmouse+set}" = set; then
5102   withval="$with_sysmouse"
5103   cf_with_sysmouse=$withval
5104 else
5105   cf_with_sysmouse=maybe
5106 fi;
5107         if test "$cf_with_sysmouse" != no ; then
5108         cat >conftest.$ac_ext <<_ACEOF
5109 #line 5109 "configure"
5110 #include "confdefs.h"
5111
5112 #include <osreldate.h>
5113 #if (__FreeBSD_version >= 400017)
5114 #include <sys/consio.h>
5115 #include <sys/fbio.h>
5116 #else
5117 #include <machine/console.h>
5118 #endif
5119
5120 int
5121 main ()
5122 {
5123
5124         struct mouse_info the_mouse;
5125         ioctl(0, CONS_MOUSECTL, &the_mouse);
5126
5127   ;
5128   return 0;
5129 }
5130 _ACEOF
5131 rm -f conftest.$ac_objext
5132 if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133   (eval $ac_compile) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } &&
5137          { ac_try='test -s conftest.$ac_objext'
5138   { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5139   (eval $ac_try) 2>&5
5140   ac_status=$?
5141   echo "$as_me:5141: \$? = $ac_status" >&5
5142   (exit $ac_status); }; }; then
5143   cf_with_sysmouse=yes
5144 else
5145   echo "$as_me: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5147 cf_with_sysmouse=no
5148 fi
5149 rm -f conftest.$ac_objext conftest.$ac_ext
5150         fi
5151 echo "$as_me:5151: result: $cf_with_sysmouse" >&5
5152 echo "${ECHO_T}$cf_with_sysmouse" >&6
5153 test "$cf_with_sysmouse" = yes &&
5154 cat >>confdefs.h <<\EOF
5155 #define USE_SYSMOUSE 1
5156 EOF
5157
5158 fi
5159
5160 if test X"$CC_G_OPT" = X"" ; then
5161         CC_G_OPT='-g'
5162         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5163 fi
5164
5165 if test X"$CXX_G_OPT" = X"" ; then
5166         CXX_G_OPT='-g'
5167         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5168 fi
5169
5170 echo "$as_me:5170: checking for default loader flags" >&5
5171 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5172 case $DFT_LWR_MODEL in
5173 libtool) LD_MODEL=''   ;;
5174 normal)  LD_MODEL=''   ;;
5175 debug)   LD_MODEL=$CC_G_OPT ;;
5176 profile) LD_MODEL='-pg';;
5177 shared)  LD_MODEL=''   ;;
5178 esac
5179 echo "$as_me:5179: result: $LD_MODEL" >&5
5180 echo "${ECHO_T}$LD_MODEL" >&6
5181
5182 case $DFT_LWR_MODEL in
5183 shared)
5184
5185 echo "$as_me:5185: checking if rpath option should be used" >&5
5186 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5187
5188 # Check whether --enable-rpath or --disable-rpath was given.
5189 if test "${enable_rpath+set}" = set; then
5190   enableval="$enable_rpath"
5191   cf_cv_enable_rpath=$enableval
5192 else
5193   cf_cv_enable_rpath=no
5194 fi;
5195 echo "$as_me:5195: result: $cf_cv_enable_rpath" >&5
5196 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5197
5198 echo "$as_me:5198: checking if shared libraries should be relinked during install" >&5
5199 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5200
5201 # Check whether --enable-relink or --disable-relink was given.
5202 if test "${enable_relink+set}" = set; then
5203   enableval="$enable_relink"
5204   cf_cv_do_relink=$enableval
5205 else
5206   cf_cv_do_relink=yes
5207 fi;
5208 echo "$as_me:5208: result: $cf_cv_do_relink" >&5
5209 echo "${ECHO_T}$cf_cv_do_relink" >&6
5210         ;;
5211 esac
5212
5213 LD_RPATH_OPT=
5214 echo "$as_me:5214: checking for an rpath option" >&5
5215 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5216 case $cf_cv_system_name in #(vi
5217 irix*) #(vi
5218         if test "$GCC" = yes; then
5219                 LD_RPATH_OPT="-Wl,-rpath,"
5220         else
5221                 LD_RPATH_OPT="-rpath "
5222         fi
5223         ;;
5224 linux*|gnu*|k*bsd*-gnu) #(vi
5225         LD_RPATH_OPT="-Wl,-rpath,"
5226         ;;
5227 openbsd[2-9].*|mirbsd*) #(vi
5228         LD_RPATH_OPT="-Wl,-rpath,"
5229         ;;
5230 dragonfly*|freebsd*) #(vi
5231         LD_RPATH_OPT="-rpath "
5232         ;;
5233 netbsd*) #(vi
5234         LD_RPATH_OPT="-Wl,-rpath,"
5235         ;;
5236 osf*|mls+*) #(vi
5237         LD_RPATH_OPT="-rpath "
5238         ;;
5239 solaris2*) #(vi
5240         LD_RPATH_OPT="-R"
5241         ;;
5242 *)
5243         ;;
5244 esac
5245 echo "$as_me:5245: result: $LD_RPATH_OPT" >&5
5246 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5247
5248 case "x$LD_RPATH_OPT" in #(vi
5249 x-R*)
5250         echo "$as_me:5250: checking if we need a space after rpath option" >&5
5251 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5252         cf_save_LIBS="$LIBS"
5253         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5254         cat >conftest.$ac_ext <<_ACEOF
5255 #line 5255 "configure"
5256 #include "confdefs.h"
5257
5258 int
5259 main ()
5260 {
5261
5262   ;
5263   return 0;
5264 }
5265 _ACEOF
5266 rm -f conftest.$ac_objext conftest$ac_exeext
5267 if { (eval echo "$as_me:5267: \"$ac_link\"") >&5
5268   (eval $ac_link) 2>&5
5269   ac_status=$?
5270   echo "$as_me:5270: \$? = $ac_status" >&5
5271   (exit $ac_status); } &&
5272          { ac_try='test -s conftest$ac_exeext'
5273   { (eval echo "$as_me:5273: \"$ac_try\"") >&5
5274   (eval $ac_try) 2>&5
5275   ac_status=$?
5276   echo "$as_me:5276: \$? = $ac_status" >&5
5277   (exit $ac_status); }; }; then
5278   cf_rpath_space=no
5279 else
5280   echo "$as_me: failed program was:" >&5
5281 cat conftest.$ac_ext >&5
5282 cf_rpath_space=yes
5283 fi
5284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5285         LIBS="$cf_save_LIBS"
5286         echo "$as_me:5286: result: $cf_rpath_space" >&5
5287 echo "${ECHO_T}$cf_rpath_space" >&6
5288         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5289         ;;
5290 esac
5291
5292         LOCAL_LDFLAGS=
5293         LOCAL_LDFLAGS2=
5294         LD_SHARED_OPTS=
5295         INSTALL_LIB="-m 644"
5296
5297         cf_cv_do_symlinks=no
5298         cf_ld_rpath_opt=
5299         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5300
5301         echo "$as_me:5301: checking if release/abi version should be used for shared libs" >&5
5302 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5303
5304 # Check whether --with-shlib-version or --without-shlib-version was given.
5305 if test "${with_shlib_version+set}" = set; then
5306   withval="$with_shlib_version"
5307   test -z "$withval" && withval=auto
5308         case $withval in #(vi
5309         yes) #(vi
5310                 cf_cv_shlib_version=auto
5311                 ;;
5312         rel|abi|auto|no) #(vi
5313                 cf_cv_shlib_version=$withval
5314                 ;;
5315         *)
5316                 { { echo "$as_me:5316: error: option value must be one of: rel, abi, auto or no" >&5
5317 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5318    { (exit 1); exit 1; }; }
5319                 ;;
5320         esac
5321
5322 else
5323   cf_cv_shlib_version=auto
5324 fi;
5325         echo "$as_me:5325: result: $cf_cv_shlib_version" >&5
5326 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5327
5328         cf_cv_rm_so_locs=no
5329         cf_try_cflags=
5330
5331         # Some less-capable ports of gcc support only -fpic
5332         CC_SHARED_OPTS=
5333         if test "$GCC" = yes
5334         then
5335                 echo "$as_me:5335: checking which $CC option to use" >&5
5336 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5337                 cf_save_CFLAGS="$CFLAGS"
5338                 for CC_SHARED_OPTS in -fPIC -fpic ''
5339                 do
5340                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5341                         cat >conftest.$ac_ext <<_ACEOF
5342 #line 5342 "configure"
5343 #include "confdefs.h"
5344 #include <stdio.h>
5345 int
5346 main ()
5347 {
5348 int x = 1
5349   ;
5350   return 0;
5351 }
5352 _ACEOF
5353 rm -f conftest.$ac_objext
5354 if { (eval echo "$as_me:5354: \"$ac_compile\"") >&5
5355   (eval $ac_compile) 2>&5
5356   ac_status=$?
5357   echo "$as_me:5357: \$? = $ac_status" >&5
5358   (exit $ac_status); } &&
5359          { ac_try='test -s conftest.$ac_objext'
5360   { (eval echo "$as_me:5360: \"$ac_try\"") >&5
5361   (eval $ac_try) 2>&5
5362   ac_status=$?
5363   echo "$as_me:5363: \$? = $ac_status" >&5
5364   (exit $ac_status); }; }; then
5365   break
5366 else
5367   echo "$as_me: failed program was:" >&5
5368 cat conftest.$ac_ext >&5
5369 fi
5370 rm -f conftest.$ac_objext conftest.$ac_ext
5371                 done
5372                 echo "$as_me:5372: result: $CC_SHARED_OPTS" >&5
5373 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5374                 CFLAGS="$cf_save_CFLAGS"
5375         fi
5376
5377         cf_cv_shlib_version_infix=no
5378
5379         case $cf_cv_system_name in #(vi
5380         aix4.3-9*|aix[5-7]*) #(vi
5381                 if test "$GCC" = yes; then
5382                         CC_SHARED_OPTS=
5383                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5384                 else
5385                         # CC_SHARED_OPTS='-qpic=large -G'
5386                         # perhaps "-bM:SRE -bnoentry -bexpall"
5387                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5388                 fi
5389                 ;;
5390         beos*) #(vi
5391                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5392                 ;;
5393         cygwin*) #(vi
5394                 CC_SHARED_OPTS=
5395                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5396                 cf_cv_shlib_version=cygdll
5397                 cf_cv_shlib_version_infix=cygdll
5398                 cat >mk_shared_lib.sh <<-CF_EOF
5399                 #!/bin/sh
5400                 SHARED_LIB=\$1
5401                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5402                 shift
5403                 cat <<-EOF
5404                 Linking shared library
5405                 ** SHARED_LIB \$SHARED_LIB
5406                 ** IMPORT_LIB \$IMPORT_LIB
5407 EOF
5408                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5409 CF_EOF
5410                 chmod +x mk_shared_lib.sh
5411                 ;;
5412         darwin*) #(vi
5413                 cf_try_cflags="no-cpp-precomp"
5414                 CC_SHARED_OPTS="-dynamic"
5415                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5416                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5417                 cf_cv_shlib_version_infix=yes
5418                 echo "$as_me:5418: checking if ld -search_paths_first works" >&5
5419 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5420 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5421   echo $ECHO_N "(cached) $ECHO_C" >&6
5422 else
5423
5424                         cf_save_LDFLAGS=$LDFLAGS
5425                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5426                         cat >conftest.$ac_ext <<_ACEOF
5427 #line 5427 "configure"
5428 #include "confdefs.h"
5429
5430 int
5431 main ()
5432 {
5433 int i;
5434   ;
5435   return 0;
5436 }
5437 _ACEOF
5438 rm -f conftest.$ac_objext conftest$ac_exeext
5439 if { (eval echo "$as_me:5439: \"$ac_link\"") >&5
5440   (eval $ac_link) 2>&5
5441   ac_status=$?
5442   echo "$as_me:5442: \$? = $ac_status" >&5
5443   (exit $ac_status); } &&
5444          { ac_try='test -s conftest$ac_exeext'
5445   { (eval echo "$as_me:5445: \"$ac_try\"") >&5
5446   (eval $ac_try) 2>&5
5447   ac_status=$?
5448   echo "$as_me:5448: \$? = $ac_status" >&5
5449   (exit $ac_status); }; }; then
5450   cf_cv_ldflags_search_paths_first=yes
5451 else
5452   echo "$as_me: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 cf_cv_ldflags_search_paths_first=no
5455 fi
5456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5457                                 LDFLAGS=$cf_save_LDFLAGS
5458 fi
5459 echo "$as_me:5459: result: $cf_cv_ldflags_search_paths_first" >&5
5460 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5461                 if test $cf_cv_ldflags_search_paths_first = yes; then
5462                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5463                 fi
5464                 ;;
5465         hpux[7-8]*) #(vi
5466                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5467                 if test "$GCC" != yes; then
5468                         CC_SHARED_OPTS='+Z'
5469                 fi
5470                 MK_SHARED_LIB='${LD} -b -o $@'
5471                 INSTALL_LIB="-m 555"
5472                 ;;
5473         hpux*) #(vi
5474                 # (tested with gcc 2.7.2 -- I don't have c89)
5475                 if test "$GCC" = yes; then
5476                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5477                 else
5478                         CC_SHARED_OPTS='+Z'
5479                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5480                 fi
5481                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5482                 # HP-UX shared libraries must be executable, and should be
5483                 # readonly to exploit a quirk in the memory manager.
5484                 INSTALL_LIB="-m 555"
5485                 ;;
5486         interix*)
5487                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5488                 if test "$cf_cv_shlib_version" = rel; then
5489                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5490                 else
5491                         cf_shared_soname='`basename `'
5492                 fi
5493                 CC_SHARED_OPTS=
5494                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5495                 ;;
5496         irix*) #(vi
5497                 if test "$cf_cv_enable_rpath" = yes ; then
5498                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5499                 fi
5500                 # tested with IRIX 5.2 and 'cc'.
5501                 if test "$GCC" != yes; then
5502                         CC_SHARED_OPTS='-KPIC'
5503                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5504                 else
5505                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5506                 fi
5507                 cf_cv_rm_so_locs=yes
5508                 ;;
5509         linux*|gnu*|k*bsd*-gnu) #(vi
5510                 if test "$DFT_LWR_MODEL" = "shared" ; then
5511                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5512                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5513                 fi
5514                 if test "$cf_cv_enable_rpath" = yes ; then
5515                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5516                 fi
5517
5518         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5519         if test "$cf_cv_shlib_version" = rel; then
5520                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5521         else
5522                 cf_cv_shared_soname='`basename $@`'
5523         fi
5524
5525                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5526                 ;;
5527         mingw*) #(vi
5528                 cf_cv_shlib_version=mingw
5529                 cf_cv_shlib_version_infix=mingw
5530                 CC_SHARED_OPTS=
5531                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5532                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5533                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5534                 cat >mk_shared_lib.sh <<-CF_EOF
5535                 #!/bin/sh
5536                 SHARED_LIB=\$1
5537                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5538                 shift
5539                 cat <<-EOF
5540                 Linking shared library
5541                 ** SHARED_LIB \$SHARED_LIB
5542                 ** IMPORT_LIB \$IMPORT_LIB
5543 EOF
5544                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5545 CF_EOF
5546                 chmod +x mk_shared_lib.sh
5547                 ;;
5548         openbsd[2-9].*|mirbsd*) #(vi
5549                 if test "$DFT_LWR_MODEL" = "shared" ; then
5550                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5551                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5552                 fi
5553                 if test "$cf_cv_enable_rpath" = yes ; then
5554                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5555                 fi
5556                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5557
5558         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5559         if test "$cf_cv_shlib_version" = rel; then
5560                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5561         else
5562                 cf_cv_shared_soname='`basename $@`'
5563         fi
5564
5565                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5566                 ;;
5567         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5568                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5569                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5570                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5571                 ;;
5572         dragonfly*|freebsd*) #(vi
5573                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5574                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5575                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5576                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5577                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5578                 fi
5579
5580         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5581         if test "$cf_cv_shlib_version" = rel; then
5582                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5583         else
5584                 cf_cv_shared_soname='`basename $@`'
5585         fi
5586
5587                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5588                 ;;
5589         netbsd*) #(vi
5590                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5591                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5592                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5593                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5594                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5595                         if test "$cf_cv_shlib_version" = auto; then
5596                         if test -f /usr/libexec/ld.elf_so; then
5597                                 cf_cv_shlib_version=abi
5598                         else
5599                                 cf_cv_shlib_version=rel
5600                         fi
5601                         fi
5602
5603         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5604         if test "$cf_cv_shlib_version" = rel; then
5605                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5606         else
5607                 cf_cv_shared_soname='`basename $@`'
5608         fi
5609
5610                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5611                 else
5612                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5613                 fi
5614                 ;;
5615         osf*|mls+*) #(vi
5616                 # tested with OSF/1 V3.2 and 'cc'
5617                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5618                 # link with shared libs).
5619                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5620                 case $host_os in #(vi
5621                 osf4*)
5622                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5623                         ;;
5624                 esac
5625                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5626                 if test "$DFT_LWR_MODEL" = "shared" ; then
5627                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5628                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5629                 fi
5630                 cf_cv_rm_so_locs=yes
5631                 ;;
5632         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5633                 # tested with osr5.0.5
5634                 if test "$GCC" != yes; then
5635                         CC_SHARED_OPTS='-belf -KPIC'
5636                 fi
5637                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5638                 if test "$cf_cv_enable_rpath" = yes ; then
5639                         # only way is to set LD_RUN_PATH but no switch for it
5640                         RUN_PATH=$libdir
5641                 fi
5642                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5643                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5644                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5645                 ;;
5646         sunos4*) #(vi
5647                 # tested with SunOS 4.1.1 and gcc 2.7.0
5648                 if test "$GCC" != yes; then
5649                         CC_SHARED_OPTS='-KPIC'
5650                 fi
5651                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5652                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5653                 ;;
5654         solaris2*) #(vi
5655                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5656                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5657                 if test "$DFT_LWR_MODEL" = "shared" ; then
5658                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5659                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5660                 fi
5661                 if test "$cf_cv_enable_rpath" = yes ; then
5662                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5663                 fi
5664
5665         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5666         if test "$cf_cv_shlib_version" = rel; then
5667                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5668         else
5669                 cf_cv_shared_soname='`basename $@`'
5670         fi
5671
5672                 if test "$GCC" != yes; then
5673                         cf_save_CFLAGS="$CFLAGS"
5674                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5675                         do
5676                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5677                                 cat >conftest.$ac_ext <<_ACEOF
5678 #line 5678 "configure"
5679 #include "confdefs.h"
5680 #include <stdio.h>
5681 int
5682 main ()
5683 {
5684 printf("Hello\n");
5685   ;
5686   return 0;
5687 }
5688 _ACEOF
5689 rm -f conftest.$ac_objext
5690 if { (eval echo "$as_me:5690: \"$ac_compile\"") >&5
5691   (eval $ac_compile) 2>&5
5692   ac_status=$?
5693   echo "$as_me:5693: \$? = $ac_status" >&5
5694   (exit $ac_status); } &&
5695          { ac_try='test -s conftest.$ac_objext'
5696   { (eval echo "$as_me:5696: \"$ac_try\"") >&5
5697   (eval $ac_try) 2>&5
5698   ac_status=$?
5699   echo "$as_me:5699: \$? = $ac_status" >&5
5700   (exit $ac_status); }; }; then
5701   break
5702 else
5703   echo "$as_me: failed program was:" >&5
5704 cat conftest.$ac_ext >&5
5705 fi
5706 rm -f conftest.$ac_objext conftest.$ac_ext
5707                         done
5708                         CFLAGS="$cf_save_CFLAGS"
5709                         CC_SHARED_OPTS=$cf_shared_opts
5710                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5711                 else
5712                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5713                 fi
5714                 ;;
5715         sysv5uw7*|unix_sv*) #(vi
5716                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5717                 if test "$GCC" != yes; then
5718                         CC_SHARED_OPTS='-KPIC'
5719                 fi
5720                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5721                 ;;
5722         *)
5723                 CC_SHARED_OPTS='unknown'
5724                 MK_SHARED_LIB='echo unknown'
5725                 ;;
5726         esac
5727
5728         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5729         case "$cf_cv_shlib_version" in #(vi
5730         rel|abi)
5731                 case "$MK_SHARED_LIB" in #(vi
5732                 *'-o $@') #(vi
5733                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5734                         ;;
5735                 *)
5736                         { echo "$as_me:5736: WARNING: ignored --with-shlib-version" >&5
5737 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5738                         ;;
5739                 esac
5740                 ;;
5741         esac
5742
5743         if test -n "$cf_try_cflags"
5744         then
5745 cat > conftest.$ac_ext <<EOF
5746 #line 5746 "${as_me:-configure}"
5747 #include <stdio.h>
5748 int main(int argc, char *argv[])
5749 {
5750         printf("hello\n");
5751         return (argv[argc-1] == 0) ;
5752 }
5753 EOF
5754                 cf_save_CFLAGS="$CFLAGS"
5755                 for cf_opt in $cf_try_cflags
5756                 do
5757                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5758                         echo "$as_me:5758: checking if CFLAGS option -$cf_opt works" >&5
5759 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5760                         if { (eval echo "$as_me:5760: \"$ac_compile\"") >&5
5761   (eval $ac_compile) 2>&5
5762   ac_status=$?
5763   echo "$as_me:5763: \$? = $ac_status" >&5
5764   (exit $ac_status); }; then
5765                                 echo "$as_me:5765: result: yes" >&5
5766 echo "${ECHO_T}yes" >&6
5767                                 cf_save_CFLAGS="$CFLAGS"
5768                         else
5769                                 echo "$as_me:5769: result: no" >&5
5770 echo "${ECHO_T}no" >&6
5771                         fi
5772                 done
5773                 CFLAGS="$cf_save_CFLAGS"
5774         fi
5775
5776         # RPATH_LIST is a colon-separated list of directories
5777         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5778         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5779
5780         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5781
5782 echo "${as_me:-configure}:5782: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5783
5784         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5785
5786 echo "${as_me:-configure}:5786: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5787
5788 if test "$CC_SHARED_OPTS" = "unknown"; then
5789         for model in $cf_list_models; do
5790                 if test "$model" = "shared"; then
5791                         { { echo "$as_me:5791: error: Shared libraries are not supported in this version" >&5
5792 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5793    { (exit 1); exit 1; }; }
5794                 fi
5795         done
5796 fi
5797
5798 ### If we're building with rpath, try to link non-standard libs that way too.
5799 if test "$DFT_LWR_MODEL" = "shared"; then
5800
5801 echo "$as_me:5801: checking if rpath-hack should be disabled" >&5
5802 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5803
5804 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5805 if test "${enable_rpath_hack+set}" = set; then
5806   enableval="$enable_rpath_hack"
5807   test "$enableval" != no && enableval=yes
5808   if test "$enableval" != "yes" ; then
5809     cf_disable_rpath_hack=yes
5810   else
5811     cf_disable_rpath_hack=no
5812   fi
5813 else
5814   enableval=yes
5815   cf_disable_rpath_hack=no
5816
5817 fi;
5818 echo "$as_me:5818: result: $cf_disable_rpath_hack" >&5
5819 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5820 if test "$cf_disable_rpath_hack" = no ; then
5821
5822 echo "$as_me:5822: checking for updated LDFLAGS" >&5
5823 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5824 if test -n "$LD_RPATH_OPT" ; then
5825         echo "$as_me:5825: result: maybe" >&5
5826 echo "${ECHO_T}maybe" >&6
5827
5828         for ac_prog in ldd
5829 do
5830   # Extract the first word of "$ac_prog", so it can be a program name with args.
5831 set dummy $ac_prog; ac_word=$2
5832 echo "$as_me:5832: checking for $ac_word" >&5
5833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5834 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5835   echo $ECHO_N "(cached) $ECHO_C" >&6
5836 else
5837   if test -n "$cf_ldd_prog"; then
5838   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5839 else
5840   ac_save_IFS=$IFS; IFS=$ac_path_separator
5841 ac_dummy="$PATH"
5842 for ac_dir in $ac_dummy; do
5843   IFS=$ac_save_IFS
5844   test -z "$ac_dir" && ac_dir=.
5845   $as_executable_p "$ac_dir/$ac_word" || continue
5846 ac_cv_prog_cf_ldd_prog="$ac_prog"
5847 echo "$as_me:5847: found $ac_dir/$ac_word" >&5
5848 break
5849 done
5850
5851 fi
5852 fi
5853 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5854 if test -n "$cf_ldd_prog"; then
5855   echo "$as_me:5855: result: $cf_ldd_prog" >&5
5856 echo "${ECHO_T}$cf_ldd_prog" >&6
5857 else
5858   echo "$as_me:5858: result: no" >&5
5859 echo "${ECHO_T}no" >&6
5860 fi
5861
5862   test -n "$cf_ldd_prog" && break
5863 done
5864 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5865
5866         cf_rpath_list="/usr/lib /lib"
5867         if test "$cf_ldd_prog" != no
5868         then
5869                 cf_rpath_oops=
5870
5871 cat >conftest.$ac_ext <<_ACEOF
5872 #line 5872 "configure"
5873 #include "confdefs.h"
5874 #include <stdio.h>
5875 int
5876 main ()
5877 {
5878 printf("Hello");
5879   ;
5880   return 0;
5881 }
5882 _ACEOF
5883 rm -f conftest.$ac_objext conftest$ac_exeext
5884 if { (eval echo "$as_me:5884: \"$ac_link\"") >&5
5885   (eval $ac_link) 2>&5
5886   ac_status=$?
5887   echo "$as_me:5887: \$? = $ac_status" >&5
5888   (exit $ac_status); } &&
5889          { ac_try='test -s conftest$ac_exeext'
5890   { (eval echo "$as_me:5890: \"$ac_try\"") >&5
5891   (eval $ac_try) 2>&5
5892   ac_status=$?
5893   echo "$as_me:5893: \$? = $ac_status" >&5
5894   (exit $ac_status); }; }; then
5895   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5896                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5897 else
5898   echo "$as_me: failed program was:" >&5
5899 cat conftest.$ac_ext >&5
5900 fi
5901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5902
5903                 # If we passed the link-test, but get a "not found" on a given library,
5904                 # this could be due to inept reconfiguration of gcc to make it only
5905                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
5906                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
5907                 # /usr/local libraries.
5908                 if test -n "$cf_rpath_oops"
5909                 then
5910                         for cf_rpath_src in $cf_rpath_oops
5911                         do
5912                                 for cf_rpath_dir in \
5913                                         /usr/local \
5914                                         /usr/pkg \
5915                                         /opt/sfw
5916                                 do
5917                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
5918                                         then
5919                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
5920
5921 echo "${as_me:-configure}:5921: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
5922
5923                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
5924                                                 break
5925                                         fi
5926                                 done
5927                         done
5928                 fi
5929         fi
5930
5931         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5932
5933 echo "${as_me:-configure}:5933: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5934
5935 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5936
5937 echo "${as_me:-configure}:5937: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5938
5939 cf_rpath_dst=
5940 for cf_rpath_src in $LDFLAGS
5941 do
5942         case $cf_rpath_src in #(vi
5943         -L*) #(vi
5944
5945                 # check if this refers to a directory which we will ignore
5946                 cf_rpath_skip=no
5947                 if test -n "$cf_rpath_list"
5948                 then
5949                         for cf_rpath_item in $cf_rpath_list
5950                         do
5951                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5952                                 then
5953                                         cf_rpath_skip=yes
5954                                         break
5955                                 fi
5956                         done
5957                 fi
5958
5959                 if test "$cf_rpath_skip" = no
5960                 then
5961                         # transform the option
5962                         if test "$LD_RPATH_OPT" = "-R " ; then
5963                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5964                         else
5965                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5966                         fi
5967
5968                         # if we have not already added this, add it now
5969                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5970                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5971                         then
5972                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5973
5974 echo "${as_me:-configure}:5974: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5975
5976                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5977                         fi
5978                 fi
5979                 ;;
5980         esac
5981         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5982 done
5983 LDFLAGS=$cf_rpath_dst
5984
5985 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5986
5987 echo "${as_me:-configure}:5987: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5988
5989 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5990
5991 echo "${as_me:-configure}:5991: testing ...checking LIBS $LIBS ..." 1>&5
5992
5993 cf_rpath_dst=
5994 for cf_rpath_src in $LIBS
5995 do
5996         case $cf_rpath_src in #(vi
5997         -L*) #(vi
5998
5999                 # check if this refers to a directory which we will ignore
6000                 cf_rpath_skip=no
6001                 if test -n "$cf_rpath_list"
6002                 then
6003                         for cf_rpath_item in $cf_rpath_list
6004                         do
6005                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6006                                 then
6007                                         cf_rpath_skip=yes
6008                                         break
6009                                 fi
6010                         done
6011                 fi
6012
6013                 if test "$cf_rpath_skip" = no
6014                 then
6015                         # transform the option
6016                         if test "$LD_RPATH_OPT" = "-R " ; then
6017                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6018                         else
6019                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6020                         fi
6021
6022                         # if we have not already added this, add it now
6023                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6024                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6025                         then
6026                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6027
6028 echo "${as_me:-configure}:6028: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6029
6030                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6031                         fi
6032                 fi
6033                 ;;
6034         esac
6035         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6036 done
6037 LIBS=$cf_rpath_dst
6038
6039 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6040
6041 echo "${as_me:-configure}:6041: testing ...checked LIBS $LIBS ..." 1>&5
6042
6043         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6044
6045 echo "${as_me:-configure}:6045: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6046
6047 fi
6048
6049 fi
6050
6051 fi
6052
6053 ###############################################################################
6054
6055 ###     use option --disable-overwrite to leave out the link to -lcurses
6056 echo "$as_me:6056: checking if you wish to install ncurses overwriting curses" >&5
6057 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6058
6059 # Check whether --enable-overwrite or --disable-overwrite was given.
6060 if test "${enable_overwrite+set}" = set; then
6061   enableval="$enable_overwrite"
6062   with_overwrite=$enableval
6063 else
6064   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6065 fi;
6066 echo "$as_me:6066: result: $with_overwrite" >&5
6067 echo "${ECHO_T}$with_overwrite" >&6
6068
6069 echo "$as_me:6069: checking if external terminfo-database is used" >&5
6070 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6071
6072 # Check whether --enable-database or --disable-database was given.
6073 if test "${enable_database+set}" = set; then
6074   enableval="$enable_database"
6075   use_database=$enableval
6076 else
6077   use_database=yes
6078 fi;
6079 echo "$as_me:6079: result: $use_database" >&5
6080 echo "${ECHO_T}$use_database" >&6
6081
6082 case $host_os in #(vi
6083 os2*) #(vi
6084         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6085         ;;
6086 *) #(vi
6087         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6088         ;;
6089 esac
6090
6091 if test "$use_database" != no ; then
6092
6093 cat >>confdefs.h <<\EOF
6094 #define USE_DATABASE 1
6095 EOF
6096
6097         echo "$as_me:6097: checking which terminfo source-file will be installed" >&5
6098 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6099
6100 # Check whether --with-database or --without-database was given.
6101 if test "${with_database+set}" = set; then
6102   withval="$with_database"
6103   TERMINFO_SRC=$withval
6104 fi;
6105         echo "$as_me:6105: result: $TERMINFO_SRC" >&5
6106 echo "${ECHO_T}$TERMINFO_SRC" >&6
6107
6108         echo "$as_me:6108: checking whether to use hashed database instead of directory/tree" >&5
6109 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6110
6111 # Check whether --with-hashed-db or --without-hashed-db was given.
6112 if test "${with_hashed_db+set}" = set; then
6113   withval="$with_hashed_db"
6114
6115 else
6116   with_hashed_db=no
6117 fi;
6118         echo "$as_me:6118: result: $with_hashed_db" >&5
6119 echo "${ECHO_T}$with_hashed_db" >&6
6120 else
6121         with_hashed_db=no
6122 fi
6123
6124 echo "$as_me:6124: checking for list of fallback descriptions" >&5
6125 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6126
6127 # Check whether --with-fallbacks or --without-fallbacks was given.
6128 if test "${with_fallbacks+set}" = set; then
6129   withval="$with_fallbacks"
6130   with_fallback=$withval
6131 else
6132   with_fallback=
6133 fi;
6134 echo "$as_me:6134: result: $with_fallback" >&5
6135 echo "${ECHO_T}$with_fallback" >&6
6136 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6137
6138 echo "$as_me:6138: checking if you want modern xterm or antique" >&5
6139 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6140
6141 # Check whether --with-xterm-new or --without-xterm-new was given.
6142 if test "${with_xterm_new+set}" = set; then
6143   withval="$with_xterm_new"
6144   with_xterm_new=$withval
6145 else
6146   with_xterm_new=yes
6147 fi;
6148 case $with_xterm_new in
6149 no)     with_xterm_new=xterm-old;;
6150 *)      with_xterm_new=xterm-new;;
6151 esac
6152 echo "$as_me:6152: result: $with_xterm_new" >&5
6153 echo "${ECHO_T}$with_xterm_new" >&6
6154 WHICH_XTERM=$with_xterm_new
6155
6156 echo "$as_me:6156: checking if xterm backspace sends BS or DEL" >&5
6157 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6158
6159 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6160 if test "${with_xterm_kbs+set}" = set; then
6161   withval="$with_xterm_kbs"
6162   with_xterm_kbs=$withval
6163 else
6164   with_xterm_kbs=BS
6165 fi;
6166 case x$with_xterm_kbs in
6167 xyes|xno|xBS|xbs|x8)
6168         with_xterm_kbs=BS
6169         ;;
6170 xDEL|xdel|x127)
6171         with_xterm_kbs=DEL
6172         ;;
6173 *)
6174         with_xterm_kbs=$withval
6175         ;;
6176 esac
6177 echo "$as_me:6177: result: $with_xterm_kbs" >&5
6178 echo "${ECHO_T}$with_xterm_kbs" >&6
6179 XTERM_KBS=$with_xterm_kbs
6180
6181 MAKE_TERMINFO=
6182 if test "$use_database" = no ; then
6183         TERMINFO="${datadir}/terminfo"
6184         MAKE_TERMINFO="#"
6185 else
6186
6187 echo "$as_me:6187: checking for list of terminfo directories" >&5
6188 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6189
6190 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6191 if test "${with_terminfo_dirs+set}" = set; then
6192   withval="$with_terminfo_dirs"
6193
6194 else
6195   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6196 fi;
6197 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6198 cf_dst_path=
6199 for cf_src_path in $withval
6200 do
6201
6202 if test "x$prefix" != xNONE; then
6203   cf_path_syntax="$prefix"
6204 else
6205   cf_path_syntax="$ac_default_prefix"
6206 fi
6207
6208 case ".$cf_src_path" in #(vi
6209 .\$\(*\)*|.\'*\'*) #(vi
6210   ;;
6211 ..|./*|.\\*) #(vi
6212   ;;
6213 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6214   ;;
6215 .\${*prefix}*|.\${*dir}*) #(vi
6216   eval cf_src_path="$cf_src_path"
6217   case ".$cf_src_path" in #(vi
6218   .NONE/*)
6219     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6220     ;;
6221   esac
6222   ;; #(vi
6223 .no|.NONE/*)
6224   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6225   ;;
6226 *)
6227   { { echo "$as_me:6227: error: expected a pathname, not \"$cf_src_path\"" >&5
6228 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6229    { (exit 1); exit 1; }; }
6230   ;;
6231 esac
6232
6233   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6234   cf_dst_path="${cf_dst_path}${cf_src_path}"
6235 done
6236 IFS="$ac_save_ifs"
6237
6238 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6239 # so we have to check/work around.  We do prefer the result of "eval"...
6240 eval cf_dst_eval="$cf_dst_path"
6241 case "x$cf_dst_eval" in #(vi
6242 xNONE*) #(vi
6243         TERMINFO_DIRS=$cf_dst_path
6244         ;;
6245 *)
6246         TERMINFO_DIRS="$cf_dst_eval"
6247         ;;
6248 esac
6249
6250 echo "$as_me:6250: result: $TERMINFO_DIRS" >&5
6251 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6252 test -n "$TERMINFO_DIRS" &&
6253 cat >>confdefs.h <<EOF
6254 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6255 EOF
6256
6257 echo "$as_me:6257: checking for default terminfo directory" >&5
6258 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6259
6260 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6261 if test "${with_default_terminfo_dir+set}" = set; then
6262   withval="$with_default_terminfo_dir"
6263
6264 else
6265   withval="${TERMINFO:-${datadir}/terminfo}"
6266 fi; if test -n "${datadir}/terminfo" ; then
6267
6268 if test "x$prefix" != xNONE; then
6269   cf_path_syntax="$prefix"
6270 else
6271   cf_path_syntax="$ac_default_prefix"
6272 fi
6273
6274 case ".$withval" in #(vi
6275 .\$\(*\)*|.\'*\'*) #(vi
6276   ;;
6277 ..|./*|.\\*) #(vi
6278   ;;
6279 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6280   ;;
6281 .\${*prefix}*|.\${*dir}*) #(vi
6282   eval withval="$withval"
6283   case ".$withval" in #(vi
6284   .NONE/*)
6285     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6286     ;;
6287   esac
6288   ;; #(vi
6289 .no|.NONE/*)
6290   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6291   ;;
6292 *)
6293   { { echo "$as_me:6293: error: expected a pathname, not \"$withval\"" >&5
6294 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6295    { (exit 1); exit 1; }; }
6296   ;;
6297 esac
6298
6299 fi
6300 eval TERMINFO="$withval"
6301
6302 echo "$as_me:6302: result: $TERMINFO" >&5
6303 echo "${ECHO_T}$TERMINFO" >&6
6304
6305 cat >>confdefs.h <<EOF
6306 #define TERMINFO "$TERMINFO"
6307 EOF
6308
6309 fi
6310
6311 ###     use option --disable-big-core to make tic run on small machines
6312 ###     We need 4Mb, check if we can allocate 50% more than that.
6313 echo "$as_me:6313: checking if big-core option selected" >&5
6314 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6315
6316 # Check whether --enable-big-core or --disable-big-core was given.
6317 if test "${enable_big_core+set}" = set; then
6318   enableval="$enable_big_core"
6319   with_big_core=$enableval
6320 else
6321   if test "$cross_compiling" = yes; then
6322   with_big_core=no
6323 else
6324   cat >conftest.$ac_ext <<_ACEOF
6325 #line 6325 "configure"
6326 #include "confdefs.h"
6327
6328 #include <stdlib.h>
6329 #include <string.h>
6330 int main() {
6331         unsigned long n = 6000000L;
6332         char *s = malloc(n);
6333         if (s != 0)
6334                 s[0] = s[n-1] = 0;
6335         ${cf_cv_main_return:-return}(s == 0);
6336 }
6337 _ACEOF
6338 rm -f conftest$ac_exeext
6339 if { (eval echo "$as_me:6339: \"$ac_link\"") >&5
6340   (eval $ac_link) 2>&5
6341   ac_status=$?
6342   echo "$as_me:6342: \$? = $ac_status" >&5
6343   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6344   { (eval echo "$as_me:6344: \"$ac_try\"") >&5
6345   (eval $ac_try) 2>&5
6346   ac_status=$?
6347   echo "$as_me:6347: \$? = $ac_status" >&5
6348   (exit $ac_status); }; }; then
6349   with_big_core=yes
6350 else
6351   echo "$as_me: program exited with status $ac_status" >&5
6352 echo "$as_me: failed program was:" >&5
6353 cat conftest.$ac_ext >&5
6354 with_big_core=no
6355 fi
6356 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6357 fi
6358 fi;
6359 echo "$as_me:6359: result: $with_big_core" >&5
6360 echo "${ECHO_T}$with_big_core" >&6
6361 test "x$with_big_core" = "xyes" &&
6362 cat >>confdefs.h <<\EOF
6363 #define HAVE_BIG_CORE 1
6364 EOF
6365
6366 ### ISO C only guarantees 512-char strings, we have tables which load faster
6367 ### when constructed using "big" strings.  More than the C compiler, the awk
6368 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6369 echo "$as_me:6369: checking if big-strings option selected" >&5
6370 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6371
6372 # Check whether --enable-big-strings or --disable-big-strings was given.
6373 if test "${enable_big_strings+set}" = set; then
6374   enableval="$enable_big_strings"
6375   with_big_strings=$enableval
6376 else
6377
6378         case x$AWK in #(vi
6379         x)
6380                 eval with_big_strings=no
6381                 ;;
6382         *) #(vi
6383                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6384                         | $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
6385                         eval with_big_strings=yes
6386                 else
6387                         eval with_big_strings=no
6388                 fi
6389                 ;;
6390         esac
6391
6392 fi;
6393 echo "$as_me:6393: result: $with_big_strings" >&5
6394 echo "${ECHO_T}$with_big_strings" >&6
6395
6396 USE_BIG_STRINGS=0
6397 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6398
6399 ###     use option --enable-termcap to compile in the termcap fallback support
6400 echo "$as_me:6400: checking if you want termcap-fallback support" >&5
6401 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6402
6403 # Check whether --enable-termcap or --disable-termcap was given.
6404 if test "${enable_termcap+set}" = set; then
6405   enableval="$enable_termcap"
6406   with_termcap=$enableval
6407 else
6408   with_termcap=no
6409 fi;
6410 echo "$as_me:6410: result: $with_termcap" >&5
6411 echo "${ECHO_T}$with_termcap" >&6
6412
6413 if test "x$with_termcap" != "xyes" ; then
6414         if test "$use_database" = no ; then
6415                 if test -z "$with_fallback" ; then
6416                         { { echo "$as_me:6416: error: You have disabled the database w/o specifying fallbacks" >&5
6417 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6418    { (exit 1); exit 1; }; }
6419                 fi
6420         fi
6421
6422 cat >>confdefs.h <<\EOF
6423 #define PURE_TERMINFO 1
6424 EOF
6425
6426 else
6427
6428 if test "$with_ticlib" != no ; then
6429         { { echo "$as_me:6429: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6430 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6431    { (exit 1); exit 1; }; }
6432 fi
6433
6434 cat >>confdefs.h <<\EOF
6435 #define USE_TERMCAP 1
6436 EOF
6437
6438 echo "$as_me:6438: checking for list of termcap files" >&5
6439 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6440
6441 # Check whether --with-termpath or --without-termpath was given.
6442 if test "${with_termpath+set}" = set; then
6443   withval="$with_termpath"
6444
6445 else
6446   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6447 fi;
6448 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6449 cf_dst_path=
6450 for cf_src_path in $withval
6451 do
6452
6453 if test "x$prefix" != xNONE; then
6454   cf_path_syntax="$prefix"
6455 else
6456   cf_path_syntax="$ac_default_prefix"
6457 fi
6458
6459 case ".$cf_src_path" in #(vi
6460 .\$\(*\)*|.\'*\'*) #(vi
6461   ;;
6462 ..|./*|.\\*) #(vi
6463   ;;
6464 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6465   ;;
6466 .\${*prefix}*|.\${*dir}*) #(vi
6467   eval cf_src_path="$cf_src_path"
6468   case ".$cf_src_path" in #(vi
6469   .NONE/*)
6470     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6471     ;;
6472   esac
6473   ;; #(vi
6474 .no|.NONE/*)
6475   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6476   ;;
6477 *)
6478   { { echo "$as_me:6478: error: expected a pathname, not \"$cf_src_path\"" >&5
6479 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6480    { (exit 1); exit 1; }; }
6481   ;;
6482 esac
6483
6484   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6485   cf_dst_path="${cf_dst_path}${cf_src_path}"
6486 done
6487 IFS="$ac_save_ifs"
6488
6489 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6490 # so we have to check/work around.  We do prefer the result of "eval"...
6491 eval cf_dst_eval="$cf_dst_path"
6492 case "x$cf_dst_eval" in #(vi
6493 xNONE*) #(vi
6494         TERMPATH=$cf_dst_path
6495         ;;
6496 *)
6497         TERMPATH="$cf_dst_eval"
6498         ;;
6499 esac
6500
6501 echo "$as_me:6501: result: $TERMPATH" >&5
6502 echo "${ECHO_T}$TERMPATH" >&6
6503 test -n "$TERMPATH" &&
6504 cat >>confdefs.h <<EOF
6505 #define TERMPATH "$TERMPATH"
6506 EOF
6507
6508 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6509 echo "$as_me:6509: checking if fast termcap-loader is needed" >&5
6510 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6511
6512 # Check whether --enable-getcap or --disable-getcap was given.
6513 if test "${enable_getcap+set}" = set; then
6514   enableval="$enable_getcap"
6515   with_getcap=$enableval
6516 else
6517   with_getcap=no
6518 fi;
6519 echo "$as_me:6519: result: $with_getcap" >&5
6520 echo "${ECHO_T}$with_getcap" >&6
6521 test "x$with_getcap" = "xyes" &&
6522 cat >>confdefs.h <<\EOF
6523 #define USE_GETCAP 1
6524 EOF
6525
6526 echo "$as_me:6526: checking if translated termcaps will be cached in ~/.terminfo" >&5
6527 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6528
6529 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6530 if test "${enable_getcap_cache+set}" = set; then
6531   enableval="$enable_getcap_cache"
6532   with_getcap_cache=$enableval
6533 else
6534   with_getcap_cache=no
6535 fi;
6536 echo "$as_me:6536: result: $with_getcap_cache" >&5
6537 echo "${ECHO_T}$with_getcap_cache" >&6
6538 test "x$with_getcap_cache" = "xyes" &&
6539 cat >>confdefs.h <<\EOF
6540 #define USE_GETCAP_CACHE 1
6541 EOF
6542
6543 fi
6544
6545 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6546 echo "$as_me:6546: checking if ~/.terminfo is wanted" >&5
6547 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6548
6549 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6550 if test "${enable_home_terminfo+set}" = set; then
6551   enableval="$enable_home_terminfo"
6552   with_home_terminfo=$enableval
6553 else
6554   with_home_terminfo=yes
6555 fi;
6556 echo "$as_me:6556: result: $with_home_terminfo" >&5
6557 echo "${ECHO_T}$with_home_terminfo" >&6
6558 test "x$with_home_terminfo" = "xyes" &&
6559 cat >>confdefs.h <<\EOF
6560 #define USE_HOME_TERMINFO 1
6561 EOF
6562
6563 echo "$as_me:6563: checking if you want to use restricted environment when running as root" >&5
6564 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6565
6566 # Check whether --enable-root-environ or --disable-root-environ was given.
6567 if test "${enable_root_environ+set}" = set; then
6568   enableval="$enable_root_environ"
6569   with_root_environ=$enableval
6570 else
6571   with_root_environ=yes
6572 fi;
6573 echo "$as_me:6573: result: $with_root_environ" >&5
6574 echo "${ECHO_T}$with_root_environ" >&6
6575 test "x$with_root_environ" = xyes &&
6576 cat >>confdefs.h <<\EOF
6577 #define USE_ROOT_ENVIRON 1
6578 EOF
6579
6580 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6581 ###   to reduce storage requirements for the terminfo database.
6582
6583 for ac_func in \
6584         remove \
6585         unlink
6586 do
6587 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6588 echo "$as_me:6588: checking for $ac_func" >&5
6589 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6590 if eval "test \"\${$as_ac_var+set}\" = set"; then
6591   echo $ECHO_N "(cached) $ECHO_C" >&6
6592 else
6593   cat >conftest.$ac_ext <<_ACEOF
6594 #line 6594 "configure"
6595 #include "confdefs.h"
6596 /* System header to define __stub macros and hopefully few prototypes,
6597     which can conflict with char $ac_func (); below.  */
6598 #include <assert.h>
6599 /* Override any gcc2 internal prototype to avoid an error.  */
6600 #ifdef __cplusplus
6601 extern "C"
6602 #endif
6603 /* We use char because int might match the return type of a gcc2
6604    builtin and then its argument prototype would still apply.  */
6605 char $ac_func ();
6606 char (*f) ();
6607
6608 int
6609 main ()
6610 {
6611 /* The GNU C library defines this for functions which it implements
6612     to always fail with ENOSYS.  Some functions are actually named
6613     something starting with __ and the normal name is an alias.  */
6614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6615 choke me
6616 #else
6617 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6618 #endif
6619
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 rm -f conftest.$ac_objext conftest$ac_exeext
6625 if { (eval echo "$as_me:6625: \"$ac_link\"") >&5
6626   (eval $ac_link) 2>&5
6627   ac_status=$?
6628   echo "$as_me:6628: \$? = $ac_status" >&5
6629   (exit $ac_status); } &&
6630          { ac_try='test -s conftest$ac_exeext'
6631   { (eval echo "$as_me:6631: \"$ac_try\"") >&5
6632   (eval $ac_try) 2>&5
6633   ac_status=$?
6634   echo "$as_me:6634: \$? = $ac_status" >&5
6635   (exit $ac_status); }; }; then
6636   eval "$as_ac_var=yes"
6637 else
6638   echo "$as_me: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 eval "$as_ac_var=no"
6641 fi
6642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6643 fi
6644 echo "$as_me:6644: result: `eval echo '${'$as_ac_var'}'`" >&5
6645 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6646 if test `eval echo '${'$as_ac_var'}'` = yes; then
6647   cat >>confdefs.h <<EOF
6648 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6649 EOF
6650
6651 fi
6652 done
6653
6654 if test "$cross_compiling" = yes ; then
6655
6656 for ac_func in \
6657                 link \
6658                 symlink
6659 do
6660 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6661 echo "$as_me:6661: checking for $ac_func" >&5
6662 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6663 if eval "test \"\${$as_ac_var+set}\" = set"; then
6664   echo $ECHO_N "(cached) $ECHO_C" >&6
6665 else
6666   cat >conftest.$ac_ext <<_ACEOF
6667 #line 6667 "configure"
6668 #include "confdefs.h"
6669 /* System header to define __stub macros and hopefully few prototypes,
6670     which can conflict with char $ac_func (); below.  */
6671 #include <assert.h>
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 #ifdef __cplusplus
6674 extern "C"
6675 #endif
6676 /* We use char because int might match the return type of a gcc2
6677    builtin and then its argument prototype would still apply.  */
6678 char $ac_func ();
6679 char (*f) ();
6680
6681 int
6682 main ()
6683 {
6684 /* The GNU C library defines this for functions which it implements
6685     to always fail with ENOSYS.  Some functions are actually named
6686     something starting with __ and the normal name is an alias.  */
6687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6688 choke me
6689 #else
6690 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6691 #endif
6692
6693   ;
6694   return 0;
6695 }
6696 _ACEOF
6697 rm -f conftest.$ac_objext conftest$ac_exeext
6698 if { (eval echo "$as_me:6698: \"$ac_link\"") >&5
6699   (eval $ac_link) 2>&5
6700   ac_status=$?
6701   echo "$as_me:6701: \$? = $ac_status" >&5
6702   (exit $ac_status); } &&
6703          { ac_try='test -s conftest$ac_exeext'
6704   { (eval echo "$as_me:6704: \"$ac_try\"") >&5
6705   (eval $ac_try) 2>&5
6706   ac_status=$?
6707   echo "$as_me:6707: \$? = $ac_status" >&5
6708   (exit $ac_status); }; }; then
6709   eval "$as_ac_var=yes"
6710 else
6711   echo "$as_me: failed program was:" >&5
6712 cat conftest.$ac_ext >&5
6713 eval "$as_ac_var=no"
6714 fi
6715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6716 fi
6717 echo "$as_me:6717: result: `eval echo '${'$as_ac_var'}'`" >&5
6718 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6719 if test `eval echo '${'$as_ac_var'}'` = yes; then
6720   cat >>confdefs.h <<EOF
6721 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6722 EOF
6723
6724 fi
6725 done
6726
6727 else
6728         echo "$as_me:6728: checking if link/symlink functions work" >&5
6729 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6730 if test "${cf_cv_link_funcs+set}" = set; then
6731   echo $ECHO_N "(cached) $ECHO_C" >&6
6732 else
6733
6734                 cf_cv_link_funcs=
6735                 for cf_func in link symlink ; do
6736                         if test "$cross_compiling" = yes; then
6737
6738                         eval 'ac_cv_func_'$cf_func'=error'
6739 else
6740   cat >conftest.$ac_ext <<_ACEOF
6741 #line 6741 "configure"
6742 #include "confdefs.h"
6743
6744 #include <sys/types.h>
6745 #include <sys/stat.h>
6746 #ifdef HAVE_UNISTD_H
6747 #include <unistd.h>
6748 #endif
6749 int main()
6750 {
6751         int fail = 0;
6752         char *src = "config.log";
6753         char *dst = "conftest.chk";
6754         struct stat src_sb;
6755         struct stat dst_sb;
6756
6757         stat(src, &src_sb);
6758         fail = ($cf_func("config.log", "conftest.chk") < 0)
6759             || (stat(dst, &dst_sb) < 0)
6760             || (dst_sb.st_mtime != src_sb.st_mtime);
6761 #ifdef HAVE_UNLINK
6762         unlink(dst);
6763 #else
6764         remove(dst);
6765 #endif
6766         ${cf_cv_main_return:-return} (fail);
6767 }
6768
6769 _ACEOF
6770 rm -f conftest$ac_exeext
6771 if { (eval echo "$as_me:6771: \"$ac_link\"") >&5
6772   (eval $ac_link) 2>&5
6773   ac_status=$?
6774   echo "$as_me:6774: \$? = $ac_status" >&5
6775   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6776   { (eval echo "$as_me:6776: \"$ac_try\"") >&5
6777   (eval $ac_try) 2>&5
6778   ac_status=$?
6779   echo "$as_me:6779: \$? = $ac_status" >&5
6780   (exit $ac_status); }; }; then
6781
6782                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6783                         eval 'ac_cv_func_'$cf_func'=yes'
6784 else
6785   echo "$as_me: program exited with status $ac_status" >&5
6786 echo "$as_me: failed program was:" >&5
6787 cat conftest.$ac_ext >&5
6788
6789                         eval 'ac_cv_func_'$cf_func'=no'
6790 fi
6791 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6792 fi
6793                 done
6794                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6795
6796 fi
6797 echo "$as_me:6797: result: $cf_cv_link_funcs" >&5
6798 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6799         test "$ac_cv_func_link"    = yes &&
6800 cat >>confdefs.h <<\EOF
6801 #define HAVE_LINK 1
6802 EOF
6803
6804         test "$ac_cv_func_symlink" = yes &&
6805 cat >>confdefs.h <<\EOF
6806 #define HAVE_SYMLINK 1
6807 EOF
6808
6809 fi
6810
6811 with_links=no
6812 with_symlinks=no
6813
6814 # soft links (symbolic links) are useful for some systems where hard links do
6815 # not work, or to make it simpler to copy terminfo trees around.
6816 if test "x$ac_cv_func_symlink" = xyes ; then
6817     echo "$as_me:6817: checking if tic should use symbolic links" >&5
6818 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6819
6820 # Check whether --enable-symlinks or --disable-symlinks was given.
6821 if test "${enable_symlinks+set}" = set; then
6822   enableval="$enable_symlinks"
6823   with_symlinks=$enableval
6824 else
6825   with_symlinks=no
6826 fi;
6827     echo "$as_me:6827: result: $with_symlinks" >&5
6828 echo "${ECHO_T}$with_symlinks" >&6
6829 fi
6830
6831 # If we have hard links and did not choose to use soft links instead, there is
6832 # no reason to make this choice optional - use the hard links.
6833 if test "$with_symlinks" = no ; then
6834     echo "$as_me:6834: checking if tic should use hard links" >&5
6835 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6836     if test "x$ac_cv_func_link" = xyes ; then
6837         with_links=yes
6838     else
6839         with_links=no
6840     fi
6841     echo "$as_me:6841: result: $with_links" >&5
6842 echo "${ECHO_T}$with_links" >&6
6843 fi
6844
6845 test "x$with_links" = xyes &&
6846 cat >>confdefs.h <<\EOF
6847 #define USE_LINKS 1
6848 EOF
6849
6850 test "x$with_symlinks" = xyes &&
6851 cat >>confdefs.h <<\EOF
6852 #define USE_SYMLINKS 1
6853 EOF
6854
6855 ###   use option --enable-broken-linker to force on use of broken-linker support
6856 echo "$as_me:6856: checking if you want broken-linker support code" >&5
6857 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6858
6859 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6860 if test "${enable_broken_linker+set}" = set; then
6861   enableval="$enable_broken_linker"
6862   with_broken_linker=$enableval
6863 else
6864   with_broken_linker=${BROKEN_LINKER:-no}
6865 fi;
6866 echo "$as_me:6866: result: $with_broken_linker" >&5
6867 echo "${ECHO_T}$with_broken_linker" >&6
6868
6869 BROKEN_LINKER=0
6870 if test "x$with_broken_linker" = xyes ; then
6871
6872 cat >>confdefs.h <<\EOF
6873 #define BROKEN_LINKER 1
6874 EOF
6875
6876         BROKEN_LINKER=1
6877 elif test "$DFT_LWR_MODEL" = shared ; then
6878         case $cf_cv_system_name in #(vi
6879         cygwin*)
6880
6881 cat >>confdefs.h <<\EOF
6882 #define BROKEN_LINKER 1
6883 EOF
6884
6885                 BROKEN_LINKER=1
6886                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6887
6888 echo "${as_me:-configure}:6888: testing cygwin linker is broken anyway ..." 1>&5
6889
6890                 ;;
6891         esac
6892 fi
6893
6894 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6895 echo "$as_me:6895: checking if tputs should process BSD-style prefix padding" >&5
6896 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6897
6898 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6899 if test "${enable_bsdpad+set}" = set; then
6900   enableval="$enable_bsdpad"
6901   with_bsdpad=$enableval
6902 else
6903   with_bsdpad=no
6904 fi;
6905 echo "$as_me:6905: result: $with_bsdpad" >&5
6906 echo "${ECHO_T}$with_bsdpad" >&6
6907 test "x$with_bsdpad" = xyes &&
6908 cat >>confdefs.h <<\EOF
6909 #define BSD_TPUTS 1
6910 EOF
6911
6912 ###   use option --enable-widec to turn on use of wide-character support
6913 NCURSES_CH_T=chtype
6914 NCURSES_LIBUTF8=0
6915
6916 NEED_WCHAR_H=0
6917 NCURSES_MBSTATE_T=0
6918 NCURSES_WCHAR_T=0
6919 NCURSES_WINT_T=0
6920
6921 # Check to define _XOPEN_SOURCE "automatically"
6922
6923 cf_XOPEN_SOURCE=500
6924 cf_POSIX_C_SOURCE=199506L
6925 cf_xopen_source=
6926
6927 case $host_os in #(vi
6928 aix[4-7]*) #(vi
6929         cf_xopen_source="-D_ALL_SOURCE"
6930         ;;
6931 cygwin) #(vi
6932         cf_XOPEN_SOURCE=600
6933         ;;
6934 darwin[0-8].*) #(vi
6935         cf_xopen_source="-D_APPLE_C_SOURCE"
6936         ;;
6937 darwin*) #(vi
6938         cf_xopen_source="-D_DARWIN_C_SOURCE"
6939         cf_XOPEN_SOURCE=
6940         ;;
6941 freebsd*|dragonfly*) #(vi
6942         # 5.x headers associate
6943         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6944         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6945         cf_POSIX_C_SOURCE=200112L
6946         cf_XOPEN_SOURCE=600
6947         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6948         ;;
6949 hpux11*) #(vi
6950         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6951         ;;
6952 hpux*) #(vi
6953         cf_xopen_source="-D_HPUX_SOURCE"
6954         ;;
6955 irix[56].*) #(vi
6956         cf_xopen_source="-D_SGI_SOURCE"
6957         cf_XOPEN_SOURCE=
6958         ;;
6959 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6960
6961 echo "$as_me:6961: checking if we must define _GNU_SOURCE" >&5
6962 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6963 if test "${cf_cv_gnu_source+set}" = set; then
6964   echo $ECHO_N "(cached) $ECHO_C" >&6
6965 else
6966
6967 cat >conftest.$ac_ext <<_ACEOF
6968 #line 6968 "configure"
6969 #include "confdefs.h"
6970 #include <sys/types.h>
6971 int
6972 main ()
6973 {
6974
6975 #ifndef _XOPEN_SOURCE
6976 make an error
6977 #endif
6978   ;
6979   return 0;
6980 }
6981 _ACEOF
6982 rm -f conftest.$ac_objext
6983 if { (eval echo "$as_me:6983: \"$ac_compile\"") >&5
6984   (eval $ac_compile) 2>&5
6985   ac_status=$?
6986   echo "$as_me:6986: \$? = $ac_status" >&5
6987   (exit $ac_status); } &&
6988          { ac_try='test -s conftest.$ac_objext'
6989   { (eval echo "$as_me:6989: \"$ac_try\"") >&5
6990   (eval $ac_try) 2>&5
6991   ac_status=$?
6992   echo "$as_me:6992: \$? = $ac_status" >&5
6993   (exit $ac_status); }; }; then
6994   cf_cv_gnu_source=no
6995 else
6996   echo "$as_me: failed program was:" >&5
6997 cat conftest.$ac_ext >&5
6998 cf_save="$CPPFLAGS"
6999          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7000          cat >conftest.$ac_ext <<_ACEOF
7001 #line 7001 "configure"
7002 #include "confdefs.h"
7003 #include <sys/types.h>
7004 int
7005 main ()
7006 {
7007
7008 #ifdef _XOPEN_SOURCE
7009 make an error
7010 #endif
7011   ;
7012   return 0;
7013 }
7014 _ACEOF
7015 rm -f conftest.$ac_objext
7016 if { (eval echo "$as_me:7016: \"$ac_compile\"") >&5
7017   (eval $ac_compile) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); } &&
7021          { ac_try='test -s conftest.$ac_objext'
7022   { (eval echo "$as_me:7022: \"$ac_try\"") >&5
7023   (eval $ac_try) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); }; }; then
7027   cf_cv_gnu_source=no
7028 else
7029   echo "$as_me: failed program was:" >&5
7030 cat conftest.$ac_ext >&5
7031 cf_cv_gnu_source=yes
7032 fi
7033 rm -f conftest.$ac_objext conftest.$ac_ext
7034         CPPFLAGS="$cf_save"
7035
7036 fi
7037 rm -f conftest.$ac_objext conftest.$ac_ext
7038
7039 fi
7040 echo "$as_me:7040: result: $cf_cv_gnu_source" >&5
7041 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7042 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7043
7044         ;;
7045 mirbsd*) #(vi
7046         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7047         cf_XOPEN_SOURCE=
7048
7049 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7050
7051 cf_save_CFLAGS="$CFLAGS"
7052 cf_save_CPPFLAGS="$CPPFLAGS"
7053
7054 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7055         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7056                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7057
7058 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7059         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7060                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7061
7062 echo "$as_me:7062: checking if we should define _POSIX_C_SOURCE" >&5
7063 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7064 if test "${cf_cv_posix_c_source+set}" = set; then
7065   echo $ECHO_N "(cached) $ECHO_C" >&6
7066 else
7067
7068 echo "${as_me:-configure}:7068: testing if the symbol is already defined go no further ..." 1>&5
7069
7070         cat >conftest.$ac_ext <<_ACEOF
7071 #line 7071 "configure"
7072 #include "confdefs.h"
7073 #include <sys/types.h>
7074 int
7075 main ()
7076 {
7077
7078 #ifndef _POSIX_C_SOURCE
7079 make an error
7080 #endif
7081   ;
7082   return 0;
7083 }
7084 _ACEOF
7085 rm -f conftest.$ac_objext
7086 if { (eval echo "$as_me:7086: \"$ac_compile\"") >&5
7087   (eval $ac_compile) 2>&5
7088   ac_status=$?
7089   echo "$as_me:7089: \$? = $ac_status" >&5
7090   (exit $ac_status); } &&
7091          { ac_try='test -s conftest.$ac_objext'
7092   { (eval echo "$as_me:7092: \"$ac_try\"") >&5
7093   (eval $ac_try) 2>&5
7094   ac_status=$?
7095   echo "$as_me:7095: \$? = $ac_status" >&5
7096   (exit $ac_status); }; }; then
7097   cf_cv_posix_c_source=no
7098 else
7099   echo "$as_me: failed program was:" >&5
7100 cat conftest.$ac_ext >&5
7101 cf_want_posix_source=no
7102          case .$cf_POSIX_C_SOURCE in #(vi
7103          .[12]??*) #(vi
7104                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7105                 ;;
7106          .2) #(vi
7107                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7108                 cf_want_posix_source=yes
7109                 ;;
7110          .*)
7111                 cf_want_posix_source=yes
7112                 ;;
7113          esac
7114          if test "$cf_want_posix_source" = yes ; then
7115                 cat >conftest.$ac_ext <<_ACEOF
7116 #line 7116 "configure"
7117 #include "confdefs.h"
7118 #include <sys/types.h>
7119 int
7120 main ()
7121 {
7122
7123 #ifdef _POSIX_SOURCE
7124 make an error
7125 #endif
7126   ;
7127   return 0;
7128 }
7129 _ACEOF
7130 rm -f conftest.$ac_objext
7131 if { (eval echo "$as_me:7131: \"$ac_compile\"") >&5
7132   (eval $ac_compile) 2>&5
7133   ac_status=$?
7134   echo "$as_me:7134: \$? = $ac_status" >&5
7135   (exit $ac_status); } &&
7136          { ac_try='test -s conftest.$ac_objext'
7137   { (eval echo "$as_me:7137: \"$ac_try\"") >&5
7138   (eval $ac_try) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); }; }; then
7142   :
7143 else
7144   echo "$as_me: failed program was:" >&5
7145 cat conftest.$ac_ext >&5
7146 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7147 fi
7148 rm -f conftest.$ac_objext conftest.$ac_ext
7149          fi
7150
7151 echo "${as_me:-configure}:7151: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7152
7153          CFLAGS="$cf_trim_CFLAGS"
7154          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7155
7156 echo "${as_me:-configure}:7156: testing if the second compile does not leave our definition intact error ..." 1>&5
7157
7158          cat >conftest.$ac_ext <<_ACEOF
7159 #line 7159 "configure"
7160 #include "confdefs.h"
7161 #include <sys/types.h>
7162 int
7163 main ()
7164 {
7165
7166 #ifndef _POSIX_C_SOURCE
7167 make an error
7168 #endif
7169   ;
7170   return 0;
7171 }
7172 _ACEOF
7173 rm -f conftest.$ac_objext
7174 if { (eval echo "$as_me:7174: \"$ac_compile\"") >&5
7175   (eval $ac_compile) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); } &&
7179          { ac_try='test -s conftest.$ac_objext'
7180   { (eval echo "$as_me:7180: \"$ac_try\"") >&5
7181   (eval $ac_try) 2>&5
7182   ac_status=$?
7183   echo "$as_me:7183: \$? = $ac_status" >&5
7184   (exit $ac_status); }; }; then
7185   :
7186 else
7187   echo "$as_me: failed program was:" >&5
7188 cat conftest.$ac_ext >&5
7189 cf_cv_posix_c_source=no
7190 fi
7191 rm -f conftest.$ac_objext conftest.$ac_ext
7192          CFLAGS="$cf_save_CFLAGS"
7193          CPPFLAGS="$cf_save_CPPFLAGS"
7194
7195 fi
7196 rm -f conftest.$ac_objext conftest.$ac_ext
7197
7198 fi
7199 echo "$as_me:7199: result: $cf_cv_posix_c_source" >&5
7200 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7201
7202 if test "$cf_cv_posix_c_source" != no ; then
7203         CFLAGS="$cf_trim_CFLAGS"
7204         CPPFLAGS="$cf_trim_CPPFLAGS"
7205
7206 cf_fix_cppflags=no
7207 cf_new_cflags=
7208 cf_new_cppflags=
7209 cf_new_extra_cppflags=
7210
7211 for cf_add_cflags in $cf_cv_posix_c_source
7212 do
7213 case $cf_fix_cppflags in
7214 no)
7215         case $cf_add_cflags in #(vi
7216         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7217                 case $cf_add_cflags in
7218                 -D*)
7219                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7220
7221                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7222                                 && test -z "${cf_tst_cflags}" \
7223                                 && cf_fix_cppflags=yes
7224
7225                         if test $cf_fix_cppflags = yes ; then
7226                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7227                                 continue
7228                         elif test "${cf_tst_cflags}" = "\"'" ; then
7229                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7230                                 continue
7231                         fi
7232                         ;;
7233                 esac
7234                 case "$CPPFLAGS" in
7235                 *$cf_add_cflags) #(vi
7236                         ;;
7237                 *) #(vi
7238                         case $cf_add_cflags in #(vi
7239                         -D*)
7240                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7241
7242 CPPFLAGS=`echo "$CPPFLAGS" | \
7243         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7244                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7245
7246                                 ;;
7247                         esac
7248                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7249                         ;;
7250                 esac
7251                 ;;
7252         *)
7253                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7254                 ;;
7255         esac
7256         ;;
7257 yes)
7258         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7259
7260         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7261
7262         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7263                 && test -z "${cf_tst_cflags}" \
7264                 && cf_fix_cppflags=no
7265         ;;
7266 esac
7267 done
7268
7269 if test -n "$cf_new_cflags" ; then
7270
7271         CFLAGS="$CFLAGS $cf_new_cflags"
7272 fi
7273
7274 if test -n "$cf_new_cppflags" ; then
7275
7276         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7277 fi
7278
7279 if test -n "$cf_new_extra_cppflags" ; then
7280
7281         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7282 fi
7283
7284 fi
7285
7286         ;;
7287 netbsd*) #(vi
7288         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7289         ;;
7290 openbsd[4-9]*) #(vi
7291         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7292         cf_xopen_source="-D_BSD_SOURCE"
7293         cf_XOPEN_SOURCE=600
7294         ;;
7295 openbsd*) #(vi
7296         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7297         ;;
7298 osf[45]*) #(vi
7299         cf_xopen_source="-D_OSF_SOURCE"
7300         ;;
7301 nto-qnx*) #(vi
7302         cf_xopen_source="-D_QNX_SOURCE"
7303         ;;
7304 sco*) #(vi
7305         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7306         ;;
7307 solaris2.*) #(vi
7308         cf_xopen_source="-D__EXTENSIONS__"
7309         ;;
7310 *)
7311
7312 echo "$as_me:7312: checking if we should define _XOPEN_SOURCE" >&5
7313 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7314 if test "${cf_cv_xopen_source+set}" = set; then
7315   echo $ECHO_N "(cached) $ECHO_C" >&6
7316 else
7317
7318         cat >conftest.$ac_ext <<_ACEOF
7319 #line 7319 "configure"
7320 #include "confdefs.h"
7321
7322 #include <stdlib.h>
7323 #include <string.h>
7324 #include <sys/types.h>
7325
7326 int
7327 main ()
7328 {
7329
7330 #ifndef _XOPEN_SOURCE
7331 make an error
7332 #endif
7333   ;
7334   return 0;
7335 }
7336 _ACEOF
7337 rm -f conftest.$ac_objext
7338 if { (eval echo "$as_me:7338: \"$ac_compile\"") >&5
7339   (eval $ac_compile) 2>&5
7340   ac_status=$?
7341   echo "$as_me:7341: \$? = $ac_status" >&5
7342   (exit $ac_status); } &&
7343          { ac_try='test -s conftest.$ac_objext'
7344   { (eval echo "$as_me:7344: \"$ac_try\"") >&5
7345   (eval $ac_try) 2>&5
7346   ac_status=$?
7347   echo "$as_me:7347: \$? = $ac_status" >&5
7348   (exit $ac_status); }; }; then
7349   cf_cv_xopen_source=no
7350 else
7351   echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 cf_save="$CPPFLAGS"
7354          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7355          cat >conftest.$ac_ext <<_ACEOF
7356 #line 7356 "configure"
7357 #include "confdefs.h"
7358
7359 #include <stdlib.h>
7360 #include <string.h>
7361 #include <sys/types.h>
7362
7363 int
7364 main ()
7365 {
7366
7367 #ifdef _XOPEN_SOURCE
7368 make an error
7369 #endif
7370   ;
7371   return 0;
7372 }
7373 _ACEOF
7374 rm -f conftest.$ac_objext
7375 if { (eval echo "$as_me:7375: \"$ac_compile\"") >&5
7376   (eval $ac_compile) 2>&5
7377   ac_status=$?
7378   echo "$as_me:7378: \$? = $ac_status" >&5
7379   (exit $ac_status); } &&
7380          { ac_try='test -s conftest.$ac_objext'
7381   { (eval echo "$as_me:7381: \"$ac_try\"") >&5
7382   (eval $ac_try) 2>&5
7383   ac_status=$?
7384   echo "$as_me:7384: \$? = $ac_status" >&5
7385   (exit $ac_status); }; }; then
7386   cf_cv_xopen_source=no
7387 else
7388   echo "$as_me: failed program was:" >&5
7389 cat conftest.$ac_ext >&5
7390 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7391 fi
7392 rm -f conftest.$ac_objext conftest.$ac_ext
7393         CPPFLAGS="$cf_save"
7394
7395 fi
7396 rm -f conftest.$ac_objext conftest.$ac_ext
7397
7398 fi
7399 echo "$as_me:7399: result: $cf_cv_xopen_source" >&5
7400 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7401
7402 if test "$cf_cv_xopen_source" != no ; then
7403
7404 CFLAGS=`echo "$CFLAGS" | \
7405         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7406                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7407
7408 CPPFLAGS=`echo "$CPPFLAGS" | \
7409         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7410                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7411
7412         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7413
7414 cf_fix_cppflags=no
7415 cf_new_cflags=
7416 cf_new_cppflags=
7417 cf_new_extra_cppflags=
7418
7419 for cf_add_cflags in $cf_temp_xopen_source
7420 do
7421 case $cf_fix_cppflags in
7422 no)
7423         case $cf_add_cflags in #(vi
7424         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7425                 case $cf_add_cflags in
7426                 -D*)
7427                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7428
7429                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7430                                 && test -z "${cf_tst_cflags}" \
7431                                 && cf_fix_cppflags=yes
7432
7433                         if test $cf_fix_cppflags = yes ; then
7434                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7435                                 continue
7436                         elif test "${cf_tst_cflags}" = "\"'" ; then
7437                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7438                                 continue
7439                         fi
7440                         ;;
7441                 esac
7442                 case "$CPPFLAGS" in
7443                 *$cf_add_cflags) #(vi
7444                         ;;
7445                 *) #(vi
7446                         case $cf_add_cflags in #(vi
7447                         -D*)
7448                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7449
7450 CPPFLAGS=`echo "$CPPFLAGS" | \
7451         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7452                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7453
7454                                 ;;
7455                         esac
7456                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7457                         ;;
7458                 esac
7459                 ;;
7460         *)
7461                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7462                 ;;
7463         esac
7464         ;;
7465 yes)
7466         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7467
7468         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7469
7470         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7471                 && test -z "${cf_tst_cflags}" \
7472                 && cf_fix_cppflags=no
7473         ;;
7474 esac
7475 done
7476
7477 if test -n "$cf_new_cflags" ; then
7478
7479         CFLAGS="$CFLAGS $cf_new_cflags"
7480 fi
7481
7482 if test -n "$cf_new_cppflags" ; then
7483
7484         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7485 fi
7486
7487 if test -n "$cf_new_extra_cppflags" ; then
7488
7489         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7490 fi
7491
7492 fi
7493
7494 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7495
7496 cf_save_CFLAGS="$CFLAGS"
7497 cf_save_CPPFLAGS="$CPPFLAGS"
7498
7499 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7500         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7501                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7502
7503 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7504         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7505                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7506
7507 echo "$as_me:7507: checking if we should define _POSIX_C_SOURCE" >&5
7508 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7509 if test "${cf_cv_posix_c_source+set}" = set; then
7510   echo $ECHO_N "(cached) $ECHO_C" >&6
7511 else
7512
7513 echo "${as_me:-configure}:7513: testing if the symbol is already defined go no further ..." 1>&5
7514
7515         cat >conftest.$ac_ext <<_ACEOF
7516 #line 7516 "configure"
7517 #include "confdefs.h"
7518 #include <sys/types.h>
7519 int
7520 main ()
7521 {
7522
7523 #ifndef _POSIX_C_SOURCE
7524 make an error
7525 #endif
7526   ;
7527   return 0;
7528 }
7529 _ACEOF
7530 rm -f conftest.$ac_objext
7531 if { (eval echo "$as_me:7531: \"$ac_compile\"") >&5
7532   (eval $ac_compile) 2>&5
7533   ac_status=$?
7534   echo "$as_me:7534: \$? = $ac_status" >&5
7535   (exit $ac_status); } &&
7536          { ac_try='test -s conftest.$ac_objext'
7537   { (eval echo "$as_me:7537: \"$ac_try\"") >&5
7538   (eval $ac_try) 2>&5
7539   ac_status=$?
7540   echo "$as_me:7540: \$? = $ac_status" >&5
7541   (exit $ac_status); }; }; then
7542   cf_cv_posix_c_source=no
7543 else
7544   echo "$as_me: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 cf_want_posix_source=no
7547          case .$cf_POSIX_C_SOURCE in #(vi
7548          .[12]??*) #(vi
7549                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7550                 ;;
7551          .2) #(vi
7552                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7553                 cf_want_posix_source=yes
7554                 ;;
7555          .*)
7556                 cf_want_posix_source=yes
7557                 ;;
7558          esac
7559          if test "$cf_want_posix_source" = yes ; then
7560                 cat >conftest.$ac_ext <<_ACEOF
7561 #line 7561 "configure"
7562 #include "confdefs.h"
7563 #include <sys/types.h>
7564 int
7565 main ()
7566 {
7567
7568 #ifdef _POSIX_SOURCE
7569 make an error
7570 #endif
7571   ;
7572   return 0;
7573 }
7574 _ACEOF
7575 rm -f conftest.$ac_objext
7576 if { (eval echo "$as_me:7576: \"$ac_compile\"") >&5
7577   (eval $ac_compile) 2>&5
7578   ac_status=$?
7579   echo "$as_me:7579: \$? = $ac_status" >&5
7580   (exit $ac_status); } &&
7581          { ac_try='test -s conftest.$ac_objext'
7582   { (eval echo "$as_me:7582: \"$ac_try\"") >&5
7583   (eval $ac_try) 2>&5
7584   ac_status=$?
7585   echo "$as_me:7585: \$? = $ac_status" >&5
7586   (exit $ac_status); }; }; then
7587   :
7588 else
7589   echo "$as_me: failed program was:" >&5
7590 cat conftest.$ac_ext >&5
7591 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7592 fi
7593 rm -f conftest.$ac_objext conftest.$ac_ext
7594          fi
7595
7596 echo "${as_me:-configure}:7596: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7597
7598          CFLAGS="$cf_trim_CFLAGS"
7599          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7600
7601 echo "${as_me:-configure}:7601: testing if the second compile does not leave our definition intact error ..." 1>&5
7602
7603          cat >conftest.$ac_ext <<_ACEOF
7604 #line 7604 "configure"
7605 #include "confdefs.h"
7606 #include <sys/types.h>
7607 int
7608 main ()
7609 {
7610
7611 #ifndef _POSIX_C_SOURCE
7612 make an error
7613 #endif
7614   ;
7615   return 0;
7616 }
7617 _ACEOF
7618 rm -f conftest.$ac_objext
7619 if { (eval echo "$as_me:7619: \"$ac_compile\"") >&5
7620   (eval $ac_compile) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); } &&
7624          { ac_try='test -s conftest.$ac_objext'
7625   { (eval echo "$as_me:7625: \"$ac_try\"") >&5
7626   (eval $ac_try) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); }; }; then
7630   :
7631 else
7632   echo "$as_me: failed program was:" >&5
7633 cat conftest.$ac_ext >&5
7634 cf_cv_posix_c_source=no
7635 fi
7636 rm -f conftest.$ac_objext conftest.$ac_ext
7637          CFLAGS="$cf_save_CFLAGS"
7638          CPPFLAGS="$cf_save_CPPFLAGS"
7639
7640 fi
7641 rm -f conftest.$ac_objext conftest.$ac_ext
7642
7643 fi
7644 echo "$as_me:7644: result: $cf_cv_posix_c_source" >&5
7645 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7646
7647 if test "$cf_cv_posix_c_source" != no ; then
7648         CFLAGS="$cf_trim_CFLAGS"
7649         CPPFLAGS="$cf_trim_CPPFLAGS"
7650
7651 cf_fix_cppflags=no
7652 cf_new_cflags=
7653 cf_new_cppflags=
7654 cf_new_extra_cppflags=
7655
7656 for cf_add_cflags in $cf_cv_posix_c_source
7657 do
7658 case $cf_fix_cppflags in
7659 no)
7660         case $cf_add_cflags in #(vi
7661         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7662                 case $cf_add_cflags in
7663                 -D*)
7664                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7665
7666                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7667                                 && test -z "${cf_tst_cflags}" \
7668                                 && cf_fix_cppflags=yes
7669
7670                         if test $cf_fix_cppflags = yes ; then
7671                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7672                                 continue
7673                         elif test "${cf_tst_cflags}" = "\"'" ; then
7674                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7675                                 continue
7676                         fi
7677                         ;;
7678                 esac
7679                 case "$CPPFLAGS" in
7680                 *$cf_add_cflags) #(vi
7681                         ;;
7682                 *) #(vi
7683                         case $cf_add_cflags in #(vi
7684                         -D*)
7685                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7686
7687 CPPFLAGS=`echo "$CPPFLAGS" | \
7688         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7689                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7690
7691                                 ;;
7692                         esac
7693                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7694                         ;;
7695                 esac
7696                 ;;
7697         *)
7698                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7699                 ;;
7700         esac
7701         ;;
7702 yes)
7703         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7704
7705         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7706
7707         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7708                 && test -z "${cf_tst_cflags}" \
7709                 && cf_fix_cppflags=no
7710         ;;
7711 esac
7712 done
7713
7714 if test -n "$cf_new_cflags" ; then
7715
7716         CFLAGS="$CFLAGS $cf_new_cflags"
7717 fi
7718
7719 if test -n "$cf_new_cppflags" ; then
7720
7721         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7722 fi
7723
7724 if test -n "$cf_new_extra_cppflags" ; then
7725
7726         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7727 fi
7728
7729 fi
7730
7731         ;;
7732 esac
7733
7734 if test -n "$cf_xopen_source" ; then
7735
7736 cf_fix_cppflags=no
7737 cf_new_cflags=
7738 cf_new_cppflags=
7739 cf_new_extra_cppflags=
7740
7741 for cf_add_cflags in $cf_xopen_source
7742 do
7743 case $cf_fix_cppflags in
7744 no)
7745         case $cf_add_cflags in #(vi
7746         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7747                 case $cf_add_cflags in
7748                 -D*)
7749                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7750
7751                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7752                                 && test -z "${cf_tst_cflags}" \
7753                                 && cf_fix_cppflags=yes
7754
7755                         if test $cf_fix_cppflags = yes ; then
7756                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7757                                 continue
7758                         elif test "${cf_tst_cflags}" = "\"'" ; then
7759                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7760                                 continue
7761                         fi
7762                         ;;
7763                 esac
7764                 case "$CPPFLAGS" in
7765                 *$cf_add_cflags) #(vi
7766                         ;;
7767                 *) #(vi
7768                         case $cf_add_cflags in #(vi
7769                         -D*)
7770                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7771
7772 CPPFLAGS=`echo "$CPPFLAGS" | \
7773         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7774                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7775
7776                                 ;;
7777                         esac
7778                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7779                         ;;
7780                 esac
7781                 ;;
7782         *)
7783                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7784                 ;;
7785         esac
7786         ;;
7787 yes)
7788         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7789
7790         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7791
7792         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7793                 && test -z "${cf_tst_cflags}" \
7794                 && cf_fix_cppflags=no
7795         ;;
7796 esac
7797 done
7798
7799 if test -n "$cf_new_cflags" ; then
7800
7801         CFLAGS="$CFLAGS $cf_new_cflags"
7802 fi
7803
7804 if test -n "$cf_new_cppflags" ; then
7805
7806         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7807 fi
7808
7809 if test -n "$cf_new_extra_cppflags" ; then
7810
7811         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7812 fi
7813
7814 fi
7815
7816 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7817         echo "$as_me:7817: checking if _XOPEN_SOURCE really is set" >&5
7818 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7819         cat >conftest.$ac_ext <<_ACEOF
7820 #line 7820 "configure"
7821 #include "confdefs.h"
7822 #include <stdlib.h>
7823 int
7824 main ()
7825 {
7826
7827 #ifndef _XOPEN_SOURCE
7828 make an error
7829 #endif
7830   ;
7831   return 0;
7832 }
7833 _ACEOF
7834 rm -f conftest.$ac_objext
7835 if { (eval echo "$as_me:7835: \"$ac_compile\"") >&5
7836   (eval $ac_compile) 2>&5
7837   ac_status=$?
7838   echo "$as_me:7838: \$? = $ac_status" >&5
7839   (exit $ac_status); } &&
7840          { ac_try='test -s conftest.$ac_objext'
7841   { (eval echo "$as_me:7841: \"$ac_try\"") >&5
7842   (eval $ac_try) 2>&5
7843   ac_status=$?
7844   echo "$as_me:7844: \$? = $ac_status" >&5
7845   (exit $ac_status); }; }; then
7846   cf_XOPEN_SOURCE_set=yes
7847 else
7848   echo "$as_me: failed program was:" >&5
7849 cat conftest.$ac_ext >&5
7850 cf_XOPEN_SOURCE_set=no
7851 fi
7852 rm -f conftest.$ac_objext conftest.$ac_ext
7853         echo "$as_me:7853: result: $cf_XOPEN_SOURCE_set" >&5
7854 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7855         if test $cf_XOPEN_SOURCE_set = yes
7856         then
7857                 cat >conftest.$ac_ext <<_ACEOF
7858 #line 7858 "configure"
7859 #include "confdefs.h"
7860 #include <stdlib.h>
7861 int
7862 main ()
7863 {
7864
7865 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7866 make an error
7867 #endif
7868   ;
7869   return 0;
7870 }
7871 _ACEOF
7872 rm -f conftest.$ac_objext
7873 if { (eval echo "$as_me:7873: \"$ac_compile\"") >&5
7874   (eval $ac_compile) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); } &&
7878          { ac_try='test -s conftest.$ac_objext'
7879   { (eval echo "$as_me:7879: \"$ac_try\"") >&5
7880   (eval $ac_try) 2>&5
7881   ac_status=$?
7882   echo "$as_me:7882: \$? = $ac_status" >&5
7883   (exit $ac_status); }; }; then
7884   cf_XOPEN_SOURCE_set_ok=yes
7885 else
7886   echo "$as_me: failed program was:" >&5
7887 cat conftest.$ac_ext >&5
7888 cf_XOPEN_SOURCE_set_ok=no
7889 fi
7890 rm -f conftest.$ac_objext conftest.$ac_ext
7891                 if test $cf_XOPEN_SOURCE_set_ok = no
7892                 then
7893                         { echo "$as_me:7893: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7894 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7895                 fi
7896         else
7897
7898 echo "$as_me:7898: checking if we should define _XOPEN_SOURCE" >&5
7899 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7900 if test "${cf_cv_xopen_source+set}" = set; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903
7904         cat >conftest.$ac_ext <<_ACEOF
7905 #line 7905 "configure"
7906 #include "confdefs.h"
7907
7908 #include <stdlib.h>
7909 #include <string.h>
7910 #include <sys/types.h>
7911
7912 int
7913 main ()
7914 {
7915
7916 #ifndef _XOPEN_SOURCE
7917 make an error
7918 #endif
7919   ;
7920   return 0;
7921 }
7922 _ACEOF
7923 rm -f conftest.$ac_objext
7924 if { (eval echo "$as_me:7924: \"$ac_compile\"") >&5
7925   (eval $ac_compile) 2>&5
7926   ac_status=$?
7927   echo "$as_me:7927: \$? = $ac_status" >&5
7928   (exit $ac_status); } &&
7929          { ac_try='test -s conftest.$ac_objext'
7930   { (eval echo "$as_me:7930: \"$ac_try\"") >&5
7931   (eval $ac_try) 2>&5
7932   ac_status=$?
7933   echo "$as_me:7933: \$? = $ac_status" >&5
7934   (exit $ac_status); }; }; then
7935   cf_cv_xopen_source=no
7936 else
7937   echo "$as_me: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 cf_save="$CPPFLAGS"
7940          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7941          cat >conftest.$ac_ext <<_ACEOF
7942 #line 7942 "configure"
7943 #include "confdefs.h"
7944
7945 #include <stdlib.h>
7946 #include <string.h>
7947 #include <sys/types.h>
7948
7949 int
7950 main ()
7951 {
7952
7953 #ifdef _XOPEN_SOURCE
7954 make an error
7955 #endif
7956   ;
7957   return 0;
7958 }
7959 _ACEOF
7960 rm -f conftest.$ac_objext
7961 if { (eval echo "$as_me:7961: \"$ac_compile\"") >&5
7962   (eval $ac_compile) 2>&5
7963   ac_status=$?
7964   echo "$as_me:7964: \$? = $ac_status" >&5
7965   (exit $ac_status); } &&
7966          { ac_try='test -s conftest.$ac_objext'
7967   { (eval echo "$as_me:7967: \"$ac_try\"") >&5
7968   (eval $ac_try) 2>&5
7969   ac_status=$?
7970   echo "$as_me:7970: \$? = $ac_status" >&5
7971   (exit $ac_status); }; }; then
7972   cf_cv_xopen_source=no
7973 else
7974   echo "$as_me: failed program was:" >&5
7975 cat conftest.$ac_ext >&5
7976 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7977 fi
7978 rm -f conftest.$ac_objext conftest.$ac_ext
7979         CPPFLAGS="$cf_save"
7980
7981 fi
7982 rm -f conftest.$ac_objext conftest.$ac_ext
7983
7984 fi
7985 echo "$as_me:7985: result: $cf_cv_xopen_source" >&5
7986 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7987
7988 if test "$cf_cv_xopen_source" != no ; then
7989
7990 CFLAGS=`echo "$CFLAGS" | \
7991         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7992                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7993
7994 CPPFLAGS=`echo "$CPPFLAGS" | \
7995         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7996                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7997
7998         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7999
8000 cf_fix_cppflags=no
8001 cf_new_cflags=
8002 cf_new_cppflags=
8003 cf_new_extra_cppflags=
8004
8005 for cf_add_cflags in $cf_temp_xopen_source
8006 do
8007 case $cf_fix_cppflags in
8008 no)
8009         case $cf_add_cflags in #(vi
8010         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8011                 case $cf_add_cflags in
8012                 -D*)
8013                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8014
8015                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8016                                 && test -z "${cf_tst_cflags}" \
8017                                 && cf_fix_cppflags=yes
8018
8019                         if test $cf_fix_cppflags = yes ; then
8020                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8021                                 continue
8022                         elif test "${cf_tst_cflags}" = "\"'" ; then
8023                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8024                                 continue
8025                         fi
8026                         ;;
8027                 esac
8028                 case "$CPPFLAGS" in
8029                 *$cf_add_cflags) #(vi
8030                         ;;
8031                 *) #(vi
8032                         case $cf_add_cflags in #(vi
8033                         -D*)
8034                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8035
8036 CPPFLAGS=`echo "$CPPFLAGS" | \
8037         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8038                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8039
8040                                 ;;
8041                         esac
8042                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8043                         ;;
8044                 esac
8045                 ;;
8046         *)
8047                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8048                 ;;
8049         esac
8050         ;;
8051 yes)
8052         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8053
8054         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8055
8056         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8057                 && test -z "${cf_tst_cflags}" \
8058                 && cf_fix_cppflags=no
8059         ;;
8060 esac
8061 done
8062
8063 if test -n "$cf_new_cflags" ; then
8064
8065         CFLAGS="$CFLAGS $cf_new_cflags"
8066 fi
8067
8068 if test -n "$cf_new_cppflags" ; then
8069
8070         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8071 fi
8072
8073 if test -n "$cf_new_extra_cppflags" ; then
8074
8075         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8076 fi
8077
8078 fi
8079
8080         fi
8081 fi
8082
8083 # Work around breakage on OS X
8084
8085 echo "$as_me:8085: checking if SIGWINCH is defined" >&5
8086 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8087 if test "${cf_cv_define_sigwinch+set}" = set; then
8088   echo $ECHO_N "(cached) $ECHO_C" >&6
8089 else
8090
8091         cat >conftest.$ac_ext <<_ACEOF
8092 #line 8092 "configure"
8093 #include "confdefs.h"
8094
8095 #include <sys/types.h>
8096 #include <sys/signal.h>
8097
8098 int
8099 main ()
8100 {
8101 int x = SIGWINCH
8102   ;
8103   return 0;
8104 }
8105 _ACEOF
8106 rm -f conftest.$ac_objext
8107 if { (eval echo "$as_me:8107: \"$ac_compile\"") >&5
8108   (eval $ac_compile) 2>&5
8109   ac_status=$?
8110   echo "$as_me:8110: \$? = $ac_status" >&5
8111   (exit $ac_status); } &&
8112          { ac_try='test -s conftest.$ac_objext'
8113   { (eval echo "$as_me:8113: \"$ac_try\"") >&5
8114   (eval $ac_try) 2>&5
8115   ac_status=$?
8116   echo "$as_me:8116: \$? = $ac_status" >&5
8117   (exit $ac_status); }; }; then
8118   cf_cv_define_sigwinch=yes
8119 else
8120   echo "$as_me: failed program was:" >&5
8121 cat conftest.$ac_ext >&5
8122 cat >conftest.$ac_ext <<_ACEOF
8123 #line 8123 "configure"
8124 #include "confdefs.h"
8125
8126 #undef _XOPEN_SOURCE
8127 #undef _POSIX_SOURCE
8128 #undef _POSIX_C_SOURCE
8129 #include <sys/types.h>
8130 #include <sys/signal.h>
8131
8132 int
8133 main ()
8134 {
8135 int x = SIGWINCH
8136   ;
8137   return 0;
8138 }
8139 _ACEOF
8140 rm -f conftest.$ac_objext
8141 if { (eval echo "$as_me:8141: \"$ac_compile\"") >&5
8142   (eval $ac_compile) 2>&5
8143   ac_status=$?
8144   echo "$as_me:8144: \$? = $ac_status" >&5
8145   (exit $ac_status); } &&
8146          { ac_try='test -s conftest.$ac_objext'
8147   { (eval echo "$as_me:8147: \"$ac_try\"") >&5
8148   (eval $ac_try) 2>&5
8149   ac_status=$?
8150   echo "$as_me:8150: \$? = $ac_status" >&5
8151   (exit $ac_status); }; }; then
8152   cf_cv_define_sigwinch=maybe
8153 else
8154   echo "$as_me: failed program was:" >&5
8155 cat conftest.$ac_ext >&5
8156 cf_cv_define_sigwinch=no
8157 fi
8158 rm -f conftest.$ac_objext conftest.$ac_ext
8159
8160 fi
8161 rm -f conftest.$ac_objext conftest.$ac_ext
8162
8163 fi
8164 echo "$as_me:8164: result: $cf_cv_define_sigwinch" >&5
8165 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8166
8167 if test "$cf_cv_define_sigwinch" = maybe ; then
8168 echo "$as_me:8168: checking for actual SIGWINCH definition" >&5
8169 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8170 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8171   echo $ECHO_N "(cached) $ECHO_C" >&6
8172 else
8173
8174 cf_cv_fixup_sigwinch=unknown
8175 cf_sigwinch=32
8176 while test $cf_sigwinch != 1
8177 do
8178         cat >conftest.$ac_ext <<_ACEOF
8179 #line 8179 "configure"
8180 #include "confdefs.h"
8181
8182 #undef _XOPEN_SOURCE
8183 #undef _POSIX_SOURCE
8184 #undef _POSIX_C_SOURCE
8185 #include <sys/types.h>
8186 #include <sys/signal.h>
8187
8188 int
8189 main ()
8190 {
8191
8192 #if SIGWINCH != $cf_sigwinch
8193 make an error
8194 #endif
8195 int x = SIGWINCH
8196   ;
8197   return 0;
8198 }
8199 _ACEOF
8200 rm -f conftest.$ac_objext
8201 if { (eval echo "$as_me:8201: \"$ac_compile\"") >&5
8202   (eval $ac_compile) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); } &&
8206          { ac_try='test -s conftest.$ac_objext'
8207   { (eval echo "$as_me:8207: \"$ac_try\"") >&5
8208   (eval $ac_try) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); }; }; then
8212   cf_cv_fixup_sigwinch=$cf_sigwinch
8213          break
8214 else
8215   echo "$as_me: failed program was:" >&5
8216 cat conftest.$ac_ext >&5
8217 fi
8218 rm -f conftest.$ac_objext conftest.$ac_ext
8219
8220 cf_sigwinch=`expr $cf_sigwinch - 1`
8221 done
8222
8223 fi
8224 echo "$as_me:8224: result: $cf_cv_fixup_sigwinch" >&5
8225 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8226
8227         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8228                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8229         fi
8230 fi
8231
8232 # Checks for CODESET support.
8233
8234   echo "$as_me:8234: checking for nl_langinfo and CODESET" >&5
8235 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8236 if test "${am_cv_langinfo_codeset+set}" = set; then
8237   echo $ECHO_N "(cached) $ECHO_C" >&6
8238 else
8239   cat >conftest.$ac_ext <<_ACEOF
8240 #line 8240 "configure"
8241 #include "confdefs.h"
8242 #include <langinfo.h>
8243 int
8244 main ()
8245 {
8246 char* cs = nl_langinfo(CODESET);
8247   ;
8248   return 0;
8249 }
8250 _ACEOF
8251 rm -f conftest.$ac_objext conftest$ac_exeext
8252 if { (eval echo "$as_me:8252: \"$ac_link\"") >&5
8253   (eval $ac_link) 2>&5
8254   ac_status=$?
8255   echo "$as_me:8255: \$? = $ac_status" >&5
8256   (exit $ac_status); } &&
8257          { ac_try='test -s conftest$ac_exeext'
8258   { (eval echo "$as_me:8258: \"$ac_try\"") >&5
8259   (eval $ac_try) 2>&5
8260   ac_status=$?
8261   echo "$as_me:8261: \$? = $ac_status" >&5
8262   (exit $ac_status); }; }; then
8263   am_cv_langinfo_codeset=yes
8264 else
8265   echo "$as_me: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267 am_cv_langinfo_codeset=no
8268 fi
8269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8270
8271 fi
8272 echo "$as_me:8272: result: $am_cv_langinfo_codeset" >&5
8273 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8274   if test $am_cv_langinfo_codeset = yes; then
8275
8276 cat >>confdefs.h <<\EOF
8277 #define HAVE_LANGINFO_CODESET 1
8278 EOF
8279
8280   fi
8281
8282 # use these variables to work around a defect in gcc's fixincludes.
8283 NCURSES_OK_WCHAR_T=
8284 NCURSES_OK_WINT_T=
8285
8286 echo "$as_me:8286: checking if you want wide-character code" >&5
8287 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8288
8289 # Check whether --enable-widec or --disable-widec was given.
8290 if test "${enable_widec+set}" = set; then
8291   enableval="$enable_widec"
8292   with_widec=$enableval
8293 else
8294   with_widec=no
8295 fi;
8296 echo "$as_me:8296: result: $with_widec" >&5
8297 echo "${ECHO_T}$with_widec" >&6
8298 if test "x$with_widec" = xyes ; then
8299         LIB_SUFFIX="w${LIB_SUFFIX}"
8300
8301 cat >>confdefs.h <<\EOF
8302 #define USE_WIDEC_SUPPORT 1
8303 EOF
8304
8305 cat >>confdefs.h <<\EOF
8306 #define NCURSES_WIDECHAR 1
8307 EOF
8308
8309 echo "$as_me:8309: checking if wchar.h can be used as is" >&5
8310 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8311 if test "${cf_cv_wchar_h_okay+set}" = set; then
8312   echo $ECHO_N "(cached) $ECHO_C" >&6
8313 else
8314
8315 cat >conftest.$ac_ext <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8318
8319 #include <stdlib.h>
8320 #include <wchar.h>
8321
8322 int
8323 main ()
8324 {
8325
8326         wint_t foo = 0;
8327         int bar = iswpunct(foo)
8328   ;
8329   return 0;
8330 }
8331 _ACEOF
8332 rm -f conftest.$ac_objext
8333 if { (eval echo "$as_me:8333: \"$ac_compile\"") >&5
8334   (eval $ac_compile) 2>&5
8335   ac_status=$?
8336   echo "$as_me:8336: \$? = $ac_status" >&5
8337   (exit $ac_status); } &&
8338          { ac_try='test -s conftest.$ac_objext'
8339   { (eval echo "$as_me:8339: \"$ac_try\"") >&5
8340   (eval $ac_try) 2>&5
8341   ac_status=$?
8342   echo "$as_me:8342: \$? = $ac_status" >&5
8343   (exit $ac_status); }; }; then
8344   cf_cv_wchar_h_okay=yes
8345 else
8346   echo "$as_me: failed program was:" >&5
8347 cat conftest.$ac_ext >&5
8348 cf_cv_wchar_h_okay=no
8349 fi
8350 rm -f conftest.$ac_objext conftest.$ac_ext
8351 fi
8352 echo "$as_me:8352: result: $cf_cv_wchar_h_okay" >&5
8353 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8354
8355 if test $cf_cv_wchar_h_okay = no
8356 then
8357
8358 echo "$as_me:8358: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8359 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8360 cat >conftest.$ac_ext <<_ACEOF
8361 #line 8361 "configure"
8362 #include "confdefs.h"
8363 #include <sys/types.h>
8364
8365 int
8366 main ()
8367 {
8368
8369 #ifndef _XOPEN_SOURCE_EXTENDED
8370 make an error
8371 #endif
8372   ;
8373   return 0;
8374 }
8375 _ACEOF
8376 rm -f conftest.$ac_objext
8377 if { (eval echo "$as_me:8377: \"$ac_compile\"") >&5
8378   (eval $ac_compile) 2>&5
8379   ac_status=$?
8380   echo "$as_me:8380: \$? = $ac_status" >&5
8381   (exit $ac_status); } &&
8382          { ac_try='test -s conftest.$ac_objext'
8383   { (eval echo "$as_me:8383: \"$ac_try\"") >&5
8384   (eval $ac_try) 2>&5
8385   ac_status=$?
8386   echo "$as_me:8386: \$? = $ac_status" >&5
8387   (exit $ac_status); }; }; then
8388   cf_result=no
8389 else
8390   echo "$as_me: failed program was:" >&5
8391 cat conftest.$ac_ext >&5
8392 cf_result=yes
8393 fi
8394 rm -f conftest.$ac_objext conftest.$ac_ext
8395 echo "$as_me:8395: result: $cf_result" >&5
8396 echo "${ECHO_T}$cf_result" >&6
8397
8398 if test "$cf_result" = yes ; then
8399         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8400 elif test "x" != "x" ; then
8401         echo "$as_me:8401: checking checking for compatible value versus " >&5
8402 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8403         cat >conftest.$ac_ext <<_ACEOF
8404 #line 8404 "configure"
8405 #include "confdefs.h"
8406 #include <sys/types.h>
8407
8408 int
8409 main ()
8410 {
8411
8412 #if _XOPEN_SOURCE_EXTENDED- < 0
8413 make an error
8414 #endif
8415   ;
8416   return 0;
8417 }
8418 _ACEOF
8419 rm -f conftest.$ac_objext
8420 if { (eval echo "$as_me:8420: \"$ac_compile\"") >&5
8421   (eval $ac_compile) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); } &&
8425          { ac_try='test -s conftest.$ac_objext'
8426   { (eval echo "$as_me:8426: \"$ac_try\"") >&5
8427   (eval $ac_try) 2>&5
8428   ac_status=$?
8429   echo "$as_me:8429: \$? = $ac_status" >&5
8430   (exit $ac_status); }; }; then
8431   cf_result=yes
8432 else
8433   echo "$as_me: failed program was:" >&5
8434 cat conftest.$ac_ext >&5
8435 cf_result=no
8436 fi
8437 rm -f conftest.$ac_objext conftest.$ac_ext
8438         echo "$as_me:8438: result: $cf_result" >&5
8439 echo "${ECHO_T}$cf_result" >&6
8440         if test "$cf_result" = no ; then
8441                 # perhaps we can override it - try...
8442                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8443         fi
8444 fi
8445
8446 fi
8447
8448         # with_overwrite=no
8449         NCURSES_CH_T=cchar_t
8450
8451 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8452 do
8453 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8454 echo "$as_me:8454: checking for $ac_func" >&5
8455 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8456 if eval "test \"\${$as_ac_var+set}\" = set"; then
8457   echo $ECHO_N "(cached) $ECHO_C" >&6
8458 else
8459   cat >conftest.$ac_ext <<_ACEOF
8460 #line 8460 "configure"
8461 #include "confdefs.h"
8462 /* System header to define __stub macros and hopefully few prototypes,
8463     which can conflict with char $ac_func (); below.  */
8464 #include <assert.h>
8465 /* Override any gcc2 internal prototype to avoid an error.  */
8466 #ifdef __cplusplus
8467 extern "C"
8468 #endif
8469 /* We use char because int might match the return type of a gcc2
8470    builtin and then its argument prototype would still apply.  */
8471 char $ac_func ();
8472 char (*f) ();
8473
8474 int
8475 main ()
8476 {
8477 /* The GNU C library defines this for functions which it implements
8478     to always fail with ENOSYS.  Some functions are actually named
8479     something starting with __ and the normal name is an alias.  */
8480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8481 choke me
8482 #else
8483 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8484 #endif
8485
8486   ;
8487   return 0;
8488 }
8489 _ACEOF
8490 rm -f conftest.$ac_objext conftest$ac_exeext
8491 if { (eval echo "$as_me:8491: \"$ac_link\"") >&5
8492   (eval $ac_link) 2>&5
8493   ac_status=$?
8494   echo "$as_me:8494: \$? = $ac_status" >&5
8495   (exit $ac_status); } &&
8496          { ac_try='test -s conftest$ac_exeext'
8497   { (eval echo "$as_me:8497: \"$ac_try\"") >&5
8498   (eval $ac_try) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); }; }; then
8502   eval "$as_ac_var=yes"
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8506 eval "$as_ac_var=no"
8507 fi
8508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8509 fi
8510 echo "$as_me:8510: result: `eval echo '${'$as_ac_var'}'`" >&5
8511 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8512 if test `eval echo '${'$as_ac_var'}'` = yes; then
8513   cat >>confdefs.h <<EOF
8514 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8515 EOF
8516
8517 fi
8518 done
8519
8520         if test "x$ac_cv_func_putwc" != xyes ; then
8521
8522 echo "$as_me:8522: checking for multibyte character support" >&5
8523 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8524 if test "${cf_cv_utf8_lib+set}" = set; then
8525   echo $ECHO_N "(cached) $ECHO_C" >&6
8526 else
8527
8528         cf_save_LIBS="$LIBS"
8529         cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532
8533 #include <stdlib.h>
8534 int
8535 main ()
8536 {
8537 putwc(0,0);
8538   ;
8539   return 0;
8540 }
8541 _ACEOF
8542 rm -f conftest.$ac_objext conftest$ac_exeext
8543 if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
8544   (eval $ac_link) 2>&5
8545   ac_status=$?
8546   echo "$as_me:8546: \$? = $ac_status" >&5
8547   (exit $ac_status); } &&
8548          { ac_try='test -s conftest$ac_exeext'
8549   { (eval echo "$as_me:8549: \"$ac_try\"") >&5
8550   (eval $ac_try) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); }; }; then
8554   cf_cv_utf8_lib=yes
8555 else
8556   echo "$as_me: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558
8559 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8560 # will be set on completion of the AC_TRY_LINK below.
8561 cf_cv_header_path_utf8=
8562 cf_cv_library_path_utf8=
8563
8564 echo "${as_me:-configure}:8564: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8565
8566 cf_save_LIBS="$LIBS"
8567
8568 cat >conftest.$ac_ext <<_ACEOF
8569 #line 8569 "configure"
8570 #include "confdefs.h"
8571
8572 #include <libutf8.h>
8573 int
8574 main ()
8575 {
8576 putwc(0,0);
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 rm -f conftest.$ac_objext conftest$ac_exeext
8582 if { (eval echo "$as_me:8582: \"$ac_link\"") >&5
8583   (eval $ac_link) 2>&5
8584   ac_status=$?
8585   echo "$as_me:8585: \$? = $ac_status" >&5
8586   (exit $ac_status); } &&
8587          { ac_try='test -s conftest$ac_exeext'
8588   { (eval echo "$as_me:8588: \"$ac_try\"") >&5
8589   (eval $ac_try) 2>&5
8590   ac_status=$?
8591   echo "$as_me:8591: \$? = $ac_status" >&5
8592   (exit $ac_status); }; }; then
8593
8594         cf_cv_find_linkage_utf8=yes
8595         cf_cv_header_path_utf8=/usr/include
8596         cf_cv_library_path_utf8=/usr/lib
8597
8598 else
8599   echo "$as_me: failed program was:" >&5
8600 cat conftest.$ac_ext >&5
8601
8602 LIBS="-lutf8  $cf_save_LIBS"
8603
8604 cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607
8608 #include <libutf8.h>
8609 int
8610 main ()
8611 {
8612 putwc(0,0);
8613   ;
8614   return 0;
8615 }
8616 _ACEOF
8617 rm -f conftest.$ac_objext conftest$ac_exeext
8618 if { (eval echo "$as_me:8618: \"$ac_link\"") >&5
8619   (eval $ac_link) 2>&5
8620   ac_status=$?
8621   echo "$as_me:8621: \$? = $ac_status" >&5
8622   (exit $ac_status); } &&
8623          { ac_try='test -s conftest$ac_exeext'
8624   { (eval echo "$as_me:8624: \"$ac_try\"") >&5
8625   (eval $ac_try) 2>&5
8626   ac_status=$?
8627   echo "$as_me:8627: \$? = $ac_status" >&5
8628   (exit $ac_status); }; }; then
8629
8630         cf_cv_find_linkage_utf8=yes
8631         cf_cv_header_path_utf8=/usr/include
8632         cf_cv_library_path_utf8=/usr/lib
8633         cf_cv_library_file_utf8="-lutf8"
8634
8635 else
8636   echo "$as_me: failed program was:" >&5
8637 cat conftest.$ac_ext >&5
8638
8639         cf_cv_find_linkage_utf8=no
8640         LIBS="$cf_save_LIBS"
8641
8642     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8643
8644 echo "${as_me:-configure}:8644: testing find linkage for utf8 library ..." 1>&5
8645
8646 echo "${as_me:-configure}:8646: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8647
8648     cf_save_CPPFLAGS="$CPPFLAGS"
8649     cf_test_CPPFLAGS="$CPPFLAGS"
8650
8651 cf_search=
8652
8653 # collect the current set of include-directories from compiler flags
8654 cf_header_path_list=""
8655 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8656         for cf_header_path in $CPPFLAGS $CFLAGS
8657         do
8658                 case $cf_header_path in #(vi
8659                 -I*)
8660                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8661
8662 test "$cf_header_path" != "NONE" && \
8663 test -d "$cf_header_path" && \
8664  {
8665         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8666         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8667         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8668         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8669         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8670         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8671 }
8672
8673                         cf_header_path_list="$cf_header_path_list $cf_search"
8674                         ;;
8675                 esac
8676         done
8677 fi
8678
8679 # add the variations for the package we are looking for
8680
8681 cf_search=
8682
8683 test "/usr" != "$prefix" && \
8684 test -d "/usr" && \
8685 (test $prefix = NONE || test "/usr" != "$prefix") && {
8686         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8687         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8688         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8689         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8690         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8691         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8692 }
8693
8694 test "$prefix" != "NONE" && \
8695 test -d "$prefix" && \
8696  {
8697         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8698         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8699         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8700         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8701         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8702         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8703 }
8704
8705 test "/usr/local" != "$prefix" && \
8706 test -d "/usr/local" && \
8707 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8708         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8709         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8710         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8711         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8712         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8713         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8714 }
8715
8716 test "/opt" != "$prefix" && \
8717 test -d "/opt" && \
8718 (test $prefix = NONE || test "/opt" != "$prefix") && {
8719         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8720         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8721         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8722         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8723         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8724         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8725 }
8726
8727 test "$HOME" != "$prefix" && \
8728 test -d "$HOME" && \
8729 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8730         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8731         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8732         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8733         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8734         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8735         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8736 }
8737
8738 test "$includedir" != NONE && \
8739 test "$includedir" != "/usr/include" && \
8740 test -d "$includedir" && {
8741         test -d $includedir &&    cf_search="$cf_search $includedir"
8742         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8743 }
8744
8745 test "$oldincludedir" != NONE && \
8746 test "$oldincludedir" != "/usr/include" && \
8747 test -d "$oldincludedir" && {
8748         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8749         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8750 }
8751
8752 cf_search="$cf_search $cf_header_path_list"
8753
8754     for cf_cv_header_path_utf8 in $cf_search
8755     do
8756       if test -d $cf_cv_header_path_utf8 ; then
8757         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8758
8759 echo "${as_me:-configure}:8759: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8760
8761         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8762         cat >conftest.$ac_ext <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765
8766 #include <libutf8.h>
8767 int
8768 main ()
8769 {
8770 putwc(0,0);
8771   ;
8772   return 0;
8773 }
8774 _ACEOF
8775 rm -f conftest.$ac_objext
8776 if { (eval echo "$as_me:8776: \"$ac_compile\"") >&5
8777   (eval $ac_compile) 2>&5
8778   ac_status=$?
8779   echo "$as_me:8779: \$? = $ac_status" >&5
8780   (exit $ac_status); } &&
8781          { ac_try='test -s conftest.$ac_objext'
8782   { (eval echo "$as_me:8782: \"$ac_try\"") >&5
8783   (eval $ac_try) 2>&5
8784   ac_status=$?
8785   echo "$as_me:8785: \$? = $ac_status" >&5
8786   (exit $ac_status); }; }; then
8787
8788             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8789
8790 echo "${as_me:-configure}:8790: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8791
8792             cf_cv_find_linkage_utf8=maybe
8793             cf_test_CPPFLAGS="$CPPFLAGS"
8794             break
8795 else
8796   echo "$as_me: failed program was:" >&5
8797 cat conftest.$ac_ext >&5
8798
8799             CPPFLAGS="$cf_save_CPPFLAGS"
8800
8801 fi
8802 rm -f conftest.$ac_objext conftest.$ac_ext
8803       fi
8804     done
8805
8806     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8807
8808 echo "${as_me:-configure}:8808: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8809
8810       cf_save_LIBS="$LIBS"
8811       cf_save_LDFLAGS="$LDFLAGS"
8812
8813       if test "$cf_cv_find_linkage_utf8" != yes ; then
8814
8815 cf_search=
8816 cf_library_path_list=""
8817 if test -n "${LDFLAGS}${LIBS}" ; then
8818         for cf_library_path in $LDFLAGS $LIBS
8819         do
8820                 case $cf_library_path in #(vi
8821                 -L*)
8822                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8823
8824 test "$cf_library_path" != "NONE" && \
8825 test -d "$cf_library_path" && \
8826  {
8827         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8828         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8829         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8830         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8831         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8832         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8833 }
8834
8835                         cf_library_path_list="$cf_library_path_list $cf_search"
8836                         ;;
8837                 esac
8838         done
8839 fi
8840
8841 cf_search=
8842
8843 test "/usr" != "$prefix" && \
8844 test -d "/usr" && \
8845 (test $prefix = NONE || test "/usr" != "$prefix") && {
8846         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8847         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8848         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8849         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8850         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8851         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8852 }
8853
8854 test "$prefix" != "NONE" && \
8855 test -d "$prefix" && \
8856  {
8857         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8858         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8859         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8860         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8861         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8862         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8863 }
8864
8865 test "/usr/local" != "$prefix" && \
8866 test -d "/usr/local" && \
8867 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8868         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8869         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8870         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8871         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8872         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8873         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8874 }
8875
8876 test "/opt" != "$prefix" && \
8877 test -d "/opt" && \
8878 (test $prefix = NONE || test "/opt" != "$prefix") && {
8879         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8880         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8881         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8882         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8883         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8884         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8885 }
8886
8887 test "$HOME" != "$prefix" && \
8888 test -d "$HOME" && \
8889 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8890         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8891         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8892         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8893         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8894         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8895         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8896 }
8897
8898 cf_search="$cf_library_path_list $cf_search"
8899
8900         for cf_cv_library_path_utf8 in $cf_search
8901         do
8902           if test -d $cf_cv_library_path_utf8 ; then
8903             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8904
8905 echo "${as_me:-configure}:8905: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8906
8907             CPPFLAGS="$cf_test_CPPFLAGS"
8908             LIBS="-lutf8  $cf_save_LIBS"
8909             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8910             cat >conftest.$ac_ext <<_ACEOF
8911 #line 8911 "configure"
8912 #include "confdefs.h"
8913
8914 #include <libutf8.h>
8915 int
8916 main ()
8917 {
8918 putwc(0,0);
8919   ;
8920   return 0;
8921 }
8922 _ACEOF
8923 rm -f conftest.$ac_objext conftest$ac_exeext
8924 if { (eval echo "$as_me:8924: \"$ac_link\"") >&5
8925   (eval $ac_link) 2>&5
8926   ac_status=$?
8927   echo "$as_me:8927: \$? = $ac_status" >&5
8928   (exit $ac_status); } &&
8929          { ac_try='test -s conftest$ac_exeext'
8930   { (eval echo "$as_me:8930: \"$ac_try\"") >&5
8931   (eval $ac_try) 2>&5
8932   ac_status=$?
8933   echo "$as_me:8933: \$? = $ac_status" >&5
8934   (exit $ac_status); }; }; then
8935
8936                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8937
8938 echo "${as_me:-configure}:8938: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8939
8940                 cf_cv_find_linkage_utf8=yes
8941                 cf_cv_library_file_utf8="-lutf8"
8942                 break
8943 else
8944   echo "$as_me: failed program was:" >&5
8945 cat conftest.$ac_ext >&5
8946
8947                 CPPFLAGS="$cf_save_CPPFLAGS"
8948                 LIBS="$cf_save_LIBS"
8949                 LDFLAGS="$cf_save_LDFLAGS"
8950
8951 fi
8952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8953           fi
8954         done
8955         CPPFLAGS="$cf_save_CPPFLAGS"
8956         LDFLAGS="$cf_save_LDFLAGS"
8957       fi
8958
8959     else
8960       cf_cv_find_linkage_utf8=no
8961     fi
8962
8963 fi
8964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8965
8966 fi
8967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8968
8969 LIBS="$cf_save_LIBS"
8970
8971 if test "$cf_cv_find_linkage_utf8" = yes ; then
8972 cf_cv_utf8_lib=add-on
8973 else
8974 cf_cv_utf8_lib=no
8975 fi
8976
8977 fi
8978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8979 fi
8980 echo "$as_me:8980: result: $cf_cv_utf8_lib" >&5
8981 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8982
8983 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8984 # ncurses/ncursesw:
8985 if test "$cf_cv_utf8_lib" = "add-on" ; then
8986
8987 cat >>confdefs.h <<\EOF
8988 #define HAVE_LIBUTF8_H 1
8989 EOF
8990
8991 if test -n "$cf_cv_header_path_utf8" ; then
8992   for cf_add_incdir in $cf_cv_header_path_utf8
8993   do
8994         while test $cf_add_incdir != /usr/include
8995         do
8996           if test -d $cf_add_incdir
8997           then
8998                 cf_have_incdir=no
8999                 if test -n "$CFLAGS$CPPFLAGS" ; then
9000                   # a loop is needed to ensure we can add subdirs of existing dirs
9001                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9002                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9003                           cf_have_incdir=yes; break
9004                         fi
9005                   done
9006                 fi
9007
9008                 if test "$cf_have_incdir" = no ; then
9009                   if test "$cf_add_incdir" = /usr/local/include ; then
9010                         if test "$GCC" = yes
9011                         then
9012                           cf_save_CPPFLAGS=$CPPFLAGS
9013                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9014                           cat >conftest.$ac_ext <<_ACEOF
9015 #line 9015 "configure"
9016 #include "confdefs.h"
9017 #include <stdio.h>
9018 int
9019 main ()
9020 {
9021 printf("Hello")
9022   ;
9023   return 0;
9024 }
9025 _ACEOF
9026 rm -f conftest.$ac_objext
9027 if { (eval echo "$as_me:9027: \"$ac_compile\"") >&5
9028   (eval $ac_compile) 2>&5
9029   ac_status=$?
9030   echo "$as_me:9030: \$? = $ac_status" >&5
9031   (exit $ac_status); } &&
9032          { ac_try='test -s conftest.$ac_objext'
9033   { (eval echo "$as_me:9033: \"$ac_try\"") >&5
9034   (eval $ac_try) 2>&5
9035   ac_status=$?
9036   echo "$as_me:9036: \$? = $ac_status" >&5
9037   (exit $ac_status); }; }; then
9038   :
9039 else
9040   echo "$as_me: failed program was:" >&5
9041 cat conftest.$ac_ext >&5
9042 cf_have_incdir=yes
9043 fi
9044 rm -f conftest.$ac_objext conftest.$ac_ext
9045                           CPPFLAGS=$cf_save_CPPFLAGS
9046                         fi
9047                   fi
9048                 fi
9049
9050                 if test "$cf_have_incdir" = no ; then
9051                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9052
9053 echo "${as_me:-configure}:9053: testing adding $cf_add_incdir to include-path ..." 1>&5
9054
9055                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9056
9057                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9058                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9059                   cf_add_incdir="$cf_top_incdir"
9060                 else
9061                   break
9062                 fi
9063           fi
9064         done
9065   done
9066 fi
9067
9068 if test -n "$cf_cv_library_path_utf8" ; then
9069   for cf_add_libdir in $cf_cv_library_path_utf8
9070   do
9071     if test $cf_add_libdir = /usr/lib ; then
9072       :
9073     elif test -d $cf_add_libdir
9074     then
9075       cf_have_libdir=no
9076       if test -n "$LDFLAGS$LIBS" ; then
9077         # a loop is needed to ensure we can add subdirs of existing dirs
9078         for cf_test_libdir in $LDFLAGS $LIBS ; do
9079           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9080             cf_have_libdir=yes; break
9081           fi
9082         done
9083       fi
9084       if test "$cf_have_libdir" = no ; then
9085         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9086
9087 echo "${as_me:-configure}:9087: testing adding $cf_add_libdir to library-path ..." 1>&5
9088
9089         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9090       fi
9091     fi
9092   done
9093 fi
9094
9095         LIBS="$cf_cv_library_file_utf8 $LIBS"
9096 fi
9097
9098                 if test "$cf_cv_utf8_lib" != no ; then
9099                         NCURSES_LIBUTF8=1
9100                 fi
9101         fi
9102
9103 # This is needed on Tru64 5.0 to declare mbstate_t
9104 echo "$as_me:9104: checking if we must include wchar.h to declare mbstate_t" >&5
9105 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9106 if test "${cf_cv_mbstate_t+set}" = set; then
9107   echo $ECHO_N "(cached) $ECHO_C" >&6
9108 else
9109
9110 cat >conftest.$ac_ext <<_ACEOF
9111 #line 9111 "configure"
9112 #include "confdefs.h"
9113
9114 #include <stdlib.h>
9115 #include <stdarg.h>
9116 #include <stdio.h>
9117 #ifdef HAVE_LIBUTF8_H
9118 #include <libutf8.h>
9119 #endif
9120 int
9121 main ()
9122 {
9123 mbstate_t state
9124   ;
9125   return 0;
9126 }
9127 _ACEOF
9128 rm -f conftest.$ac_objext
9129 if { (eval echo "$as_me:9129: \"$ac_compile\"") >&5
9130   (eval $ac_compile) 2>&5
9131   ac_status=$?
9132   echo "$as_me:9132: \$? = $ac_status" >&5
9133   (exit $ac_status); } &&
9134          { ac_try='test -s conftest.$ac_objext'
9135   { (eval echo "$as_me:9135: \"$ac_try\"") >&5
9136   (eval $ac_try) 2>&5
9137   ac_status=$?
9138   echo "$as_me:9138: \$? = $ac_status" >&5
9139   (exit $ac_status); }; }; then
9140   cf_cv_mbstate_t=no
9141 else
9142   echo "$as_me: failed program was:" >&5
9143 cat conftest.$ac_ext >&5
9144 cat >conftest.$ac_ext <<_ACEOF
9145 #line 9145 "configure"
9146 #include "confdefs.h"
9147
9148 #include <stdlib.h>
9149 #include <stdarg.h>
9150 #include <stdio.h>
9151 #include <wchar.h>
9152 #ifdef HAVE_LIBUTF8_H
9153 #include <libutf8.h>
9154 #endif
9155 int
9156 main ()
9157 {
9158 mbstate_t value
9159   ;
9160   return 0;
9161 }
9162 _ACEOF
9163 rm -f conftest.$ac_objext
9164 if { (eval echo "$as_me:9164: \"$ac_compile\"") >&5
9165   (eval $ac_compile) 2>&5
9166   ac_status=$?
9167   echo "$as_me:9167: \$? = $ac_status" >&5
9168   (exit $ac_status); } &&
9169          { ac_try='test -s conftest.$ac_objext'
9170   { (eval echo "$as_me:9170: \"$ac_try\"") >&5
9171   (eval $ac_try) 2>&5
9172   ac_status=$?
9173   echo "$as_me:9173: \$? = $ac_status" >&5
9174   (exit $ac_status); }; }; then
9175   cf_cv_mbstate_t=yes
9176 else
9177   echo "$as_me: failed program was:" >&5
9178 cat conftest.$ac_ext >&5
9179 cf_cv_mbstate_t=unknown
9180 fi
9181 rm -f conftest.$ac_objext conftest.$ac_ext
9182 fi
9183 rm -f conftest.$ac_objext conftest.$ac_ext
9184 fi
9185 echo "$as_me:9185: result: $cf_cv_mbstate_t" >&5
9186 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9187
9188 if test "$cf_cv_mbstate_t" = yes ; then
9189
9190 cat >>confdefs.h <<\EOF
9191 #define NEED_WCHAR_H 1
9192 EOF
9193
9194         NEED_WCHAR_H=1
9195 fi
9196
9197 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9198 if test "$cf_cv_mbstate_t" = unknown ; then
9199         NCURSES_MBSTATE_T=1
9200 fi
9201
9202 # This is needed on Tru64 5.0 to declare wchar_t
9203 echo "$as_me:9203: checking if we must include wchar.h to declare wchar_t" >&5
9204 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9205 if test "${cf_cv_wchar_t+set}" = set; then
9206   echo $ECHO_N "(cached) $ECHO_C" >&6
9207 else
9208
9209 cat >conftest.$ac_ext <<_ACEOF
9210 #line 9210 "configure"
9211 #include "confdefs.h"
9212
9213 #include <stdlib.h>
9214 #include <stdarg.h>
9215 #include <stdio.h>
9216 #ifdef HAVE_LIBUTF8_H
9217 #include <libutf8.h>
9218 #endif
9219 int
9220 main ()
9221 {
9222 wchar_t state
9223   ;
9224   return 0;
9225 }
9226 _ACEOF
9227 rm -f conftest.$ac_objext
9228 if { (eval echo "$as_me:9228: \"$ac_compile\"") >&5
9229   (eval $ac_compile) 2>&5
9230   ac_status=$?
9231   echo "$as_me:9231: \$? = $ac_status" >&5
9232   (exit $ac_status); } &&
9233          { ac_try='test -s conftest.$ac_objext'
9234   { (eval echo "$as_me:9234: \"$ac_try\"") >&5
9235   (eval $ac_try) 2>&5
9236   ac_status=$?
9237   echo "$as_me:9237: \$? = $ac_status" >&5
9238   (exit $ac_status); }; }; then
9239   cf_cv_wchar_t=no
9240 else
9241   echo "$as_me: failed program was:" >&5
9242 cat conftest.$ac_ext >&5
9243 cat >conftest.$ac_ext <<_ACEOF
9244 #line 9244 "configure"
9245 #include "confdefs.h"
9246
9247 #include <stdlib.h>
9248 #include <stdarg.h>
9249 #include <stdio.h>
9250 #include <wchar.h>
9251 #ifdef HAVE_LIBUTF8_H
9252 #include <libutf8.h>
9253 #endif
9254 int
9255 main ()
9256 {
9257 wchar_t value
9258   ;
9259   return 0;
9260 }
9261 _ACEOF
9262 rm -f conftest.$ac_objext
9263 if { (eval echo "$as_me:9263: \"$ac_compile\"") >&5
9264   (eval $ac_compile) 2>&5
9265   ac_status=$?
9266   echo "$as_me:9266: \$? = $ac_status" >&5
9267   (exit $ac_status); } &&
9268          { ac_try='test -s conftest.$ac_objext'
9269   { (eval echo "$as_me:9269: \"$ac_try\"") >&5
9270   (eval $ac_try) 2>&5
9271   ac_status=$?
9272   echo "$as_me:9272: \$? = $ac_status" >&5
9273   (exit $ac_status); }; }; then
9274   cf_cv_wchar_t=yes
9275 else
9276   echo "$as_me: failed program was:" >&5
9277 cat conftest.$ac_ext >&5
9278 cf_cv_wchar_t=unknown
9279 fi
9280 rm -f conftest.$ac_objext conftest.$ac_ext
9281 fi
9282 rm -f conftest.$ac_objext conftest.$ac_ext
9283 fi
9284 echo "$as_me:9284: result: $cf_cv_wchar_t" >&5
9285 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9286
9287 if test "$cf_cv_wchar_t" = yes ; then
9288
9289 cat >>confdefs.h <<\EOF
9290 #define NEED_WCHAR_H 1
9291 EOF
9292
9293         NEED_WCHAR_H=1
9294 fi
9295
9296 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9297 if test "$cf_cv_wchar_t" = unknown ; then
9298         NCURSES_WCHAR_T=1
9299 fi
9300
9301 # if we find wchar_t in either place, use substitution to provide a fallback.
9302 if test "$cf_cv_wchar_t" != unknown ; then
9303         NCURSES_OK_WCHAR_T=1
9304 fi
9305
9306 # This is needed on Tru64 5.0 to declare wint_t
9307 echo "$as_me:9307: checking if we must include wchar.h to declare wint_t" >&5
9308 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9309 if test "${cf_cv_wint_t+set}" = set; then
9310   echo $ECHO_N "(cached) $ECHO_C" >&6
9311 else
9312
9313 cat >conftest.$ac_ext <<_ACEOF
9314 #line 9314 "configure"
9315 #include "confdefs.h"
9316
9317 #include <stdlib.h>
9318 #include <stdarg.h>
9319 #include <stdio.h>
9320 #ifdef HAVE_LIBUTF8_H
9321 #include <libutf8.h>
9322 #endif
9323 int
9324 main ()
9325 {
9326 wint_t state
9327   ;
9328   return 0;
9329 }
9330 _ACEOF
9331 rm -f conftest.$ac_objext
9332 if { (eval echo "$as_me:9332: \"$ac_compile\"") >&5
9333   (eval $ac_compile) 2>&5
9334   ac_status=$?
9335   echo "$as_me:9335: \$? = $ac_status" >&5
9336   (exit $ac_status); } &&
9337          { ac_try='test -s conftest.$ac_objext'
9338   { (eval echo "$as_me:9338: \"$ac_try\"") >&5
9339   (eval $ac_try) 2>&5
9340   ac_status=$?
9341   echo "$as_me:9341: \$? = $ac_status" >&5
9342   (exit $ac_status); }; }; then
9343   cf_cv_wint_t=no
9344 else
9345   echo "$as_me: failed program was:" >&5
9346 cat conftest.$ac_ext >&5
9347 cat >conftest.$ac_ext <<_ACEOF
9348 #line 9348 "configure"
9349 #include "confdefs.h"
9350
9351 #include <stdlib.h>
9352 #include <stdarg.h>
9353 #include <stdio.h>
9354 #include <wchar.h>
9355 #ifdef HAVE_LIBUTF8_H
9356 #include <libutf8.h>
9357 #endif
9358 int
9359 main ()
9360 {
9361 wint_t value
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext
9367 if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
9368   (eval $ac_compile) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest.$ac_objext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378   cf_cv_wint_t=yes
9379 else
9380   echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9382 cf_cv_wint_t=unknown
9383 fi
9384 rm -f conftest.$ac_objext conftest.$ac_ext
9385 fi
9386 rm -f conftest.$ac_objext conftest.$ac_ext
9387 fi
9388 echo "$as_me:9388: result: $cf_cv_wint_t" >&5
9389 echo "${ECHO_T}$cf_cv_wint_t" >&6
9390
9391 if test "$cf_cv_wint_t" = yes ; then
9392
9393 cat >>confdefs.h <<\EOF
9394 #define NEED_WCHAR_H 1
9395 EOF
9396
9397         NEED_WCHAR_H=1
9398 fi
9399
9400 # if we do not find wint_t in either place, use substitution to provide a fallback.
9401 if test "$cf_cv_wint_t" = unknown ; then
9402         NCURSES_WINT_T=1
9403 fi
9404
9405 # if we find wint_t in either place, use substitution to provide a fallback.
9406 if test "$cf_cv_wint_t" != unknown ; then
9407         NCURSES_OK_WINT_T=1
9408 fi
9409
9410         if test "$NCURSES_MBSTATE_T" != 0; then
9411
9412 cat >>confdefs.h <<\EOF
9413 #define NEED_MBSTATE_T_DEF 1
9414 EOF
9415
9416         fi
9417 fi
9418
9419 ###   use option --disable-lp64 to allow long chtype
9420 case $cf_cv_abi_version in
9421 [345]*)
9422         default_with_lp64=no
9423         ;;
9424 *)
9425         default_with_lp64=yes
9426         ;;
9427 esac
9428
9429 echo "$as_me:9429: checking whether to enable _LP64 definition in curses.h" >&5
9430 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9431
9432 # Check whether --enable-lp64 or --disable-lp64 was given.
9433 if test "${enable_lp64+set}" = set; then
9434   enableval="$enable_lp64"
9435   with_lp64=$enableval
9436 else
9437   with_lp64=$default_with_lp64
9438 fi;
9439 echo "$as_me:9439: result: $with_lp64" >&5
9440 echo "${ECHO_T}$with_lp64" >&6
9441
9442 if test "x$with_lp64" = xyes ; then
9443         cf_cv_enable_lp64=1
9444 else
9445         cf_cv_enable_lp64=0
9446 fi
9447
9448 # Check whether --enable-largefile or --disable-largefile was given.
9449 if test "${enable_largefile+set}" = set; then
9450   enableval="$enable_largefile"
9451
9452 fi;
9453 if test "$enable_largefile" != no; then
9454
9455   echo "$as_me:9455: checking for special C compiler options needed for large files" >&5
9456 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9457 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9458   echo $ECHO_N "(cached) $ECHO_C" >&6
9459 else
9460   ac_cv_sys_largefile_CC=no
9461      if test "$GCC" != yes; then
9462        ac_save_CC=$CC
9463        while :; do
9464          # IRIX 6.2 and later do not support large files by default,
9465          # so use the C compiler's -n32 option if that helps.
9466          cat >conftest.$ac_ext <<_ACEOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9469 #include <sys/types.h>
9470  /* Check that off_t can represent 2**63 - 1 correctly.
9471     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9472     since some C++ compilers masquerading as C compilers
9473     incorrectly reject 9223372036854775807.  */
9474 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9475   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9476                        && LARGE_OFF_T % 2147483647 == 1)
9477                       ? 1 : -1];
9478 int
9479 main ()
9480 {
9481
9482   ;
9483   return 0;
9484 }
9485 _ACEOF
9486          rm -f conftest.$ac_objext
9487 if { (eval echo "$as_me:9487: \"$ac_compile\"") >&5
9488   (eval $ac_compile) 2>&5
9489   ac_status=$?
9490   echo "$as_me:9490: \$? = $ac_status" >&5
9491   (exit $ac_status); } &&
9492          { ac_try='test -s conftest.$ac_objext'
9493   { (eval echo "$as_me:9493: \"$ac_try\"") >&5
9494   (eval $ac_try) 2>&5
9495   ac_status=$?
9496   echo "$as_me:9496: \$? = $ac_status" >&5
9497   (exit $ac_status); }; }; then
9498   break
9499 else
9500   echo "$as_me: failed program was:" >&5
9501 cat conftest.$ac_ext >&5
9502 fi
9503 rm -f conftest.$ac_objext
9504          CC="$CC -n32"
9505          rm -f conftest.$ac_objext
9506 if { (eval echo "$as_me:9506: \"$ac_compile\"") >&5
9507   (eval $ac_compile) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit $ac_status); } &&
9511          { ac_try='test -s conftest.$ac_objext'
9512   { (eval echo "$as_me:9512: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:9515: \$? = $ac_status" >&5
9516   (exit $ac_status); }; }; then
9517   ac_cv_sys_largefile_CC=' -n32'; break
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 cat conftest.$ac_ext >&5
9521 fi
9522 rm -f conftest.$ac_objext
9523          break
9524        done
9525        CC=$ac_save_CC
9526        rm -f conftest.$ac_ext
9527     fi
9528 fi
9529 echo "$as_me:9529: result: $ac_cv_sys_largefile_CC" >&5
9530 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9531   if test "$ac_cv_sys_largefile_CC" != no; then
9532     CC=$CC$ac_cv_sys_largefile_CC
9533   fi
9534
9535   echo "$as_me:9535: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9536 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9537 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9538   echo $ECHO_N "(cached) $ECHO_C" >&6
9539 else
9540   while :; do
9541   ac_cv_sys_file_offset_bits=no
9542   cat >conftest.$ac_ext <<_ACEOF
9543 #line 9543 "configure"
9544 #include "confdefs.h"
9545 #include <sys/types.h>
9546  /* Check that off_t can represent 2**63 - 1 correctly.
9547     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9548     since some C++ compilers masquerading as C compilers
9549     incorrectly reject 9223372036854775807.  */
9550 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9551   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9552                        && LARGE_OFF_T % 2147483647 == 1)
9553                       ? 1 : -1];
9554 int
9555 main ()
9556 {
9557
9558   ;
9559   return 0;
9560 }
9561 _ACEOF
9562 rm -f conftest.$ac_objext
9563 if { (eval echo "$as_me:9563: \"$ac_compile\"") >&5
9564   (eval $ac_compile) 2>&5
9565   ac_status=$?
9566   echo "$as_me:9566: \$? = $ac_status" >&5
9567   (exit $ac_status); } &&
9568          { ac_try='test -s conftest.$ac_objext'
9569   { (eval echo "$as_me:9569: \"$ac_try\"") >&5
9570   (eval $ac_try) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit $ac_status); }; }; then
9574   break
9575 else
9576   echo "$as_me: failed program was:" >&5
9577 cat conftest.$ac_ext >&5
9578 fi
9579 rm -f conftest.$ac_objext conftest.$ac_ext
9580   cat >conftest.$ac_ext <<_ACEOF
9581 #line 9581 "configure"
9582 #include "confdefs.h"
9583 #define _FILE_OFFSET_BITS 64
9584 #include <sys/types.h>
9585  /* Check that off_t can represent 2**63 - 1 correctly.
9586     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9587     since some C++ compilers masquerading as C compilers
9588     incorrectly reject 9223372036854775807.  */
9589 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9590   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9591                        && LARGE_OFF_T % 2147483647 == 1)
9592                       ? 1 : -1];
9593 int
9594 main ()
9595 {
9596
9597   ;
9598   return 0;
9599 }
9600 _ACEOF
9601 rm -f conftest.$ac_objext
9602 if { (eval echo "$as_me:9602: \"$ac_compile\"") >&5
9603   (eval $ac_compile) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); } &&
9607          { ac_try='test -s conftest.$ac_objext'
9608   { (eval echo "$as_me:9608: \"$ac_try\"") >&5
9609   (eval $ac_try) 2>&5
9610   ac_status=$?
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); }; }; then
9613   ac_cv_sys_file_offset_bits=64; break
9614 else
9615   echo "$as_me: failed program was:" >&5
9616 cat conftest.$ac_ext >&5
9617 fi
9618 rm -f conftest.$ac_objext conftest.$ac_ext
9619   break
9620 done
9621 fi
9622 echo "$as_me:9622: result: $ac_cv_sys_file_offset_bits" >&5
9623 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9624 if test "$ac_cv_sys_file_offset_bits" != no; then
9625
9626 cat >>confdefs.h <<EOF
9627 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9628 EOF
9629
9630 fi
9631 rm -rf conftest*
9632   echo "$as_me:9632: checking for _LARGE_FILES value needed for large files" >&5
9633 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9634 if test "${ac_cv_sys_large_files+set}" = set; then
9635   echo $ECHO_N "(cached) $ECHO_C" >&6
9636 else
9637   while :; do
9638   ac_cv_sys_large_files=no
9639   cat >conftest.$ac_ext <<_ACEOF
9640 #line 9640 "configure"
9641 #include "confdefs.h"
9642 #include <sys/types.h>
9643  /* Check that off_t can represent 2**63 - 1 correctly.
9644     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9645     since some C++ compilers masquerading as C compilers
9646     incorrectly reject 9223372036854775807.  */
9647 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9648   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9649                        && LARGE_OFF_T % 2147483647 == 1)
9650                       ? 1 : -1];
9651 int
9652 main ()
9653 {
9654
9655   ;
9656   return 0;
9657 }
9658 _ACEOF
9659 rm -f conftest.$ac_objext
9660 if { (eval echo "$as_me:9660: \"$ac_compile\"") >&5
9661   (eval $ac_compile) 2>&5
9662   ac_status=$?
9663   echo "$as_me:9663: \$? = $ac_status" >&5
9664   (exit $ac_status); } &&
9665          { ac_try='test -s conftest.$ac_objext'
9666   { (eval echo "$as_me:9666: \"$ac_try\"") >&5
9667   (eval $ac_try) 2>&5
9668   ac_status=$?
9669   echo "$as_me:9669: \$? = $ac_status" >&5
9670   (exit $ac_status); }; }; then
9671   break
9672 else
9673   echo "$as_me: failed program was:" >&5
9674 cat conftest.$ac_ext >&5
9675 fi
9676 rm -f conftest.$ac_objext conftest.$ac_ext
9677   cat >conftest.$ac_ext <<_ACEOF
9678 #line 9678 "configure"
9679 #include "confdefs.h"
9680 #define _LARGE_FILES 1
9681 #include <sys/types.h>
9682  /* Check that off_t can represent 2**63 - 1 correctly.
9683     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9684     since some C++ compilers masquerading as C compilers
9685     incorrectly reject 9223372036854775807.  */
9686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9687   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9688                        && LARGE_OFF_T % 2147483647 == 1)
9689                       ? 1 : -1];
9690 int
9691 main ()
9692 {
9693
9694   ;
9695   return 0;
9696 }
9697 _ACEOF
9698 rm -f conftest.$ac_objext
9699 if { (eval echo "$as_me:9699: \"$ac_compile\"") >&5
9700   (eval $ac_compile) 2>&5
9701   ac_status=$?
9702   echo "$as_me:9702: \$? = $ac_status" >&5
9703   (exit $ac_status); } &&
9704          { ac_try='test -s conftest.$ac_objext'
9705   { (eval echo "$as_me:9705: \"$ac_try\"") >&5
9706   (eval $ac_try) 2>&5
9707   ac_status=$?
9708   echo "$as_me:9708: \$? = $ac_status" >&5
9709   (exit $ac_status); }; }; then
9710   ac_cv_sys_large_files=1; break
9711 else
9712   echo "$as_me: failed program was:" >&5
9713 cat conftest.$ac_ext >&5
9714 fi
9715 rm -f conftest.$ac_objext conftest.$ac_ext
9716   break
9717 done
9718 fi
9719 echo "$as_me:9719: result: $ac_cv_sys_large_files" >&5
9720 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9721 if test "$ac_cv_sys_large_files" != no; then
9722
9723 cat >>confdefs.h <<EOF
9724 #define _LARGE_FILES $ac_cv_sys_large_files
9725 EOF
9726
9727 fi
9728 rm -rf conftest*
9729 fi
9730
9731     if test "$enable_largefile" != no ; then
9732         echo "$as_me:9732: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9733 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9734 if test "${ac_cv_sys_largefile_source+set}" = set; then
9735   echo $ECHO_N "(cached) $ECHO_C" >&6
9736 else
9737   while :; do
9738   ac_cv_sys_largefile_source=no
9739   cat >conftest.$ac_ext <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9742 #include <stdio.h>
9743 int
9744 main ()
9745 {
9746 return !fseeko;
9747   ;
9748   return 0;
9749 }
9750 _ACEOF
9751 rm -f conftest.$ac_objext
9752 if { (eval echo "$as_me:9752: \"$ac_compile\"") >&5
9753   (eval $ac_compile) 2>&5
9754   ac_status=$?
9755   echo "$as_me:9755: \$? = $ac_status" >&5
9756   (exit $ac_status); } &&
9757          { ac_try='test -s conftest.$ac_objext'
9758   { (eval echo "$as_me:9758: \"$ac_try\"") >&5
9759   (eval $ac_try) 2>&5
9760   ac_status=$?
9761   echo "$as_me:9761: \$? = $ac_status" >&5
9762   (exit $ac_status); }; }; then
9763   break
9764 else
9765   echo "$as_me: failed program was:" >&5
9766 cat conftest.$ac_ext >&5
9767 fi
9768 rm -f conftest.$ac_objext conftest.$ac_ext
9769   cat >conftest.$ac_ext <<_ACEOF
9770 #line 9770 "configure"
9771 #include "confdefs.h"
9772 #define _LARGEFILE_SOURCE 1
9773 #include <stdio.h>
9774 int
9775 main ()
9776 {
9777 return !fseeko;
9778   ;
9779   return 0;
9780 }
9781 _ACEOF
9782 rm -f conftest.$ac_objext
9783 if { (eval echo "$as_me:9783: \"$ac_compile\"") >&5
9784   (eval $ac_compile) 2>&5
9785   ac_status=$?
9786   echo "$as_me:9786: \$? = $ac_status" >&5
9787   (exit $ac_status); } &&
9788          { ac_try='test -s conftest.$ac_objext'
9789   { (eval echo "$as_me:9789: \"$ac_try\"") >&5
9790   (eval $ac_try) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); }; }; then
9794   ac_cv_sys_largefile_source=1; break
9795 else
9796   echo "$as_me: failed program was:" >&5
9797 cat conftest.$ac_ext >&5
9798 fi
9799 rm -f conftest.$ac_objext conftest.$ac_ext
9800   break
9801 done
9802 fi
9803 echo "$as_me:9803: result: $ac_cv_sys_largefile_source" >&5
9804 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9805 if test "$ac_cv_sys_largefile_source" != no; then
9806
9807 cat >>confdefs.h <<EOF
9808 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9809 EOF
9810
9811 fi
9812 rm -rf conftest*
9813
9814 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9815 # in glibc 2.1.3, but that breaks too many other things.
9816 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9817 echo "$as_me:9817: checking for fseeko" >&5
9818 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9819 if test "${ac_cv_func_fseeko+set}" = set; then
9820   echo $ECHO_N "(cached) $ECHO_C" >&6
9821 else
9822   cat >conftest.$ac_ext <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 #include <stdio.h>
9826 int
9827 main ()
9828 {
9829 return fseeko && fseeko (stdin, 0, 0);
9830   ;
9831   return 0;
9832 }
9833 _ACEOF
9834 rm -f conftest.$ac_objext conftest$ac_exeext
9835 if { (eval echo "$as_me:9835: \"$ac_link\"") >&5
9836   (eval $ac_link) 2>&5
9837   ac_status=$?
9838   echo "$as_me:9838: \$? = $ac_status" >&5
9839   (exit $ac_status); } &&
9840          { ac_try='test -s conftest$ac_exeext'
9841   { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9842   (eval $ac_try) 2>&5
9843   ac_status=$?
9844   echo "$as_me:9844: \$? = $ac_status" >&5
9845   (exit $ac_status); }; }; then
9846   ac_cv_func_fseeko=yes
9847 else
9848   echo "$as_me: failed program was:" >&5
9849 cat conftest.$ac_ext >&5
9850 ac_cv_func_fseeko=no
9851 fi
9852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9853 fi
9854 echo "$as_me:9854: result: $ac_cv_func_fseeko" >&5
9855 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9856 if test $ac_cv_func_fseeko = yes; then
9857
9858 cat >>confdefs.h <<\EOF
9859 #define HAVE_FSEEKO 1
9860 EOF
9861
9862 fi
9863
9864         # Normally we would collect these definitions in the config.h,
9865         # but (like _XOPEN_SOURCE), some environments rely on having these
9866         # defined before any of the system headers are included.  Another
9867         # case comes up with C++, e.g., on AIX the compiler compiles the
9868         # header files by themselves before looking at the body files it is
9869         # told to compile.  For ncurses, those header files do not include
9870         # the config.h
9871         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9872         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9873         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9874
9875         echo "$as_me:9875: checking whether to use struct dirent64" >&5
9876 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9877 if test "${cf_cv_struct_dirent64+set}" = set; then
9878   echo $ECHO_N "(cached) $ECHO_C" >&6
9879 else
9880
9881                 cat >conftest.$ac_ext <<_ACEOF
9882 #line 9882 "configure"
9883 #include "confdefs.h"
9884
9885 #include <sys/types.h>
9886 #include <dirent.h>
9887
9888 int
9889 main ()
9890 {
9891
9892                 /* if transitional largefile support is setup, this is true */
9893                 extern struct dirent64 * readdir(DIR *);
9894                 struct dirent64 *x = readdir((DIR *)0);
9895                 struct dirent *y = readdir((DIR *)0);
9896                 int z = x - y;
9897
9898   ;
9899   return 0;
9900 }
9901 _ACEOF
9902 rm -f conftest.$ac_objext
9903 if { (eval echo "$as_me:9903: \"$ac_compile\"") >&5
9904   (eval $ac_compile) 2>&5
9905   ac_status=$?
9906   echo "$as_me:9906: \$? = $ac_status" >&5
9907   (exit $ac_status); } &&
9908          { ac_try='test -s conftest.$ac_objext'
9909   { (eval echo "$as_me:9909: \"$ac_try\"") >&5
9910   (eval $ac_try) 2>&5
9911   ac_status=$?
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); }; }; then
9914   cf_cv_struct_dirent64=yes
9915 else
9916   echo "$as_me: failed program was:" >&5
9917 cat conftest.$ac_ext >&5
9918 cf_cv_struct_dirent64=no
9919 fi
9920 rm -f conftest.$ac_objext conftest.$ac_ext
9921
9922 fi
9923 echo "$as_me:9923: result: $cf_cv_struct_dirent64" >&5
9924 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9925         test "$cf_cv_struct_dirent64" = yes &&
9926 cat >>confdefs.h <<\EOF
9927 #define HAVE_STRUCT_DIRENT64 1
9928 EOF
9929
9930     fi
9931
9932 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9933 echo "$as_me:9933: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9934 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9935
9936 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9937 if test "${enable_tparm_varargs+set}" = set; then
9938   enableval="$enable_tparm_varargs"
9939   with_tparm_varargs=$enableval
9940 else
9941   with_tparm_varargs=yes
9942 fi;
9943 echo "$as_me:9943: result: $with_tparm_varargs" >&5
9944 echo "${ECHO_T}$with_tparm_varargs" >&6
9945 NCURSES_TPARM_VARARGS=0
9946 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
9947
9948 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9949 if test "$with_ticlib" != no ; then
9950 echo "$as_me:9950: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9951 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9952
9953 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9954 if test "${enable_tic_depends+set}" = set; then
9955   enableval="$enable_tic_depends"
9956   with_tic_depends=$enableval
9957 else
9958   with_tic_depends=yes
9959 fi;
9960 echo "$as_me:9960: result: $with_tic_depends" >&5
9961 echo "${ECHO_T}$with_tic_depends" >&6
9962 else
9963         with_tic_depends=no
9964 fi
9965
9966 ###   use option --with-bool to override bool's type
9967 echo "$as_me:9967: checking for type of bool" >&5
9968 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9969
9970 # Check whether --with-bool or --without-bool was given.
9971 if test "${with_bool+set}" = set; then
9972   withval="$with_bool"
9973   NCURSES_BOOL="$withval"
9974 else
9975   NCURSES_BOOL=auto
9976 fi;
9977 echo "$as_me:9977: result: $NCURSES_BOOL" >&5
9978 echo "${ECHO_T}$NCURSES_BOOL" >&6
9979
9980 echo "$as_me:9980: checking for alternate terminal capabilities file" >&5
9981 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9982
9983 # Check whether --with-caps or --without-caps was given.
9984 if test "${with_caps+set}" = set; then
9985   withval="$with_caps"
9986   TERMINFO_CAPS=Caps.$withval
9987 else
9988   TERMINFO_CAPS=Caps
9989 fi;
9990 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9991 echo "$as_me:9991: result: $TERMINFO_CAPS" >&5
9992 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9993
9994 ###   use option --with-chtype to override chtype's type
9995 echo "$as_me:9995: checking for type of chtype" >&5
9996 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9997
9998 # Check whether --with-chtype or --without-chtype was given.
9999 if test "${with_chtype+set}" = set; then
10000   withval="$with_chtype"
10001   NCURSES_CHTYPE="$withval"
10002 else
10003   NCURSES_CHTYPE=auto
10004 fi;
10005 echo "$as_me:10005: result: $NCURSES_CHTYPE" >&5
10006 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10007
10008 ###   use option --with-ospeed to override ospeed's type
10009 echo "$as_me:10009: checking for type of ospeed" >&5
10010 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10011
10012 # Check whether --with-ospeed or --without-ospeed was given.
10013 if test "${with_ospeed+set}" = set; then
10014   withval="$with_ospeed"
10015   NCURSES_OSPEED="$withval"
10016 else
10017   NCURSES_OSPEED=short
10018 fi;
10019 echo "$as_me:10019: result: $NCURSES_OSPEED" >&5
10020 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10021
10022 ###   use option --with-mmask-t to override mmask_t's type
10023 echo "$as_me:10023: checking for type of mmask_t" >&5
10024 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10025
10026 # Check whether --with-mmask-t or --without-mmask-t was given.
10027 if test "${with_mmask_t+set}" = set; then
10028   withval="$with_mmask_t"
10029   NCURSES_MMASK_T="$withval"
10030 else
10031   NCURSES_MMASK_T=auto
10032 fi;
10033 echo "$as_me:10033: result: $NCURSES_MMASK_T" >&5
10034 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10035
10036 ###   use option --with-ccharw-max to override CCHARW_MAX size
10037 echo "$as_me:10037: checking for size CCHARW_MAX" >&5
10038 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10039
10040 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10041 if test "${with_ccharw_max+set}" = set; then
10042   withval="$with_ccharw_max"
10043   NCURSES_CCHARW_MAX="$withval"
10044 else
10045   NCURSES_CCHARW_MAX=5
10046 fi;
10047 echo "$as_me:10047: result: $NCURSES_CCHARW_MAX" >&5
10048 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10049
10050 ###   use option --with-tparm-arg to override tparm's argument type
10051 echo "$as_me:10051: checking for type of tparm args" >&5
10052 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10053
10054 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10055 if test "${with_tparm_arg+set}" = set; then
10056   withval="$with_tparm_arg"
10057   NCURSES_TPARM_ARG="$withval"
10058 else
10059   NCURSES_TPARM_ARG=long
10060 fi;
10061 echo "$as_me:10061: result: $NCURSES_TPARM_ARG" >&5
10062 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10063
10064 ### Enable compiling-in rcs id's
10065 echo "$as_me:10065: checking if RCS identifiers should be compiled-in" >&5
10066 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10067
10068 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10069 if test "${with_rcs_ids+set}" = set; then
10070   withval="$with_rcs_ids"
10071   with_rcs_ids=$withval
10072 else
10073   with_rcs_ids=no
10074 fi;
10075 echo "$as_me:10075: result: $with_rcs_ids" >&5
10076 echo "${ECHO_T}$with_rcs_ids" >&6
10077 test "x$with_rcs_ids" = xyes &&
10078 cat >>confdefs.h <<\EOF
10079 #define USE_RCS_IDS 1
10080 EOF
10081
10082 ###############################################################################
10083
10084 echo "$as_me:10084: checking format of man-pages" >&5
10085 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10086
10087 # Check whether --with-manpage-format or --without-manpage-format was given.
10088 if test "${with_manpage_format+set}" = set; then
10089   withval="$with_manpage_format"
10090   MANPAGE_FORMAT=$withval
10091 else
10092   MANPAGE_FORMAT=unknown
10093 fi;
10094
10095 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10096 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10097
10098 cf_unknown=
10099
10100 case $MANPAGE_FORMAT in
10101 unknown)
10102   if test -z "$MANPATH" ; then
10103     MANPATH="/usr/man:/usr/share/man"
10104   fi
10105
10106   # look for the 'date' man-page (it's most likely to be installed!)
10107   MANPAGE_FORMAT=
10108   cf_preform=no
10109   cf_catonly=yes
10110   cf_example=date
10111
10112   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10113   for cf_dir in $MANPATH; do
10114     test -z "$cf_dir" && cf_dir=/usr/man
10115     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
10116     do
10117       cf_test=`echo $cf_name | sed -e 's/*//'`
10118       if test "x$cf_test" = "x$cf_name" ; then
10119
10120         case "$cf_name" in
10121         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10122         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10123         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10124         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10125         esac
10126
10127         case "$cf_name" in
10128         $cf_dir/man*)
10129           cf_catonly=no
10130           ;;
10131         $cf_dir/cat*)
10132           cf_preform=yes
10133           ;;
10134         esac
10135         break
10136       fi
10137
10138       # if we found a match in either man* or cat*, stop looking
10139       if test -n "$MANPAGE_FORMAT" ; then
10140         cf_found=no
10141         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10142         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10143         case "$cf_name" in
10144         $cf_dir/cat*)
10145           cf_found=yes
10146           ;;
10147         esac
10148         test $cf_found=yes && break
10149       fi
10150     done
10151     # only check the first directory in $MANPATH where we find manpages
10152     if test -n "$MANPAGE_FORMAT" ; then
10153        break
10154     fi
10155   done
10156   # if we did not find the example, just assume it is normal
10157   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10158   IFS="$ac_save_ifs"
10159   ;;
10160 *)
10161   for cf_option in $MANPAGE_FORMAT; do
10162      case $cf_option in #(vi
10163      gzip|compress|BSDI|normal|formatted|catonly)
10164        ;;
10165      *)
10166        cf_unknown="$cf_unknown $cf_option"
10167        ;;
10168      esac
10169   done
10170   ;;
10171 esac
10172
10173 echo "$as_me:10173: result: $MANPAGE_FORMAT" >&5
10174 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10175 if test -n "$cf_unknown" ; then
10176   { echo "$as_me:10176: WARNING: Unexpected manpage-format $cf_unknown" >&5
10177 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10178 fi
10179
10180 echo "$as_me:10180: checking for manpage renaming" >&5
10181 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10182
10183 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10184 if test "${with_manpage_renames+set}" = set; then
10185   withval="$with_manpage_renames"
10186   MANPAGE_RENAMES=$withval
10187 else
10188   MANPAGE_RENAMES=yes
10189 fi;
10190
10191 case ".$MANPAGE_RENAMES" in #(vi
10192 .no) #(vi
10193   ;;
10194 .|.yes)
10195   # Debian 'man' program?
10196   if test -f /etc/debian_version ; then
10197     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10198   else
10199     MANPAGE_RENAMES=no
10200   fi
10201   ;;
10202 esac
10203
10204 if test "$MANPAGE_RENAMES" != no ; then
10205   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10206     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10207   elif test ! -f $MANPAGE_RENAMES ; then
10208     { { echo "$as_me:10208: error: not a filename: $MANPAGE_RENAMES" >&5
10209 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10210    { (exit 1); exit 1; }; }
10211   fi
10212
10213   test ! -d man && mkdir man
10214
10215   # Construct a sed-script to perform renaming within man-pages
10216   if test -n "$MANPAGE_RENAMES" ; then
10217     test ! -d man && mkdir man
10218     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10219   fi
10220 fi
10221
10222 echo "$as_me:10222: result: $MANPAGE_RENAMES" >&5
10223 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10224
10225 echo "$as_me:10225: checking if manpage aliases will be installed" >&5
10226 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10227
10228 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10229 if test "${with_manpage_aliases+set}" = set; then
10230   withval="$with_manpage_aliases"
10231   MANPAGE_ALIASES=$withval
10232 else
10233   MANPAGE_ALIASES=yes
10234 fi;
10235
10236 echo "$as_me:10236: result: $MANPAGE_ALIASES" >&5
10237 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10238
10239 case "x$LN_S" in #(vi
10240 xln*) #(vi
10241         cf_use_symlinks=yes
10242         ;;
10243 *)
10244         cf_use_symlinks=no
10245         ;;
10246 esac
10247
10248 MANPAGE_SYMLINKS=no
10249 if test "$MANPAGE_ALIASES" = yes ; then
10250 echo "$as_me:10250: checking if manpage symlinks should be used" >&5
10251 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10252
10253 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10254 if test "${with_manpage_symlinks+set}" = set; then
10255   withval="$with_manpage_symlinks"
10256   MANPAGE_SYMLINKS=$withval
10257 else
10258   MANPAGE_SYMLINKS=$cf_use_symlinks
10259 fi;
10260
10261 if test "$$cf_use_symlinks" = no; then
10262 if test "$MANPAGE_SYMLINKS" = yes ; then
10263         { echo "$as_me:10263: WARNING: cannot make symlinks" >&5
10264 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10265         MANPAGE_SYMLINKS=no
10266 fi
10267 fi
10268
10269 echo "$as_me:10269: result: $MANPAGE_SYMLINKS" >&5
10270 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10271 fi
10272
10273 echo "$as_me:10273: checking for manpage tbl" >&5
10274 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10275
10276 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10277 if test "${with_manpage_tbl+set}" = set; then
10278   withval="$with_manpage_tbl"
10279   MANPAGE_TBL=$withval
10280 else
10281   MANPAGE_TBL=no
10282 fi;
10283
10284 echo "$as_me:10284: result: $MANPAGE_TBL" >&5
10285 echo "${ECHO_T}$MANPAGE_TBL" >&6
10286
10287   if test "$prefix" = "NONE" ; then
10288      cf_prefix="$ac_default_prefix"
10289   else
10290      cf_prefix="$prefix"
10291   fi
10292
10293   case "$MANPAGE_FORMAT" in # (vi
10294   *catonly*) # (vi
10295     cf_format=yes
10296     cf_inboth=no
10297     ;;
10298   *formatted*) # (vi
10299     cf_format=yes
10300     cf_inboth=yes
10301     ;;
10302   *)
10303     cf_format=no
10304     cf_inboth=no
10305     ;;
10306   esac
10307
10308 test ! -d man && mkdir man
10309
10310 cf_so_strip=
10311 cf_compress=
10312 case "$MANPAGE_FORMAT" in #(vi
10313 *compress*) #(vi
10314         cf_so_strip="Z"
10315         cf_compress=compress
10316   ;;
10317 *gzip*)
10318         cf_so_strip="gz"
10319         cf_compress=gzip
10320   ;;
10321 esac
10322
10323 cf_edit_man=./edit_man.sh
10324 cf_man_alias=`pwd`/man_alias.sed
10325
10326 cat >$cf_edit_man <<CF_EOF
10327 #! /bin/sh
10328 # this script is generated by the configure-script CF_MAN_PAGES macro.
10329
10330 prefix="$cf_prefix"
10331 datarootdir="$datarootdir"
10332 datadir="$datadir"
10333
10334 NCURSES_MAJOR="$NCURSES_MAJOR"
10335 NCURSES_MINOR="$NCURSES_MINOR"
10336 NCURSES_PATCH="$NCURSES_PATCH"
10337
10338 NCURSES_OSPEED="$NCURSES_OSPEED"
10339 TERMINFO="$TERMINFO"
10340
10341 INSTALL="$INSTALL"
10342 INSTALL_DATA="$INSTALL_DATA"
10343
10344 transform="$program_transform_name"
10345
10346 TMP=\${TMPDIR:=/tmp}/man\$\$
10347 trap "rm -f \$TMP" 0 1 2 5 15
10348
10349 form=\$1
10350 shift || exit 1
10351
10352 verb=\$1
10353 shift || exit 1
10354
10355 mandir=\$1
10356 shift || exit 1
10357
10358 srcdir=\$1
10359 top_srcdir=\$srcdir/..
10360 shift || exit 1
10361
10362 if test "\$form" = normal ; then
10363         if test "$cf_format" = yes ; then
10364         if test "$cf_inboth" = no ; then
10365                 sh \$0 format \$verb \$mandir \$srcdir \$*
10366                 exit $?
10367         fi
10368         fi
10369         cf_subdir=\$mandir/man
10370         cf_tables=$MANPAGE_TBL
10371 else
10372         cf_subdir=\$mandir/cat
10373         cf_tables=yes
10374 fi
10375
10376 # process the list of source-files
10377 for i in \$* ; do
10378 case \$i in #(vi
10379 *.orig|*.rej) ;; #(vi
10380 *.[0-9]*)
10381         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10382         if test \$verb = installing ; then
10383         if test ! -d \$cf_subdir\${section} ; then
10384                 mkdir -p \$cf_subdir\$section
10385         fi
10386         fi
10387
10388         # replace variables in man page
10389         if test ! -f $cf_man_alias ; then
10390 cat >>$cf_man_alias <<-CF_EOF2
10391                 s,@DATADIR@,\$datadir,g
10392                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10393                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10394                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10395                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10396                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10397                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10398 CF_EOF
10399
10400         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10401         do
10402                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10403                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10404 cat >>$cf_edit_man <<-CF_EOF
10405                 s,@$cf_NAME@,$cf_name,g
10406 CF_EOF
10407         done
10408
10409 cat >>$cf_edit_man <<CF_EOF
10410 CF_EOF2
10411                 echo "...made $cf_man_alias"
10412         fi
10413
10414         aliases=
10415         cf_source=\`basename \$i\`
10416         inalias=\$cf_source
10417         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10418         if test ! -f \$inalias ; then
10419                 echo .. skipped \$cf_source
10420                 continue
10421         fi
10422 CF_EOF
10423
10424 if test "$MANPAGE_ALIASES" != no ; then
10425 cat >>$cf_edit_man <<CF_EOF
10426         nCurses=ignore.3x
10427         test $with_curses_h = yes && nCurses=ncurses.3x
10428         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10429 CF_EOF
10430 fi
10431
10432 if test "$MANPAGE_RENAMES" = no ; then
10433 cat >>$cf_edit_man <<CF_EOF
10434         # perform program transformations for section 1 man pages
10435         if test \$section = 1 ; then
10436                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10437         else
10438                 cf_target=\$cf_subdir\${section}/\$cf_source
10439         fi
10440 CF_EOF
10441 else
10442 cat >>$cf_edit_man <<CF_EOF
10443         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10444         if test -z "\$cf_target" ; then
10445                 echo '? missing rename for '\$cf_source
10446                 cf_target="\$cf_source"
10447         fi
10448         cf_target="\$cf_subdir\${section}/\${cf_target}"
10449
10450 CF_EOF
10451 fi
10452
10453 cat >>$cf_edit_man <<CF_EOF
10454         sed     -f $cf_man_alias \\
10455 CF_EOF
10456
10457 if test -f $MANPAGE_RENAMES ; then
10458 cat >>$cf_edit_man <<CF_EOF
10459                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10460 CF_EOF
10461 else
10462 cat >>$cf_edit_man <<CF_EOF
10463                 < \$i >\$TMP
10464 CF_EOF
10465 fi
10466
10467 cat >>$cf_edit_man <<CF_EOF
10468 if test \$cf_tables = yes ; then
10469         tbl \$TMP >\$TMP.out
10470         mv \$TMP.out \$TMP
10471 fi
10472 CF_EOF
10473
10474 if test $with_overwrite != yes ; then
10475 cat >>$cf_edit_man <<CF_EOF
10476         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10477         mv \$TMP.out \$TMP
10478 CF_EOF
10479 fi
10480
10481 if test $with_curses_h != yes ; then
10482 cat >>$cf_edit_man <<CF_EOF
10483         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10484         mv \$TMP.out \$TMP
10485 CF_EOF
10486 fi
10487
10488 cat >>$cf_edit_man <<CF_EOF
10489         if test \$form = format ; then
10490                 nroff -man \$TMP >\$TMP.out
10491                 mv \$TMP.out \$TMP
10492         fi
10493 CF_EOF
10494
10495 if test -n "$cf_compress" ; then
10496 cat >>$cf_edit_man <<CF_EOF
10497         if test \$verb = installing ; then
10498         if ( $cf_compress -f \$TMP )
10499         then
10500                 mv \$TMP.$cf_so_strip \$TMP
10501         fi
10502         fi
10503         cf_target="\$cf_target.$cf_so_strip"
10504 CF_EOF
10505 fi
10506
10507 case "$MANPAGE_FORMAT" in #(vi
10508 *BSDI*)
10509 cat >>$cf_edit_man <<CF_EOF
10510         if test \$form = format ; then
10511                 # BSDI installs only .0 suffixes in the cat directories
10512                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10513         fi
10514 CF_EOF
10515   ;;
10516 esac
10517
10518 cat >>$cf_edit_man <<CF_EOF
10519         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10520         if test \$verb = installing ; then
10521                 echo \$verb \$cf_target
10522                 \$INSTALL_DATA \$TMP \$cf_target
10523                 test -d \$cf_subdir\${section} &&
10524                 test -n "\$aliases" && (
10525                         cd \$cf_subdir\${section} && (
10526                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10527                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10528                                 cf_target=\`basename \$cf_target\`
10529                                 for cf_alias in \$aliases
10530                                 do
10531                                         if test \$section = 1 ; then
10532                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10533                                         fi
10534
10535                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10536                                                 if test -f \$cf_alias\${suffix} ; then
10537                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10538                                                         then
10539                                                                 continue
10540                                                         fi
10541                                                 fi
10542                                                 echo .. \$verb alias \$cf_alias\${suffix}
10543 CF_EOF
10544 case "x$LN_S" in #(vi
10545 *-f) #(vi
10546 cat >>$cf_edit_man <<CF_EOF
10547                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10548 CF_EOF
10549         ;;
10550 *)
10551 cat >>$cf_edit_man <<CF_EOF
10552                                                 rm -f \$cf_alias\${suffix}
10553                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10554 CF_EOF
10555         ;;
10556 esac
10557 cat >>$cf_edit_man <<CF_EOF
10558                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10559                                                 echo ".so \$cf_source" >\$TMP
10560 CF_EOF
10561 if test -n "$cf_compress" ; then
10562 cat >>$cf_edit_man <<CF_EOF
10563                                                 if test -n "$cf_so_strip" ; then
10564                                                         $cf_compress -f \$TMP
10565                                                         mv \$TMP.$cf_so_strip \$TMP
10566                                                 fi
10567 CF_EOF
10568 fi
10569 cat >>$cf_edit_man <<CF_EOF
10570                                                 echo .. \$verb alias \$cf_alias\${suffix}
10571                                                 rm -f \$cf_alias\${suffix}
10572                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10573                                         fi
10574                                 done
10575                         )
10576                 )
10577         elif test \$verb = removing ; then
10578                 test -f \$cf_target && (
10579                         echo \$verb \$cf_target
10580                         rm -f \$cf_target
10581                 )
10582                 test -d \$cf_subdir\${section} &&
10583                 test -n "\$aliases" && (
10584                         cd \$cf_subdir\${section} && (
10585                                 for cf_alias in \$aliases
10586                                 do
10587                                         if test \$section = 1 ; then
10588                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10589                                         fi
10590
10591                                         echo .. \$verb alias \$cf_alias\${suffix}
10592                                         rm -f \$cf_alias\${suffix}
10593                                 done
10594                         )
10595                 )
10596         else
10597 #               echo ".hy 0"
10598                 cat \$TMP
10599         fi
10600         ;;
10601 esac
10602 done
10603
10604 if test $cf_inboth = yes ; then
10605 if test \$form != format ; then
10606         sh \$0 format \$verb \$mandir \$srcdir \$*
10607 fi
10608 fi
10609
10610 exit 0
10611 CF_EOF
10612 chmod 755 $cf_edit_man
10613
10614 ###############################################################################
10615
10616 ### Note that some functions (such as const) are normally disabled anyway.
10617 echo "$as_me:10617: checking if you want to build with function extensions" >&5
10618 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10619
10620 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10621 if test "${enable_ext_funcs+set}" = set; then
10622   enableval="$enable_ext_funcs"
10623   with_ext_funcs=$enableval
10624 else
10625   with_ext_funcs=yes
10626 fi;
10627 echo "$as_me:10627: result: $with_ext_funcs" >&5
10628 echo "${ECHO_T}$with_ext_funcs" >&6
10629 if test "x$with_ext_funcs" = xyes ; then
10630         NCURSES_EXT_FUNCS=1
10631
10632 cat >>confdefs.h <<\EOF
10633 #define HAVE_ASSUME_DEFAULT_COLORS 1
10634 EOF
10635
10636 cat >>confdefs.h <<\EOF
10637 #define HAVE_CURSES_VERSION 1
10638 EOF
10639
10640 cat >>confdefs.h <<\EOF
10641 #define HAVE_HAS_KEY 1
10642 EOF
10643
10644 cat >>confdefs.h <<\EOF
10645 #define HAVE_RESIZETERM 1
10646 EOF
10647
10648 cat >>confdefs.h <<\EOF
10649 #define HAVE_RESIZE_TERM 1
10650 EOF
10651
10652 cat >>confdefs.h <<\EOF
10653 #define HAVE_TERM_ENTRY_H 1
10654 EOF
10655
10656 cat >>confdefs.h <<\EOF
10657 #define HAVE_USE_DEFAULT_COLORS 1
10658 EOF
10659
10660 cat >>confdefs.h <<\EOF
10661 #define HAVE_USE_SCREEN 1
10662 EOF
10663
10664 cat >>confdefs.h <<\EOF
10665 #define HAVE_USE_WINDOW 1
10666 EOF
10667
10668 cat >>confdefs.h <<\EOF
10669 #define HAVE_WRESIZE 1
10670 EOF
10671
10672 cat >>confdefs.h <<\EOF
10673 #define NCURSES_EXT_FUNCS 1
10674 EOF
10675
10676         GENERATED_EXT_FUNCS=generated
10677 else
10678         NCURSES_EXT_FUNCS=0
10679         GENERATED_EXT_FUNCS=
10680 fi
10681
10682 echo "$as_me:10682: checking if you want to build with experimental SCREEN extensions" >&5
10683 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10684
10685 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10686 if test "${enable_sp_funcs+set}" = set; then
10687   enableval="$enable_sp_funcs"
10688   with_sp_funcs=$enableval
10689 else
10690   with_sp_funcs=no
10691 fi;
10692 echo "$as_me:10692: result: $with_sp_funcs" >&5
10693 echo "${ECHO_T}$with_sp_funcs" >&6
10694 if test "x$with_sp_funcs" = xyes ; then
10695         NCURSES_SP_FUNCS=1
10696
10697 cat >>confdefs.h <<\EOF
10698 #define NCURSES_SP_FUNCS 1
10699 EOF
10700
10701         GENERATED_SP_FUNCS=generated
10702 else
10703         NCURSES_SP_FUNCS=0
10704         GENERATED_SP_FUNCS=
10705 fi
10706
10707 echo "$as_me:10707: checking if you want to build with experimental terminal-driver" >&5
10708 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10709
10710 # Check whether --enable-term-driver or --disable-term-driver was given.
10711 if test "${enable_term_driver+set}" = set; then
10712   enableval="$enable_term_driver"
10713   with_term_driver=$enableval
10714 else
10715   with_term_driver=no
10716 fi;
10717 echo "$as_me:10717: result: $with_term_driver" >&5
10718 echo "${ECHO_T}$with_term_driver" >&6
10719 if test "x$with_term_driver" = xyes ; then
10720
10721 cat >>confdefs.h <<\EOF
10722 #define USE_TERM_DRIVER 1
10723 EOF
10724
10725         if test "x$with_sp_funcs" != xyes ; then
10726                 { { echo "$as_me:10726: error: The term-driver option relies upon sp-funcs" >&5
10727 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10728    { (exit 1); exit 1; }; }
10729         fi
10730 fi
10731
10732 ###   use option --enable-const to turn on use of const beyond that in XSI.
10733 echo "$as_me:10733: checking for extended use of const keyword" >&5
10734 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10735
10736 # Check whether --enable-const or --disable-const was given.
10737 if test "${enable_const+set}" = set; then
10738   enableval="$enable_const"
10739   with_ext_const=$enableval
10740 else
10741   with_ext_const=no
10742 fi;
10743 echo "$as_me:10743: result: $with_ext_const" >&5
10744 echo "${ECHO_T}$with_ext_const" >&6
10745 NCURSES_CONST='/*nothing*/'
10746 if test "x$with_ext_const" = xyes ; then
10747         NCURSES_CONST=const
10748 fi
10749
10750 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10751 echo "$as_me:10751: checking if you want to use extended colors" >&5
10752 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10753
10754 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10755 if test "${enable_ext_colors+set}" = set; then
10756   enableval="$enable_ext_colors"
10757   with_ext_colors=$enableval
10758 else
10759   with_ext_colors=no
10760 fi;
10761 echo "$as_me:10761: result: $with_ext_colors" >&5
10762 echo "${ECHO_T}$with_ext_colors" >&6
10763 NCURSES_EXT_COLORS=0
10764 if test "x$with_ext_colors" = xyes ; then
10765         if test "x$with_widec" != xyes ; then
10766                 { { echo "$as_me:10766: error: This option applies only to wide-character library" >&5
10767 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10768    { (exit 1); exit 1; }; }
10769         else
10770                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10771
10772 if test "${with_abi_version+set}" != set; then
10773         case $cf_cv_rel_version in
10774         5.*)
10775                 cf_cv_rel_version=6.0
10776                 cf_cv_abi_version=6
10777                 { echo "$as_me:10777: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10778 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10779                 ;;
10780         esac
10781 fi
10782
10783         fi
10784         NCURSES_EXT_COLORS=1
10785
10786 cat >>confdefs.h <<\EOF
10787 #define NCURSES_EXT_COLORS 1
10788 EOF
10789
10790 fi
10791
10792 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10793 echo "$as_me:10793: checking if you want to use extended mouse encoding" >&5
10794 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10795
10796 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10797 if test "${enable_ext_mouse+set}" = set; then
10798   enableval="$enable_ext_mouse"
10799   with_ext_mouse=$enableval
10800 else
10801   with_ext_mouse=no
10802 fi;
10803 echo "$as_me:10803: result: $with_ext_mouse" >&5
10804 echo "${ECHO_T}$with_ext_mouse" >&6
10805 NCURSES_MOUSE_VERSION=1
10806 if test "x$with_ext_mouse" = xyes ; then
10807         NCURSES_MOUSE_VERSION=2
10808
10809 if test "${with_abi_version+set}" != set; then
10810         case $cf_cv_rel_version in
10811         5.*)
10812                 cf_cv_rel_version=6.0
10813                 cf_cv_abi_version=6
10814                 { echo "$as_me:10814: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10815 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10816                 ;;
10817         esac
10818 fi
10819
10820 fi
10821
10822 echo "$as_me:10822: checking if you want \$NCURSES_NO_PADDING code" >&5
10823 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10824
10825 # Check whether --enable-no-padding or --disable-no-padding was given.
10826 if test "${enable_no_padding+set}" = set; then
10827   enableval="$enable_no_padding"
10828   with_no_padding=$enableval
10829 else
10830   with_no_padding=$with_ext_funcs
10831 fi;
10832 echo "$as_me:10832: result: $with_no_padding" >&5
10833 echo "${ECHO_T}$with_no_padding" >&6
10834 test "x$with_no_padding" = xyes &&
10835 cat >>confdefs.h <<\EOF
10836 #define NCURSES_NO_PADDING 1
10837 EOF
10838
10839 echo "$as_me:10839: checking for ANSI C header files" >&5
10840 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10841 if test "${ac_cv_header_stdc+set}" = set; then
10842   echo $ECHO_N "(cached) $ECHO_C" >&6
10843 else
10844   cat >conftest.$ac_ext <<_ACEOF
10845 #line 10845 "configure"
10846 #include "confdefs.h"
10847 #include <stdlib.h>
10848 #include <stdarg.h>
10849 #include <string.h>
10850 #include <float.h>
10851
10852 _ACEOF
10853 if { (eval echo "$as_me:10853: \"$ac_cpp conftest.$ac_ext\"") >&5
10854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10855   ac_status=$?
10856   egrep -v '^ *\+' conftest.er1 >conftest.err
10857   rm -f conftest.er1
10858   cat conftest.err >&5
10859   echo "$as_me:10859: \$? = $ac_status" >&5
10860   (exit $ac_status); } >/dev/null; then
10861   if test -s conftest.err; then
10862     ac_cpp_err=$ac_c_preproc_warn_flag
10863   else
10864     ac_cpp_err=
10865   fi
10866 else
10867   ac_cpp_err=yes
10868 fi
10869 if test -z "$ac_cpp_err"; then
10870   ac_cv_header_stdc=yes
10871 else
10872   echo "$as_me: failed program was:" >&5
10873   cat conftest.$ac_ext >&5
10874   ac_cv_header_stdc=no
10875 fi
10876 rm -f conftest.err conftest.$ac_ext
10877
10878 if test $ac_cv_header_stdc = yes; then
10879   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10880   cat >conftest.$ac_ext <<_ACEOF
10881 #line 10881 "configure"
10882 #include "confdefs.h"
10883 #include <string.h>
10884
10885 _ACEOF
10886 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10887   egrep "memchr" >/dev/null 2>&1; then
10888   :
10889 else
10890   ac_cv_header_stdc=no
10891 fi
10892 rm -rf conftest*
10893
10894 fi
10895
10896 if test $ac_cv_header_stdc = yes; then
10897   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10898   cat >conftest.$ac_ext <<_ACEOF
10899 #line 10899 "configure"
10900 #include "confdefs.h"
10901 #include <stdlib.h>
10902
10903 _ACEOF
10904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10905   egrep "free" >/dev/null 2>&1; then
10906   :
10907 else
10908   ac_cv_header_stdc=no
10909 fi
10910 rm -rf conftest*
10911
10912 fi
10913
10914 if test $ac_cv_header_stdc = yes; then
10915   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10916   if test "$cross_compiling" = yes; then
10917   :
10918 else
10919   cat >conftest.$ac_ext <<_ACEOF
10920 #line 10920 "configure"
10921 #include "confdefs.h"
10922 #include <ctype.h>
10923 #if ((' ' & 0x0FF) == 0x020)
10924 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10925 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10926 #else
10927 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10928                      || ('j' <= (c) && (c) <= 'r') \
10929                      || ('s' <= (c) && (c) <= 'z'))
10930 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10931 #endif
10932
10933 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10934 int
10935 main ()
10936 {
10937   int i;
10938   for (i = 0; i < 256; i++)
10939     if (XOR (islower (i), ISLOWER (i))
10940         || toupper (i) != TOUPPER (i))
10941       $ac_main_return(2);
10942   $ac_main_return (0);
10943 }
10944 _ACEOF
10945 rm -f conftest$ac_exeext
10946 if { (eval echo "$as_me:10946: \"$ac_link\"") >&5
10947   (eval $ac_link) 2>&5
10948   ac_status=$?
10949   echo "$as_me:10949: \$? = $ac_status" >&5
10950   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10951   { (eval echo "$as_me:10951: \"$ac_try\"") >&5
10952   (eval $ac_try) 2>&5
10953   ac_status=$?
10954   echo "$as_me:10954: \$? = $ac_status" >&5
10955   (exit $ac_status); }; }; then
10956   :
10957 else
10958   echo "$as_me: program exited with status $ac_status" >&5
10959 echo "$as_me: failed program was:" >&5
10960 cat conftest.$ac_ext >&5
10961 ac_cv_header_stdc=no
10962 fi
10963 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10964 fi
10965 fi
10966 fi
10967 echo "$as_me:10967: result: $ac_cv_header_stdc" >&5
10968 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10969 if test $ac_cv_header_stdc = yes; then
10970
10971 cat >>confdefs.h <<\EOF
10972 #define STDC_HEADERS 1
10973 EOF
10974
10975 fi
10976
10977 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10978
10979 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10980                   inttypes.h stdint.h unistd.h
10981 do
10982 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10983 echo "$as_me:10983: checking for $ac_header" >&5
10984 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10985 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10986   echo $ECHO_N "(cached) $ECHO_C" >&6
10987 else
10988   cat >conftest.$ac_ext <<_ACEOF
10989 #line 10989 "configure"
10990 #include "confdefs.h"
10991 $ac_includes_default
10992 #include <$ac_header>
10993 _ACEOF
10994 rm -f conftest.$ac_objext
10995 if { (eval echo "$as_me:10995: \"$ac_compile\"") >&5
10996   (eval $ac_compile) 2>&5
10997   ac_status=$?
10998   echo "$as_me:10998: \$? = $ac_status" >&5
10999   (exit $ac_status); } &&
11000          { ac_try='test -s conftest.$ac_objext'
11001   { (eval echo "$as_me:11001: \"$ac_try\"") >&5
11002   (eval $ac_try) 2>&5
11003   ac_status=$?
11004   echo "$as_me:11004: \$? = $ac_status" >&5
11005   (exit $ac_status); }; }; then
11006   eval "$as_ac_Header=yes"
11007 else
11008   echo "$as_me: failed program was:" >&5
11009 cat conftest.$ac_ext >&5
11010 eval "$as_ac_Header=no"
11011 fi
11012 rm -f conftest.$ac_objext conftest.$ac_ext
11013 fi
11014 echo "$as_me:11014: result: `eval echo '${'$as_ac_Header'}'`" >&5
11015 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11016 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11017   cat >>confdefs.h <<EOF
11018 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11019 EOF
11020
11021 fi
11022 done
11023
11024 echo "$as_me:11024: checking for signed char" >&5
11025 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11026 if test "${ac_cv_type_signed_char+set}" = set; then
11027   echo $ECHO_N "(cached) $ECHO_C" >&6
11028 else
11029   cat >conftest.$ac_ext <<_ACEOF
11030 #line 11030 "configure"
11031 #include "confdefs.h"
11032 $ac_includes_default
11033 int
11034 main ()
11035 {
11036 if ((signed char *) 0)
11037   return 0;
11038 if (sizeof (signed char))
11039   return 0;
11040   ;
11041   return 0;
11042 }
11043 _ACEOF
11044 rm -f conftest.$ac_objext
11045 if { (eval echo "$as_me:11045: \"$ac_compile\"") >&5
11046   (eval $ac_compile) 2>&5
11047   ac_status=$?
11048   echo "$as_me:11048: \$? = $ac_status" >&5
11049   (exit $ac_status); } &&
11050          { ac_try='test -s conftest.$ac_objext'
11051   { (eval echo "$as_me:11051: \"$ac_try\"") >&5
11052   (eval $ac_try) 2>&5
11053   ac_status=$?
11054   echo "$as_me:11054: \$? = $ac_status" >&5
11055   (exit $ac_status); }; }; then
11056   ac_cv_type_signed_char=yes
11057 else
11058   echo "$as_me: failed program was:" >&5
11059 cat conftest.$ac_ext >&5
11060 ac_cv_type_signed_char=no
11061 fi
11062 rm -f conftest.$ac_objext conftest.$ac_ext
11063 fi
11064 echo "$as_me:11064: result: $ac_cv_type_signed_char" >&5
11065 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11066
11067 echo "$as_me:11067: checking size of signed char" >&5
11068 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11069 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11070   echo $ECHO_N "(cached) $ECHO_C" >&6
11071 else
11072   if test "$ac_cv_type_signed_char" = yes; then
11073   if test "$cross_compiling" = yes; then
11074   # Depending upon the size, compute the lo and hi bounds.
11075 cat >conftest.$ac_ext <<_ACEOF
11076 #line 11076 "configure"
11077 #include "confdefs.h"
11078 $ac_includes_default
11079 int
11080 main ()
11081 {
11082 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11083   ;
11084   return 0;
11085 }
11086 _ACEOF
11087 rm -f conftest.$ac_objext
11088 if { (eval echo "$as_me:11088: \"$ac_compile\"") >&5
11089   (eval $ac_compile) 2>&5
11090   ac_status=$?
11091   echo "$as_me:11091: \$? = $ac_status" >&5
11092   (exit $ac_status); } &&
11093          { ac_try='test -s conftest.$ac_objext'
11094   { (eval echo "$as_me:11094: \"$ac_try\"") >&5
11095   (eval $ac_try) 2>&5
11096   ac_status=$?
11097   echo "$as_me:11097: \$? = $ac_status" >&5
11098   (exit $ac_status); }; }; then
11099   ac_lo=0 ac_mid=0
11100   while :; do
11101     cat >conftest.$ac_ext <<_ACEOF
11102 #line 11102 "configure"
11103 #include "confdefs.h"
11104 $ac_includes_default
11105 int
11106 main ()
11107 {
11108 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11109   ;
11110   return 0;
11111 }
11112 _ACEOF
11113 rm -f conftest.$ac_objext
11114 if { (eval echo "$as_me:11114: \"$ac_compile\"") >&5
11115   (eval $ac_compile) 2>&5
11116   ac_status=$?
11117   echo "$as_me:11117: \$? = $ac_status" >&5
11118   (exit $ac_status); } &&
11119          { ac_try='test -s conftest.$ac_objext'
11120   { (eval echo "$as_me:11120: \"$ac_try\"") >&5
11121   (eval $ac_try) 2>&5
11122   ac_status=$?
11123   echo "$as_me:11123: \$? = $ac_status" >&5
11124   (exit $ac_status); }; }; then
11125   ac_hi=$ac_mid; break
11126 else
11127   echo "$as_me: failed program was:" >&5
11128 cat conftest.$ac_ext >&5
11129 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11130 fi
11131 rm -f conftest.$ac_objext conftest.$ac_ext
11132   done
11133 else
11134   echo "$as_me: failed program was:" >&5
11135 cat conftest.$ac_ext >&5
11136 ac_hi=-1 ac_mid=-1
11137   while :; do
11138     cat >conftest.$ac_ext <<_ACEOF
11139 #line 11139 "configure"
11140 #include "confdefs.h"
11141 $ac_includes_default
11142 int
11143 main ()
11144 {
11145 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 rm -f conftest.$ac_objext
11151 if { (eval echo "$as_me:11151: \"$ac_compile\"") >&5
11152   (eval $ac_compile) 2>&5
11153   ac_status=$?
11154   echo "$as_me:11154: \$? = $ac_status" >&5
11155   (exit $ac_status); } &&
11156          { ac_try='test -s conftest.$ac_objext'
11157   { (eval echo "$as_me:11157: \"$ac_try\"") >&5
11158   (eval $ac_try) 2>&5
11159   ac_status=$?
11160   echo "$as_me:11160: \$? = $ac_status" >&5
11161   (exit $ac_status); }; }; then
11162   ac_lo=$ac_mid; break
11163 else
11164   echo "$as_me: failed program was:" >&5
11165 cat conftest.$ac_ext >&5
11166 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11167 fi
11168 rm -f conftest.$ac_objext conftest.$ac_ext
11169   done
11170 fi
11171 rm -f conftest.$ac_objext conftest.$ac_ext
11172 # Binary search between lo and hi bounds.
11173 while test "x$ac_lo" != "x$ac_hi"; do
11174   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11175   cat >conftest.$ac_ext <<_ACEOF
11176 #line 11176 "configure"
11177 #include "confdefs.h"
11178 $ac_includes_default
11179 int
11180 main ()
11181 {
11182 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11183   ;
11184   return 0;
11185 }
11186 _ACEOF
11187 rm -f conftest.$ac_objext
11188 if { (eval echo "$as_me:11188: \"$ac_compile\"") >&5
11189   (eval $ac_compile) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); } &&
11193          { ac_try='test -s conftest.$ac_objext'
11194   { (eval echo "$as_me:11194: \"$ac_try\"") >&5
11195   (eval $ac_try) 2>&5
11196   ac_status=$?
11197   echo "$as_me:11197: \$? = $ac_status" >&5
11198   (exit $ac_status); }; }; then
11199   ac_hi=$ac_mid
11200 else
11201   echo "$as_me: failed program was:" >&5
11202 cat conftest.$ac_ext >&5
11203 ac_lo=`expr $ac_mid + 1`
11204 fi
11205 rm -f conftest.$ac_objext conftest.$ac_ext
11206 done
11207 ac_cv_sizeof_signed_char=$ac_lo
11208 else
11209   if test "$cross_compiling" = yes; then
11210   { { echo "$as_me:11210: error: cannot run test program while cross compiling" >&5
11211 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11212    { (exit 1); exit 1; }; }
11213 else
11214   cat >conftest.$ac_ext <<_ACEOF
11215 #line 11215 "configure"
11216 #include "confdefs.h"
11217 $ac_includes_default
11218 int
11219 main ()
11220 {
11221 FILE *f = fopen ("conftest.val", "w");
11222 if (!f)
11223   $ac_main_return (1);
11224 fprintf (f, "%d", (sizeof (signed char)));
11225 fclose (f);
11226   ;
11227   return 0;
11228 }
11229 _ACEOF
11230 rm -f conftest$ac_exeext
11231 if { (eval echo "$as_me:11231: \"$ac_link\"") >&5
11232   (eval $ac_link) 2>&5
11233   ac_status=$?
11234   echo "$as_me:11234: \$? = $ac_status" >&5
11235   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11236   { (eval echo "$as_me:11236: \"$ac_try\"") >&5
11237   (eval $ac_try) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); }; }; then
11241   ac_cv_sizeof_signed_char=`cat conftest.val`
11242 else
11243   echo "$as_me: program exited with status $ac_status" >&5
11244 echo "$as_me: failed program was:" >&5
11245 cat conftest.$ac_ext >&5
11246 fi
11247 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11248 fi
11249 fi
11250 rm -f conftest.val
11251 else
11252   ac_cv_sizeof_signed_char=0
11253 fi
11254 fi
11255 echo "$as_me:11255: result: $ac_cv_sizeof_signed_char" >&5
11256 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11257 cat >>confdefs.h <<EOF
11258 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11259 EOF
11260
11261 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11262         NCURSES_SBOOL="signed char"
11263 else
11264         NCURSES_SBOOL="char"
11265 fi
11266 echo "$as_me:11266: checking if you want to use signed Boolean array in term.h" >&5
11267 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11268
11269 # Check whether --enable-signed-char or --disable-signed-char was given.
11270 if test "${enable_signed_char+set}" = set; then
11271   enableval="$enable_signed_char"
11272   with_signed_char=$enableval
11273 else
11274   with_signed_char=no
11275 fi;
11276 echo "$as_me:11276: result: $with_signed_char" >&5
11277 echo "${ECHO_T}$with_signed_char" >&6
11278 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11279
11280 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11281 echo "$as_me:11281: checking if you want SIGWINCH handler" >&5
11282 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11283
11284 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11285 if test "${enable_sigwinch+set}" = set; then
11286   enableval="$enable_sigwinch"
11287   with_sigwinch=$enableval
11288 else
11289   with_sigwinch=$with_ext_funcs
11290 fi;
11291 echo "$as_me:11291: result: $with_sigwinch" >&5
11292 echo "${ECHO_T}$with_sigwinch" >&6
11293 test "x$with_sigwinch" = xyes &&
11294 cat >>confdefs.h <<\EOF
11295 #define USE_SIGWINCH 1
11296 EOF
11297
11298 ###   use option --enable-tcap-names to allow user to define new capabilities
11299 echo "$as_me:11299: checking if you want user-definable terminal capabilities like termcap" >&5
11300 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11301
11302 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11303 if test "${enable_tcap_names+set}" = set; then
11304   enableval="$enable_tcap_names"
11305   with_tcap_names=$enableval
11306 else
11307   with_tcap_names=$with_ext_funcs
11308 fi;
11309 echo "$as_me:11309: result: $with_tcap_names" >&5
11310 echo "${ECHO_T}$with_tcap_names" >&6
11311 NCURSES_XNAMES=0
11312 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11313
11314 ###############################################################################
11315 # These options are relatively safe to experiment with.
11316
11317 echo "$as_me:11317: checking if you want all development code" >&5
11318 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11319
11320 # Check whether --with-develop or --without-develop was given.
11321 if test "${with_develop+set}" = set; then
11322   withval="$with_develop"
11323   with_develop=$withval
11324 else
11325   with_develop=no
11326 fi;
11327 echo "$as_me:11327: result: $with_develop" >&5
11328 echo "${ECHO_T}$with_develop" >&6
11329
11330 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11331 echo "$as_me:11331: checking if you want hard-tabs code" >&5
11332 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11333
11334 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11335 if test "${enable_hard_tabs+set}" = set; then
11336   enableval="$enable_hard_tabs"
11337
11338 else
11339   enable_hard_tabs=$with_develop
11340 fi;
11341 echo "$as_me:11341: result: $enable_hard_tabs" >&5
11342 echo "${ECHO_T}$enable_hard_tabs" >&6
11343 test "x$enable_hard_tabs" = xyes &&
11344 cat >>confdefs.h <<\EOF
11345 #define USE_HARD_TABS 1
11346 EOF
11347
11348 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11349 echo "$as_me:11349: checking if you want limited support for xmc" >&5
11350 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11351
11352 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11353 if test "${enable_xmc_glitch+set}" = set; then
11354   enableval="$enable_xmc_glitch"
11355
11356 else
11357   enable_xmc_glitch=$with_develop
11358 fi;
11359 echo "$as_me:11359: result: $enable_xmc_glitch" >&5
11360 echo "${ECHO_T}$enable_xmc_glitch" >&6
11361 test "x$enable_xmc_glitch" = xyes &&
11362 cat >>confdefs.h <<\EOF
11363 #define USE_XMC_SUPPORT 1
11364 EOF
11365
11366 ###############################################################################
11367 # These are just experimental, probably should not be in a package:
11368
11369 echo "$as_me:11369: checking if you do not want to assume colors are white-on-black" >&5
11370 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11371
11372 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11373 if test "${enable_assumed_color+set}" = set; then
11374   enableval="$enable_assumed_color"
11375   with_assumed_color=$enableval
11376 else
11377   with_assumed_color=yes
11378 fi;
11379 echo "$as_me:11379: result: $with_assumed_color" >&5
11380 echo "${ECHO_T}$with_assumed_color" >&6
11381 test "x$with_assumed_color" = xyes &&
11382 cat >>confdefs.h <<\EOF
11383 #define USE_ASSUMED_COLOR 1
11384 EOF
11385
11386 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11387 echo "$as_me:11387: checking if you want hashmap scrolling-optimization code" >&5
11388 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11389
11390 # Check whether --enable-hashmap or --disable-hashmap was given.
11391 if test "${enable_hashmap+set}" = set; then
11392   enableval="$enable_hashmap"
11393   with_hashmap=$enableval
11394 else
11395   with_hashmap=yes
11396 fi;
11397 echo "$as_me:11397: result: $with_hashmap" >&5
11398 echo "${ECHO_T}$with_hashmap" >&6
11399 test "x$with_hashmap" = xyes &&
11400 cat >>confdefs.h <<\EOF
11401 #define USE_HASHMAP 1
11402 EOF
11403
11404 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11405 echo "$as_me:11405: checking if you want colorfgbg code" >&5
11406 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11407
11408 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11409 if test "${enable_colorfgbg+set}" = set; then
11410   enableval="$enable_colorfgbg"
11411   with_colorfgbg=$enableval
11412 else
11413   with_colorfgbg=no
11414 fi;
11415 echo "$as_me:11415: result: $with_colorfgbg" >&5
11416 echo "${ECHO_T}$with_colorfgbg" >&6
11417 test "x$with_colorfgbg" = xyes &&
11418 cat >>confdefs.h <<\EOF
11419 #define USE_COLORFGBG 1
11420 EOF
11421
11422 ###   use option --enable-interop to turn on use of bindings used for interop
11423 echo "$as_me:11423: checking if you want interop bindings" >&5
11424 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11425
11426 # Check whether --enable-interop or --disable-interop was given.
11427 if test "${enable_interop+set}" = set; then
11428   enableval="$enable_interop"
11429   with_exp_interop=$enableval
11430 else
11431   with_exp_interop=no
11432 fi;
11433 echo "$as_me:11433: result: $with_exp_interop" >&5
11434 echo "${ECHO_T}$with_exp_interop" >&6
11435
11436 NCURSES_INTEROP_FUNCS=0
11437 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11438
11439 # This is still experimental (20080329), but should ultimately be moved to
11440 # the script-block --with-normal, etc.
11441
11442 echo "$as_me:11442: checking if you want to link with the pthread library" >&5
11443 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11444
11445 # Check whether --with-pthread or --without-pthread was given.
11446 if test "${with_pthread+set}" = set; then
11447   withval="$with_pthread"
11448   with_pthread=$withval
11449 else
11450   with_pthread=no
11451 fi;
11452 echo "$as_me:11452: result: $with_pthread" >&5
11453 echo "${ECHO_T}$with_pthread" >&6
11454
11455 if test "$with_pthread" != no ; then
11456     echo "$as_me:11456: checking for pthread.h" >&5
11457 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11458 if test "${ac_cv_header_pthread_h+set}" = set; then
11459   echo $ECHO_N "(cached) $ECHO_C" >&6
11460 else
11461   cat >conftest.$ac_ext <<_ACEOF
11462 #line 11462 "configure"
11463 #include "confdefs.h"
11464 #include <pthread.h>
11465 _ACEOF
11466 if { (eval echo "$as_me:11466: \"$ac_cpp conftest.$ac_ext\"") >&5
11467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11468   ac_status=$?
11469   egrep -v '^ *\+' conftest.er1 >conftest.err
11470   rm -f conftest.er1
11471   cat conftest.err >&5
11472   echo "$as_me:11472: \$? = $ac_status" >&5
11473   (exit $ac_status); } >/dev/null; then
11474   if test -s conftest.err; then
11475     ac_cpp_err=$ac_c_preproc_warn_flag
11476   else
11477     ac_cpp_err=
11478   fi
11479 else
11480   ac_cpp_err=yes
11481 fi
11482 if test -z "$ac_cpp_err"; then
11483   ac_cv_header_pthread_h=yes
11484 else
11485   echo "$as_me: failed program was:" >&5
11486   cat conftest.$ac_ext >&5
11487   ac_cv_header_pthread_h=no
11488 fi
11489 rm -f conftest.err conftest.$ac_ext
11490 fi
11491 echo "$as_me:11491: result: $ac_cv_header_pthread_h" >&5
11492 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11493 if test $ac_cv_header_pthread_h = yes; then
11494
11495 cat >>confdefs.h <<\EOF
11496 #define HAVE_PTHREADS_H 1
11497 EOF
11498
11499         for cf_lib_pthread in pthread c_r
11500         do
11501             echo "$as_me:11501: checking if we can link with the $cf_lib_pthread library" >&5
11502 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11503             cf_save_LIBS="$LIBS"
11504             LIBS="-l$cf_lib_pthread $LIBS"
11505             cat >conftest.$ac_ext <<_ACEOF
11506 #line 11506 "configure"
11507 #include "confdefs.h"
11508
11509 #include <pthread.h>
11510
11511 int
11512 main ()
11513 {
11514
11515                 int rc = pthread_create(0,0,0,0);
11516                 int r2 = pthread_mutexattr_settype(0, 0);
11517
11518   ;
11519   return 0;
11520 }
11521 _ACEOF
11522 rm -f conftest.$ac_objext conftest$ac_exeext
11523 if { (eval echo "$as_me:11523: \"$ac_link\"") >&5
11524   (eval $ac_link) 2>&5
11525   ac_status=$?
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit $ac_status); } &&
11528          { ac_try='test -s conftest$ac_exeext'
11529   { (eval echo "$as_me:11529: \"$ac_try\"") >&5
11530   (eval $ac_try) 2>&5
11531   ac_status=$?
11532   echo "$as_me:11532: \$? = $ac_status" >&5
11533   (exit $ac_status); }; }; then
11534   with_pthread=yes
11535 else
11536   echo "$as_me: failed program was:" >&5
11537 cat conftest.$ac_ext >&5
11538 with_pthread=no
11539 fi
11540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11541             LIBS="$cf_save_LIBS"
11542             echo "$as_me:11542: result: $with_pthread" >&5
11543 echo "${ECHO_T}$with_pthread" >&6
11544             test "$with_pthread" = yes && break
11545         done
11546
11547         if test "$with_pthread" = yes ; then
11548             LIBS="-l$cf_lib_pthread $LIBS"
11549
11550 cat >>confdefs.h <<\EOF
11551 #define HAVE_LIBPTHREADS 1
11552 EOF
11553
11554         else
11555             { { echo "$as_me:11555: error: Cannot link with pthread library" >&5
11556 echo "$as_me: error: Cannot link with pthread library" >&2;}
11557    { (exit 1); exit 1; }; }
11558         fi
11559
11560 fi
11561
11562 fi
11563
11564 if test "x$with_pthread" != xno; then
11565         echo "$as_me:11565: checking for pthread_kill" >&5
11566 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11567 if test "${ac_cv_func_pthread_kill+set}" = set; then
11568   echo $ECHO_N "(cached) $ECHO_C" >&6
11569 else
11570   cat >conftest.$ac_ext <<_ACEOF
11571 #line 11571 "configure"
11572 #include "confdefs.h"
11573 /* System header to define __stub macros and hopefully few prototypes,
11574     which can conflict with char pthread_kill (); below.  */
11575 #include <assert.h>
11576 /* Override any gcc2 internal prototype to avoid an error.  */
11577 #ifdef __cplusplus
11578 extern "C"
11579 #endif
11580 /* We use char because int might match the return type of a gcc2
11581    builtin and then its argument prototype would still apply.  */
11582 char pthread_kill ();
11583 char (*f) ();
11584
11585 int
11586 main ()
11587 {
11588 /* The GNU C library defines this for functions which it implements
11589     to always fail with ENOSYS.  Some functions are actually named
11590     something starting with __ and the normal name is an alias.  */
11591 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11592 choke me
11593 #else
11594 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11595 #endif
11596
11597   ;
11598   return 0;
11599 }
11600 _ACEOF
11601 rm -f conftest.$ac_objext conftest$ac_exeext
11602 if { (eval echo "$as_me:11602: \"$ac_link\"") >&5
11603   (eval $ac_link) 2>&5
11604   ac_status=$?
11605   echo "$as_me:11605: \$? = $ac_status" >&5
11606   (exit $ac_status); } &&
11607          { ac_try='test -s conftest$ac_exeext'
11608   { (eval echo "$as_me:11608: \"$ac_try\"") >&5
11609   (eval $ac_try) 2>&5
11610   ac_status=$?
11611   echo "$as_me:11611: \$? = $ac_status" >&5
11612   (exit $ac_status); }; }; then
11613   ac_cv_func_pthread_kill=yes
11614 else
11615   echo "$as_me: failed program was:" >&5
11616 cat conftest.$ac_ext >&5
11617 ac_cv_func_pthread_kill=no
11618 fi
11619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11620 fi
11621 echo "$as_me:11621: result: $ac_cv_func_pthread_kill" >&5
11622 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11623 if test $ac_cv_func_pthread_kill = yes; then
11624
11625                 echo "$as_me:11625: checking if you want to allow EINTR in wgetch with pthreads" >&5
11626 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11627
11628 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11629 if test "${enable_pthreads_eintr+set}" = set; then
11630   enableval="$enable_pthreads_eintr"
11631   use_pthreads_eintr=$enableval
11632 else
11633   use_pthreads_eintr=no
11634 fi;
11635                 echo "$as_me:11635: result: $use_pthreads_eintr" >&5
11636 echo "${ECHO_T}$use_pthreads_eintr" >&6
11637                 if test "x$use_pthreads_eintr" = xyes ; then
11638
11639 cat >>confdefs.h <<\EOF
11640 #define USE_PTHREADS_EINTR 1
11641 EOF
11642
11643                 fi
11644 fi
11645
11646         echo "$as_me:11646: checking if you want to use weak-symbols for pthreads" >&5
11647 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11648
11649 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11650 if test "${enable_weak_symbols+set}" = set; then
11651   enableval="$enable_weak_symbols"
11652   use_weak_symbols=$enableval
11653 else
11654   use_weak_symbols=no
11655 fi;
11656         echo "$as_me:11656: result: $use_weak_symbols" >&5
11657 echo "${ECHO_T}$use_weak_symbols" >&6
11658         if test "x$use_weak_symbols" = xyes ; then
11659
11660 echo "$as_me:11660: checking if $CC supports weak symbols" >&5
11661 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11662 if test "${cf_cv_weak_symbols+set}" = set; then
11663   echo $ECHO_N "(cached) $ECHO_C" >&6
11664 else
11665
11666 cat >conftest.$ac_ext <<_ACEOF
11667 #line 11667 "configure"
11668 #include "confdefs.h"
11669
11670 #include <stdio.h>
11671 int
11672 main ()
11673 {
11674
11675 #if defined(__GNUC__)
11676 #  if defined __USE_ISOC99
11677 #    define _cat_pragma(exp)    _Pragma(#exp)
11678 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11679 #  else
11680 #    define _weak_pragma(exp)
11681 #  endif
11682 #  define _declare(name)        __extension__ extern __typeof__(name) name
11683 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11684 #endif
11685
11686 weak_symbol(fopen);
11687
11688   ;
11689   return 0;
11690 }
11691 _ACEOF
11692 rm -f conftest.$ac_objext
11693 if { (eval echo "$as_me:11693: \"$ac_compile\"") >&5
11694   (eval $ac_compile) 2>&5
11695   ac_status=$?
11696   echo "$as_me:11696: \$? = $ac_status" >&5
11697   (exit $ac_status); } &&
11698          { ac_try='test -s conftest.$ac_objext'
11699   { (eval echo "$as_me:11699: \"$ac_try\"") >&5
11700   (eval $ac_try) 2>&5
11701   ac_status=$?
11702   echo "$as_me:11702: \$? = $ac_status" >&5
11703   (exit $ac_status); }; }; then
11704   cf_cv_weak_symbols=yes
11705 else
11706   echo "$as_me: failed program was:" >&5
11707 cat conftest.$ac_ext >&5
11708 cf_cv_weak_symbols=no
11709 fi
11710 rm -f conftest.$ac_objext conftest.$ac_ext
11711
11712 fi
11713 echo "$as_me:11713: result: $cf_cv_weak_symbols" >&5
11714 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11715
11716         else
11717                 cf_cv_weak_symbols=no
11718         fi
11719
11720         if test "x$cf_cv_weak_symbols" = xyes ; then
11721
11722 cat >>confdefs.h <<\EOF
11723 #define USE_WEAK_SYMBOLS 1
11724 EOF
11725
11726         fi
11727 fi
11728
11729 PTHREAD=
11730 if test "x$with_pthread" = "xyes" ; then
11731
11732 cat >>confdefs.h <<\EOF
11733 #define USE_PTHREADS 1
11734 EOF
11735
11736     enable_reentrant=yes
11737     if test "x$cf_cv_weak_symbols" = xyes ; then
11738         PTHREAD=-lpthread
11739     fi
11740 fi
11741
11742 # Reentrant code has to be opaque; there's little advantage to making ncurses
11743 # opaque outside of that, so there is no --enable-opaque option.  We can use
11744 # this option without --with-pthreads, but this will be always set for
11745 # pthreads.
11746 echo "$as_me:11746: checking if you want experimental reentrant code" >&5
11747 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11748
11749 # Check whether --enable-reentrant or --disable-reentrant was given.
11750 if test "${enable_reentrant+set}" = set; then
11751   enableval="$enable_reentrant"
11752   with_reentrant=$enableval
11753 else
11754   with_reentrant=no
11755 fi;
11756 echo "$as_me:11756: result: $with_reentrant" >&5
11757 echo "${ECHO_T}$with_reentrant" >&6
11758 if test "x$with_reentrant" = xyes ; then
11759         cf_cv_enable_reentrant=1
11760         cf_cv_enable_opaque="NCURSES_INTERNALS"
11761         NCURSES_OPAQUE=1
11762         NCURSES_SIZE_T=int
11763         if test "x$cf_cv_weak_symbols" = xyes ; then
11764
11765 # remove pthread library from $LIBS
11766 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11767
11768                 TEST_LIBS="-lpthread $TEST_LIBS"
11769                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11770         else
11771                 LIB_SUFFIX="t${LIB_SUFFIX}"
11772         fi
11773
11774 cat >>confdefs.h <<\EOF
11775 #define USE_REENTRANT 1
11776 EOF
11777
11778 if test "${with_abi_version+set}" != set; then
11779         case $cf_cv_rel_version in
11780         5.*)
11781                 cf_cv_rel_version=6.0
11782                 cf_cv_abi_version=6
11783                 { echo "$as_me:11783: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11784 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11785                 ;;
11786         esac
11787 fi
11788
11789 else
11790         cf_cv_enable_reentrant=0
11791         cf_cv_enable_opaque="NCURSES_OPAQUE"
11792         NCURSES_OPAQUE=0
11793         NCURSES_SIZE_T=short
11794 fi
11795
11796 ### Allow using a different wrap-prefix
11797 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11798         echo "$as_me:11798: checking for prefix used to wrap public variables" >&5
11799 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11800
11801 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11802 if test "${with_wrap_prefix+set}" = set; then
11803   withval="$with_wrap_prefix"
11804   NCURSES_WRAP_PREFIX=$withval
11805 else
11806   NCURSES_WRAP_PREFIX=_nc_
11807 fi;
11808         echo "$as_me:11808: result: $NCURSES_WRAP_PREFIX" >&5
11809 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11810 else
11811         NCURSES_WRAP_PREFIX=_nc_
11812 fi
11813
11814 cat >>confdefs.h <<EOF
11815 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11816 EOF
11817
11818 echo "$as_me:11818: checking if you want experimental safe-sprintf code" >&5
11819 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11820
11821 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11822 if test "${enable_safe_sprintf+set}" = set; then
11823   enableval="$enable_safe_sprintf"
11824   with_safe_sprintf=$enableval
11825 else
11826   with_safe_sprintf=no
11827 fi;
11828 echo "$as_me:11828: result: $with_safe_sprintf" >&5
11829 echo "${ECHO_T}$with_safe_sprintf" >&6
11830 test "x$with_safe_sprintf" = xyes &&
11831 cat >>confdefs.h <<\EOF
11832 #define USE_SAFE_SPRINTF 1
11833 EOF
11834
11835 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11836 # when hashmap is used scroll hints are useless
11837 if test "$with_hashmap" = no ; then
11838 echo "$as_me:11838: checking if you want to experiment without scrolling-hints code" >&5
11839 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11840
11841 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11842 if test "${enable_scroll_hints+set}" = set; then
11843   enableval="$enable_scroll_hints"
11844   with_scroll_hints=$enableval
11845 else
11846   with_scroll_hints=yes
11847 fi;
11848 echo "$as_me:11848: result: $with_scroll_hints" >&5
11849 echo "${ECHO_T}$with_scroll_hints" >&6
11850 test "x$with_scroll_hints" = xyes &&
11851 cat >>confdefs.h <<\EOF
11852 #define USE_SCROLL_HINTS 1
11853 EOF
11854
11855 fi
11856
11857 echo "$as_me:11857: checking if you want experimental wgetch-events code" >&5
11858 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11859
11860 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11861 if test "${enable_wgetch_events+set}" = set; then
11862   enableval="$enable_wgetch_events"
11863   with_wgetch_events=$enableval
11864 else
11865   with_wgetch_events=no
11866 fi;
11867 echo "$as_me:11867: result: $with_wgetch_events" >&5
11868 echo "${ECHO_T}$with_wgetch_events" >&6
11869 test "x$with_wgetch_events" = xyes &&
11870 cat >>confdefs.h <<\EOF
11871 #define NCURSES_WGETCH_EVENTS 1
11872 EOF
11873
11874 ###############################################################################
11875
11876 ###     use option --disable-echo to suppress full display compiling commands
11877
11878 echo "$as_me:11878: checking if you want to see long compiling messages" >&5
11879 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11880
11881 # Check whether --enable-echo or --disable-echo was given.
11882 if test "${enable_echo+set}" = set; then
11883   enableval="$enable_echo"
11884   test "$enableval" != no && enableval=yes
11885   if test "$enableval" != "yes" ; then
11886
11887     ECHO_LT='--silent'
11888     ECHO_LD='@echo linking $@;'
11889     RULE_CC='@echo compiling $<'
11890     SHOW_CC='@echo compiling $@'
11891     ECHO_CC='@'
11892
11893   else
11894
11895     ECHO_LT=''
11896     ECHO_LD=''
11897     RULE_CC=''
11898     SHOW_CC=''
11899     ECHO_CC=''
11900
11901   fi
11902 else
11903   enableval=yes
11904
11905     ECHO_LT=''
11906     ECHO_LD=''
11907     RULE_CC=''
11908     SHOW_CC=''
11909     ECHO_CC=''
11910
11911 fi;
11912 echo "$as_me:11912: result: $enableval" >&5
11913 echo "${ECHO_T}$enableval" >&6
11914
11915 if test "x$enable_echo" = xyes; then
11916         ECHO_LINK=
11917 else
11918         ECHO_LINK='@ echo linking $@ ... ;'
11919         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11920         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11921 fi
11922
11923 ###     use option --enable-warnings to turn on all gcc warnings
11924 echo "$as_me:11924: checking if you want to see compiler warnings" >&5
11925 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11926
11927 # Check whether --enable-warnings or --disable-warnings was given.
11928 if test "${enable_warnings+set}" = set; then
11929   enableval="$enable_warnings"
11930   with_warnings=$enableval
11931 fi;
11932 echo "$as_me:11932: result: $with_warnings" >&5
11933 echo "${ECHO_T}$with_warnings" >&6
11934
11935 if test "x$with_warnings" = "xyes"; then
11936
11937         ADAFLAGS="$ADAFLAGS -gnatg"
11938
11939 INTEL_COMPILER=no
11940
11941 if test "$GCC" = yes ; then
11942         case $host_os in
11943         linux*|gnu*)
11944                 echo "$as_me:11944: checking if this is really Intel C compiler" >&5
11945 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11946                 cf_save_CFLAGS="$CFLAGS"
11947                 CFLAGS="$CFLAGS -no-gcc"
11948                 cat >conftest.$ac_ext <<_ACEOF
11949 #line 11949 "configure"
11950 #include "confdefs.h"
11951
11952 int
11953 main ()
11954 {
11955
11956 #ifdef __INTEL_COMPILER
11957 #else
11958 make an error
11959 #endif
11960
11961   ;
11962   return 0;
11963 }
11964 _ACEOF
11965 rm -f conftest.$ac_objext
11966 if { (eval echo "$as_me:11966: \"$ac_compile\"") >&5
11967   (eval $ac_compile) 2>&5
11968   ac_status=$?
11969   echo "$as_me:11969: \$? = $ac_status" >&5
11970   (exit $ac_status); } &&
11971          { ac_try='test -s conftest.$ac_objext'
11972   { (eval echo "$as_me:11972: \"$ac_try\"") >&5
11973   (eval $ac_try) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); }; }; then
11977   INTEL_COMPILER=yes
11978 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11979
11980 else
11981   echo "$as_me: failed program was:" >&5
11982 cat conftest.$ac_ext >&5
11983 fi
11984 rm -f conftest.$ac_objext conftest.$ac_ext
11985                 CFLAGS="$cf_save_CFLAGS"
11986                 echo "$as_me:11986: result: $INTEL_COMPILER" >&5
11987 echo "${ECHO_T}$INTEL_COMPILER" >&6
11988                 ;;
11989         esac
11990 fi
11991
11992 CLANG_COMPILER=no
11993
11994 if test "$GCC" = yes ; then
11995         echo "$as_me:11995: checking if this is really Clang C compiler" >&5
11996 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11997         cf_save_CFLAGS="$CFLAGS"
11998         CFLAGS="$CFLAGS -Qunused-arguments"
11999         cat >conftest.$ac_ext <<_ACEOF
12000 #line 12000 "configure"
12001 #include "confdefs.h"
12002
12003 int
12004 main ()
12005 {
12006
12007 #ifdef __clang__
12008 #else
12009 make an error
12010 #endif
12011
12012   ;
12013   return 0;
12014 }
12015 _ACEOF
12016 rm -f conftest.$ac_objext
12017 if { (eval echo "$as_me:12017: \"$ac_compile\"") >&5
12018   (eval $ac_compile) 2>&5
12019   ac_status=$?
12020   echo "$as_me:12020: \$? = $ac_status" >&5
12021   (exit $ac_status); } &&
12022          { ac_try='test -s conftest.$ac_objext'
12023   { (eval echo "$as_me:12023: \"$ac_try\"") >&5
12024   (eval $ac_try) 2>&5
12025   ac_status=$?
12026   echo "$as_me:12026: \$? = $ac_status" >&5
12027   (exit $ac_status); }; }; then
12028   CLANG_COMPILER=yes
12029 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12030
12031 else
12032   echo "$as_me: failed program was:" >&5
12033 cat conftest.$ac_ext >&5
12034 fi
12035 rm -f conftest.$ac_objext conftest.$ac_ext
12036         CFLAGS="$cf_save_CFLAGS"
12037         echo "$as_me:12037: result: $CLANG_COMPILER" >&5
12038 echo "${ECHO_T}$CLANG_COMPILER" >&6
12039 fi
12040
12041 cat > conftest.$ac_ext <<EOF
12042 #line 12042 "${as_me:-configure}"
12043 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12044 EOF
12045
12046 if test "$INTEL_COMPILER" = yes
12047 then
12048 # The "-wdXXX" options suppress warnings:
12049 # remark #1419: external declaration in primary source file
12050 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12051 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12052 # remark #193: zero used for undefined preprocessing identifier
12053 # remark #593: variable "curs_sb_left_arrow" was set but never used
12054 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12055 # remark #869: parameter "tw" was never referenced
12056 # remark #981: operands are evaluated in unspecified order
12057 # warning #279: controlling expression is constant
12058
12059         { echo "$as_me:12059: checking for $CC warning options..." >&5
12060 echo "$as_me: checking for $CC warning options..." >&6;}
12061         cf_save_CFLAGS="$CFLAGS"
12062         EXTRA_CFLAGS="-Wall"
12063         for cf_opt in \
12064                 wd1419 \
12065                 wd1683 \
12066                 wd1684 \
12067                 wd193 \
12068                 wd593 \
12069                 wd279 \
12070                 wd810 \
12071                 wd869 \
12072                 wd981
12073         do
12074                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12075                 if { (eval echo "$as_me:12075: \"$ac_compile\"") >&5
12076   (eval $ac_compile) 2>&5
12077   ac_status=$?
12078   echo "$as_me:12078: \$? = $ac_status" >&5
12079   (exit $ac_status); }; then
12080                         test -n "$verbose" && echo "$as_me:12080: result: ... -$cf_opt" >&5
12081 echo "${ECHO_T}... -$cf_opt" >&6
12082                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12083                 fi
12084         done
12085         CFLAGS="$cf_save_CFLAGS"
12086
12087 elif test "$GCC" = yes
12088 then
12089         { echo "$as_me:12089: checking for $CC warning options..." >&5
12090 echo "$as_me: checking for $CC warning options..." >&6;}
12091         cf_save_CFLAGS="$CFLAGS"
12092         EXTRA_CFLAGS=
12093         cf_warn_CONST=""
12094         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12095         for cf_opt in W Wall \
12096                 Wbad-function-cast \
12097                 Wcast-align \
12098                 Wcast-qual \
12099                 Winline \
12100                 Wmissing-declarations \
12101                 Wmissing-prototypes \
12102                 Wnested-externs \
12103                 Wpointer-arith \
12104                 Wshadow \
12105                 Wstrict-prototypes \
12106                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12107         do
12108                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12109                 if { (eval echo "$as_me:12109: \"$ac_compile\"") >&5
12110   (eval $ac_compile) 2>&5
12111   ac_status=$?
12112   echo "$as_me:12112: \$? = $ac_status" >&5
12113   (exit $ac_status); }; then
12114                         test -n "$verbose" && echo "$as_me:12114: result: ... -$cf_opt" >&5
12115 echo "${ECHO_T}... -$cf_opt" >&6
12116                         case $cf_opt in #(vi
12117                         Wcast-qual) #(vi
12118                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12119                                 ;;
12120                         Winline) #(vi
12121                                 case $GCC_VERSION in
12122                                 [34].*)
12123                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12124
12125 echo "${as_me:-configure}:12125: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12126
12127                                         continue;;
12128                                 esac
12129                                 ;;
12130                         Wpointer-arith) #(vi
12131                                 case $GCC_VERSION in
12132                                 [12].*)
12133                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12134
12135 echo "${as_me:-configure}:12135: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12136
12137                                         continue;;
12138                                 esac
12139                                 ;;
12140                         esac
12141                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12142                 fi
12143         done
12144         CFLAGS="$cf_save_CFLAGS"
12145 fi
12146 rm -rf conftest*
12147
12148         if test "x$cf_with_cxx" = xyes ; then
12149
12150 INTEL_CPLUSPLUS=no
12151
12152 if test "$GCC" = yes ; then
12153         case $host_os in
12154         linux*|gnu*)
12155                 echo "$as_me:12155: checking if this is really Intel C++ compiler" >&5
12156 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12157                 cf_save_CFLAGS="$CXXFLAGS"
12158                 CXXFLAGS="$CXXFLAGS -no-gcc"
12159                 cat >conftest.$ac_ext <<_ACEOF
12160 #line 12160 "configure"
12161 #include "confdefs.h"
12162
12163 int
12164 main ()
12165 {
12166
12167 #ifdef __INTEL_COMPILER
12168 #else
12169 make an error
12170 #endif
12171
12172   ;
12173   return 0;
12174 }
12175 _ACEOF
12176 rm -f conftest.$ac_objext
12177 if { (eval echo "$as_me:12177: \"$ac_compile\"") >&5
12178   (eval $ac_compile) 2>&5
12179   ac_status=$?
12180   echo "$as_me:12180: \$? = $ac_status" >&5
12181   (exit $ac_status); } &&
12182          { ac_try='test -s conftest.$ac_objext'
12183   { (eval echo "$as_me:12183: \"$ac_try\"") >&5
12184   (eval $ac_try) 2>&5
12185   ac_status=$?
12186   echo "$as_me:12186: \$? = $ac_status" >&5
12187   (exit $ac_status); }; }; then
12188   INTEL_CPLUSPLUS=yes
12189 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12190
12191 else
12192   echo "$as_me: failed program was:" >&5
12193 cat conftest.$ac_ext >&5
12194 fi
12195 rm -f conftest.$ac_objext conftest.$ac_ext
12196                 CXXFLAGS="$cf_save_CFLAGS"
12197                 echo "$as_me:12197: result: $INTEL_CPLUSPLUS" >&5
12198 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12199                 ;;
12200         esac
12201 fi
12202
12203 CLANG_CPLUSPLUS=no
12204
12205 if test "$GCC" = yes ; then
12206         echo "$as_me:12206: checking if this is really Clang C++ compiler" >&5
12207 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12208         cf_save_CFLAGS="$CXXFLAGS"
12209         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12210         cat >conftest.$ac_ext <<_ACEOF
12211 #line 12211 "configure"
12212 #include "confdefs.h"
12213
12214 int
12215 main ()
12216 {
12217
12218 #ifdef __clang__
12219 #else
12220 make an error
12221 #endif
12222
12223   ;
12224   return 0;
12225 }
12226 _ACEOF
12227 rm -f conftest.$ac_objext
12228 if { (eval echo "$as_me:12228: \"$ac_compile\"") >&5
12229   (eval $ac_compile) 2>&5
12230   ac_status=$?
12231   echo "$as_me:12231: \$? = $ac_status" >&5
12232   (exit $ac_status); } &&
12233          { ac_try='test -s conftest.$ac_objext'
12234   { (eval echo "$as_me:12234: \"$ac_try\"") >&5
12235   (eval $ac_try) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit $ac_status); }; }; then
12239   CLANG_CPLUSPLUS=yes
12240 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12241
12242 else
12243   echo "$as_me: failed program was:" >&5
12244 cat conftest.$ac_ext >&5
12245 fi
12246 rm -f conftest.$ac_objext conftest.$ac_ext
12247         CXXFLAGS="$cf_save_CFLAGS"
12248         echo "$as_me:12248: result: $CLANG_CPLUSPLUS" >&5
12249 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12250 fi
12251
12252 ac_ext=cc
12253 ac_cpp='$CXXCPP $CPPFLAGS'
12254 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12255 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12256 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12257 ac_main_return=return
12258
12259 cat > conftest.$ac_ext <<EOF
12260 #line 12260 "configure"
12261 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12262 EOF
12263
12264 if test "$INTEL_CPLUSPLUS" = yes
12265 then
12266 # The "-wdXXX" options suppress warnings:
12267 # remark #1419: external declaration in primary source file
12268 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12269 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12270 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12271 # remark #193: zero used for undefined preprocessing identifier
12272 # remark #593: variable "curs_sb_left_arrow" was set but never used
12273 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12274 # remark #869: parameter "tw" was never referenced
12275 # remark #981: operands are evaluated in unspecified order
12276 # warning #269: invalid format string conversion
12277
12278         { echo "$as_me:12278: checking for $CC warning options..." >&5
12279 echo "$as_me: checking for $CC warning options..." >&6;}
12280         cf_save_CXXFLAGS="$CXXFLAGS"
12281         EXTRA_CXXFLAGS="-Wall"
12282         for cf_opt in \
12283                 wd1419 \
12284                 wd1682 \
12285                 wd1683 \
12286                 wd1684 \
12287                 wd193 \
12288                 wd279 \
12289                 wd593 \
12290                 wd810 \
12291                 wd869 \
12292                 wd981
12293         do
12294                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12295                 if { (eval echo "$as_me:12295: \"$ac_compile\"") >&5
12296   (eval $ac_compile) 2>&5
12297   ac_status=$?
12298   echo "$as_me:12298: \$? = $ac_status" >&5
12299   (exit $ac_status); }; then
12300                         test -n "$verbose" && echo "$as_me:12300: result: ... -$cf_opt" >&5
12301 echo "${ECHO_T}... -$cf_opt" >&6
12302                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12303                 fi
12304         done
12305         CXXFLAGS="$cf_save_CXXFLAGS"
12306
12307 elif test "$GXX" = yes
12308 then
12309         { echo "$as_me:12309: checking for $CXX warning options..." >&5
12310 echo "$as_me: checking for $CXX warning options..." >&6;}
12311         cf_save_CXXFLAGS="$CXXFLAGS"
12312         EXTRA_CXXFLAGS="-W -Wall"
12313         cf_gxx_extra_warnings=""
12314         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12315         case "$GCC_VERSION" in
12316         [1-2].*)
12317                 ;;
12318         *)
12319                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12320                 ;;
12321         esac
12322         for cf_opt in \
12323                 Wabi \
12324                 fabi-version=0 \
12325                 Woverloaded-virtual \
12326                 Wsign-promo \
12327                 Wsynth \
12328                 Wold-style-cast \
12329                 Wcast-align \
12330                 Wcast-qual \
12331                 Wmissing-prototypes \
12332                 Wpointer-arith \
12333                 Wshadow \
12334                 Wstrict-prototypes \
12335                 Wundef $cf_gxx_extra_warnings Wno-unused
12336         do
12337                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12338                 if { (eval echo "$as_me:12338: \"$ac_compile\"") >&5
12339   (eval $ac_compile) 2>&5
12340   ac_status=$?
12341   echo "$as_me:12341: \$? = $ac_status" >&5
12342   (exit $ac_status); }; then
12343                         test -n "$verbose" && echo "$as_me:12343: result: ... -$cf_opt" >&5
12344 echo "${ECHO_T}... -$cf_opt" >&6
12345                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12346                 else
12347                         test -n "$verbose" && echo "$as_me:12347: result: ... no -$cf_opt" >&5
12348 echo "${ECHO_T}... no -$cf_opt" >&6
12349                 fi
12350         done
12351         CXXFLAGS="$cf_save_CXXFLAGS"
12352 fi
12353
12354 rm -rf conftest*
12355 ac_ext=c
12356 ac_cpp='$CPP $CPPFLAGS'
12357 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12358 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12359 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12360 ac_main_return=return
12361
12362         fi
12363 fi
12364
12365 if test "$GCC" = yes
12366 then
12367 cat > conftest.i <<EOF
12368 #ifndef GCC_PRINTF
12369 #define GCC_PRINTF 0
12370 #endif
12371 #ifndef GCC_SCANF
12372 #define GCC_SCANF 0
12373 #endif
12374 #ifndef GCC_NORETURN
12375 #define GCC_NORETURN /* nothing */
12376 #endif
12377 #ifndef GCC_UNUSED
12378 #define GCC_UNUSED /* nothing */
12379 #endif
12380 EOF
12381 if test "$GCC" = yes
12382 then
12383         { echo "$as_me:12383: checking for $CC __attribute__ directives..." >&5
12384 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12385 cat > conftest.$ac_ext <<EOF
12386 #line 12386 "${as_me:-configure}"
12387 #include "confdefs.h"
12388 #include "conftest.h"
12389 #include "conftest.i"
12390 #if     GCC_PRINTF
12391 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12392 #else
12393 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12394 #endif
12395 #if     GCC_SCANF
12396 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12397 #else
12398 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12399 #endif
12400 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12401 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12402 extern void foo(void) GCC_NORETURN;
12403 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12404 EOF
12405         cf_printf_attribute=no
12406         cf_scanf_attribute=no
12407         for cf_attribute in scanf printf unused noreturn
12408         do
12409
12410 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12411
12412                 cf_directive="__attribute__(($cf_attribute))"
12413                 echo "checking for $CC $cf_directive" 1>&5
12414
12415                 case $cf_attribute in #(vi
12416                 printf) #(vi
12417                         cf_printf_attribute=yes
12418                         cat >conftest.h <<EOF
12419 #define GCC_$cf_ATTRIBUTE 1
12420 EOF
12421                         ;;
12422                 scanf) #(vi
12423                         cf_scanf_attribute=yes
12424                         cat >conftest.h <<EOF
12425 #define GCC_$cf_ATTRIBUTE 1
12426 EOF
12427                         ;;
12428                 *) #(vi
12429                         cat >conftest.h <<EOF
12430 #define GCC_$cf_ATTRIBUTE $cf_directive
12431 EOF
12432                         ;;
12433                 esac
12434
12435                 if { (eval echo "$as_me:12435: \"$ac_compile\"") >&5
12436   (eval $ac_compile) 2>&5
12437   ac_status=$?
12438   echo "$as_me:12438: \$? = $ac_status" >&5
12439   (exit $ac_status); }; then
12440                         test -n "$verbose" && echo "$as_me:12440: result: ... $cf_attribute" >&5
12441 echo "${ECHO_T}... $cf_attribute" >&6
12442                         cat conftest.h >>confdefs.h
12443                         case $cf_attribute in #(vi
12444                         noreturn) #(vi
12445
12446 cat >>confdefs.h <<EOF
12447 #define GCC_NORETURN $cf_directive
12448 EOF
12449
12450                                 ;;
12451                         printf) #(vi
12452                                 cf_value='/* nothing */'
12453                                 if test "$cf_printf_attribute" != no ; then
12454                                         cf_value='__attribute__((format(printf,fmt,var)))'
12455
12456 cat >>confdefs.h <<\EOF
12457 #define GCC_PRINTF 1
12458 EOF
12459
12460                                 fi
12461
12462 cat >>confdefs.h <<EOF
12463 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12464 EOF
12465
12466                                 ;;
12467                         scanf) #(vi
12468                                 cf_value='/* nothing */'
12469                                 if test "$cf_scanf_attribute" != no ; then
12470                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12471
12472 cat >>confdefs.h <<\EOF
12473 #define GCC_SCANF 1
12474 EOF
12475
12476                                 fi
12477
12478 cat >>confdefs.h <<EOF
12479 #define GCC_SCANFLIKE(fmt,var) $cf_value
12480 EOF
12481
12482                                 ;;
12483                         unused) #(vi
12484
12485 cat >>confdefs.h <<EOF
12486 #define GCC_UNUSED $cf_directive
12487 EOF
12488
12489                                 ;;
12490                         esac
12491                 fi
12492         done
12493 else
12494         fgrep define conftest.i >>confdefs.h
12495 fi
12496 rm -rf conftest*
12497 fi
12498
12499 echo "$as_me:12499: checking if you want to work around bogus compiler/loader warnings" >&5
12500 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12501
12502 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12503 if test "${enable_string_hacks+set}" = set; then
12504   enableval="$enable_string_hacks"
12505   with_string_hacks=$enableval
12506 else
12507   with_string_hacks=no
12508 fi;
12509 echo "$as_me:12509: result: $with_string_hacks" >&5
12510 echo "${ECHO_T}$with_string_hacks" >&6
12511
12512 if test "x$with_string_hacks" = "xyes"; then
12513
12514 cat >>confdefs.h <<\EOF
12515 #define USE_STRING_HACKS 1
12516 EOF
12517
12518         { echo "$as_me:12518: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12519 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12520
12521 for ac_func in strlcat strlcpy snprintf
12522 do
12523 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12524 echo "$as_me:12524: checking for $ac_func" >&5
12525 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12526 if eval "test \"\${$as_ac_var+set}\" = set"; then
12527   echo $ECHO_N "(cached) $ECHO_C" >&6
12528 else
12529   cat >conftest.$ac_ext <<_ACEOF
12530 #line 12530 "configure"
12531 #include "confdefs.h"
12532 /* System header to define __stub macros and hopefully few prototypes,
12533     which can conflict with char $ac_func (); below.  */
12534 #include <assert.h>
12535 /* Override any gcc2 internal prototype to avoid an error.  */
12536 #ifdef __cplusplus
12537 extern "C"
12538 #endif
12539 /* We use char because int might match the return type of a gcc2
12540    builtin and then its argument prototype would still apply.  */
12541 char $ac_func ();
12542 char (*f) ();
12543
12544 int
12545 main ()
12546 {
12547 /* The GNU C library defines this for functions which it implements
12548     to always fail with ENOSYS.  Some functions are actually named
12549     something starting with __ and the normal name is an alias.  */
12550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12551 choke me
12552 #else
12553 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12554 #endif
12555
12556   ;
12557   return 0;
12558 }
12559 _ACEOF
12560 rm -f conftest.$ac_objext conftest$ac_exeext
12561 if { (eval echo "$as_me:12561: \"$ac_link\"") >&5
12562   (eval $ac_link) 2>&5
12563   ac_status=$?
12564   echo "$as_me:12564: \$? = $ac_status" >&5
12565   (exit $ac_status); } &&
12566          { ac_try='test -s conftest$ac_exeext'
12567   { (eval echo "$as_me:12567: \"$ac_try\"") >&5
12568   (eval $ac_try) 2>&5
12569   ac_status=$?
12570   echo "$as_me:12570: \$? = $ac_status" >&5
12571   (exit $ac_status); }; }; then
12572   eval "$as_ac_var=yes"
12573 else
12574   echo "$as_me: failed program was:" >&5
12575 cat conftest.$ac_ext >&5
12576 eval "$as_ac_var=no"
12577 fi
12578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12579 fi
12580 echo "$as_me:12580: result: `eval echo '${'$as_ac_var'}'`" >&5
12581 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12582 if test `eval echo '${'$as_ac_var'}'` = yes; then
12583   cat >>confdefs.h <<EOF
12584 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12585 EOF
12586
12587 fi
12588 done
12589
12590 fi
12591
12592 ###     use option --enable-assertions to turn on generation of assertion code
12593 echo "$as_me:12593: checking if you want to enable runtime assertions" >&5
12594 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12595
12596 # Check whether --enable-assertions or --disable-assertions was given.
12597 if test "${enable_assertions+set}" = set; then
12598   enableval="$enable_assertions"
12599   with_assertions=$enableval
12600 else
12601   with_assertions=no
12602 fi;
12603 echo "$as_me:12603: result: $with_assertions" >&5
12604 echo "${ECHO_T}$with_assertions" >&6
12605 if test -n "$GCC"
12606 then
12607         if test "$with_assertions" = no
12608         then
12609                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12610         else
12611
12612         ADAFLAGS="$ADAFLAGS -gnata"
12613
12614         fi
12615 fi
12616
12617 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12618
12619 echo "$as_me:12619: checking if you want to use dmalloc for testing" >&5
12620 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12621
12622 # Check whether --with-dmalloc or --without-dmalloc was given.
12623 if test "${with_dmalloc+set}" = set; then
12624   withval="$with_dmalloc"
12625
12626 cat >>confdefs.h <<EOF
12627 #define USE_DMALLOC 1
12628 EOF
12629
12630         : ${with_cflags:=-g}
12631         : ${with_no_leaks:=yes}
12632          with_dmalloc=yes
12633 else
12634   with_dmalloc=
12635 fi;
12636 echo "$as_me:12636: result: ${with_dmalloc:-no}" >&5
12637 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12638
12639 case .$with_cflags in #(vi
12640 .*-g*)
12641         case .$CFLAGS in #(vi
12642         .*-g*) #(vi
12643                 ;;
12644         *)
12645
12646 cf_fix_cppflags=no
12647 cf_new_cflags=
12648 cf_new_cppflags=
12649 cf_new_extra_cppflags=
12650
12651 for cf_add_cflags in -g
12652 do
12653 case $cf_fix_cppflags in
12654 no)
12655         case $cf_add_cflags in #(vi
12656         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12657                 case $cf_add_cflags in
12658                 -D*)
12659                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12660
12661                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12662                                 && test -z "${cf_tst_cflags}" \
12663                                 && cf_fix_cppflags=yes
12664
12665                         if test $cf_fix_cppflags = yes ; then
12666                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12667                                 continue
12668                         elif test "${cf_tst_cflags}" = "\"'" ; then
12669                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12670                                 continue
12671                         fi
12672                         ;;
12673                 esac
12674                 case "$CPPFLAGS" in
12675                 *$cf_add_cflags) #(vi
12676                         ;;
12677                 *) #(vi
12678                         case $cf_add_cflags in #(vi
12679                         -D*)
12680                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12681
12682 CPPFLAGS=`echo "$CPPFLAGS" | \
12683         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12684                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12685
12686                                 ;;
12687                         esac
12688                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12689                         ;;
12690                 esac
12691                 ;;
12692         *)
12693                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12694                 ;;
12695         esac
12696         ;;
12697 yes)
12698         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12699
12700         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12701
12702         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12703                 && test -z "${cf_tst_cflags}" \
12704                 && cf_fix_cppflags=no
12705         ;;
12706 esac
12707 done
12708
12709 if test -n "$cf_new_cflags" ; then
12710
12711         CFLAGS="$CFLAGS $cf_new_cflags"
12712 fi
12713
12714 if test -n "$cf_new_cppflags" ; then
12715
12716         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12717 fi
12718
12719 if test -n "$cf_new_extra_cppflags" ; then
12720
12721         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12722 fi
12723
12724                 ;;
12725         esac
12726         ;;
12727 esac
12728
12729 if test "$with_dmalloc" = yes ; then
12730         echo "$as_me:12730: checking for dmalloc.h" >&5
12731 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12732 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12733   echo $ECHO_N "(cached) $ECHO_C" >&6
12734 else
12735   cat >conftest.$ac_ext <<_ACEOF
12736 #line 12736 "configure"
12737 #include "confdefs.h"
12738 #include <dmalloc.h>
12739 _ACEOF
12740 if { (eval echo "$as_me:12740: \"$ac_cpp conftest.$ac_ext\"") >&5
12741   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12742   ac_status=$?
12743   egrep -v '^ *\+' conftest.er1 >conftest.err
12744   rm -f conftest.er1
12745   cat conftest.err >&5
12746   echo "$as_me:12746: \$? = $ac_status" >&5
12747   (exit $ac_status); } >/dev/null; then
12748   if test -s conftest.err; then
12749     ac_cpp_err=$ac_c_preproc_warn_flag
12750   else
12751     ac_cpp_err=
12752   fi
12753 else
12754   ac_cpp_err=yes
12755 fi
12756 if test -z "$ac_cpp_err"; then
12757   ac_cv_header_dmalloc_h=yes
12758 else
12759   echo "$as_me: failed program was:" >&5
12760   cat conftest.$ac_ext >&5
12761   ac_cv_header_dmalloc_h=no
12762 fi
12763 rm -f conftest.err conftest.$ac_ext
12764 fi
12765 echo "$as_me:12765: result: $ac_cv_header_dmalloc_h" >&5
12766 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12767 if test $ac_cv_header_dmalloc_h = yes; then
12768
12769 echo "$as_me:12769: checking for dmalloc_debug in -ldmalloc" >&5
12770 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12771 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12772   echo $ECHO_N "(cached) $ECHO_C" >&6
12773 else
12774   ac_check_lib_save_LIBS=$LIBS
12775 LIBS="-ldmalloc  $LIBS"
12776 cat >conftest.$ac_ext <<_ACEOF
12777 #line 12777 "configure"
12778 #include "confdefs.h"
12779
12780 /* Override any gcc2 internal prototype to avoid an error.  */
12781 #ifdef __cplusplus
12782 extern "C"
12783 #endif
12784 /* We use char because int might match the return type of a gcc2
12785    builtin and then its argument prototype would still apply.  */
12786 char dmalloc_debug ();
12787 int
12788 main ()
12789 {
12790 dmalloc_debug ();
12791   ;
12792   return 0;
12793 }
12794 _ACEOF
12795 rm -f conftest.$ac_objext conftest$ac_exeext
12796 if { (eval echo "$as_me:12796: \"$ac_link\"") >&5
12797   (eval $ac_link) 2>&5
12798   ac_status=$?
12799   echo "$as_me:12799: \$? = $ac_status" >&5
12800   (exit $ac_status); } &&
12801          { ac_try='test -s conftest$ac_exeext'
12802   { (eval echo "$as_me:12802: \"$ac_try\"") >&5
12803   (eval $ac_try) 2>&5
12804   ac_status=$?
12805   echo "$as_me:12805: \$? = $ac_status" >&5
12806   (exit $ac_status); }; }; then
12807   ac_cv_lib_dmalloc_dmalloc_debug=yes
12808 else
12809   echo "$as_me: failed program was:" >&5
12810 cat conftest.$ac_ext >&5
12811 ac_cv_lib_dmalloc_dmalloc_debug=no
12812 fi
12813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12814 LIBS=$ac_check_lib_save_LIBS
12815 fi
12816 echo "$as_me:12816: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12817 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12818 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12819   cat >>confdefs.h <<EOF
12820 #define HAVE_LIBDMALLOC 1
12821 EOF
12822
12823   LIBS="-ldmalloc $LIBS"
12824
12825 fi
12826
12827 fi
12828
12829 fi
12830
12831 echo "$as_me:12831: checking if you want to use dbmalloc for testing" >&5
12832 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12833
12834 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12835 if test "${with_dbmalloc+set}" = set; then
12836   withval="$with_dbmalloc"
12837
12838 cat >>confdefs.h <<EOF
12839 #define USE_DBMALLOC 1
12840 EOF
12841
12842         : ${with_cflags:=-g}
12843         : ${with_no_leaks:=yes}
12844          with_dbmalloc=yes
12845 else
12846   with_dbmalloc=
12847 fi;
12848 echo "$as_me:12848: result: ${with_dbmalloc:-no}" >&5
12849 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12850
12851 case .$with_cflags in #(vi
12852 .*-g*)
12853         case .$CFLAGS in #(vi
12854         .*-g*) #(vi
12855                 ;;
12856         *)
12857
12858 cf_fix_cppflags=no
12859 cf_new_cflags=
12860 cf_new_cppflags=
12861 cf_new_extra_cppflags=
12862
12863 for cf_add_cflags in -g
12864 do
12865 case $cf_fix_cppflags in
12866 no)
12867         case $cf_add_cflags in #(vi
12868         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12869                 case $cf_add_cflags in
12870                 -D*)
12871                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12872
12873                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12874                                 && test -z "${cf_tst_cflags}" \
12875                                 && cf_fix_cppflags=yes
12876
12877                         if test $cf_fix_cppflags = yes ; then
12878                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12879                                 continue
12880                         elif test "${cf_tst_cflags}" = "\"'" ; then
12881                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12882                                 continue
12883                         fi
12884                         ;;
12885                 esac
12886                 case "$CPPFLAGS" in
12887                 *$cf_add_cflags) #(vi
12888                         ;;
12889                 *) #(vi
12890                         case $cf_add_cflags in #(vi
12891                         -D*)
12892                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12893
12894 CPPFLAGS=`echo "$CPPFLAGS" | \
12895         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12896                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12897
12898                                 ;;
12899                         esac
12900                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12901                         ;;
12902                 esac
12903                 ;;
12904         *)
12905                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12906                 ;;
12907         esac
12908         ;;
12909 yes)
12910         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12911
12912         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12913
12914         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12915                 && test -z "${cf_tst_cflags}" \
12916                 && cf_fix_cppflags=no
12917         ;;
12918 esac
12919 done
12920
12921 if test -n "$cf_new_cflags" ; then
12922
12923         CFLAGS="$CFLAGS $cf_new_cflags"
12924 fi
12925
12926 if test -n "$cf_new_cppflags" ; then
12927
12928         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12929 fi
12930
12931 if test -n "$cf_new_extra_cppflags" ; then
12932
12933         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12934 fi
12935
12936                 ;;
12937         esac
12938         ;;
12939 esac
12940
12941 if test "$with_dbmalloc" = yes ; then
12942         echo "$as_me:12942: checking for dbmalloc.h" >&5
12943 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12944 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12945   echo $ECHO_N "(cached) $ECHO_C" >&6
12946 else
12947   cat >conftest.$ac_ext <<_ACEOF
12948 #line 12948 "configure"
12949 #include "confdefs.h"
12950 #include <dbmalloc.h>
12951 _ACEOF
12952 if { (eval echo "$as_me:12952: \"$ac_cpp conftest.$ac_ext\"") >&5
12953   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12954   ac_status=$?
12955   egrep -v '^ *\+' conftest.er1 >conftest.err
12956   rm -f conftest.er1
12957   cat conftest.err >&5
12958   echo "$as_me:12958: \$? = $ac_status" >&5
12959   (exit $ac_status); } >/dev/null; then
12960   if test -s conftest.err; then
12961     ac_cpp_err=$ac_c_preproc_warn_flag
12962   else
12963     ac_cpp_err=
12964   fi
12965 else
12966   ac_cpp_err=yes
12967 fi
12968 if test -z "$ac_cpp_err"; then
12969   ac_cv_header_dbmalloc_h=yes
12970 else
12971   echo "$as_me: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   ac_cv_header_dbmalloc_h=no
12974 fi
12975 rm -f conftest.err conftest.$ac_ext
12976 fi
12977 echo "$as_me:12977: result: $ac_cv_header_dbmalloc_h" >&5
12978 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12979 if test $ac_cv_header_dbmalloc_h = yes; then
12980
12981 echo "$as_me:12981: checking for debug_malloc in -ldbmalloc" >&5
12982 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12983 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12984   echo $ECHO_N "(cached) $ECHO_C" >&6
12985 else
12986   ac_check_lib_save_LIBS=$LIBS
12987 LIBS="-ldbmalloc  $LIBS"
12988 cat >conftest.$ac_ext <<_ACEOF
12989 #line 12989 "configure"
12990 #include "confdefs.h"
12991
12992 /* Override any gcc2 internal prototype to avoid an error.  */
12993 #ifdef __cplusplus
12994 extern "C"
12995 #endif
12996 /* We use char because int might match the return type of a gcc2
12997    builtin and then its argument prototype would still apply.  */
12998 char debug_malloc ();
12999 int
13000 main ()
13001 {
13002 debug_malloc ();
13003   ;
13004   return 0;
13005 }
13006 _ACEOF
13007 rm -f conftest.$ac_objext conftest$ac_exeext
13008 if { (eval echo "$as_me:13008: \"$ac_link\"") >&5
13009   (eval $ac_link) 2>&5
13010   ac_status=$?
13011   echo "$as_me:13011: \$? = $ac_status" >&5
13012   (exit $ac_status); } &&
13013          { ac_try='test -s conftest$ac_exeext'
13014   { (eval echo "$as_me:13014: \"$ac_try\"") >&5
13015   (eval $ac_try) 2>&5
13016   ac_status=$?
13017   echo "$as_me:13017: \$? = $ac_status" >&5
13018   (exit $ac_status); }; }; then
13019   ac_cv_lib_dbmalloc_debug_malloc=yes
13020 else
13021   echo "$as_me: failed program was:" >&5
13022 cat conftest.$ac_ext >&5
13023 ac_cv_lib_dbmalloc_debug_malloc=no
13024 fi
13025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13026 LIBS=$ac_check_lib_save_LIBS
13027 fi
13028 echo "$as_me:13028: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13029 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13030 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13031   cat >>confdefs.h <<EOF
13032 #define HAVE_LIBDBMALLOC 1
13033 EOF
13034
13035   LIBS="-ldbmalloc $LIBS"
13036
13037 fi
13038
13039 fi
13040
13041 fi
13042
13043 echo "$as_me:13043: checking if you want to use valgrind for testing" >&5
13044 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13045
13046 # Check whether --with-valgrind or --without-valgrind was given.
13047 if test "${with_valgrind+set}" = set; then
13048   withval="$with_valgrind"
13049
13050 cat >>confdefs.h <<EOF
13051 #define USE_VALGRIND 1
13052 EOF
13053
13054         : ${with_cflags:=-g}
13055         : ${with_no_leaks:=yes}
13056          with_valgrind=yes
13057 else
13058   with_valgrind=
13059 fi;
13060 echo "$as_me:13060: result: ${with_valgrind:-no}" >&5
13061 echo "${ECHO_T}${with_valgrind:-no}" >&6
13062
13063 case .$with_cflags in #(vi
13064 .*-g*)
13065         case .$CFLAGS in #(vi
13066         .*-g*) #(vi
13067                 ;;
13068         *)
13069
13070 cf_fix_cppflags=no
13071 cf_new_cflags=
13072 cf_new_cppflags=
13073 cf_new_extra_cppflags=
13074
13075 for cf_add_cflags in -g
13076 do
13077 case $cf_fix_cppflags in
13078 no)
13079         case $cf_add_cflags in #(vi
13080         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13081                 case $cf_add_cflags in
13082                 -D*)
13083                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13084
13085                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13086                                 && test -z "${cf_tst_cflags}" \
13087                                 && cf_fix_cppflags=yes
13088
13089                         if test $cf_fix_cppflags = yes ; then
13090                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13091                                 continue
13092                         elif test "${cf_tst_cflags}" = "\"'" ; then
13093                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13094                                 continue
13095                         fi
13096                         ;;
13097                 esac
13098                 case "$CPPFLAGS" in
13099                 *$cf_add_cflags) #(vi
13100                         ;;
13101                 *) #(vi
13102                         case $cf_add_cflags in #(vi
13103                         -D*)
13104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13105
13106 CPPFLAGS=`echo "$CPPFLAGS" | \
13107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13109
13110                                 ;;
13111                         esac
13112                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13113                         ;;
13114                 esac
13115                 ;;
13116         *)
13117                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13118                 ;;
13119         esac
13120         ;;
13121 yes)
13122         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13123
13124         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13125
13126         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13127                 && test -z "${cf_tst_cflags}" \
13128                 && cf_fix_cppflags=no
13129         ;;
13130 esac
13131 done
13132
13133 if test -n "$cf_new_cflags" ; then
13134
13135         CFLAGS="$CFLAGS $cf_new_cflags"
13136 fi
13137
13138 if test -n "$cf_new_cppflags" ; then
13139
13140         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13141 fi
13142
13143 if test -n "$cf_new_extra_cppflags" ; then
13144
13145         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13146 fi
13147
13148                 ;;
13149         esac
13150         ;;
13151 esac
13152
13153 echo "$as_me:13153: checking if you want to perform memory-leak testing" >&5
13154 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13155
13156 # Check whether --enable-leaks or --disable-leaks was given.
13157 if test "${enable_leaks+set}" = set; then
13158   enableval="$enable_leaks"
13159   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13160 else
13161   : ${with_no_leaks:=no}
13162 fi;
13163 echo "$as_me:13163: result: $with_no_leaks" >&5
13164 echo "${ECHO_T}$with_no_leaks" >&6
13165
13166 if test "$with_no_leaks" = yes ; then
13167
13168 cat >>confdefs.h <<\EOF
13169 #define NO_LEAKS 1
13170 EOF
13171
13172 cat >>confdefs.h <<\EOF
13173 #define YY_NO_LEAKS 1
13174 EOF
13175
13176 fi
13177
13178 cat >>confdefs.h <<\EOF
13179 #define HAVE_NC_ALLOC_H 1
13180 EOF
13181
13182 ###     use option --enable-expanded to generate certain macros as functions
13183
13184 # Check whether --enable-expanded or --disable-expanded was given.
13185 if test "${enable_expanded+set}" = set; then
13186   enableval="$enable_expanded"
13187   test "x$enableval" = xyes &&
13188 cat >>confdefs.h <<\EOF
13189 #define NCURSES_EXPANDED 1
13190 EOF
13191
13192 fi;
13193
13194 ###     use option --disable-macros to suppress macros in favor of functions
13195
13196 # Check whether --enable-macros or --disable-macros was given.
13197 if test "${enable_macros+set}" = set; then
13198   enableval="$enable_macros"
13199   test "$enableval" = no &&
13200 cat >>confdefs.h <<\EOF
13201 #define NCURSES_NOMACROS 1
13202 EOF
13203
13204 fi;
13205
13206 # Normally we only add trace() to the debug-library.  Allow this to be
13207 # extended to all models of the ncurses library:
13208 cf_all_traces=no
13209 case "$CFLAGS $CPPFLAGS" in
13210 *-DTRACE*)
13211         cf_all_traces=yes
13212         ;;
13213 esac
13214
13215 echo "$as_me:13215: checking whether to add trace feature to all models" >&5
13216 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13217
13218 # Check whether --with-trace or --without-trace was given.
13219 if test "${with_trace+set}" = set; then
13220   withval="$with_trace"
13221   cf_with_trace=$withval
13222 else
13223   cf_with_trace=$cf_all_traces
13224 fi;
13225 echo "$as_me:13225: result: $cf_with_trace" >&5
13226 echo "${ECHO_T}$cf_with_trace" >&6
13227
13228 if test "x$cf_with_trace" = xyes ; then
13229         LIB_TRACING=all
13230         ADA_TRACE=TRUE
13231
13232 cf_fix_cppflags=no
13233 cf_new_cflags=
13234 cf_new_cppflags=
13235 cf_new_extra_cppflags=
13236
13237 for cf_add_cflags in -DTRACE
13238 do
13239 case $cf_fix_cppflags in
13240 no)
13241         case $cf_add_cflags in #(vi
13242         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13243                 case $cf_add_cflags in
13244                 -D*)
13245                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13246
13247                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13248                                 && test -z "${cf_tst_cflags}" \
13249                                 && cf_fix_cppflags=yes
13250
13251                         if test $cf_fix_cppflags = yes ; then
13252                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13253                                 continue
13254                         elif test "${cf_tst_cflags}" = "\"'" ; then
13255                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13256                                 continue
13257                         fi
13258                         ;;
13259                 esac
13260                 case "$CPPFLAGS" in
13261                 *$cf_add_cflags) #(vi
13262                         ;;
13263                 *) #(vi
13264                         case $cf_add_cflags in #(vi
13265                         -D*)
13266                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13267
13268 CPPFLAGS=`echo "$CPPFLAGS" | \
13269         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13270                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13271
13272                                 ;;
13273                         esac
13274                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13275                         ;;
13276                 esac
13277                 ;;
13278         *)
13279                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13280                 ;;
13281         esac
13282         ;;
13283 yes)
13284         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13285
13286         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13287
13288         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13289                 && test -z "${cf_tst_cflags}" \
13290                 && cf_fix_cppflags=no
13291         ;;
13292 esac
13293 done
13294
13295 if test -n "$cf_new_cflags" ; then
13296
13297         CFLAGS="$CFLAGS $cf_new_cflags"
13298 fi
13299
13300 if test -n "$cf_new_cppflags" ; then
13301
13302         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13303 fi
13304
13305 if test -n "$cf_new_extra_cppflags" ; then
13306
13307         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13308 fi
13309
13310 else
13311         LIB_TRACING=DEBUG
13312         ADA_TRACE=FALSE
13313 fi
13314
13315 ###     Checks for libraries.
13316 case $cf_cv_system_name in #(vi
13317 *mingw32*) #(vi
13318         ;;
13319 *)
13320 echo "$as_me:13320: checking for gettimeofday" >&5
13321 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13322 if test "${ac_cv_func_gettimeofday+set}" = set; then
13323   echo $ECHO_N "(cached) $ECHO_C" >&6
13324 else
13325   cat >conftest.$ac_ext <<_ACEOF
13326 #line 13326 "configure"
13327 #include "confdefs.h"
13328 /* System header to define __stub macros and hopefully few prototypes,
13329     which can conflict with char gettimeofday (); below.  */
13330 #include <assert.h>
13331 /* Override any gcc2 internal prototype to avoid an error.  */
13332 #ifdef __cplusplus
13333 extern "C"
13334 #endif
13335 /* We use char because int might match the return type of a gcc2
13336    builtin and then its argument prototype would still apply.  */
13337 char gettimeofday ();
13338 char (*f) ();
13339
13340 int
13341 main ()
13342 {
13343 /* The GNU C library defines this for functions which it implements
13344     to always fail with ENOSYS.  Some functions are actually named
13345     something starting with __ and the normal name is an alias.  */
13346 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13347 choke me
13348 #else
13349 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13350 #endif
13351
13352   ;
13353   return 0;
13354 }
13355 _ACEOF
13356 rm -f conftest.$ac_objext conftest$ac_exeext
13357 if { (eval echo "$as_me:13357: \"$ac_link\"") >&5
13358   (eval $ac_link) 2>&5
13359   ac_status=$?
13360   echo "$as_me:13360: \$? = $ac_status" >&5
13361   (exit $ac_status); } &&
13362          { ac_try='test -s conftest$ac_exeext'
13363   { (eval echo "$as_me:13363: \"$ac_try\"") >&5
13364   (eval $ac_try) 2>&5
13365   ac_status=$?
13366   echo "$as_me:13366: \$? = $ac_status" >&5
13367   (exit $ac_status); }; }; then
13368   ac_cv_func_gettimeofday=yes
13369 else
13370   echo "$as_me: failed program was:" >&5
13371 cat conftest.$ac_ext >&5
13372 ac_cv_func_gettimeofday=no
13373 fi
13374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13375 fi
13376 echo "$as_me:13376: result: $ac_cv_func_gettimeofday" >&5
13377 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13378 if test $ac_cv_func_gettimeofday = yes; then
13379
13380 cat >>confdefs.h <<\EOF
13381 #define HAVE_GETTIMEOFDAY 1
13382 EOF
13383
13384 else
13385
13386 echo "$as_me:13386: checking for gettimeofday in -lbsd" >&5
13387 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13388 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13389   echo $ECHO_N "(cached) $ECHO_C" >&6
13390 else
13391   ac_check_lib_save_LIBS=$LIBS
13392 LIBS="-lbsd  $LIBS"
13393 cat >conftest.$ac_ext <<_ACEOF
13394 #line 13394 "configure"
13395 #include "confdefs.h"
13396
13397 /* Override any gcc2 internal prototype to avoid an error.  */
13398 #ifdef __cplusplus
13399 extern "C"
13400 #endif
13401 /* We use char because int might match the return type of a gcc2
13402    builtin and then its argument prototype would still apply.  */
13403 char gettimeofday ();
13404 int
13405 main ()
13406 {
13407 gettimeofday ();
13408   ;
13409   return 0;
13410 }
13411 _ACEOF
13412 rm -f conftest.$ac_objext conftest$ac_exeext
13413 if { (eval echo "$as_me:13413: \"$ac_link\"") >&5
13414   (eval $ac_link) 2>&5
13415   ac_status=$?
13416   echo "$as_me:13416: \$? = $ac_status" >&5
13417   (exit $ac_status); } &&
13418          { ac_try='test -s conftest$ac_exeext'
13419   { (eval echo "$as_me:13419: \"$ac_try\"") >&5
13420   (eval $ac_try) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit $ac_status); }; }; then
13424   ac_cv_lib_bsd_gettimeofday=yes
13425 else
13426   echo "$as_me: failed program was:" >&5
13427 cat conftest.$ac_ext >&5
13428 ac_cv_lib_bsd_gettimeofday=no
13429 fi
13430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13431 LIBS=$ac_check_lib_save_LIBS
13432 fi
13433 echo "$as_me:13433: result: $ac_cv_lib_bsd_gettimeofday" >&5
13434 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13435 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13436
13437 cat >>confdefs.h <<\EOF
13438 #define HAVE_GETTIMEOFDAY 1
13439 EOF
13440
13441         LIBS="-lbsd $LIBS"
13442 fi
13443
13444 fi
13445         ;;
13446 esac
13447
13448 echo "$as_me:13448: checking if -lm needed for math functions" >&5
13449 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13450 if test "${cf_cv_need_libm+set}" = set; then
13451   echo $ECHO_N "(cached) $ECHO_C" >&6
13452 else
13453
13454         cat >conftest.$ac_ext <<_ACEOF
13455 #line 13455 "configure"
13456 #include "confdefs.h"
13457
13458         #include <stdio.h>
13459         #include <math.h>
13460
13461 int
13462 main ()
13463 {
13464 double x = rand(); printf("result = %g\n", sin(x))
13465   ;
13466   return 0;
13467 }
13468 _ACEOF
13469 rm -f conftest.$ac_objext conftest$ac_exeext
13470 if { (eval echo "$as_me:13470: \"$ac_link\"") >&5
13471   (eval $ac_link) 2>&5
13472   ac_status=$?
13473   echo "$as_me:13473: \$? = $ac_status" >&5
13474   (exit $ac_status); } &&
13475          { ac_try='test -s conftest$ac_exeext'
13476   { (eval echo "$as_me:13476: \"$ac_try\"") >&5
13477   (eval $ac_try) 2>&5
13478   ac_status=$?
13479   echo "$as_me:13479: \$? = $ac_status" >&5
13480   (exit $ac_status); }; }; then
13481   cf_cv_need_libm=no
13482 else
13483   echo "$as_me: failed program was:" >&5
13484 cat conftest.$ac_ext >&5
13485 cf_cv_need_libm=yes
13486 fi
13487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13488 fi
13489 echo "$as_me:13489: result: $cf_cv_need_libm" >&5
13490 echo "${ECHO_T}$cf_cv_need_libm" >&6
13491 if test "$cf_cv_need_libm" = yes
13492 then
13493 MATH_LIB=-lm
13494 fi
13495
13496 ###     Checks for header files.
13497 echo "$as_me:13497: checking for ANSI C header files" >&5
13498 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13499 if test "${ac_cv_header_stdc+set}" = set; then
13500   echo $ECHO_N "(cached) $ECHO_C" >&6
13501 else
13502   cat >conftest.$ac_ext <<_ACEOF
13503 #line 13503 "configure"
13504 #include "confdefs.h"
13505 #include <stdlib.h>
13506 #include <stdarg.h>
13507 #include <string.h>
13508 #include <float.h>
13509
13510 _ACEOF
13511 if { (eval echo "$as_me:13511: \"$ac_cpp conftest.$ac_ext\"") >&5
13512   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13513   ac_status=$?
13514   egrep -v '^ *\+' conftest.er1 >conftest.err
13515   rm -f conftest.er1
13516   cat conftest.err >&5
13517   echo "$as_me:13517: \$? = $ac_status" >&5
13518   (exit $ac_status); } >/dev/null; then
13519   if test -s conftest.err; then
13520     ac_cpp_err=$ac_c_preproc_warn_flag
13521   else
13522     ac_cpp_err=
13523   fi
13524 else
13525   ac_cpp_err=yes
13526 fi
13527 if test -z "$ac_cpp_err"; then
13528   ac_cv_header_stdc=yes
13529 else
13530   echo "$as_me: failed program was:" >&5
13531   cat conftest.$ac_ext >&5
13532   ac_cv_header_stdc=no
13533 fi
13534 rm -f conftest.err conftest.$ac_ext
13535
13536 if test $ac_cv_header_stdc = yes; then
13537   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13538   cat >conftest.$ac_ext <<_ACEOF
13539 #line 13539 "configure"
13540 #include "confdefs.h"
13541 #include <string.h>
13542
13543 _ACEOF
13544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13545   egrep "memchr" >/dev/null 2>&1; then
13546   :
13547 else
13548   ac_cv_header_stdc=no
13549 fi
13550 rm -rf conftest*
13551
13552 fi
13553
13554 if test $ac_cv_header_stdc = yes; then
13555   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13556   cat >conftest.$ac_ext <<_ACEOF
13557 #line 13557 "configure"
13558 #include "confdefs.h"
13559 #include <stdlib.h>
13560
13561 _ACEOF
13562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13563   egrep "free" >/dev/null 2>&1; then
13564   :
13565 else
13566   ac_cv_header_stdc=no
13567 fi
13568 rm -rf conftest*
13569
13570 fi
13571
13572 if test $ac_cv_header_stdc = yes; then
13573   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13574   if test "$cross_compiling" = yes; then
13575   :
13576 else
13577   cat >conftest.$ac_ext <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580 #include <ctype.h>
13581 #if ((' ' & 0x0FF) == 0x020)
13582 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13583 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13584 #else
13585 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13586                      || ('j' <= (c) && (c) <= 'r') \
13587                      || ('s' <= (c) && (c) <= 'z'))
13588 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13589 #endif
13590
13591 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13592 int
13593 main ()
13594 {
13595   int i;
13596   for (i = 0; i < 256; i++)
13597     if (XOR (islower (i), ISLOWER (i))
13598         || toupper (i) != TOUPPER (i))
13599       $ac_main_return(2);
13600   $ac_main_return (0);
13601 }
13602 _ACEOF
13603 rm -f conftest$ac_exeext
13604 if { (eval echo "$as_me:13604: \"$ac_link\"") >&5
13605   (eval $ac_link) 2>&5
13606   ac_status=$?
13607   echo "$as_me:13607: \$? = $ac_status" >&5
13608   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13609   { (eval echo "$as_me:13609: \"$ac_try\"") >&5
13610   (eval $ac_try) 2>&5
13611   ac_status=$?
13612   echo "$as_me:13612: \$? = $ac_status" >&5
13613   (exit $ac_status); }; }; then
13614   :
13615 else
13616   echo "$as_me: program exited with status $ac_status" >&5
13617 echo "$as_me: failed program was:" >&5
13618 cat conftest.$ac_ext >&5
13619 ac_cv_header_stdc=no
13620 fi
13621 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13622 fi
13623 fi
13624 fi
13625 echo "$as_me:13625: result: $ac_cv_header_stdc" >&5
13626 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13627 if test $ac_cv_header_stdc = yes; then
13628
13629 cat >>confdefs.h <<\EOF
13630 #define STDC_HEADERS 1
13631 EOF
13632
13633 fi
13634
13635 ac_header_dirent=no
13636 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13637   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13638 echo "$as_me:13638: checking for $ac_hdr that defines DIR" >&5
13639 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13640 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13641   echo $ECHO_N "(cached) $ECHO_C" >&6
13642 else
13643   cat >conftest.$ac_ext <<_ACEOF
13644 #line 13644 "configure"
13645 #include "confdefs.h"
13646 #include <sys/types.h>
13647 #include <$ac_hdr>
13648
13649 int
13650 main ()
13651 {
13652 if ((DIR *) 0)
13653 return 0;
13654   ;
13655   return 0;
13656 }
13657 _ACEOF
13658 rm -f conftest.$ac_objext
13659 if { (eval echo "$as_me:13659: \"$ac_compile\"") >&5
13660   (eval $ac_compile) 2>&5
13661   ac_status=$?
13662   echo "$as_me:13662: \$? = $ac_status" >&5
13663   (exit $ac_status); } &&
13664          { ac_try='test -s conftest.$ac_objext'
13665   { (eval echo "$as_me:13665: \"$ac_try\"") >&5
13666   (eval $ac_try) 2>&5
13667   ac_status=$?
13668   echo "$as_me:13668: \$? = $ac_status" >&5
13669   (exit $ac_status); }; }; then
13670   eval "$as_ac_Header=yes"
13671 else
13672   echo "$as_me: failed program was:" >&5
13673 cat conftest.$ac_ext >&5
13674 eval "$as_ac_Header=no"
13675 fi
13676 rm -f conftest.$ac_objext conftest.$ac_ext
13677 fi
13678 echo "$as_me:13678: result: `eval echo '${'$as_ac_Header'}'`" >&5
13679 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13680 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13681   cat >>confdefs.h <<EOF
13682 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13683 EOF
13684
13685 ac_header_dirent=$ac_hdr; break
13686 fi
13687
13688 done
13689 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13690 if test $ac_header_dirent = dirent.h; then
13691   echo "$as_me:13691: checking for opendir in -ldir" >&5
13692 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13693 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13694   echo $ECHO_N "(cached) $ECHO_C" >&6
13695 else
13696   ac_check_lib_save_LIBS=$LIBS
13697 LIBS="-ldir  $LIBS"
13698 cat >conftest.$ac_ext <<_ACEOF
13699 #line 13699 "configure"
13700 #include "confdefs.h"
13701
13702 /* Override any gcc2 internal prototype to avoid an error.  */
13703 #ifdef __cplusplus
13704 extern "C"
13705 #endif
13706 /* We use char because int might match the return type of a gcc2
13707    builtin and then its argument prototype would still apply.  */
13708 char opendir ();
13709 int
13710 main ()
13711 {
13712 opendir ();
13713   ;
13714   return 0;
13715 }
13716 _ACEOF
13717 rm -f conftest.$ac_objext conftest$ac_exeext
13718 if { (eval echo "$as_me:13718: \"$ac_link\"") >&5
13719   (eval $ac_link) 2>&5
13720   ac_status=$?
13721   echo "$as_me:13721: \$? = $ac_status" >&5
13722   (exit $ac_status); } &&
13723          { ac_try='test -s conftest$ac_exeext'
13724   { (eval echo "$as_me:13724: \"$ac_try\"") >&5
13725   (eval $ac_try) 2>&5
13726   ac_status=$?
13727   echo "$as_me:13727: \$? = $ac_status" >&5
13728   (exit $ac_status); }; }; then
13729   ac_cv_lib_dir_opendir=yes
13730 else
13731   echo "$as_me: failed program was:" >&5
13732 cat conftest.$ac_ext >&5
13733 ac_cv_lib_dir_opendir=no
13734 fi
13735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13736 LIBS=$ac_check_lib_save_LIBS
13737 fi
13738 echo "$as_me:13738: result: $ac_cv_lib_dir_opendir" >&5
13739 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13740 if test $ac_cv_lib_dir_opendir = yes; then
13741   LIBS="$LIBS -ldir"
13742 fi
13743
13744 else
13745   echo "$as_me:13745: checking for opendir in -lx" >&5
13746 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13747 if test "${ac_cv_lib_x_opendir+set}" = set; then
13748   echo $ECHO_N "(cached) $ECHO_C" >&6
13749 else
13750   ac_check_lib_save_LIBS=$LIBS
13751 LIBS="-lx  $LIBS"
13752 cat >conftest.$ac_ext <<_ACEOF
13753 #line 13753 "configure"
13754 #include "confdefs.h"
13755
13756 /* Override any gcc2 internal prototype to avoid an error.  */
13757 #ifdef __cplusplus
13758 extern "C"
13759 #endif
13760 /* We use char because int might match the return type of a gcc2
13761    builtin and then its argument prototype would still apply.  */
13762 char opendir ();
13763 int
13764 main ()
13765 {
13766 opendir ();
13767   ;
13768   return 0;
13769 }
13770 _ACEOF
13771 rm -f conftest.$ac_objext conftest$ac_exeext
13772 if { (eval echo "$as_me:13772: \"$ac_link\"") >&5
13773   (eval $ac_link) 2>&5
13774   ac_status=$?
13775   echo "$as_me:13775: \$? = $ac_status" >&5
13776   (exit $ac_status); } &&
13777          { ac_try='test -s conftest$ac_exeext'
13778   { (eval echo "$as_me:13778: \"$ac_try\"") >&5
13779   (eval $ac_try) 2>&5
13780   ac_status=$?
13781   echo "$as_me:13781: \$? = $ac_status" >&5
13782   (exit $ac_status); }; }; then
13783   ac_cv_lib_x_opendir=yes
13784 else
13785   echo "$as_me: failed program was:" >&5
13786 cat conftest.$ac_ext >&5
13787 ac_cv_lib_x_opendir=no
13788 fi
13789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13790 LIBS=$ac_check_lib_save_LIBS
13791 fi
13792 echo "$as_me:13792: result: $ac_cv_lib_x_opendir" >&5
13793 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13794 if test $ac_cv_lib_x_opendir = yes; then
13795   LIBS="$LIBS -lx"
13796 fi
13797
13798 fi
13799
13800 echo "$as_me:13800: checking whether time.h and sys/time.h may both be included" >&5
13801 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13802 if test "${ac_cv_header_time+set}" = set; then
13803   echo $ECHO_N "(cached) $ECHO_C" >&6
13804 else
13805   cat >conftest.$ac_ext <<_ACEOF
13806 #line 13806 "configure"
13807 #include "confdefs.h"
13808 #include <sys/types.h>
13809 #include <sys/time.h>
13810 #include <time.h>
13811
13812 int
13813 main ()
13814 {
13815 if ((struct tm *) 0)
13816 return 0;
13817   ;
13818   return 0;
13819 }
13820 _ACEOF
13821 rm -f conftest.$ac_objext
13822 if { (eval echo "$as_me:13822: \"$ac_compile\"") >&5
13823   (eval $ac_compile) 2>&5
13824   ac_status=$?
13825   echo "$as_me:13825: \$? = $ac_status" >&5
13826   (exit $ac_status); } &&
13827          { ac_try='test -s conftest.$ac_objext'
13828   { (eval echo "$as_me:13828: \"$ac_try\"") >&5
13829   (eval $ac_try) 2>&5
13830   ac_status=$?
13831   echo "$as_me:13831: \$? = $ac_status" >&5
13832   (exit $ac_status); }; }; then
13833   ac_cv_header_time=yes
13834 else
13835   echo "$as_me: failed program was:" >&5
13836 cat conftest.$ac_ext >&5
13837 ac_cv_header_time=no
13838 fi
13839 rm -f conftest.$ac_objext conftest.$ac_ext
13840 fi
13841 echo "$as_me:13841: result: $ac_cv_header_time" >&5
13842 echo "${ECHO_T}$ac_cv_header_time" >&6
13843 if test $ac_cv_header_time = yes; then
13844
13845 cat >>confdefs.h <<\EOF
13846 #define TIME_WITH_SYS_TIME 1
13847 EOF
13848
13849 fi
13850
13851 cf_regex_func=no
13852
13853 cf_regex_libs="regex re"
13854 case $host_os in #(vi
13855 mingw*)
13856         cf_regex_libs="gnurx $cf_regex_libs"
13857         ;;
13858 esac
13859
13860 echo "$as_me:13860: checking for regcomp" >&5
13861 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13862 if test "${ac_cv_func_regcomp+set}" = set; then
13863   echo $ECHO_N "(cached) $ECHO_C" >&6
13864 else
13865   cat >conftest.$ac_ext <<_ACEOF
13866 #line 13866 "configure"
13867 #include "confdefs.h"
13868 /* System header to define __stub macros and hopefully few prototypes,
13869     which can conflict with char regcomp (); below.  */
13870 #include <assert.h>
13871 /* Override any gcc2 internal prototype to avoid an error.  */
13872 #ifdef __cplusplus
13873 extern "C"
13874 #endif
13875 /* We use char because int might match the return type of a gcc2
13876    builtin and then its argument prototype would still apply.  */
13877 char regcomp ();
13878 char (*f) ();
13879
13880 int
13881 main ()
13882 {
13883 /* The GNU C library defines this for functions which it implements
13884     to always fail with ENOSYS.  Some functions are actually named
13885     something starting with __ and the normal name is an alias.  */
13886 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13887 choke me
13888 #else
13889 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13890 #endif
13891
13892   ;
13893   return 0;
13894 }
13895 _ACEOF
13896 rm -f conftest.$ac_objext conftest$ac_exeext
13897 if { (eval echo "$as_me:13897: \"$ac_link\"") >&5
13898   (eval $ac_link) 2>&5
13899   ac_status=$?
13900   echo "$as_me:13900: \$? = $ac_status" >&5
13901   (exit $ac_status); } &&
13902          { ac_try='test -s conftest$ac_exeext'
13903   { (eval echo "$as_me:13903: \"$ac_try\"") >&5
13904   (eval $ac_try) 2>&5
13905   ac_status=$?
13906   echo "$as_me:13906: \$? = $ac_status" >&5
13907   (exit $ac_status); }; }; then
13908   ac_cv_func_regcomp=yes
13909 else
13910   echo "$as_me: failed program was:" >&5
13911 cat conftest.$ac_ext >&5
13912 ac_cv_func_regcomp=no
13913 fi
13914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13915 fi
13916 echo "$as_me:13916: result: $ac_cv_func_regcomp" >&5
13917 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13918 if test $ac_cv_func_regcomp = yes; then
13919   cf_regex_func=regcomp
13920 else
13921
13922         for cf_regex_lib in $cf_regex_libs
13923         do
13924                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13925 echo "$as_me:13925: checking for regcomp in -l$cf_regex_lib" >&5
13926 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13927 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13928   echo $ECHO_N "(cached) $ECHO_C" >&6
13929 else
13930   ac_check_lib_save_LIBS=$LIBS
13931 LIBS="-l$cf_regex_lib  $LIBS"
13932 cat >conftest.$ac_ext <<_ACEOF
13933 #line 13933 "configure"
13934 #include "confdefs.h"
13935
13936 /* Override any gcc2 internal prototype to avoid an error.  */
13937 #ifdef __cplusplus
13938 extern "C"
13939 #endif
13940 /* We use char because int might match the return type of a gcc2
13941    builtin and then its argument prototype would still apply.  */
13942 char regcomp ();
13943 int
13944 main ()
13945 {
13946 regcomp ();
13947   ;
13948   return 0;
13949 }
13950 _ACEOF
13951 rm -f conftest.$ac_objext conftest$ac_exeext
13952 if { (eval echo "$as_me:13952: \"$ac_link\"") >&5
13953   (eval $ac_link) 2>&5
13954   ac_status=$?
13955   echo "$as_me:13955: \$? = $ac_status" >&5
13956   (exit $ac_status); } &&
13957          { ac_try='test -s conftest$ac_exeext'
13958   { (eval echo "$as_me:13958: \"$ac_try\"") >&5
13959   (eval $ac_try) 2>&5
13960   ac_status=$?
13961   echo "$as_me:13961: \$? = $ac_status" >&5
13962   (exit $ac_status); }; }; then
13963   eval "$as_ac_Lib=yes"
13964 else
13965   echo "$as_me: failed program was:" >&5
13966 cat conftest.$ac_ext >&5
13967 eval "$as_ac_Lib=no"
13968 fi
13969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13970 LIBS=$ac_check_lib_save_LIBS
13971 fi
13972 echo "$as_me:13972: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13973 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13974 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13975
13976                                 LIBS="-l$cf_regex_lib $LIBS"
13977                                 cf_regex_func=regcomp
13978                                 break
13979 fi
13980
13981         done
13982
13983 fi
13984
13985 if test "$cf_regex_func" = no ; then
13986         echo "$as_me:13986: checking for compile" >&5
13987 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13988 if test "${ac_cv_func_compile+set}" = set; then
13989   echo $ECHO_N "(cached) $ECHO_C" >&6
13990 else
13991   cat >conftest.$ac_ext <<_ACEOF
13992 #line 13992 "configure"
13993 #include "confdefs.h"
13994 /* System header to define __stub macros and hopefully few prototypes,
13995     which can conflict with char compile (); below.  */
13996 #include <assert.h>
13997 /* Override any gcc2 internal prototype to avoid an error.  */
13998 #ifdef __cplusplus
13999 extern "C"
14000 #endif
14001 /* We use char because int might match the return type of a gcc2
14002    builtin and then its argument prototype would still apply.  */
14003 char compile ();
14004 char (*f) ();
14005
14006 int
14007 main ()
14008 {
14009 /* The GNU C library defines this for functions which it implements
14010     to always fail with ENOSYS.  Some functions are actually named
14011     something starting with __ and the normal name is an alias.  */
14012 #if defined (__stub_compile) || defined (__stub___compile)
14013 choke me
14014 #else
14015 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14016 #endif
14017
14018   ;
14019   return 0;
14020 }
14021 _ACEOF
14022 rm -f conftest.$ac_objext conftest$ac_exeext
14023 if { (eval echo "$as_me:14023: \"$ac_link\"") >&5
14024   (eval $ac_link) 2>&5
14025   ac_status=$?
14026   echo "$as_me:14026: \$? = $ac_status" >&5
14027   (exit $ac_status); } &&
14028          { ac_try='test -s conftest$ac_exeext'
14029   { (eval echo "$as_me:14029: \"$ac_try\"") >&5
14030   (eval $ac_try) 2>&5
14031   ac_status=$?
14032   echo "$as_me:14032: \$? = $ac_status" >&5
14033   (exit $ac_status); }; }; then
14034   ac_cv_func_compile=yes
14035 else
14036   echo "$as_me: failed program was:" >&5
14037 cat conftest.$ac_ext >&5
14038 ac_cv_func_compile=no
14039 fi
14040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14041 fi
14042 echo "$as_me:14042: result: $ac_cv_func_compile" >&5
14043 echo "${ECHO_T}$ac_cv_func_compile" >&6
14044 if test $ac_cv_func_compile = yes; then
14045   cf_regex_func=compile
14046 else
14047
14048                 echo "$as_me:14048: checking for compile in -lgen" >&5
14049 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14050 if test "${ac_cv_lib_gen_compile+set}" = set; then
14051   echo $ECHO_N "(cached) $ECHO_C" >&6
14052 else
14053   ac_check_lib_save_LIBS=$LIBS
14054 LIBS="-lgen  $LIBS"
14055 cat >conftest.$ac_ext <<_ACEOF
14056 #line 14056 "configure"
14057 #include "confdefs.h"
14058
14059 /* Override any gcc2 internal prototype to avoid an error.  */
14060 #ifdef __cplusplus
14061 extern "C"
14062 #endif
14063 /* We use char because int might match the return type of a gcc2
14064    builtin and then its argument prototype would still apply.  */
14065 char compile ();
14066 int
14067 main ()
14068 {
14069 compile ();
14070   ;
14071   return 0;
14072 }
14073 _ACEOF
14074 rm -f conftest.$ac_objext conftest$ac_exeext
14075 if { (eval echo "$as_me:14075: \"$ac_link\"") >&5
14076   (eval $ac_link) 2>&5
14077   ac_status=$?
14078   echo "$as_me:14078: \$? = $ac_status" >&5
14079   (exit $ac_status); } &&
14080          { ac_try='test -s conftest$ac_exeext'
14081   { (eval echo "$as_me:14081: \"$ac_try\"") >&5
14082   (eval $ac_try) 2>&5
14083   ac_status=$?
14084   echo "$as_me:14084: \$? = $ac_status" >&5
14085   (exit $ac_status); }; }; then
14086   ac_cv_lib_gen_compile=yes
14087 else
14088   echo "$as_me: failed program was:" >&5
14089 cat conftest.$ac_ext >&5
14090 ac_cv_lib_gen_compile=no
14091 fi
14092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14093 LIBS=$ac_check_lib_save_LIBS
14094 fi
14095 echo "$as_me:14095: result: $ac_cv_lib_gen_compile" >&5
14096 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14097 if test $ac_cv_lib_gen_compile = yes; then
14098
14099                                 LIBS="-lgen $LIBS"
14100                                 cf_regex_func=compile
14101 fi
14102
14103 fi
14104
14105 fi
14106
14107 if test "$cf_regex_func" = no ; then
14108         { echo "$as_me:14108: WARNING: cannot find regular expression library" >&5
14109 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14110 fi
14111
14112 echo "$as_me:14112: checking for regular-expression headers" >&5
14113 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14114 if test "${cf_cv_regex_hdrs+set}" = set; then
14115   echo $ECHO_N "(cached) $ECHO_C" >&6
14116 else
14117
14118 cf_cv_regex_hdrs=no
14119 case $cf_regex_func in #(vi
14120 compile) #(vi
14121         for cf_regex_hdr in regexp.h regexpr.h
14122         do
14123                 cat >conftest.$ac_ext <<_ACEOF
14124 #line 14124 "configure"
14125 #include "confdefs.h"
14126 #include <$cf_regex_hdr>
14127 int
14128 main ()
14129 {
14130
14131                         char *p = compile("", "", "", 0);
14132                         int x = step("", "");
14133
14134   ;
14135   return 0;
14136 }
14137 _ACEOF
14138 rm -f conftest.$ac_objext conftest$ac_exeext
14139 if { (eval echo "$as_me:14139: \"$ac_link\"") >&5
14140   (eval $ac_link) 2>&5
14141   ac_status=$?
14142   echo "$as_me:14142: \$? = $ac_status" >&5
14143   (exit $ac_status); } &&
14144          { ac_try='test -s conftest$ac_exeext'
14145   { (eval echo "$as_me:14145: \"$ac_try\"") >&5
14146   (eval $ac_try) 2>&5
14147   ac_status=$?
14148   echo "$as_me:14148: \$? = $ac_status" >&5
14149   (exit $ac_status); }; }; then
14150
14151                         cf_cv_regex_hdrs=$cf_regex_hdr
14152                         break
14153
14154 else
14155   echo "$as_me: failed program was:" >&5
14156 cat conftest.$ac_ext >&5
14157 fi
14158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14159         done
14160         ;;
14161 *)
14162         for cf_regex_hdr in regex.h
14163         do
14164                 cat >conftest.$ac_ext <<_ACEOF
14165 #line 14165 "configure"
14166 #include "confdefs.h"
14167 #include <sys/types.h>
14168 #include <$cf_regex_hdr>
14169 int
14170 main ()
14171 {
14172
14173                         regex_t *p;
14174                         int x = regcomp(p, "", 0);
14175                         int y = regexec(p, "", 0, 0, 0);
14176                         regfree(p);
14177
14178   ;
14179   return 0;
14180 }
14181 _ACEOF
14182 rm -f conftest.$ac_objext conftest$ac_exeext
14183 if { (eval echo "$as_me:14183: \"$ac_link\"") >&5
14184   (eval $ac_link) 2>&5
14185   ac_status=$?
14186   echo "$as_me:14186: \$? = $ac_status" >&5
14187   (exit $ac_status); } &&
14188          { ac_try='test -s conftest$ac_exeext'
14189   { (eval echo "$as_me:14189: \"$ac_try\"") >&5
14190   (eval $ac_try) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit $ac_status); }; }; then
14194
14195                         cf_cv_regex_hdrs=$cf_regex_hdr
14196                         break
14197
14198 else
14199   echo "$as_me: failed program was:" >&5
14200 cat conftest.$ac_ext >&5
14201 fi
14202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14203         done
14204         ;;
14205 esac
14206
14207 fi
14208 echo "$as_me:14208: result: $cf_cv_regex_hdrs" >&5
14209 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14210
14211 case $cf_cv_regex_hdrs in #(vi
14212     no)        { echo "$as_me:14212: WARNING: no regular expression header found" >&5
14213 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14214     regex.h)
14215 cat >>confdefs.h <<\EOF
14216 #define HAVE_REGEX_H_FUNCS 1
14217 EOF
14218  ;; #(vi
14219     regexp.h)
14220 cat >>confdefs.h <<\EOF
14221 #define HAVE_REGEXP_H_FUNCS 1
14222 EOF
14223  ;; #(vi
14224     regexpr.h)
14225 cat >>confdefs.h <<\EOF
14226 #define HAVE_REGEXPR_H_FUNCS 1
14227 EOF
14228  ;;
14229 esac
14230
14231 for ac_header in \
14232 fcntl.h \
14233 getopt.h \
14234 limits.h \
14235 locale.h \
14236 math.h \
14237 poll.h \
14238 sys/bsdtypes.h \
14239 sys/ioctl.h \
14240 sys/param.h \
14241 sys/poll.h \
14242 sys/select.h \
14243 sys/time.h \
14244 sys/times.h \
14245 ttyent.h \
14246 unistd.h \
14247 wctype.h \
14248
14249 do
14250 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14251 echo "$as_me:14251: checking for $ac_header" >&5
14252 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14253 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14254   echo $ECHO_N "(cached) $ECHO_C" >&6
14255 else
14256   cat >conftest.$ac_ext <<_ACEOF
14257 #line 14257 "configure"
14258 #include "confdefs.h"
14259 #include <$ac_header>
14260 _ACEOF
14261 if { (eval echo "$as_me:14261: \"$ac_cpp conftest.$ac_ext\"") >&5
14262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14263   ac_status=$?
14264   egrep -v '^ *\+' conftest.er1 >conftest.err
14265   rm -f conftest.er1
14266   cat conftest.err >&5
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit $ac_status); } >/dev/null; then
14269   if test -s conftest.err; then
14270     ac_cpp_err=$ac_c_preproc_warn_flag
14271   else
14272     ac_cpp_err=
14273   fi
14274 else
14275   ac_cpp_err=yes
14276 fi
14277 if test -z "$ac_cpp_err"; then
14278   eval "$as_ac_Header=yes"
14279 else
14280   echo "$as_me: failed program was:" >&5
14281   cat conftest.$ac_ext >&5
14282   eval "$as_ac_Header=no"
14283 fi
14284 rm -f conftest.err conftest.$ac_ext
14285 fi
14286 echo "$as_me:14286: result: `eval echo '${'$as_ac_Header'}'`" >&5
14287 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14288 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14289   cat >>confdefs.h <<EOF
14290 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14291 EOF
14292
14293 fi
14294 done
14295
14296 for ac_header in unistd.h getopt.h
14297 do
14298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14299 echo "$as_me:14299: checking for $ac_header" >&5
14300 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14301 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304   cat >conftest.$ac_ext <<_ACEOF
14305 #line 14305 "configure"
14306 #include "confdefs.h"
14307 #include <$ac_header>
14308 _ACEOF
14309 if { (eval echo "$as_me:14309: \"$ac_cpp conftest.$ac_ext\"") >&5
14310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14311   ac_status=$?
14312   egrep -v '^ *\+' conftest.er1 >conftest.err
14313   rm -f conftest.er1
14314   cat conftest.err >&5
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); } >/dev/null; then
14317   if test -s conftest.err; then
14318     ac_cpp_err=$ac_c_preproc_warn_flag
14319   else
14320     ac_cpp_err=
14321   fi
14322 else
14323   ac_cpp_err=yes
14324 fi
14325 if test -z "$ac_cpp_err"; then
14326   eval "$as_ac_Header=yes"
14327 else
14328   echo "$as_me: failed program was:" >&5
14329   cat conftest.$ac_ext >&5
14330   eval "$as_ac_Header=no"
14331 fi
14332 rm -f conftest.err conftest.$ac_ext
14333 fi
14334 echo "$as_me:14334: result: `eval echo '${'$as_ac_Header'}'`" >&5
14335 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14336 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14337   cat >>confdefs.h <<EOF
14338 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14339 EOF
14340
14341 fi
14342 done
14343
14344 echo "$as_me:14344: checking for header declaring getopt variables" >&5
14345 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14346 if test "${cf_cv_getopt_header+set}" = set; then
14347   echo $ECHO_N "(cached) $ECHO_C" >&6
14348 else
14349
14350 cf_cv_getopt_header=none
14351 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14352 do
14353 cat >conftest.$ac_ext <<_ACEOF
14354 #line 14354 "configure"
14355 #include "confdefs.h"
14356
14357 #include <$cf_header>
14358 int
14359 main ()
14360 {
14361 int x = optind; char *y = optarg
14362   ;
14363   return 0;
14364 }
14365 _ACEOF
14366 rm -f conftest.$ac_objext
14367 if { (eval echo "$as_me:14367: \"$ac_compile\"") >&5
14368   (eval $ac_compile) 2>&5
14369   ac_status=$?
14370   echo "$as_me:14370: \$? = $ac_status" >&5
14371   (exit $ac_status); } &&
14372          { ac_try='test -s conftest.$ac_objext'
14373   { (eval echo "$as_me:14373: \"$ac_try\"") >&5
14374   (eval $ac_try) 2>&5
14375   ac_status=$?
14376   echo "$as_me:14376: \$? = $ac_status" >&5
14377   (exit $ac_status); }; }; then
14378   cf_cv_getopt_header=$cf_header
14379  break
14380 else
14381   echo "$as_me: failed program was:" >&5
14382 cat conftest.$ac_ext >&5
14383 fi
14384 rm -f conftest.$ac_objext conftest.$ac_ext
14385 done
14386
14387 fi
14388 echo "$as_me:14388: result: $cf_cv_getopt_header" >&5
14389 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14390 if test $cf_cv_getopt_header != none ; then
14391
14392 cat >>confdefs.h <<\EOF
14393 #define HAVE_GETOPT_HEADER 1
14394 EOF
14395
14396 fi
14397
14398 # check for ISC (this may also define _POSIX_SOURCE)
14399 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14400 if test "x$ISC" = xyes ; then
14401
14402 echo "$as_me:14402: checking for main in -lcposix" >&5
14403 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14404 if test "${ac_cv_lib_cposix_main+set}" = set; then
14405   echo $ECHO_N "(cached) $ECHO_C" >&6
14406 else
14407   ac_check_lib_save_LIBS=$LIBS
14408 LIBS="-lcposix  $LIBS"
14409 cat >conftest.$ac_ext <<_ACEOF
14410 #line 14410 "configure"
14411 #include "confdefs.h"
14412
14413 int
14414 main ()
14415 {
14416 main ();
14417   ;
14418   return 0;
14419 }
14420 _ACEOF
14421 rm -f conftest.$ac_objext conftest$ac_exeext
14422 if { (eval echo "$as_me:14422: \"$ac_link\"") >&5
14423   (eval $ac_link) 2>&5
14424   ac_status=$?
14425   echo "$as_me:14425: \$? = $ac_status" >&5
14426   (exit $ac_status); } &&
14427          { ac_try='test -s conftest$ac_exeext'
14428   { (eval echo "$as_me:14428: \"$ac_try\"") >&5
14429   (eval $ac_try) 2>&5
14430   ac_status=$?
14431   echo "$as_me:14431: \$? = $ac_status" >&5
14432   (exit $ac_status); }; }; then
14433   ac_cv_lib_cposix_main=yes
14434 else
14435   echo "$as_me: failed program was:" >&5
14436 cat conftest.$ac_ext >&5
14437 ac_cv_lib_cposix_main=no
14438 fi
14439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14440 LIBS=$ac_check_lib_save_LIBS
14441 fi
14442 echo "$as_me:14442: result: $ac_cv_lib_cposix_main" >&5
14443 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14444 if test $ac_cv_lib_cposix_main = yes; then
14445   cat >>confdefs.h <<EOF
14446 #define HAVE_LIBCPOSIX 1
14447 EOF
14448
14449   LIBS="-lcposix $LIBS"
14450
14451 fi
14452
14453         echo "$as_me:14453: checking for bzero in -linet" >&5
14454 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14455 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14456   echo $ECHO_N "(cached) $ECHO_C" >&6
14457 else
14458   ac_check_lib_save_LIBS=$LIBS
14459 LIBS="-linet  $LIBS"
14460 cat >conftest.$ac_ext <<_ACEOF
14461 #line 14461 "configure"
14462 #include "confdefs.h"
14463
14464 /* Override any gcc2 internal prototype to avoid an error.  */
14465 #ifdef __cplusplus
14466 extern "C"
14467 #endif
14468 /* We use char because int might match the return type of a gcc2
14469    builtin and then its argument prototype would still apply.  */
14470 char bzero ();
14471 int
14472 main ()
14473 {
14474 bzero ();
14475   ;
14476   return 0;
14477 }
14478 _ACEOF
14479 rm -f conftest.$ac_objext conftest$ac_exeext
14480 if { (eval echo "$as_me:14480: \"$ac_link\"") >&5
14481   (eval $ac_link) 2>&5
14482   ac_status=$?
14483   echo "$as_me:14483: \$? = $ac_status" >&5
14484   (exit $ac_status); } &&
14485          { ac_try='test -s conftest$ac_exeext'
14486   { (eval echo "$as_me:14486: \"$ac_try\"") >&5
14487   (eval $ac_try) 2>&5
14488   ac_status=$?
14489   echo "$as_me:14489: \$? = $ac_status" >&5
14490   (exit $ac_status); }; }; then
14491   ac_cv_lib_inet_bzero=yes
14492 else
14493   echo "$as_me: failed program was:" >&5
14494 cat conftest.$ac_ext >&5
14495 ac_cv_lib_inet_bzero=no
14496 fi
14497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14498 LIBS=$ac_check_lib_save_LIBS
14499 fi
14500 echo "$as_me:14500: result: $ac_cv_lib_inet_bzero" >&5
14501 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14502 if test $ac_cv_lib_inet_bzero = yes; then
14503   LIBS="-linet $LIBS"
14504 fi
14505 fi
14506
14507 echo "$as_me:14507: checking if sys/time.h works with sys/select.h" >&5
14508 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14509 if test "${cf_cv_sys_time_select+set}" = set; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512
14513 cat >conftest.$ac_ext <<_ACEOF
14514 #line 14514 "configure"
14515 #include "confdefs.h"
14516
14517 #include <sys/types.h>
14518 #ifdef HAVE_SYS_TIME_H
14519 #include <sys/time.h>
14520 #endif
14521 #ifdef HAVE_SYS_SELECT_H
14522 #include <sys/select.h>
14523 #endif
14524
14525 int
14526 main ()
14527 {
14528
14529   ;
14530   return 0;
14531 }
14532 _ACEOF
14533 rm -f conftest.$ac_objext
14534 if { (eval echo "$as_me:14534: \"$ac_compile\"") >&5
14535   (eval $ac_compile) 2>&5
14536   ac_status=$?
14537   echo "$as_me:14537: \$? = $ac_status" >&5
14538   (exit $ac_status); } &&
14539          { ac_try='test -s conftest.$ac_objext'
14540   { (eval echo "$as_me:14540: \"$ac_try\"") >&5
14541   (eval $ac_try) 2>&5
14542   ac_status=$?
14543   echo "$as_me:14543: \$? = $ac_status" >&5
14544   (exit $ac_status); }; }; then
14545   cf_cv_sys_time_select=yes
14546 else
14547   echo "$as_me: failed program was:" >&5
14548 cat conftest.$ac_ext >&5
14549 cf_cv_sys_time_select=no
14550 fi
14551 rm -f conftest.$ac_objext conftest.$ac_ext
14552
14553 fi
14554
14555 echo "$as_me:14555: result: $cf_cv_sys_time_select" >&5
14556 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14557 test "$cf_cv_sys_time_select" = yes &&
14558 cat >>confdefs.h <<\EOF
14559 #define HAVE_SYS_TIME_SELECT 1
14560 EOF
14561
14562 ###     checks for compiler characteristics
14563 ac_ext=c
14564 ac_cpp='$CPP $CPPFLAGS'
14565 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14566 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14567 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14568 ac_main_return=return
14569
14570 echo "$as_me:14570: checking for an ANSI C-conforming const" >&5
14571 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14572 if test "${ac_cv_c_const+set}" = set; then
14573   echo $ECHO_N "(cached) $ECHO_C" >&6
14574 else
14575   cat >conftest.$ac_ext <<_ACEOF
14576 #line 14576 "configure"
14577 #include "confdefs.h"
14578
14579 int
14580 main ()
14581 {
14582 /* FIXME: Include the comments suggested by Paul. */
14583 #ifndef __cplusplus
14584   /* Ultrix mips cc rejects this.  */
14585   typedef int charset[2];
14586   const charset x;
14587   /* SunOS 4.1.1 cc rejects this.  */
14588   char const *const *ccp;
14589   char **p;
14590   /* NEC SVR4.0.2 mips cc rejects this.  */
14591   struct point {int x, y;};
14592   static struct point const zero = {0,0};
14593   /* AIX XL C 1.02.0.0 rejects this.
14594      It does not let you subtract one const X* pointer from another in
14595      an arm of an if-expression whose if-part is not a constant
14596      expression */
14597   const char *g = "string";
14598   ccp = &g + (g ? g-g : 0);
14599   /* HPUX 7.0 cc rejects these. */
14600   ++ccp;
14601   p = (char**) ccp;
14602   ccp = (char const *const *) p;
14603   { /* SCO 3.2v4 cc rejects this.  */
14604     char *t;
14605     char const *s = 0 ? (char *) 0 : (char const *) 0;
14606
14607     *t++ = 0;
14608   }
14609   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14610     int x[] = {25, 17};
14611     const int *foo = &x[0];
14612     ++foo;
14613   }
14614   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14615     typedef const int *iptr;
14616     iptr p = 0;
14617     ++p;
14618   }
14619   { /* AIX XL C 1.02.0.0 rejects this saying
14620        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14621     struct s { int j; const int *ap[3]; };
14622     struct s *b; b->j = 5;
14623   }
14624   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14625     const int foo = 10;
14626   }
14627 #endif
14628
14629   ;
14630   return 0;
14631 }
14632 _ACEOF
14633 rm -f conftest.$ac_objext
14634 if { (eval echo "$as_me:14634: \"$ac_compile\"") >&5
14635   (eval $ac_compile) 2>&5
14636   ac_status=$?
14637   echo "$as_me:14637: \$? = $ac_status" >&5
14638   (exit $ac_status); } &&
14639          { ac_try='test -s conftest.$ac_objext'
14640   { (eval echo "$as_me:14640: \"$ac_try\"") >&5
14641   (eval $ac_try) 2>&5
14642   ac_status=$?
14643   echo "$as_me:14643: \$? = $ac_status" >&5
14644   (exit $ac_status); }; }; then
14645   ac_cv_c_const=yes
14646 else
14647   echo "$as_me: failed program was:" >&5
14648 cat conftest.$ac_ext >&5
14649 ac_cv_c_const=no
14650 fi
14651 rm -f conftest.$ac_objext conftest.$ac_ext
14652 fi
14653 echo "$as_me:14653: result: $ac_cv_c_const" >&5
14654 echo "${ECHO_T}$ac_cv_c_const" >&6
14655 if test $ac_cv_c_const = no; then
14656
14657 cat >>confdefs.h <<\EOF
14658 #define const
14659 EOF
14660
14661 fi
14662
14663 echo "$as_me:14663: checking for inline" >&5
14664 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14665 if test "${ac_cv_c_inline+set}" = set; then
14666   echo $ECHO_N "(cached) $ECHO_C" >&6
14667 else
14668   ac_cv_c_inline=no
14669 for ac_kw in inline __inline__ __inline; do
14670   cat >conftest.$ac_ext <<_ACEOF
14671 #line 14671 "configure"
14672 #include "confdefs.h"
14673 #ifndef __cplusplus
14674 static $ac_kw int static_foo () {return 0; }
14675 $ac_kw int foo () {return 0; }
14676 #endif
14677
14678 _ACEOF
14679 rm -f conftest.$ac_objext
14680 if { (eval echo "$as_me:14680: \"$ac_compile\"") >&5
14681   (eval $ac_compile) 2>&5
14682   ac_status=$?
14683   echo "$as_me:14683: \$? = $ac_status" >&5
14684   (exit $ac_status); } &&
14685          { ac_try='test -s conftest.$ac_objext'
14686   { (eval echo "$as_me:14686: \"$ac_try\"") >&5
14687   (eval $ac_try) 2>&5
14688   ac_status=$?
14689   echo "$as_me:14689: \$? = $ac_status" >&5
14690   (exit $ac_status); }; }; then
14691   ac_cv_c_inline=$ac_kw; break
14692 else
14693   echo "$as_me: failed program was:" >&5
14694 cat conftest.$ac_ext >&5
14695 fi
14696 rm -f conftest.$ac_objext conftest.$ac_ext
14697 done
14698
14699 fi
14700 echo "$as_me:14700: result: $ac_cv_c_inline" >&5
14701 echo "${ECHO_T}$ac_cv_c_inline" >&6
14702 case $ac_cv_c_inline in
14703   inline | yes) ;;
14704   no)
14705 cat >>confdefs.h <<\EOF
14706 #define inline
14707 EOF
14708  ;;
14709   *)  cat >>confdefs.h <<EOF
14710 #define inline $ac_cv_c_inline
14711 EOF
14712  ;;
14713 esac
14714
14715 NCURSES_INLINE=
14716 if test "$ac_cv_c_inline" != no ; then
14717   NCURSES_INLINE=inline
14718   if test "$INTEL_COMPILER" = yes
14719   then
14720     :
14721   elif test "$CLANG_COMPILER" = yes
14722   then
14723     :
14724   elif test "$GCC" = yes
14725   then
14726     echo "$as_me:14726: checking if $CC supports options to tune inlining" >&5
14727 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14728 if test "${cf_cv_gcc_inline+set}" = set; then
14729   echo $ECHO_N "(cached) $ECHO_C" >&6
14730 else
14731
14732       cf_save_CFLAGS=$CFLAGS
14733       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14734       cat >conftest.$ac_ext <<_ACEOF
14735 #line 14735 "configure"
14736 #include "confdefs.h"
14737 inline int foo(void) { return 1; }
14738 int
14739 main ()
14740 {
14741 ${cf_cv_main_return:-return} foo()
14742   ;
14743   return 0;
14744 }
14745 _ACEOF
14746 rm -f conftest.$ac_objext
14747 if { (eval echo "$as_me:14747: \"$ac_compile\"") >&5
14748   (eval $ac_compile) 2>&5
14749   ac_status=$?
14750   echo "$as_me:14750: \$? = $ac_status" >&5
14751   (exit $ac_status); } &&
14752          { ac_try='test -s conftest.$ac_objext'
14753   { (eval echo "$as_me:14753: \"$ac_try\"") >&5
14754   (eval $ac_try) 2>&5
14755   ac_status=$?
14756   echo "$as_me:14756: \$? = $ac_status" >&5
14757   (exit $ac_status); }; }; then
14758   cf_cv_gcc_inline=yes
14759 else
14760   echo "$as_me: failed program was:" >&5
14761 cat conftest.$ac_ext >&5
14762 cf_cv_gcc_inline=no
14763 fi
14764 rm -f conftest.$ac_objext conftest.$ac_ext
14765       CFLAGS=$cf_save_CFLAGS
14766
14767 fi
14768 echo "$as_me:14768: result: $cf_cv_gcc_inline" >&5
14769 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14770     if test "$cf_cv_gcc_inline" = yes ; then
14771
14772 cf_fix_cppflags=no
14773 cf_new_cflags=
14774 cf_new_cppflags=
14775 cf_new_extra_cppflags=
14776
14777 for cf_add_cflags in --param max-inline-insns-single=1200
14778 do
14779 case $cf_fix_cppflags in
14780 no)
14781         case $cf_add_cflags in #(vi
14782         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14783                 case $cf_add_cflags in
14784                 -D*)
14785                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14786
14787                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14788                                 && test -z "${cf_tst_cflags}" \
14789                                 && cf_fix_cppflags=yes
14790
14791                         if test $cf_fix_cppflags = yes ; then
14792                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14793                                 continue
14794                         elif test "${cf_tst_cflags}" = "\"'" ; then
14795                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14796                                 continue
14797                         fi
14798                         ;;
14799                 esac
14800                 case "$CPPFLAGS" in
14801                 *$cf_add_cflags) #(vi
14802                         ;;
14803                 *) #(vi
14804                         case $cf_add_cflags in #(vi
14805                         -D*)
14806                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14807
14808 CPPFLAGS=`echo "$CPPFLAGS" | \
14809         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14810                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14811
14812                                 ;;
14813                         esac
14814                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14815                         ;;
14816                 esac
14817                 ;;
14818         *)
14819                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14820                 ;;
14821         esac
14822         ;;
14823 yes)
14824         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14825
14826         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14827
14828         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14829                 && test -z "${cf_tst_cflags}" \
14830                 && cf_fix_cppflags=no
14831         ;;
14832 esac
14833 done
14834
14835 if test -n "$cf_new_cflags" ; then
14836
14837         CFLAGS="$CFLAGS $cf_new_cflags"
14838 fi
14839
14840 if test -n "$cf_new_cppflags" ; then
14841
14842         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14843 fi
14844
14845 if test -n "$cf_new_extra_cppflags" ; then
14846
14847         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14848 fi
14849
14850     fi
14851   fi
14852 fi
14853
14854 echo "$as_me:14854: checking for signal global datatype" >&5
14855 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14856 if test "${cf_cv_sig_atomic_t+set}" = set; then
14857   echo $ECHO_N "(cached) $ECHO_C" >&6
14858 else
14859
14860         for cf_type in \
14861                 "volatile sig_atomic_t" \
14862                 "sig_atomic_t" \
14863                 "int"
14864         do
14865         cat >conftest.$ac_ext <<_ACEOF
14866 #line 14866 "configure"
14867 #include "confdefs.h"
14868
14869 #include <sys/types.h>
14870 #include <signal.h>
14871 #include <stdio.h>
14872
14873 extern $cf_type x;
14874 $cf_type x;
14875 static void handler(int sig)
14876 {
14877         x = 5;
14878 }
14879 int
14880 main ()
14881 {
14882 signal(SIGINT, handler);
14883                  x = 1
14884   ;
14885   return 0;
14886 }
14887 _ACEOF
14888 rm -f conftest.$ac_objext
14889 if { (eval echo "$as_me:14889: \"$ac_compile\"") >&5
14890   (eval $ac_compile) 2>&5
14891   ac_status=$?
14892   echo "$as_me:14892: \$? = $ac_status" >&5
14893   (exit $ac_status); } &&
14894          { ac_try='test -s conftest.$ac_objext'
14895   { (eval echo "$as_me:14895: \"$ac_try\"") >&5
14896   (eval $ac_try) 2>&5
14897   ac_status=$?
14898   echo "$as_me:14898: \$? = $ac_status" >&5
14899   (exit $ac_status); }; }; then
14900   cf_cv_sig_atomic_t=$cf_type
14901 else
14902   echo "$as_me: failed program was:" >&5
14903 cat conftest.$ac_ext >&5
14904 cf_cv_sig_atomic_t=no
14905 fi
14906 rm -f conftest.$ac_objext conftest.$ac_ext
14907                 test "$cf_cv_sig_atomic_t" != no && break
14908         done
14909
14910 fi
14911
14912 echo "$as_me:14912: result: $cf_cv_sig_atomic_t" >&5
14913 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14914 test "$cf_cv_sig_atomic_t" != no &&
14915 cat >>confdefs.h <<EOF
14916 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14917 EOF
14918
14919 if test $NCURSES_CHTYPE = auto ; then
14920
14921 echo "$as_me:14921: checking for type of chtype" >&5
14922 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14923 if test "${cf_cv_typeof_chtype+set}" = set; then
14924   echo $ECHO_N "(cached) $ECHO_C" >&6
14925 else
14926
14927                 if test "$cross_compiling" = yes; then
14928   cf_cv_typeof_chtype=long
14929 else
14930   cat >conftest.$ac_ext <<_ACEOF
14931 #line 14931 "configure"
14932 #include "confdefs.h"
14933
14934 #define WANT_BITS 31
14935 #include <stdio.h>
14936 int main()
14937 {
14938         FILE *fp = fopen("cf_test.out", "w");
14939         if (fp != 0) {
14940                 char *result = "long";
14941                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14942                         int n;
14943                         unsigned int x, y;
14944                         for (n = 0; n < WANT_BITS; n++) {
14945                                 x = (1 << n);
14946                                 y = (x >> n);
14947                                 if (y != 1 || x == 0) {
14948                                         x = 0;
14949                                         break;
14950                                 }
14951                         }
14952                         /*
14953                          * If x is nonzero, an int is big enough for the bits
14954                          * that we want.
14955                          */
14956                         result = (x != 0) ? "int" : "long";
14957                 }
14958                 fputs(result, fp);
14959                 fclose(fp);
14960         }
14961         ${cf_cv_main_return:-return}(0);
14962 }
14963
14964 _ACEOF
14965 rm -f conftest$ac_exeext
14966 if { (eval echo "$as_me:14966: \"$ac_link\"") >&5
14967   (eval $ac_link) 2>&5
14968   ac_status=$?
14969   echo "$as_me:14969: \$? = $ac_status" >&5
14970   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14971   { (eval echo "$as_me:14971: \"$ac_try\"") >&5
14972   (eval $ac_try) 2>&5
14973   ac_status=$?
14974   echo "$as_me:14974: \$? = $ac_status" >&5
14975   (exit $ac_status); }; }; then
14976   cf_cv_typeof_chtype=`cat cf_test.out`
14977 else
14978   echo "$as_me: program exited with status $ac_status" >&5
14979 echo "$as_me: failed program was:" >&5
14980 cat conftest.$ac_ext >&5
14981 cf_cv_typeof_chtype=long
14982 fi
14983 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14984 fi
14985                 rm -f cf_test.out
14986
14987 fi
14988
14989 echo "$as_me:14989: result: $cf_cv_typeof_chtype" >&5
14990 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14991
14992 cat >>confdefs.h <<EOF
14993 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14994 EOF
14995
14996 else
14997         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14998 fi
14999 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15000
15001 echo "$as_me:15001: checking if unsigned literals are legal" >&5
15002 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15003 if test "${cf_cv_unsigned_literals+set}" = set; then
15004   echo $ECHO_N "(cached) $ECHO_C" >&6
15005 else
15006
15007         cat >conftest.$ac_ext <<_ACEOF
15008 #line 15008 "configure"
15009 #include "confdefs.h"
15010
15011 int
15012 main ()
15013 {
15014 long x = 1L + 1UL + 1U + 1
15015   ;
15016   return 0;
15017 }
15018 _ACEOF
15019 rm -f conftest.$ac_objext
15020 if { (eval echo "$as_me:15020: \"$ac_compile\"") >&5
15021   (eval $ac_compile) 2>&5
15022   ac_status=$?
15023   echo "$as_me:15023: \$? = $ac_status" >&5
15024   (exit $ac_status); } &&
15025          { ac_try='test -s conftest.$ac_objext'
15026   { (eval echo "$as_me:15026: \"$ac_try\"") >&5
15027   (eval $ac_try) 2>&5
15028   ac_status=$?
15029   echo "$as_me:15029: \$? = $ac_status" >&5
15030   (exit $ac_status); }; }; then
15031   cf_cv_unsigned_literals=yes
15032 else
15033   echo "$as_me: failed program was:" >&5
15034 cat conftest.$ac_ext >&5
15035 cf_cv_unsigned_literals=no
15036 fi
15037 rm -f conftest.$ac_objext conftest.$ac_ext
15038
15039 fi
15040
15041 echo "$as_me:15041: result: $cf_cv_unsigned_literals" >&5
15042 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15043
15044 cf_cv_1UL="1"
15045 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15046 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15047
15048 if test $NCURSES_MMASK_T = auto ; then
15049         cf_cv_typeof_mmask_t=long
15050 else
15051         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15052 fi
15053 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15054
15055 ###     Checks for external-data
15056
15057 echo "$as_me:15057: checking if external errno is declared" >&5
15058 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15059 if test "${cf_cv_dcl_errno+set}" = set; then
15060   echo $ECHO_N "(cached) $ECHO_C" >&6
15061 else
15062
15063     cat >conftest.$ac_ext <<_ACEOF
15064 #line 15064 "configure"
15065 #include "confdefs.h"
15066
15067 #ifdef HAVE_STDLIB_H
15068 #include <stdlib.h>
15069 #endif
15070 #include <stdio.h>
15071 #include <sys/types.h>
15072 #include <errno.h>
15073 int
15074 main ()
15075 {
15076 int x = (int) errno
15077   ;
15078   return 0;
15079 }
15080 _ACEOF
15081 rm -f conftest.$ac_objext
15082 if { (eval echo "$as_me:15082: \"$ac_compile\"") >&5
15083   (eval $ac_compile) 2>&5
15084   ac_status=$?
15085   echo "$as_me:15085: \$? = $ac_status" >&5
15086   (exit $ac_status); } &&
15087          { ac_try='test -s conftest.$ac_objext'
15088   { (eval echo "$as_me:15088: \"$ac_try\"") >&5
15089   (eval $ac_try) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); }; }; then
15093   cf_cv_dcl_errno=yes
15094 else
15095   echo "$as_me: failed program was:" >&5
15096 cat conftest.$ac_ext >&5
15097 cf_cv_dcl_errno=no
15098 fi
15099 rm -f conftest.$ac_objext conftest.$ac_ext
15100
15101 fi
15102 echo "$as_me:15102: result: $cf_cv_dcl_errno" >&5
15103 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15104
15105 if test "$cf_cv_dcl_errno" = no ; then
15106
15107 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15108
15109     cat >>confdefs.h <<EOF
15110 #define $cf_result 1
15111 EOF
15112
15113 fi
15114
15115 # It's possible (for near-UNIX clones) that the data doesn't exist
15116
15117 echo "$as_me:15117: checking if external errno exists" >&5
15118 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15119 if test "${cf_cv_have_errno+set}" = set; then
15120   echo $ECHO_N "(cached) $ECHO_C" >&6
15121 else
15122
15123     cat >conftest.$ac_ext <<_ACEOF
15124 #line 15124 "configure"
15125 #include "confdefs.h"
15126
15127 #undef errno
15128 extern int errno;
15129
15130 int
15131 main ()
15132 {
15133 errno = 2
15134   ;
15135   return 0;
15136 }
15137 _ACEOF
15138 rm -f conftest.$ac_objext conftest$ac_exeext
15139 if { (eval echo "$as_me:15139: \"$ac_link\"") >&5
15140   (eval $ac_link) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit $ac_status); } &&
15144          { ac_try='test -s conftest$ac_exeext'
15145   { (eval echo "$as_me:15145: \"$ac_try\"") >&5
15146   (eval $ac_try) 2>&5
15147   ac_status=$?
15148   echo "$as_me:15148: \$? = $ac_status" >&5
15149   (exit $ac_status); }; }; then
15150   cf_cv_have_errno=yes
15151 else
15152   echo "$as_me: failed program was:" >&5
15153 cat conftest.$ac_ext >&5
15154 cf_cv_have_errno=no
15155 fi
15156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15157
15158 fi
15159 echo "$as_me:15159: result: $cf_cv_have_errno" >&5
15160 echo "${ECHO_T}$cf_cv_have_errno" >&6
15161
15162 if test "$cf_cv_have_errno" = yes ; then
15163
15164 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15165
15166     cat >>confdefs.h <<EOF
15167 #define $cf_result 1
15168 EOF
15169
15170 fi
15171
15172 echo "$as_me:15172: checking if data-only library module links" >&5
15173 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15174 if test "${cf_cv_link_dataonly+set}" = set; then
15175   echo $ECHO_N "(cached) $ECHO_C" >&6
15176 else
15177
15178         rm -f conftest.a
15179         cat >conftest.$ac_ext <<EOF
15180 #line 15180 "configure"
15181 int     testdata[3] = { 123, 456, 789 };
15182 EOF
15183         if { (eval echo "$as_me:15183: \"$ac_compile\"") >&5
15184   (eval $ac_compile) 2>&5
15185   ac_status=$?
15186   echo "$as_me:15186: \$? = $ac_status" >&5
15187   (exit $ac_status); } ; then
15188                 mv conftest.o data.o && \
15189                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15190         fi
15191         rm -f conftest.$ac_ext data.o
15192         cat >conftest.$ac_ext <<EOF
15193 #line 15193 "configure"
15194 int     testfunc()
15195 {
15196 #if defined(NeXT)
15197         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15198 #else
15199         extern int testdata[3];
15200         return testdata[0] == 123
15201            &&  testdata[1] == 456
15202            &&  testdata[2] == 789;
15203 #endif
15204 }
15205 EOF
15206         if { (eval echo "$as_me:15206: \"$ac_compile\"") >&5
15207   (eval $ac_compile) 2>&5
15208   ac_status=$?
15209   echo "$as_me:15209: \$? = $ac_status" >&5
15210   (exit $ac_status); }; then
15211                 mv conftest.o func.o && \
15212                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15213         fi
15214         rm -f conftest.$ac_ext func.o
15215         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15216         cf_saveLIBS="$LIBS"
15217         LIBS="conftest.a $LIBS"
15218         if test "$cross_compiling" = yes; then
15219   cf_cv_link_dataonly=unknown
15220 else
15221   cat >conftest.$ac_ext <<_ACEOF
15222 #line 15222 "configure"
15223 #include "confdefs.h"
15224
15225         int main()
15226         {
15227                 extern int testfunc();
15228                 ${cf_cv_main_return:-return} (!testfunc());
15229         }
15230
15231 _ACEOF
15232 rm -f conftest$ac_exeext
15233 if { (eval echo "$as_me:15233: \"$ac_link\"") >&5
15234   (eval $ac_link) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15238   { (eval echo "$as_me:15238: \"$ac_try\"") >&5
15239   (eval $ac_try) 2>&5
15240   ac_status=$?
15241   echo "$as_me:15241: \$? = $ac_status" >&5
15242   (exit $ac_status); }; }; then
15243   cf_cv_link_dataonly=yes
15244 else
15245   echo "$as_me: program exited with status $ac_status" >&5
15246 echo "$as_me: failed program was:" >&5
15247 cat conftest.$ac_ext >&5
15248 cf_cv_link_dataonly=no
15249 fi
15250 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15251 fi
15252         LIBS="$cf_saveLIBS"
15253
15254 fi
15255
15256 echo "$as_me:15256: result: $cf_cv_link_dataonly" >&5
15257 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15258
15259 if test "$cf_cv_link_dataonly" = no ; then
15260
15261 cat >>confdefs.h <<\EOF
15262 #define BROKEN_LINKER 1
15263 EOF
15264
15265         BROKEN_LINKER=1
15266 fi
15267
15268 ###     Checks for library functions.
15269
15270 for ac_func in \
15271 getcwd \
15272 getegid \
15273 geteuid \
15274 getttynam \
15275 issetugid \
15276 poll \
15277 putenv \
15278 remove \
15279 select \
15280 setbuf \
15281 setbuffer \
15282 setenv \
15283 setvbuf \
15284 sigaction \
15285 sigvec \
15286 strdup \
15287 strstr \
15288 tcgetpgrp \
15289 times \
15290 vsnprintf \
15291
15292 do
15293 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15294 echo "$as_me:15294: checking for $ac_func" >&5
15295 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15296 if eval "test \"\${$as_ac_var+set}\" = set"; then
15297   echo $ECHO_N "(cached) $ECHO_C" >&6
15298 else
15299   cat >conftest.$ac_ext <<_ACEOF
15300 #line 15300 "configure"
15301 #include "confdefs.h"
15302 /* System header to define __stub macros and hopefully few prototypes,
15303     which can conflict with char $ac_func (); below.  */
15304 #include <assert.h>
15305 /* Override any gcc2 internal prototype to avoid an error.  */
15306 #ifdef __cplusplus
15307 extern "C"
15308 #endif
15309 /* We use char because int might match the return type of a gcc2
15310    builtin and then its argument prototype would still apply.  */
15311 char $ac_func ();
15312 char (*f) ();
15313
15314 int
15315 main ()
15316 {
15317 /* The GNU C library defines this for functions which it implements
15318     to always fail with ENOSYS.  Some functions are actually named
15319     something starting with __ and the normal name is an alias.  */
15320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15321 choke me
15322 #else
15323 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15324 #endif
15325
15326   ;
15327   return 0;
15328 }
15329 _ACEOF
15330 rm -f conftest.$ac_objext conftest$ac_exeext
15331 if { (eval echo "$as_me:15331: \"$ac_link\"") >&5
15332   (eval $ac_link) 2>&5
15333   ac_status=$?
15334   echo "$as_me:15334: \$? = $ac_status" >&5
15335   (exit $ac_status); } &&
15336          { ac_try='test -s conftest$ac_exeext'
15337   { (eval echo "$as_me:15337: \"$ac_try\"") >&5
15338   (eval $ac_try) 2>&5
15339   ac_status=$?
15340   echo "$as_me:15340: \$? = $ac_status" >&5
15341   (exit $ac_status); }; }; then
15342   eval "$as_ac_var=yes"
15343 else
15344   echo "$as_me: failed program was:" >&5
15345 cat conftest.$ac_ext >&5
15346 eval "$as_ac_var=no"
15347 fi
15348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15349 fi
15350 echo "$as_me:15350: result: `eval echo '${'$as_ac_var'}'`" >&5
15351 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15352 if test `eval echo '${'$as_ac_var'}'` = yes; then
15353   cat >>confdefs.h <<EOF
15354 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15355 EOF
15356
15357 fi
15358 done
15359
15360 if test "x$with_getcap" = "xyes" ; then
15361
15362 echo "$as_me:15362: checking for terminal-capability database functions" >&5
15363 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15364 if test "${cf_cv_cgetent+set}" = set; then
15365   echo $ECHO_N "(cached) $ECHO_C" >&6
15366 else
15367
15368 cat >conftest.$ac_ext <<_ACEOF
15369 #line 15369 "configure"
15370 #include "confdefs.h"
15371
15372 #include <stdlib.h>
15373 int
15374 main ()
15375 {
15376
15377         char temp[128];
15378         char *buf = temp;
15379         char *db_array = temp;
15380         cgetent(&buf, &db_array, "vt100");
15381         cgetcap(buf, "tc", '=');
15382         cgetmatch(buf, "tc");
15383
15384   ;
15385   return 0;
15386 }
15387 _ACEOF
15388 rm -f conftest.$ac_objext conftest$ac_exeext
15389 if { (eval echo "$as_me:15389: \"$ac_link\"") >&5
15390   (eval $ac_link) 2>&5
15391   ac_status=$?
15392   echo "$as_me:15392: \$? = $ac_status" >&5
15393   (exit $ac_status); } &&
15394          { ac_try='test -s conftest$ac_exeext'
15395   { (eval echo "$as_me:15395: \"$ac_try\"") >&5
15396   (eval $ac_try) 2>&5
15397   ac_status=$?
15398   echo "$as_me:15398: \$? = $ac_status" >&5
15399   (exit $ac_status); }; }; then
15400   cf_cv_cgetent=yes
15401 else
15402   echo "$as_me: failed program was:" >&5
15403 cat conftest.$ac_ext >&5
15404 cf_cv_cgetent=no
15405 fi
15406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15407
15408 fi
15409 echo "$as_me:15409: result: $cf_cv_cgetent" >&5
15410 echo "${ECHO_T}$cf_cv_cgetent" >&6
15411
15412 if test "$cf_cv_cgetent" = yes
15413 then
15414
15415 cat >>confdefs.h <<\EOF
15416 #define HAVE_BSD_CGETENT 1
15417 EOF
15418
15419 echo "$as_me:15419: checking if cgetent uses const parameter" >&5
15420 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15421 if test "${cf_cv_cgetent_const+set}" = set; then
15422   echo $ECHO_N "(cached) $ECHO_C" >&6
15423 else
15424
15425 cat >conftest.$ac_ext <<_ACEOF
15426 #line 15426 "configure"
15427 #include "confdefs.h"
15428
15429 #include <stdlib.h>
15430 int
15431 main ()
15432 {
15433
15434         char temp[128];
15435         char *buf = temp;
15436 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15437         const char *db_array = temp;
15438         cgetent(&buf, &db_array, "vt100");
15439 #endif
15440         cgetcap(buf, "tc", '=');
15441         cgetmatch(buf, "tc");
15442
15443   ;
15444   return 0;
15445 }
15446 _ACEOF
15447 rm -f conftest.$ac_objext conftest$ac_exeext
15448 if { (eval echo "$as_me:15448: \"$ac_link\"") >&5
15449   (eval $ac_link) 2>&5
15450   ac_status=$?
15451   echo "$as_me:15451: \$? = $ac_status" >&5
15452   (exit $ac_status); } &&
15453          { ac_try='test -s conftest$ac_exeext'
15454   { (eval echo "$as_me:15454: \"$ac_try\"") >&5
15455   (eval $ac_try) 2>&5
15456   ac_status=$?
15457   echo "$as_me:15457: \$? = $ac_status" >&5
15458   (exit $ac_status); }; }; then
15459   cf_cv_cgetent_const=yes
15460 else
15461   echo "$as_me: failed program was:" >&5
15462 cat conftest.$ac_ext >&5
15463 cf_cv_cgetent_const=no
15464 fi
15465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15466
15467 fi
15468 echo "$as_me:15468: result: $cf_cv_cgetent_const" >&5
15469 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15470         if test "$cf_cv_cgetent_const" = yes
15471         then
15472
15473 cat >>confdefs.h <<EOF
15474 #define CGETENT_CONST const
15475 EOF
15476
15477         fi
15478 fi
15479
15480 fi
15481
15482 echo "$as_me:15482: checking for isascii" >&5
15483 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15484 if test "${cf_cv_have_isascii+set}" = set; then
15485   echo $ECHO_N "(cached) $ECHO_C" >&6
15486 else
15487
15488         cat >conftest.$ac_ext <<_ACEOF
15489 #line 15489 "configure"
15490 #include "confdefs.h"
15491 #include <ctype.h>
15492 int
15493 main ()
15494 {
15495 int x = isascii(' ')
15496   ;
15497   return 0;
15498 }
15499 _ACEOF
15500 rm -f conftest.$ac_objext conftest$ac_exeext
15501 if { (eval echo "$as_me:15501: \"$ac_link\"") >&5
15502   (eval $ac_link) 2>&5
15503   ac_status=$?
15504   echo "$as_me:15504: \$? = $ac_status" >&5
15505   (exit $ac_status); } &&
15506          { ac_try='test -s conftest$ac_exeext'
15507   { (eval echo "$as_me:15507: \"$ac_try\"") >&5
15508   (eval $ac_try) 2>&5
15509   ac_status=$?
15510   echo "$as_me:15510: \$? = $ac_status" >&5
15511   (exit $ac_status); }; }; then
15512   cf_cv_have_isascii=yes
15513 else
15514   echo "$as_me: failed program was:" >&5
15515 cat conftest.$ac_ext >&5
15516 cf_cv_have_isascii=no
15517 fi
15518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15519
15520 fi
15521 echo "$as_me:15521: result: $cf_cv_have_isascii" >&5
15522 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15523 test "$cf_cv_have_isascii" = yes &&
15524 cat >>confdefs.h <<\EOF
15525 #define HAVE_ISASCII 1
15526 EOF
15527
15528 if test "$ac_cv_func_sigaction" = yes; then
15529 echo "$as_me:15529: checking whether sigaction needs _POSIX_SOURCE" >&5
15530 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15531 cat >conftest.$ac_ext <<_ACEOF
15532 #line 15532 "configure"
15533 #include "confdefs.h"
15534
15535 #include <sys/types.h>
15536 #include <signal.h>
15537 int
15538 main ()
15539 {
15540 struct sigaction act
15541   ;
15542   return 0;
15543 }
15544 _ACEOF
15545 rm -f conftest.$ac_objext
15546 if { (eval echo "$as_me:15546: \"$ac_compile\"") >&5
15547   (eval $ac_compile) 2>&5
15548   ac_status=$?
15549   echo "$as_me:15549: \$? = $ac_status" >&5
15550   (exit $ac_status); } &&
15551          { ac_try='test -s conftest.$ac_objext'
15552   { (eval echo "$as_me:15552: \"$ac_try\"") >&5
15553   (eval $ac_try) 2>&5
15554   ac_status=$?
15555   echo "$as_me:15555: \$? = $ac_status" >&5
15556   (exit $ac_status); }; }; then
15557   sigact_bad=no
15558 else
15559   echo "$as_me: failed program was:" >&5
15560 cat conftest.$ac_ext >&5
15561
15562 cat >conftest.$ac_ext <<_ACEOF
15563 #line 15563 "configure"
15564 #include "confdefs.h"
15565
15566 #define _POSIX_SOURCE
15567 #include <sys/types.h>
15568 #include <signal.h>
15569 int
15570 main ()
15571 {
15572 struct sigaction act
15573   ;
15574   return 0;
15575 }
15576 _ACEOF
15577 rm -f conftest.$ac_objext
15578 if { (eval echo "$as_me:15578: \"$ac_compile\"") >&5
15579   (eval $ac_compile) 2>&5
15580   ac_status=$?
15581   echo "$as_me:15581: \$? = $ac_status" >&5
15582   (exit $ac_status); } &&
15583          { ac_try='test -s conftest.$ac_objext'
15584   { (eval echo "$as_me:15584: \"$ac_try\"") >&5
15585   (eval $ac_try) 2>&5
15586   ac_status=$?
15587   echo "$as_me:15587: \$? = $ac_status" >&5
15588   (exit $ac_status); }; }; then
15589   sigact_bad=yes
15590
15591 cat >>confdefs.h <<\EOF
15592 #define _POSIX_SOURCE 1
15593 EOF
15594
15595 else
15596   echo "$as_me: failed program was:" >&5
15597 cat conftest.$ac_ext >&5
15598 sigact_bad=unknown
15599 fi
15600 rm -f conftest.$ac_objext conftest.$ac_ext
15601 fi
15602 rm -f conftest.$ac_objext conftest.$ac_ext
15603 echo "$as_me:15603: result: $sigact_bad" >&5
15604 echo "${ECHO_T}$sigact_bad" >&6
15605 fi
15606
15607 echo "$as_me:15607: checking if nanosleep really works" >&5
15608 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15609 if test "${cf_cv_func_nanosleep+set}" = set; then
15610   echo $ECHO_N "(cached) $ECHO_C" >&6
15611 else
15612
15613 if test "$cross_compiling" = yes; then
15614   cf_cv_func_nanosleep=unknown
15615 else
15616   cat >conftest.$ac_ext <<_ACEOF
15617 #line 15617 "configure"
15618 #include "confdefs.h"
15619
15620 #include <stdio.h>
15621 #include <errno.h>
15622 #include <time.h>
15623
15624 #ifdef HAVE_SYS_TIME_H
15625 #include <sys/time.h>
15626 #endif
15627
15628 int main() {
15629         struct timespec ts1, ts2;
15630         int code;
15631         ts1.tv_sec  = 0;
15632         ts1.tv_nsec = 750000000;
15633         ts2.tv_sec  = 0;
15634         ts2.tv_nsec = 0;
15635         errno = 0;
15636         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15637         ${cf_cv_main_return:-return}(code != 0);
15638 }
15639
15640 _ACEOF
15641 rm -f conftest$ac_exeext
15642 if { (eval echo "$as_me:15642: \"$ac_link\"") >&5
15643   (eval $ac_link) 2>&5
15644   ac_status=$?
15645   echo "$as_me:15645: \$? = $ac_status" >&5
15646   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15647   { (eval echo "$as_me:15647: \"$ac_try\"") >&5
15648   (eval $ac_try) 2>&5
15649   ac_status=$?
15650   echo "$as_me:15650: \$? = $ac_status" >&5
15651   (exit $ac_status); }; }; then
15652   cf_cv_func_nanosleep=yes
15653 else
15654   echo "$as_me: program exited with status $ac_status" >&5
15655 echo "$as_me: failed program was:" >&5
15656 cat conftest.$ac_ext >&5
15657 cf_cv_func_nanosleep=no
15658 fi
15659 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15660 fi
15661 fi
15662 echo "$as_me:15662: result: $cf_cv_func_nanosleep" >&5
15663 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15664
15665 test "$cf_cv_func_nanosleep" = "yes" &&
15666 cat >>confdefs.h <<\EOF
15667 #define HAVE_NANOSLEEP 1
15668 EOF
15669
15670 for ac_header in \
15671 termio.h \
15672 termios.h \
15673 unistd.h \
15674
15675 do
15676 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15677 echo "$as_me:15677: checking for $ac_header" >&5
15678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15679 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15680   echo $ECHO_N "(cached) $ECHO_C" >&6
15681 else
15682   cat >conftest.$ac_ext <<_ACEOF
15683 #line 15683 "configure"
15684 #include "confdefs.h"
15685 #include <$ac_header>
15686 _ACEOF
15687 if { (eval echo "$as_me:15687: \"$ac_cpp conftest.$ac_ext\"") >&5
15688   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15689   ac_status=$?
15690   egrep -v '^ *\+' conftest.er1 >conftest.err
15691   rm -f conftest.er1
15692   cat conftest.err >&5
15693   echo "$as_me:15693: \$? = $ac_status" >&5
15694   (exit $ac_status); } >/dev/null; then
15695   if test -s conftest.err; then
15696     ac_cpp_err=$ac_c_preproc_warn_flag
15697   else
15698     ac_cpp_err=
15699   fi
15700 else
15701   ac_cpp_err=yes
15702 fi
15703 if test -z "$ac_cpp_err"; then
15704   eval "$as_ac_Header=yes"
15705 else
15706   echo "$as_me: failed program was:" >&5
15707   cat conftest.$ac_ext >&5
15708   eval "$as_ac_Header=no"
15709 fi
15710 rm -f conftest.err conftest.$ac_ext
15711 fi
15712 echo "$as_me:15712: result: `eval echo '${'$as_ac_Header'}'`" >&5
15713 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15714 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15715   cat >>confdefs.h <<EOF
15716 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15717 EOF
15718
15719 fi
15720 done
15721
15722 if test "$ISC" = yes ; then
15723
15724 for ac_header in sys/termio.h
15725 do
15726 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15727 echo "$as_me:15727: checking for $ac_header" >&5
15728 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15729 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15730   echo $ECHO_N "(cached) $ECHO_C" >&6
15731 else
15732   cat >conftest.$ac_ext <<_ACEOF
15733 #line 15733 "configure"
15734 #include "confdefs.h"
15735 #include <$ac_header>
15736 _ACEOF
15737 if { (eval echo "$as_me:15737: \"$ac_cpp conftest.$ac_ext\"") >&5
15738   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15739   ac_status=$?
15740   egrep -v '^ *\+' conftest.er1 >conftest.err
15741   rm -f conftest.er1
15742   cat conftest.err >&5
15743   echo "$as_me:15743: \$? = $ac_status" >&5
15744   (exit $ac_status); } >/dev/null; then
15745   if test -s conftest.err; then
15746     ac_cpp_err=$ac_c_preproc_warn_flag
15747   else
15748     ac_cpp_err=
15749   fi
15750 else
15751   ac_cpp_err=yes
15752 fi
15753 if test -z "$ac_cpp_err"; then
15754   eval "$as_ac_Header=yes"
15755 else
15756   echo "$as_me: failed program was:" >&5
15757   cat conftest.$ac_ext >&5
15758   eval "$as_ac_Header=no"
15759 fi
15760 rm -f conftest.err conftest.$ac_ext
15761 fi
15762 echo "$as_me:15762: result: `eval echo '${'$as_ac_Header'}'`" >&5
15763 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15764 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15765   cat >>confdefs.h <<EOF
15766 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15767 EOF
15768
15769 fi
15770 done
15771
15772 fi
15773 if test "$ac_cv_header_termios_h" = yes ; then
15774         case "$CFLAGS $CPPFLAGS" in
15775         *-D_POSIX_SOURCE*)
15776                 termios_bad=dunno ;;
15777         *)      termios_bad=maybe ;;
15778         esac
15779         if test "$termios_bad" = maybe ; then
15780         echo "$as_me:15780: checking whether termios.h needs _POSIX_SOURCE" >&5
15781 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15782         cat >conftest.$ac_ext <<_ACEOF
15783 #line 15783 "configure"
15784 #include "confdefs.h"
15785 #include <termios.h>
15786 int
15787 main ()
15788 {
15789 struct termios foo; int x = foo.c_iflag
15790   ;
15791   return 0;
15792 }
15793 _ACEOF
15794 rm -f conftest.$ac_objext
15795 if { (eval echo "$as_me:15795: \"$ac_compile\"") >&5
15796   (eval $ac_compile) 2>&5
15797   ac_status=$?
15798   echo "$as_me:15798: \$? = $ac_status" >&5
15799   (exit $ac_status); } &&
15800          { ac_try='test -s conftest.$ac_objext'
15801   { (eval echo "$as_me:15801: \"$ac_try\"") >&5
15802   (eval $ac_try) 2>&5
15803   ac_status=$?
15804   echo "$as_me:15804: \$? = $ac_status" >&5
15805   (exit $ac_status); }; }; then
15806   termios_bad=no
15807 else
15808   echo "$as_me: failed program was:" >&5
15809 cat conftest.$ac_ext >&5
15810
15811                 cat >conftest.$ac_ext <<_ACEOF
15812 #line 15812 "configure"
15813 #include "confdefs.h"
15814
15815 #define _POSIX_SOURCE
15816 #include <termios.h>
15817 int
15818 main ()
15819 {
15820 struct termios foo; int x = foo.c_iflag
15821   ;
15822   return 0;
15823 }
15824 _ACEOF
15825 rm -f conftest.$ac_objext
15826 if { (eval echo "$as_me:15826: \"$ac_compile\"") >&5
15827   (eval $ac_compile) 2>&5
15828   ac_status=$?
15829   echo "$as_me:15829: \$? = $ac_status" >&5
15830   (exit $ac_status); } &&
15831          { ac_try='test -s conftest.$ac_objext'
15832   { (eval echo "$as_me:15832: \"$ac_try\"") >&5
15833   (eval $ac_try) 2>&5
15834   ac_status=$?
15835   echo "$as_me:15835: \$? = $ac_status" >&5
15836   (exit $ac_status); }; }; then
15837   termios_bad=unknown
15838 else
15839   echo "$as_me: failed program was:" >&5
15840 cat conftest.$ac_ext >&5
15841 termios_bad=yes
15842 cat >>confdefs.h <<\EOF
15843 #define _POSIX_SOURCE 1
15844 EOF
15845
15846 fi
15847 rm -f conftest.$ac_objext conftest.$ac_ext
15848
15849 fi
15850 rm -f conftest.$ac_objext conftest.$ac_ext
15851         echo "$as_me:15851: result: $termios_bad" >&5
15852 echo "${ECHO_T}$termios_bad" >&6
15853         fi
15854 fi
15855
15856 echo "$as_me:15856: checking for tcgetattr" >&5
15857 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15858 if test "${cf_cv_have_tcgetattr+set}" = set; then
15859   echo $ECHO_N "(cached) $ECHO_C" >&6
15860 else
15861
15862 cat >conftest.$ac_ext <<_ACEOF
15863 #line 15863 "configure"
15864 #include "confdefs.h"
15865
15866 #include <sys/types.h>
15867 #ifdef HAVE_UNISTD_H
15868 #include <unistd.h>
15869 #endif
15870 #ifdef HAVE_TERMIOS_H
15871 #include <termios.h>
15872 #define TTY struct termios
15873 #else
15874 #ifdef HAVE_TERMIO_H
15875 #include <termio.h>
15876 #define TTY struct termio
15877 #endif
15878 #endif
15879
15880 int
15881 main ()
15882 {
15883
15884 TTY foo;
15885 tcgetattr(1, &foo);
15886   ;
15887   return 0;
15888 }
15889 _ACEOF
15890 rm -f conftest.$ac_objext conftest$ac_exeext
15891 if { (eval echo "$as_me:15891: \"$ac_link\"") >&5
15892   (eval $ac_link) 2>&5
15893   ac_status=$?
15894   echo "$as_me:15894: \$? = $ac_status" >&5
15895   (exit $ac_status); } &&
15896          { ac_try='test -s conftest$ac_exeext'
15897   { (eval echo "$as_me:15897: \"$ac_try\"") >&5
15898   (eval $ac_try) 2>&5
15899   ac_status=$?
15900   echo "$as_me:15900: \$? = $ac_status" >&5
15901   (exit $ac_status); }; }; then
15902   cf_cv_have_tcgetattr=yes
15903 else
15904   echo "$as_me: failed program was:" >&5
15905 cat conftest.$ac_ext >&5
15906 cf_cv_have_tcgetattr=no
15907 fi
15908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15909 fi
15910 echo "$as_me:15910: result: $cf_cv_have_tcgetattr" >&5
15911 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15912 test "$cf_cv_have_tcgetattr" = yes &&
15913 cat >>confdefs.h <<\EOF
15914 #define HAVE_TCGETATTR 1
15915 EOF
15916
15917 echo "$as_me:15917: checking for vsscanf function or workaround" >&5
15918 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15919 if test "${cf_cv_func_vsscanf+set}" = set; then
15920   echo $ECHO_N "(cached) $ECHO_C" >&6
15921 else
15922
15923 cat >conftest.$ac_ext <<_ACEOF
15924 #line 15924 "configure"
15925 #include "confdefs.h"
15926
15927 #include <stdarg.h>
15928 #include <stdio.h>
15929 int
15930 main ()
15931 {
15932
15933         va_list ap;
15934         vsscanf("from", "%d", ap)
15935   ;
15936   return 0;
15937 }
15938 _ACEOF
15939 rm -f conftest.$ac_objext conftest$ac_exeext
15940 if { (eval echo "$as_me:15940: \"$ac_link\"") >&5
15941   (eval $ac_link) 2>&5
15942   ac_status=$?
15943   echo "$as_me:15943: \$? = $ac_status" >&5
15944   (exit $ac_status); } &&
15945          { ac_try='test -s conftest$ac_exeext'
15946   { (eval echo "$as_me:15946: \"$ac_try\"") >&5
15947   (eval $ac_try) 2>&5
15948   ac_status=$?
15949   echo "$as_me:15949: \$? = $ac_status" >&5
15950   (exit $ac_status); }; }; then
15951   cf_cv_func_vsscanf=vsscanf
15952 else
15953   echo "$as_me: failed program was:" >&5
15954 cat conftest.$ac_ext >&5
15955
15956 cat >conftest.$ac_ext <<_ACEOF
15957 #line 15957 "configure"
15958 #include "confdefs.h"
15959
15960 #include <stdarg.h>
15961 #include <stdio.h>
15962 int
15963 main ()
15964 {
15965
15966     FILE strbuf;
15967     char *str = "from";
15968
15969     strbuf._flag = _IOREAD;
15970     strbuf._ptr = strbuf._base = (unsigned char *) str;
15971     strbuf._cnt = strlen(str);
15972     strbuf._file = _NFILE;
15973     return (vfscanf(&strbuf, "%d", ap))
15974   ;
15975   return 0;
15976 }
15977 _ACEOF
15978 rm -f conftest.$ac_objext conftest$ac_exeext
15979 if { (eval echo "$as_me:15979: \"$ac_link\"") >&5
15980   (eval $ac_link) 2>&5
15981   ac_status=$?
15982   echo "$as_me:15982: \$? = $ac_status" >&5
15983   (exit $ac_status); } &&
15984          { ac_try='test -s conftest$ac_exeext'
15985   { (eval echo "$as_me:15985: \"$ac_try\"") >&5
15986   (eval $ac_try) 2>&5
15987   ac_status=$?
15988   echo "$as_me:15988: \$? = $ac_status" >&5
15989   (exit $ac_status); }; }; then
15990   cf_cv_func_vsscanf=vfscanf
15991 else
15992   echo "$as_me: failed program was:" >&5
15993 cat conftest.$ac_ext >&5
15994
15995 cat >conftest.$ac_ext <<_ACEOF
15996 #line 15996 "configure"
15997 #include "confdefs.h"
15998
15999 #include <stdarg.h>
16000 #include <stdio.h>
16001 int
16002 main ()
16003 {
16004
16005     FILE strbuf;
16006     char *str = "from";
16007
16008     strbuf._flag = _IOREAD;
16009     strbuf._ptr = strbuf._base = (unsigned char *) str;
16010     strbuf._cnt = strlen(str);
16011     strbuf._file = _NFILE;
16012     return (_doscan(&strbuf, "%d", ap))
16013   ;
16014   return 0;
16015 }
16016 _ACEOF
16017 rm -f conftest.$ac_objext conftest$ac_exeext
16018 if { (eval echo "$as_me:16018: \"$ac_link\"") >&5
16019   (eval $ac_link) 2>&5
16020   ac_status=$?
16021   echo "$as_me:16021: \$? = $ac_status" >&5
16022   (exit $ac_status); } &&
16023          { ac_try='test -s conftest$ac_exeext'
16024   { (eval echo "$as_me:16024: \"$ac_try\"") >&5
16025   (eval $ac_try) 2>&5
16026   ac_status=$?
16027   echo "$as_me:16027: \$? = $ac_status" >&5
16028   (exit $ac_status); }; }; then
16029   cf_cv_func_vsscanf=_doscan
16030 else
16031   echo "$as_me: failed program was:" >&5
16032 cat conftest.$ac_ext >&5
16033
16034 cf_cv_func_vsscanf=no
16035 fi
16036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16037 fi
16038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16039 fi
16040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16041 fi
16042 echo "$as_me:16042: result: $cf_cv_func_vsscanf" >&5
16043 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16044
16045 case $cf_cv_func_vsscanf in #(vi
16046 vsscanf)
16047 cat >>confdefs.h <<\EOF
16048 #define HAVE_VSSCANF 1
16049 EOF
16050 ;; #(vi
16051 vfscanf)
16052 cat >>confdefs.h <<\EOF
16053 #define HAVE_VFSCANF 1
16054 EOF
16055 ;; #(vi
16056 _doscan)
16057 cat >>confdefs.h <<\EOF
16058 #define HAVE__DOSCAN 1
16059 EOF
16060 ;;
16061 esac
16062
16063 echo "$as_me:16063: checking for working mkstemp" >&5
16064 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16065 if test "${cf_cv_func_mkstemp+set}" = set; then
16066   echo $ECHO_N "(cached) $ECHO_C" >&6
16067 else
16068
16069 rm -rf conftest*
16070 if test "$cross_compiling" = yes; then
16071   cf_cv_func_mkstemp=maybe
16072 else
16073   cat >conftest.$ac_ext <<_ACEOF
16074 #line 16074 "configure"
16075 #include "confdefs.h"
16076
16077 #include <sys/types.h>
16078 #include <stdlib.h>
16079 #include <stdio.h>
16080 #include <string.h>
16081 #include <sys/stat.h>
16082 int main()
16083 {
16084         char *tmpl = "conftestXXXXXX";
16085         char name[2][80];
16086         int n;
16087         int result = 0;
16088         int fd;
16089         struct stat sb;
16090
16091         umask(077);
16092         for (n = 0; n < 2; ++n) {
16093                 strcpy(name[n], tmpl);
16094                 if ((fd = mkstemp(name[n])) >= 0) {
16095                         if (!strcmp(name[n], tmpl)
16096                          || stat(name[n], &sb) != 0
16097                          || (sb.st_mode & S_IFMT) != S_IFREG
16098                          || (sb.st_mode & 077) != 0) {
16099                                 result = 1;
16100                         }
16101                         close(fd);
16102                 }
16103         }
16104         if (result == 0
16105          && !strcmp(name[0], name[1]))
16106                 result = 1;
16107         ${cf_cv_main_return:-return}(result);
16108 }
16109
16110 _ACEOF
16111 rm -f conftest$ac_exeext
16112 if { (eval echo "$as_me:16112: \"$ac_link\"") >&5
16113   (eval $ac_link) 2>&5
16114   ac_status=$?
16115   echo "$as_me:16115: \$? = $ac_status" >&5
16116   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16117   { (eval echo "$as_me:16117: \"$ac_try\"") >&5
16118   (eval $ac_try) 2>&5
16119   ac_status=$?
16120   echo "$as_me:16120: \$? = $ac_status" >&5
16121   (exit $ac_status); }; }; then
16122   cf_cv_func_mkstemp=yes
16123
16124 else
16125   echo "$as_me: program exited with status $ac_status" >&5
16126 echo "$as_me: failed program was:" >&5
16127 cat conftest.$ac_ext >&5
16128 cf_cv_func_mkstemp=no
16129
16130 fi
16131 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16132 fi
16133
16134 fi
16135 echo "$as_me:16135: result: $cf_cv_func_mkstemp" >&5
16136 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16137 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16138         echo "$as_me:16138: checking for mkstemp" >&5
16139 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16140 if test "${ac_cv_func_mkstemp+set}" = set; then
16141   echo $ECHO_N "(cached) $ECHO_C" >&6
16142 else
16143   cat >conftest.$ac_ext <<_ACEOF
16144 #line 16144 "configure"
16145 #include "confdefs.h"
16146 /* System header to define __stub macros and hopefully few prototypes,
16147     which can conflict with char mkstemp (); below.  */
16148 #include <assert.h>
16149 /* Override any gcc2 internal prototype to avoid an error.  */
16150 #ifdef __cplusplus
16151 extern "C"
16152 #endif
16153 /* We use char because int might match the return type of a gcc2
16154    builtin and then its argument prototype would still apply.  */
16155 char mkstemp ();
16156 char (*f) ();
16157
16158 int
16159 main ()
16160 {
16161 /* The GNU C library defines this for functions which it implements
16162     to always fail with ENOSYS.  Some functions are actually named
16163     something starting with __ and the normal name is an alias.  */
16164 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16165 choke me
16166 #else
16167 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16168 #endif
16169
16170   ;
16171   return 0;
16172 }
16173 _ACEOF
16174 rm -f conftest.$ac_objext conftest$ac_exeext
16175 if { (eval echo "$as_me:16175: \"$ac_link\"") >&5
16176   (eval $ac_link) 2>&5
16177   ac_status=$?
16178   echo "$as_me:16178: \$? = $ac_status" >&5
16179   (exit $ac_status); } &&
16180          { ac_try='test -s conftest$ac_exeext'
16181   { (eval echo "$as_me:16181: \"$ac_try\"") >&5
16182   (eval $ac_try) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit $ac_status); }; }; then
16186   ac_cv_func_mkstemp=yes
16187 else
16188   echo "$as_me: failed program was:" >&5
16189 cat conftest.$ac_ext >&5
16190 ac_cv_func_mkstemp=no
16191 fi
16192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16193 fi
16194 echo "$as_me:16194: result: $ac_cv_func_mkstemp" >&5
16195 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16196
16197 fi
16198 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16199
16200 cat >>confdefs.h <<\EOF
16201 #define HAVE_MKSTEMP 1
16202 EOF
16203
16204 fi
16205
16206 # setup for prototype of fallback for vsscanf()
16207
16208 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16209         HAVE_VSSCANF=1
16210 else
16211         HAVE_VSSCANF=0
16212 fi
16213
16214 if test "x$cross_compiling" = xyes ; then
16215         { echo "$as_me:16215: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16216 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16217 else
16218         echo "$as_me:16218: checking whether setvbuf arguments are reversed" >&5
16219 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16220 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16221   echo $ECHO_N "(cached) $ECHO_C" >&6
16222 else
16223   if test "$cross_compiling" = yes; then
16224   { { echo "$as_me:16224: error: cannot run test program while cross compiling" >&5
16225 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16226    { (exit 1); exit 1; }; }
16227 else
16228   cat >conftest.$ac_ext <<_ACEOF
16229 #line 16229 "configure"
16230 #include "confdefs.h"
16231 #include <stdio.h>
16232 /* If setvbuf has the reversed format, exit 0. */
16233 int
16234 main ()
16235 {
16236   /* This call has the arguments reversed.
16237      A reversed system may check and see that the address of main
16238      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16239   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16240     $ac_main_return(1);
16241   putc('\r', stdout);
16242   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16243 }
16244 _ACEOF
16245 rm -f conftest$ac_exeext
16246 if { (eval echo "$as_me:16246: \"$ac_link\"") >&5
16247   (eval $ac_link) 2>&5
16248   ac_status=$?
16249   echo "$as_me:16249: \$? = $ac_status" >&5
16250   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16251   { (eval echo "$as_me:16251: \"$ac_try\"") >&5
16252   (eval $ac_try) 2>&5
16253   ac_status=$?
16254   echo "$as_me:16254: \$? = $ac_status" >&5
16255   (exit $ac_status); }; }; then
16256   ac_cv_func_setvbuf_reversed=yes
16257 else
16258   echo "$as_me: program exited with status $ac_status" >&5
16259 echo "$as_me: failed program was:" >&5
16260 cat conftest.$ac_ext >&5
16261 ac_cv_func_setvbuf_reversed=no
16262 fi
16263 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16264 fi
16265 rm -f core core.* *.core
16266 fi
16267 echo "$as_me:16267: result: $ac_cv_func_setvbuf_reversed" >&5
16268 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16269 if test $ac_cv_func_setvbuf_reversed = yes; then
16270
16271 cat >>confdefs.h <<\EOF
16272 #define SETVBUF_REVERSED 1
16273 EOF
16274
16275 fi
16276
16277 fi
16278 echo "$as_me:16278: checking return type of signal handlers" >&5
16279 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16280 if test "${ac_cv_type_signal+set}" = set; then
16281   echo $ECHO_N "(cached) $ECHO_C" >&6
16282 else
16283   cat >conftest.$ac_ext <<_ACEOF
16284 #line 16284 "configure"
16285 #include "confdefs.h"
16286 #include <sys/types.h>
16287 #include <signal.h>
16288 #ifdef signal
16289 # undef signal
16290 #endif
16291 #ifdef __cplusplus
16292 extern "C" void (*signal (int, void (*)(int)))(int);
16293 #else
16294 void (*signal ()) ();
16295 #endif
16296
16297 int
16298 main ()
16299 {
16300 int i;
16301   ;
16302   return 0;
16303 }
16304 _ACEOF
16305 rm -f conftest.$ac_objext
16306 if { (eval echo "$as_me:16306: \"$ac_compile\"") >&5
16307   (eval $ac_compile) 2>&5
16308   ac_status=$?
16309   echo "$as_me:16309: \$? = $ac_status" >&5
16310   (exit $ac_status); } &&
16311          { ac_try='test -s conftest.$ac_objext'
16312   { (eval echo "$as_me:16312: \"$ac_try\"") >&5
16313   (eval $ac_try) 2>&5
16314   ac_status=$?
16315   echo "$as_me:16315: \$? = $ac_status" >&5
16316   (exit $ac_status); }; }; then
16317   ac_cv_type_signal=void
16318 else
16319   echo "$as_me: failed program was:" >&5
16320 cat conftest.$ac_ext >&5
16321 ac_cv_type_signal=int
16322 fi
16323 rm -f conftest.$ac_objext conftest.$ac_ext
16324 fi
16325 echo "$as_me:16325: result: $ac_cv_type_signal" >&5
16326 echo "${ECHO_T}$ac_cv_type_signal" >&6
16327
16328 cat >>confdefs.h <<EOF
16329 #define RETSIGTYPE $ac_cv_type_signal
16330 EOF
16331
16332 echo "$as_me:16332: checking for intptr_t" >&5
16333 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16334 if test "${ac_cv_type_intptr_t+set}" = set; then
16335   echo $ECHO_N "(cached) $ECHO_C" >&6
16336 else
16337   cat >conftest.$ac_ext <<_ACEOF
16338 #line 16338 "configure"
16339 #include "confdefs.h"
16340 $ac_includes_default
16341 int
16342 main ()
16343 {
16344 if ((intptr_t *) 0)
16345   return 0;
16346 if (sizeof (intptr_t))
16347   return 0;
16348   ;
16349   return 0;
16350 }
16351 _ACEOF
16352 rm -f conftest.$ac_objext
16353 if { (eval echo "$as_me:16353: \"$ac_compile\"") >&5
16354   (eval $ac_compile) 2>&5
16355   ac_status=$?
16356   echo "$as_me:16356: \$? = $ac_status" >&5
16357   (exit $ac_status); } &&
16358          { ac_try='test -s conftest.$ac_objext'
16359   { (eval echo "$as_me:16359: \"$ac_try\"") >&5
16360   (eval $ac_try) 2>&5
16361   ac_status=$?
16362   echo "$as_me:16362: \$? = $ac_status" >&5
16363   (exit $ac_status); }; }; then
16364   ac_cv_type_intptr_t=yes
16365 else
16366   echo "$as_me: failed program was:" >&5
16367 cat conftest.$ac_ext >&5
16368 ac_cv_type_intptr_t=no
16369 fi
16370 rm -f conftest.$ac_objext conftest.$ac_ext
16371 fi
16372 echo "$as_me:16372: result: $ac_cv_type_intptr_t" >&5
16373 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16374 if test $ac_cv_type_intptr_t = yes; then
16375   :
16376 else
16377
16378 cat >>confdefs.h <<EOF
16379 #define intptr_t long
16380 EOF
16381
16382 fi
16383
16384 echo "$as_me:16384: checking for type sigaction_t" >&5
16385 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16386 if test "${cf_cv_type_sigaction+set}" = set; then
16387   echo $ECHO_N "(cached) $ECHO_C" >&6
16388 else
16389
16390         cat >conftest.$ac_ext <<_ACEOF
16391 #line 16391 "configure"
16392 #include "confdefs.h"
16393
16394 #include <signal.h>
16395 int
16396 main ()
16397 {
16398 sigaction_t x
16399   ;
16400   return 0;
16401 }
16402 _ACEOF
16403 rm -f conftest.$ac_objext
16404 if { (eval echo "$as_me:16404: \"$ac_compile\"") >&5
16405   (eval $ac_compile) 2>&5
16406   ac_status=$?
16407   echo "$as_me:16407: \$? = $ac_status" >&5
16408   (exit $ac_status); } &&
16409          { ac_try='test -s conftest.$ac_objext'
16410   { (eval echo "$as_me:16410: \"$ac_try\"") >&5
16411   (eval $ac_try) 2>&5
16412   ac_status=$?
16413   echo "$as_me:16413: \$? = $ac_status" >&5
16414   (exit $ac_status); }; }; then
16415   cf_cv_type_sigaction=yes
16416 else
16417   echo "$as_me: failed program was:" >&5
16418 cat conftest.$ac_ext >&5
16419 cf_cv_type_sigaction=no
16420 fi
16421 rm -f conftest.$ac_objext conftest.$ac_ext
16422 fi
16423
16424 echo "$as_me:16424: result: $cf_cv_type_sigaction" >&5
16425 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16426 test "$cf_cv_type_sigaction" = yes &&
16427 cat >>confdefs.h <<\EOF
16428 #define HAVE_TYPE_SIGACTION 1
16429 EOF
16430
16431 echo "$as_me:16431: checking declaration of size-change" >&5
16432 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16433 if test "${cf_cv_sizechange+set}" = set; then
16434   echo $ECHO_N "(cached) $ECHO_C" >&6
16435 else
16436
16437     cf_cv_sizechange=unknown
16438     cf_save_CPPFLAGS="$CPPFLAGS"
16439
16440 for cf_opts in "" "NEED_PTEM_H"
16441 do
16442
16443     CPPFLAGS="$cf_save_CPPFLAGS"
16444     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16445     cat >conftest.$ac_ext <<_ACEOF
16446 #line 16446 "configure"
16447 #include "confdefs.h"
16448 #include <sys/types.h>
16449 #ifdef HAVE_TERMIOS_H
16450 #include <termios.h>
16451 #else
16452 #ifdef HAVE_TERMIO_H
16453 #include <termio.h>
16454 #endif
16455 #endif
16456 #ifdef NEED_PTEM_H
16457 /* This is a workaround for SCO:  they neglected to define struct winsize in
16458  * termios.h -- it's only in termio.h and ptem.h
16459  */
16460 #include        <sys/stream.h>
16461 #include        <sys/ptem.h>
16462 #endif
16463 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16464 #include <sys/ioctl.h>
16465 #endif
16466
16467 int
16468 main ()
16469 {
16470
16471 #ifdef TIOCGSIZE
16472         struct ttysize win;     /* FIXME: what system is this? */
16473         int y = win.ts_lines;
16474         int x = win.ts_cols;
16475 #else
16476 #ifdef TIOCGWINSZ
16477         struct winsize win;
16478         int y = win.ws_row;
16479         int x = win.ws_col;
16480 #else
16481         no TIOCGSIZE or TIOCGWINSZ
16482 #endif /* TIOCGWINSZ */
16483 #endif /* TIOCGSIZE */
16484
16485   ;
16486   return 0;
16487 }
16488 _ACEOF
16489 rm -f conftest.$ac_objext
16490 if { (eval echo "$as_me:16490: \"$ac_compile\"") >&5
16491   (eval $ac_compile) 2>&5
16492   ac_status=$?
16493   echo "$as_me:16493: \$? = $ac_status" >&5
16494   (exit $ac_status); } &&
16495          { ac_try='test -s conftest.$ac_objext'
16496   { (eval echo "$as_me:16496: \"$ac_try\"") >&5
16497   (eval $ac_try) 2>&5
16498   ac_status=$?
16499   echo "$as_me:16499: \$? = $ac_status" >&5
16500   (exit $ac_status); }; }; then
16501   cf_cv_sizechange=yes
16502 else
16503   echo "$as_me: failed program was:" >&5
16504 cat conftest.$ac_ext >&5
16505 cf_cv_sizechange=no
16506 fi
16507 rm -f conftest.$ac_objext conftest.$ac_ext
16508
16509         CPPFLAGS="$cf_save_CPPFLAGS"
16510         if test "$cf_cv_sizechange" = yes ; then
16511                 echo "size-change succeeded ($cf_opts)" >&5
16512                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16513                 break
16514         fi
16515 done
16516
16517 fi
16518 echo "$as_me:16518: result: $cf_cv_sizechange" >&5
16519 echo "${ECHO_T}$cf_cv_sizechange" >&6
16520 if test "$cf_cv_sizechange" != no ; then
16521
16522 cat >>confdefs.h <<\EOF
16523 #define HAVE_SIZECHANGE 1
16524 EOF
16525
16526         case $cf_cv_sizechange in #(vi
16527         NEED*)
16528                 cat >>confdefs.h <<EOF
16529 #define $cf_cv_sizechange  1
16530 EOF
16531
16532                 ;;
16533         esac
16534 fi
16535
16536 echo "$as_me:16536: checking for memmove" >&5
16537 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16538 if test "${ac_cv_func_memmove+set}" = set; then
16539   echo $ECHO_N "(cached) $ECHO_C" >&6
16540 else
16541   cat >conftest.$ac_ext <<_ACEOF
16542 #line 16542 "configure"
16543 #include "confdefs.h"
16544 /* System header to define __stub macros and hopefully few prototypes,
16545     which can conflict with char memmove (); below.  */
16546 #include <assert.h>
16547 /* Override any gcc2 internal prototype to avoid an error.  */
16548 #ifdef __cplusplus
16549 extern "C"
16550 #endif
16551 /* We use char because int might match the return type of a gcc2
16552    builtin and then its argument prototype would still apply.  */
16553 char memmove ();
16554 char (*f) ();
16555
16556 int
16557 main ()
16558 {
16559 /* The GNU C library defines this for functions which it implements
16560     to always fail with ENOSYS.  Some functions are actually named
16561     something starting with __ and the normal name is an alias.  */
16562 #if defined (__stub_memmove) || defined (__stub___memmove)
16563 choke me
16564 #else
16565 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16566 #endif
16567
16568   ;
16569   return 0;
16570 }
16571 _ACEOF
16572 rm -f conftest.$ac_objext conftest$ac_exeext
16573 if { (eval echo "$as_me:16573: \"$ac_link\"") >&5
16574   (eval $ac_link) 2>&5
16575   ac_status=$?
16576   echo "$as_me:16576: \$? = $ac_status" >&5
16577   (exit $ac_status); } &&
16578          { ac_try='test -s conftest$ac_exeext'
16579   { (eval echo "$as_me:16579: \"$ac_try\"") >&5
16580   (eval $ac_try) 2>&5
16581   ac_status=$?
16582   echo "$as_me:16582: \$? = $ac_status" >&5
16583   (exit $ac_status); }; }; then
16584   ac_cv_func_memmove=yes
16585 else
16586   echo "$as_me: failed program was:" >&5
16587 cat conftest.$ac_ext >&5
16588 ac_cv_func_memmove=no
16589 fi
16590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16591 fi
16592 echo "$as_me:16592: result: $ac_cv_func_memmove" >&5
16593 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16594 if test $ac_cv_func_memmove = yes; then
16595   :
16596 else
16597
16598 echo "$as_me:16598: checking for bcopy" >&5
16599 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16600 if test "${ac_cv_func_bcopy+set}" = set; then
16601   echo $ECHO_N "(cached) $ECHO_C" >&6
16602 else
16603   cat >conftest.$ac_ext <<_ACEOF
16604 #line 16604 "configure"
16605 #include "confdefs.h"
16606 /* System header to define __stub macros and hopefully few prototypes,
16607     which can conflict with char bcopy (); below.  */
16608 #include <assert.h>
16609 /* Override any gcc2 internal prototype to avoid an error.  */
16610 #ifdef __cplusplus
16611 extern "C"
16612 #endif
16613 /* We use char because int might match the return type of a gcc2
16614    builtin and then its argument prototype would still apply.  */
16615 char bcopy ();
16616 char (*f) ();
16617
16618 int
16619 main ()
16620 {
16621 /* The GNU C library defines this for functions which it implements
16622     to always fail with ENOSYS.  Some functions are actually named
16623     something starting with __ and the normal name is an alias.  */
16624 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16625 choke me
16626 #else
16627 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16628 #endif
16629
16630   ;
16631   return 0;
16632 }
16633 _ACEOF
16634 rm -f conftest.$ac_objext conftest$ac_exeext
16635 if { (eval echo "$as_me:16635: \"$ac_link\"") >&5
16636   (eval $ac_link) 2>&5
16637   ac_status=$?
16638   echo "$as_me:16638: \$? = $ac_status" >&5
16639   (exit $ac_status); } &&
16640          { ac_try='test -s conftest$ac_exeext'
16641   { (eval echo "$as_me:16641: \"$ac_try\"") >&5
16642   (eval $ac_try) 2>&5
16643   ac_status=$?
16644   echo "$as_me:16644: \$? = $ac_status" >&5
16645   (exit $ac_status); }; }; then
16646   ac_cv_func_bcopy=yes
16647 else
16648   echo "$as_me: failed program was:" >&5
16649 cat conftest.$ac_ext >&5
16650 ac_cv_func_bcopy=no
16651 fi
16652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16653 fi
16654 echo "$as_me:16654: result: $ac_cv_func_bcopy" >&5
16655 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16656 if test $ac_cv_func_bcopy = yes; then
16657
16658         echo "$as_me:16658: checking if bcopy does overlapping moves" >&5
16659 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16660 if test "${cf_cv_good_bcopy+set}" = set; then
16661   echo $ECHO_N "(cached) $ECHO_C" >&6
16662 else
16663
16664                 if test "$cross_compiling" = yes; then
16665   cf_cv_good_bcopy=unknown
16666 else
16667   cat >conftest.$ac_ext <<_ACEOF
16668 #line 16668 "configure"
16669 #include "confdefs.h"
16670
16671 int main() {
16672         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16673         char temp[40];
16674         bcopy(data, temp, sizeof(data));
16675         bcopy(temp+10, temp, 15);
16676         bcopy(temp+5, temp+15, 10);
16677         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16678 }
16679
16680 _ACEOF
16681 rm -f conftest$ac_exeext
16682 if { (eval echo "$as_me:16682: \"$ac_link\"") >&5
16683   (eval $ac_link) 2>&5
16684   ac_status=$?
16685   echo "$as_me:16685: \$? = $ac_status" >&5
16686   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16687   { (eval echo "$as_me:16687: \"$ac_try\"") >&5
16688   (eval $ac_try) 2>&5
16689   ac_status=$?
16690   echo "$as_me:16690: \$? = $ac_status" >&5
16691   (exit $ac_status); }; }; then
16692   cf_cv_good_bcopy=yes
16693 else
16694   echo "$as_me: program exited with status $ac_status" >&5
16695 echo "$as_me: failed program was:" >&5
16696 cat conftest.$ac_ext >&5
16697 cf_cv_good_bcopy=no
16698 fi
16699 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16700 fi
16701
16702 fi
16703 echo "$as_me:16703: result: $cf_cv_good_bcopy" >&5
16704 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16705
16706 else
16707   cf_cv_good_bcopy=no
16708 fi
16709
16710         if test "$cf_cv_good_bcopy" = yes ; then
16711
16712 cat >>confdefs.h <<\EOF
16713 #define USE_OK_BCOPY 1
16714 EOF
16715
16716         else
16717
16718 cat >>confdefs.h <<\EOF
16719 #define USE_MY_MEMMOVE 1
16720 EOF
16721
16722         fi
16723
16724 fi
16725
16726 echo "$as_me:16726: checking if poll really works" >&5
16727 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16728 if test "${cf_cv_working_poll+set}" = set; then
16729   echo $ECHO_N "(cached) $ECHO_C" >&6
16730 else
16731
16732 if test "$cross_compiling" = yes; then
16733   cf_cv_working_poll=unknown
16734 else
16735   cat >conftest.$ac_ext <<_ACEOF
16736 #line 16736 "configure"
16737 #include "confdefs.h"
16738
16739 #include <stdlib.h>
16740 #include <stdio.h>
16741 #include <unistd.h>
16742 #include <fcntl.h>
16743 #ifdef HAVE_POLL_H
16744 #include <poll.h>
16745 #else
16746 #include <sys/poll.h>
16747 #endif
16748 int main() {
16749         struct pollfd myfds;
16750         int ret;
16751
16752         /* check for Darwin bug with respect to "devices" */
16753         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16754         if (myfds.fd < 0)
16755                 myfds.fd = 0;
16756         myfds.events = POLLIN;
16757         myfds.revents = 0;
16758
16759         ret = poll(&myfds, 1, 100);
16760
16761         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16762                 ret = -1;
16763         } else {
16764                 int fd = 0;
16765                 if (!isatty(fd)) {
16766                         fd = open("/dev/tty", 2);       /* O_RDWR */
16767                 }
16768
16769                 if (fd >= 0) {
16770                         /* also check with standard input */
16771                         myfds.fd = fd;
16772                         myfds.events = POLLIN;
16773                         myfds.revents = 0;
16774                         ret = poll(&myfds, 1, 100);
16775                 } else {
16776                         ret = -1;
16777                 }
16778         }
16779         ${cf_cv_main_return:-return}(ret < 0);
16780 }
16781 _ACEOF
16782 rm -f conftest$ac_exeext
16783 if { (eval echo "$as_me:16783: \"$ac_link\"") >&5
16784   (eval $ac_link) 2>&5
16785   ac_status=$?
16786   echo "$as_me:16786: \$? = $ac_status" >&5
16787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16788   { (eval echo "$as_me:16788: \"$ac_try\"") >&5
16789   (eval $ac_try) 2>&5
16790   ac_status=$?
16791   echo "$as_me:16791: \$? = $ac_status" >&5
16792   (exit $ac_status); }; }; then
16793   cf_cv_working_poll=yes
16794 else
16795   echo "$as_me: program exited with status $ac_status" >&5
16796 echo "$as_me: failed program was:" >&5
16797 cat conftest.$ac_ext >&5
16798 cf_cv_working_poll=no
16799 fi
16800 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16801 fi
16802 fi
16803 echo "$as_me:16803: result: $cf_cv_working_poll" >&5
16804 echo "${ECHO_T}$cf_cv_working_poll" >&6
16805 test "$cf_cv_working_poll" = "yes" &&
16806 cat >>confdefs.h <<\EOF
16807 #define HAVE_WORKING_POLL 1
16808 EOF
16809
16810 echo "$as_me:16810: checking for va_copy" >&5
16811 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16812 if test "${cf_cv_have_va_copy+set}" = set; then
16813   echo $ECHO_N "(cached) $ECHO_C" >&6
16814 else
16815
16816 cat >conftest.$ac_ext <<_ACEOF
16817 #line 16817 "configure"
16818 #include "confdefs.h"
16819
16820 #include <stdarg.h>
16821
16822 int
16823 main ()
16824 {
16825
16826         static va_list dst;
16827         static va_list src;
16828         va_copy(dst, src)
16829   ;
16830   return 0;
16831 }
16832 _ACEOF
16833 rm -f conftest.$ac_objext conftest$ac_exeext
16834 if { (eval echo "$as_me:16834: \"$ac_link\"") >&5
16835   (eval $ac_link) 2>&5
16836   ac_status=$?
16837   echo "$as_me:16837: \$? = $ac_status" >&5
16838   (exit $ac_status); } &&
16839          { ac_try='test -s conftest$ac_exeext'
16840   { (eval echo "$as_me:16840: \"$ac_try\"") >&5
16841   (eval $ac_try) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); }; }; then
16845   cf_cv_have_va_copy=yes
16846 else
16847   echo "$as_me: failed program was:" >&5
16848 cat conftest.$ac_ext >&5
16849 cf_cv_have_va_copy=no
16850 fi
16851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16852 fi
16853 echo "$as_me:16853: result: $cf_cv_have_va_copy" >&5
16854 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16855
16856 test "$cf_cv_have_va_copy" = yes &&
16857 cat >>confdefs.h <<\EOF
16858 #define HAVE_VA_COPY 1
16859 EOF
16860
16861 echo "$as_me:16861: checking for __va_copy" >&5
16862 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16863 if test "${cf_cv_have___va_copy+set}" = set; then
16864   echo $ECHO_N "(cached) $ECHO_C" >&6
16865 else
16866
16867 cat >conftest.$ac_ext <<_ACEOF
16868 #line 16868 "configure"
16869 #include "confdefs.h"
16870
16871 #include <stdarg.h>
16872
16873 int
16874 main ()
16875 {
16876
16877         static va_list dst;
16878         static va_list src;
16879         __va_copy(dst, src)
16880   ;
16881   return 0;
16882 }
16883 _ACEOF
16884 rm -f conftest.$ac_objext conftest$ac_exeext
16885 if { (eval echo "$as_me:16885: \"$ac_link\"") >&5
16886   (eval $ac_link) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit $ac_status); } &&
16890          { ac_try='test -s conftest$ac_exeext'
16891   { (eval echo "$as_me:16891: \"$ac_try\"") >&5
16892   (eval $ac_try) 2>&5
16893   ac_status=$?
16894   echo "$as_me:16894: \$? = $ac_status" >&5
16895   (exit $ac_status); }; }; then
16896   cf_cv_have___va_copy=yes
16897 else
16898   echo "$as_me: failed program was:" >&5
16899 cat conftest.$ac_ext >&5
16900 cf_cv_have___va_copy=no
16901 fi
16902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16903 fi
16904 echo "$as_me:16904: result: $cf_cv_have___va_copy" >&5
16905 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16906
16907 test "$cf_cv_have___va_copy" = yes &&
16908 cat >>confdefs.h <<\EOF
16909 #define HAVE___VA_COPY 1
16910 EOF
16911
16912 echo "$as_me:16912: checking for pid_t" >&5
16913 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16914 if test "${ac_cv_type_pid_t+set}" = set; then
16915   echo $ECHO_N "(cached) $ECHO_C" >&6
16916 else
16917   cat >conftest.$ac_ext <<_ACEOF
16918 #line 16918 "configure"
16919 #include "confdefs.h"
16920 $ac_includes_default
16921 int
16922 main ()
16923 {
16924 if ((pid_t *) 0)
16925   return 0;
16926 if (sizeof (pid_t))
16927   return 0;
16928   ;
16929   return 0;
16930 }
16931 _ACEOF
16932 rm -f conftest.$ac_objext
16933 if { (eval echo "$as_me:16933: \"$ac_compile\"") >&5
16934   (eval $ac_compile) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); } &&
16938          { ac_try='test -s conftest.$ac_objext'
16939   { (eval echo "$as_me:16939: \"$ac_try\"") >&5
16940   (eval $ac_try) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); }; }; then
16944   ac_cv_type_pid_t=yes
16945 else
16946   echo "$as_me: failed program was:" >&5
16947 cat conftest.$ac_ext >&5
16948 ac_cv_type_pid_t=no
16949 fi
16950 rm -f conftest.$ac_objext conftest.$ac_ext
16951 fi
16952 echo "$as_me:16952: result: $ac_cv_type_pid_t" >&5
16953 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16954 if test $ac_cv_type_pid_t = yes; then
16955   :
16956 else
16957
16958 cat >>confdefs.h <<EOF
16959 #define pid_t int
16960 EOF
16961
16962 fi
16963
16964 for ac_header in unistd.h vfork.h
16965 do
16966 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16967 echo "$as_me:16967: checking for $ac_header" >&5
16968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16970   echo $ECHO_N "(cached) $ECHO_C" >&6
16971 else
16972   cat >conftest.$ac_ext <<_ACEOF
16973 #line 16973 "configure"
16974 #include "confdefs.h"
16975 #include <$ac_header>
16976 _ACEOF
16977 if { (eval echo "$as_me:16977: \"$ac_cpp conftest.$ac_ext\"") >&5
16978   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16979   ac_status=$?
16980   egrep -v '^ *\+' conftest.er1 >conftest.err
16981   rm -f conftest.er1
16982   cat conftest.err >&5
16983   echo "$as_me:16983: \$? = $ac_status" >&5
16984   (exit $ac_status); } >/dev/null; then
16985   if test -s conftest.err; then
16986     ac_cpp_err=$ac_c_preproc_warn_flag
16987   else
16988     ac_cpp_err=
16989   fi
16990 else
16991   ac_cpp_err=yes
16992 fi
16993 if test -z "$ac_cpp_err"; then
16994   eval "$as_ac_Header=yes"
16995 else
16996   echo "$as_me: failed program was:" >&5
16997   cat conftest.$ac_ext >&5
16998   eval "$as_ac_Header=no"
16999 fi
17000 rm -f conftest.err conftest.$ac_ext
17001 fi
17002 echo "$as_me:17002: result: `eval echo '${'$as_ac_Header'}'`" >&5
17003 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17004 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17005   cat >>confdefs.h <<EOF
17006 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17007 EOF
17008
17009 fi
17010 done
17011
17012 for ac_func in fork vfork
17013 do
17014 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17015 echo "$as_me:17015: checking for $ac_func" >&5
17016 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17017 if eval "test \"\${$as_ac_var+set}\" = set"; then
17018   echo $ECHO_N "(cached) $ECHO_C" >&6
17019 else
17020   cat >conftest.$ac_ext <<_ACEOF
17021 #line 17021 "configure"
17022 #include "confdefs.h"
17023 /* System header to define __stub macros and hopefully few prototypes,
17024     which can conflict with char $ac_func (); below.  */
17025 #include <assert.h>
17026 /* Override any gcc2 internal prototype to avoid an error.  */
17027 #ifdef __cplusplus
17028 extern "C"
17029 #endif
17030 /* We use char because int might match the return type of a gcc2
17031    builtin and then its argument prototype would still apply.  */
17032 char $ac_func ();
17033 char (*f) ();
17034
17035 int
17036 main ()
17037 {
17038 /* The GNU C library defines this for functions which it implements
17039     to always fail with ENOSYS.  Some functions are actually named
17040     something starting with __ and the normal name is an alias.  */
17041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17042 choke me
17043 #else
17044 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17045 #endif
17046
17047   ;
17048   return 0;
17049 }
17050 _ACEOF
17051 rm -f conftest.$ac_objext conftest$ac_exeext
17052 if { (eval echo "$as_me:17052: \"$ac_link\"") >&5
17053   (eval $ac_link) 2>&5
17054   ac_status=$?
17055   echo "$as_me:17055: \$? = $ac_status" >&5
17056   (exit $ac_status); } &&
17057          { ac_try='test -s conftest$ac_exeext'
17058   { (eval echo "$as_me:17058: \"$ac_try\"") >&5
17059   (eval $ac_try) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); }; }; then
17063   eval "$as_ac_var=yes"
17064 else
17065   echo "$as_me: failed program was:" >&5
17066 cat conftest.$ac_ext >&5
17067 eval "$as_ac_var=no"
17068 fi
17069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17070 fi
17071 echo "$as_me:17071: result: `eval echo '${'$as_ac_var'}'`" >&5
17072 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17073 if test `eval echo '${'$as_ac_var'}'` = yes; then
17074   cat >>confdefs.h <<EOF
17075 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17076 EOF
17077
17078 fi
17079 done
17080
17081 ac_cv_func_fork_works=$ac_cv_func_fork
17082 if test "x$ac_cv_func_fork" = xyes; then
17083   echo "$as_me:17083: checking for working fork" >&5
17084 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17085 if test "${ac_cv_func_fork_works+set}" = set; then
17086   echo $ECHO_N "(cached) $ECHO_C" >&6
17087 else
17088   if test "$cross_compiling" = yes; then
17089   ac_cv_func_fork_works=cross
17090 else
17091   cat >conftest.$ac_ext <<_ACEOF
17092 /* By Rüdiger Kuhlmann. */
17093       #include <sys/types.h>
17094       #if HAVE_UNISTD_H
17095       # include <unistd.h>
17096       #endif
17097       /* Some systems only have a dummy stub for fork() */
17098       int main ()
17099       {
17100         if (fork() < 0)
17101           $ac_main_return (1);
17102         $ac_main_return (0);
17103       }
17104 _ACEOF
17105 rm -f conftest$ac_exeext
17106 if { (eval echo "$as_me:17106: \"$ac_link\"") >&5
17107   (eval $ac_link) 2>&5
17108   ac_status=$?
17109   echo "$as_me:17109: \$? = $ac_status" >&5
17110   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17111   { (eval echo "$as_me:17111: \"$ac_try\"") >&5
17112   (eval $ac_try) 2>&5
17113   ac_status=$?
17114   echo "$as_me:17114: \$? = $ac_status" >&5
17115   (exit $ac_status); }; }; then
17116   ac_cv_func_fork_works=yes
17117 else
17118   echo "$as_me: program exited with status $ac_status" >&5
17119 echo "$as_me: failed program was:" >&5
17120 cat conftest.$ac_ext >&5
17121 ac_cv_func_fork_works=no
17122 fi
17123 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17124 fi
17125 fi
17126 echo "$as_me:17126: result: $ac_cv_func_fork_works" >&5
17127 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17128
17129 fi
17130 if test "x$ac_cv_func_fork_works" = xcross; then
17131   case $host in
17132     *-*-amigaos* | *-*-msdosdjgpp*)
17133       # Override, as these systems have only a dummy fork() stub
17134       ac_cv_func_fork_works=no
17135       ;;
17136     *)
17137       ac_cv_func_fork_works=yes
17138       ;;
17139   esac
17140   { echo "$as_me:17140: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17141 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17142 fi
17143 ac_cv_func_vfork_works=$ac_cv_func_vfork
17144 if test "x$ac_cv_func_vfork" = xyes; then
17145   echo "$as_me:17145: checking for working vfork" >&5
17146 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17147 if test "${ac_cv_func_vfork_works+set}" = set; then
17148   echo $ECHO_N "(cached) $ECHO_C" >&6
17149 else
17150   if test "$cross_compiling" = yes; then
17151   ac_cv_func_vfork_works=cross
17152 else
17153   cat >conftest.$ac_ext <<_ACEOF
17154 #line 17154 "configure"
17155 #include "confdefs.h"
17156 /* Thanks to Paul Eggert for this test.  */
17157 #include <stdio.h>
17158 #include <sys/types.h>
17159 #include <sys/stat.h>
17160 #if HAVE_UNISTD_H
17161 # include <unistd.h>
17162 #endif
17163 #if HAVE_VFORK_H
17164 # include <vfork.h>
17165 #endif
17166 /* On some sparc systems, changes by the child to local and incoming
17167    argument registers are propagated back to the parent.  The compiler
17168    is told about this with #include <vfork.h>, but some compilers
17169    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17170    static variable whose address is put into a register that is
17171    clobbered by the vfork.  */
17172 static
17173 #ifdef __cplusplus
17174 sparc_address_test (int arg)
17175 # else
17176 sparc_address_test (arg) int arg;
17177 #endif
17178 {
17179   static pid_t child;
17180   if (!child) {
17181     child = vfork ();
17182     if (child < 0) {
17183       perror ("vfork");
17184       _exit(2);
17185     }
17186     if (!child) {
17187       arg = getpid();
17188       write(-1, "", 0);
17189       _exit (arg);
17190     }
17191   }
17192 }
17193
17194 int
17195 main ()
17196 {
17197   pid_t parent = getpid ();
17198   pid_t child;
17199
17200   sparc_address_test ();
17201
17202   child = vfork ();
17203
17204   if (child == 0) {
17205     /* Here is another test for sparc vfork register problems.  This
17206        test uses lots of local variables, at least as many local
17207        variables as main has allocated so far including compiler
17208        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17209        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17210        reuse the register of parent for one of the local variables,
17211        since it will think that parent can't possibly be used any more
17212        in this routine.  Assigning to the local variable will thus
17213        munge parent in the parent process.  */
17214     pid_t
17215       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17216       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17217     /* Convince the compiler that p..p7 are live; otherwise, it might
17218        use the same hardware register for all 8 local variables.  */
17219     if (p != p1 || p != p2 || p != p3 || p != p4
17220         || p != p5 || p != p6 || p != p7)
17221       _exit(1);
17222
17223     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17224        from child file descriptors.  If the child closes a descriptor
17225        before it execs or exits, this munges the parent's descriptor
17226        as well.  Test for this by closing stdout in the child.  */
17227     _exit(close(fileno(stdout)) != 0);
17228   } else {
17229     int status;
17230     struct stat st;
17231
17232     while (wait(&status) != child)
17233       ;
17234     $ac_main_return(
17235          /* Was there some problem with vforking?  */
17236          child < 0
17237
17238          /* Did the child fail?  (This shouldn't happen.)  */
17239          || status
17240
17241          /* Did the vfork/compiler bug occur?  */
17242          || parent != getpid()
17243
17244          /* Did the file descriptor bug occur?  */
17245          || fstat(fileno(stdout), &st) != 0
17246          );
17247   }
17248 }
17249 _ACEOF
17250 rm -f conftest$ac_exeext
17251 if { (eval echo "$as_me:17251: \"$ac_link\"") >&5
17252   (eval $ac_link) 2>&5
17253   ac_status=$?
17254   echo "$as_me:17254: \$? = $ac_status" >&5
17255   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17256   { (eval echo "$as_me:17256: \"$ac_try\"") >&5
17257   (eval $ac_try) 2>&5
17258   ac_status=$?
17259   echo "$as_me:17259: \$? = $ac_status" >&5
17260   (exit $ac_status); }; }; then
17261   ac_cv_func_vfork_works=yes
17262 else
17263   echo "$as_me: program exited with status $ac_status" >&5
17264 echo "$as_me: failed program was:" >&5
17265 cat conftest.$ac_ext >&5
17266 ac_cv_func_vfork_works=no
17267 fi
17268 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17269 fi
17270 fi
17271 echo "$as_me:17271: result: $ac_cv_func_vfork_works" >&5
17272 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17273
17274 fi;
17275 if test "x$ac_cv_func_fork_works" = xcross; then
17276   ac_cv_func_vfork_works=ac_cv_func_vfork
17277   { echo "$as_me:17277: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17278 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17279 fi
17280
17281 if test "x$ac_cv_func_vfork_works" = xyes; then
17282
17283 cat >>confdefs.h <<\EOF
17284 #define HAVE_WORKING_VFORK 1
17285 EOF
17286
17287 else
17288
17289 cat >>confdefs.h <<\EOF
17290 #define vfork fork
17291 EOF
17292
17293 fi
17294 if test "x$ac_cv_func_fork_works" = xyes; then
17295
17296 cat >>confdefs.h <<\EOF
17297 #define HAVE_WORKING_FORK 1
17298 EOF
17299
17300 fi
17301
17302 # special check for test/ditto.c
17303
17304 echo "$as_me:17304: checking for openpty in -lutil" >&5
17305 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17306 if test "${ac_cv_lib_util_openpty+set}" = set; then
17307   echo $ECHO_N "(cached) $ECHO_C" >&6
17308 else
17309   ac_check_lib_save_LIBS=$LIBS
17310 LIBS="-lutil  $LIBS"
17311 cat >conftest.$ac_ext <<_ACEOF
17312 #line 17312 "configure"
17313 #include "confdefs.h"
17314
17315 /* Override any gcc2 internal prototype to avoid an error.  */
17316 #ifdef __cplusplus
17317 extern "C"
17318 #endif
17319 /* We use char because int might match the return type of a gcc2
17320    builtin and then its argument prototype would still apply.  */
17321 char openpty ();
17322 int
17323 main ()
17324 {
17325 openpty ();
17326   ;
17327   return 0;
17328 }
17329 _ACEOF
17330 rm -f conftest.$ac_objext conftest$ac_exeext
17331 if { (eval echo "$as_me:17331: \"$ac_link\"") >&5
17332   (eval $ac_link) 2>&5
17333   ac_status=$?
17334   echo "$as_me:17334: \$? = $ac_status" >&5
17335   (exit $ac_status); } &&
17336          { ac_try='test -s conftest$ac_exeext'
17337   { (eval echo "$as_me:17337: \"$ac_try\"") >&5
17338   (eval $ac_try) 2>&5
17339   ac_status=$?
17340   echo "$as_me:17340: \$? = $ac_status" >&5
17341   (exit $ac_status); }; }; then
17342   ac_cv_lib_util_openpty=yes
17343 else
17344   echo "$as_me: failed program was:" >&5
17345 cat conftest.$ac_ext >&5
17346 ac_cv_lib_util_openpty=no
17347 fi
17348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17349 LIBS=$ac_check_lib_save_LIBS
17350 fi
17351 echo "$as_me:17351: result: $ac_cv_lib_util_openpty" >&5
17352 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17353 if test $ac_cv_lib_util_openpty = yes; then
17354   cf_cv_lib_util=yes
17355 else
17356   cf_cv_lib_util=no
17357 fi
17358
17359 echo "$as_me:17359: checking for openpty header" >&5
17360 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17361 if test "${cf_cv_func_openpty+set}" = set; then
17362   echo $ECHO_N "(cached) $ECHO_C" >&6
17363 else
17364
17365     cf_save_LIBS="$LIBS"
17366     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17367     for cf_header in pty.h libutil.h util.h
17368     do
17369     cat >conftest.$ac_ext <<_ACEOF
17370 #line 17370 "configure"
17371 #include "confdefs.h"
17372
17373 #include <$cf_header>
17374
17375 int
17376 main ()
17377 {
17378
17379     int x = openpty((int *)0, (int *)0, (char *)0,
17380                    (struct termios *)0, (struct winsize *)0);
17381
17382   ;
17383   return 0;
17384 }
17385 _ACEOF
17386 rm -f conftest.$ac_objext conftest$ac_exeext
17387 if { (eval echo "$as_me:17387: \"$ac_link\"") >&5
17388   (eval $ac_link) 2>&5
17389   ac_status=$?
17390   echo "$as_me:17390: \$? = $ac_status" >&5
17391   (exit $ac_status); } &&
17392          { ac_try='test -s conftest$ac_exeext'
17393   { (eval echo "$as_me:17393: \"$ac_try\"") >&5
17394   (eval $ac_try) 2>&5
17395   ac_status=$?
17396   echo "$as_me:17396: \$? = $ac_status" >&5
17397   (exit $ac_status); }; }; then
17398
17399         cf_cv_func_openpty=$cf_header
17400         break
17401
17402 else
17403   echo "$as_me: failed program was:" >&5
17404 cat conftest.$ac_ext >&5
17405
17406         cf_cv_func_openpty=no
17407
17408 fi
17409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17410     done
17411     LIBS="$cf_save_LIBS"
17412
17413 fi
17414 echo "$as_me:17414: result: $cf_cv_func_openpty" >&5
17415 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17416
17417 if test "$cf_cv_func_openpty" != no ; then
17418
17419 cat >>confdefs.h <<EOF
17420 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17421 EOF
17422
17423 cat >>confdefs.h <<\EOF
17424 #define USE_XTERM_PTY 1
17425 EOF
17426
17427     if test "x$cf_cv_lib_util" = xyes ; then
17428         TEST_LIBS="-lutil $TEST_LIBS"
17429     fi
17430 fi
17431
17432 if test "$with_hashed_db" != no ; then
17433
17434 cat >>confdefs.h <<\EOF
17435 #define USE_HASHED_DB 1
17436 EOF
17437
17438 case $with_hashed_db in #(vi
17439 yes|*able*) #(vi
17440     ;;
17441 *)
17442     if test -d "$with_hashed_db" ; then
17443
17444 if test -n "$with_hashed_db/include" ; then
17445   for cf_add_incdir in $with_hashed_db/include
17446   do
17447         while test $cf_add_incdir != /usr/include
17448         do
17449           if test -d $cf_add_incdir
17450           then
17451                 cf_have_incdir=no
17452                 if test -n "$CFLAGS$CPPFLAGS" ; then
17453                   # a loop is needed to ensure we can add subdirs of existing dirs
17454                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17455                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17456                           cf_have_incdir=yes; break
17457                         fi
17458                   done
17459                 fi
17460
17461                 if test "$cf_have_incdir" = no ; then
17462                   if test "$cf_add_incdir" = /usr/local/include ; then
17463                         if test "$GCC" = yes
17464                         then
17465                           cf_save_CPPFLAGS=$CPPFLAGS
17466                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17467                           cat >conftest.$ac_ext <<_ACEOF
17468 #line 17468 "configure"
17469 #include "confdefs.h"
17470 #include <stdio.h>
17471 int
17472 main ()
17473 {
17474 printf("Hello")
17475   ;
17476   return 0;
17477 }
17478 _ACEOF
17479 rm -f conftest.$ac_objext
17480 if { (eval echo "$as_me:17480: \"$ac_compile\"") >&5
17481   (eval $ac_compile) 2>&5
17482   ac_status=$?
17483   echo "$as_me:17483: \$? = $ac_status" >&5
17484   (exit $ac_status); } &&
17485          { ac_try='test -s conftest.$ac_objext'
17486   { (eval echo "$as_me:17486: \"$ac_try\"") >&5
17487   (eval $ac_try) 2>&5
17488   ac_status=$?
17489   echo "$as_me:17489: \$? = $ac_status" >&5
17490   (exit $ac_status); }; }; then
17491   :
17492 else
17493   echo "$as_me: failed program was:" >&5
17494 cat conftest.$ac_ext >&5
17495 cf_have_incdir=yes
17496 fi
17497 rm -f conftest.$ac_objext conftest.$ac_ext
17498                           CPPFLAGS=$cf_save_CPPFLAGS
17499                         fi
17500                   fi
17501                 fi
17502
17503                 if test "$cf_have_incdir" = no ; then
17504                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17505
17506 echo "${as_me:-configure}:17506: testing adding $cf_add_incdir to include-path ..." 1>&5
17507
17508                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17509
17510                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17511                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17512                   cf_add_incdir="$cf_top_incdir"
17513                 else
17514                   break
17515                 fi
17516           fi
17517         done
17518   done
17519 fi
17520
17521 if test -n "$with_hashed_db/lib" ; then
17522   for cf_add_libdir in $with_hashed_db/lib
17523   do
17524     if test $cf_add_libdir = /usr/lib ; then
17525       :
17526     elif test -d $cf_add_libdir
17527     then
17528       cf_have_libdir=no
17529       if test -n "$LDFLAGS$LIBS" ; then
17530         # a loop is needed to ensure we can add subdirs of existing dirs
17531         for cf_test_libdir in $LDFLAGS $LIBS ; do
17532           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17533             cf_have_libdir=yes; break
17534           fi
17535         done
17536       fi
17537       if test "$cf_have_libdir" = no ; then
17538         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17539
17540 echo "${as_me:-configure}:17540: testing adding $cf_add_libdir to library-path ..." 1>&5
17541
17542         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17543       fi
17544     fi
17545   done
17546 fi
17547
17548     fi
17549 esac
17550
17551 echo "$as_me:17551: checking for db.h" >&5
17552 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17553 if test "${ac_cv_header_db_h+set}" = set; then
17554   echo $ECHO_N "(cached) $ECHO_C" >&6
17555 else
17556   cat >conftest.$ac_ext <<_ACEOF
17557 #line 17557 "configure"
17558 #include "confdefs.h"
17559 #include <db.h>
17560 _ACEOF
17561 if { (eval echo "$as_me:17561: \"$ac_cpp conftest.$ac_ext\"") >&5
17562   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17563   ac_status=$?
17564   egrep -v '^ *\+' conftest.er1 >conftest.err
17565   rm -f conftest.er1
17566   cat conftest.err >&5
17567   echo "$as_me:17567: \$? = $ac_status" >&5
17568   (exit $ac_status); } >/dev/null; then
17569   if test -s conftest.err; then
17570     ac_cpp_err=$ac_c_preproc_warn_flag
17571   else
17572     ac_cpp_err=
17573   fi
17574 else
17575   ac_cpp_err=yes
17576 fi
17577 if test -z "$ac_cpp_err"; then
17578   ac_cv_header_db_h=yes
17579 else
17580   echo "$as_me: failed program was:" >&5
17581   cat conftest.$ac_ext >&5
17582   ac_cv_header_db_h=no
17583 fi
17584 rm -f conftest.err conftest.$ac_ext
17585 fi
17586 echo "$as_me:17586: result: $ac_cv_header_db_h" >&5
17587 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17588 if test $ac_cv_header_db_h = yes; then
17589
17590 echo "$as_me:17590: checking for version of db" >&5
17591 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17592 if test "${cf_cv_hashed_db_version+set}" = set; then
17593   echo $ECHO_N "(cached) $ECHO_C" >&6
17594 else
17595
17596 cf_cv_hashed_db_version=unknown
17597
17598 for cf_db_version in 1 2 3 4 5
17599 do
17600
17601 echo "${as_me:-configure}:17601: testing checking for db version $cf_db_version ..." 1>&5
17602
17603         cat >conftest.$ac_ext <<_ACEOF
17604 #line 17604 "configure"
17605 #include "confdefs.h"
17606
17607 $ac_includes_default
17608 #include <db.h>
17609
17610 #ifdef DB_VERSION_MAJOR
17611         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17612 #if $cf_db_version == DB_VERSION_MAJOR
17613         /* ok */
17614 #else
17615         make an error
17616 #endif
17617 #else
17618 #if $cf_db_version == 1
17619         /* ok: assuming this is DB 1.8.5 */
17620 #else
17621         make an error
17622 #endif
17623 #endif
17624
17625 int
17626 main ()
17627 {
17628 DBT *foo = 0
17629   ;
17630   return 0;
17631 }
17632 _ACEOF
17633 rm -f conftest.$ac_objext
17634 if { (eval echo "$as_me:17634: \"$ac_compile\"") >&5
17635   (eval $ac_compile) 2>&5
17636   ac_status=$?
17637   echo "$as_me:17637: \$? = $ac_status" >&5
17638   (exit $ac_status); } &&
17639          { ac_try='test -s conftest.$ac_objext'
17640   { (eval echo "$as_me:17640: \"$ac_try\"") >&5
17641   (eval $ac_try) 2>&5
17642   ac_status=$?
17643   echo "$as_me:17643: \$? = $ac_status" >&5
17644   (exit $ac_status); }; }; then
17645
17646         cf_cv_hashed_db_version=$cf_db_version
17647         break
17648
17649 else
17650   echo "$as_me: failed program was:" >&5
17651 cat conftest.$ac_ext >&5
17652 fi
17653 rm -f conftest.$ac_objext conftest.$ac_ext
17654 done
17655
17656 fi
17657 echo "$as_me:17657: result: $cf_cv_hashed_db_version" >&5
17658 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17659
17660 if test "$cf_cv_hashed_db_version" = unknown ; then
17661         { { echo "$as_me:17661: error: Cannot determine version of db" >&5
17662 echo "$as_me: error: Cannot determine version of db" >&2;}
17663    { (exit 1); exit 1; }; }
17664 else
17665
17666 echo "$as_me:17666: checking for db libraries" >&5
17667 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17668 if test "${cf_cv_hashed_db_libs+set}" = set; then
17669   echo $ECHO_N "(cached) $ECHO_C" >&6
17670 else
17671
17672 cf_cv_hashed_db_libs=unknown
17673 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17674 do
17675         cf_save_libs="$LIBS"
17676         if test -n "$cf_db_libs"; then
17677                 LIBS="-l$cf_db_libs $LIBS"
17678         fi
17679
17680 echo "${as_me:-configure}:17680: testing checking for library "$cf_db_libs" ..." 1>&5
17681
17682         cat >conftest.$ac_ext <<_ACEOF
17683 #line 17683 "configure"
17684 #include "confdefs.h"
17685
17686 $ac_includes_default
17687 #include <db.h>
17688
17689 int
17690 main ()
17691 {
17692
17693         char *path = "/tmp/foo";
17694 #ifdef DB_VERSION_MAJOR
17695 #if DB_VERSION_MAJOR >= 4
17696         DB *result = 0;
17697         db_create(&result, NULL, 0);
17698         result->open(result,
17699                 NULL,
17700                 path,
17701                 path,
17702                 DB_HASH,
17703                 DB_CREATE,
17704                 0644);
17705 #elif DB_VERSION_MAJOR >= 3
17706         DB *result = 0;
17707         db_create(&result, NULL, 0);
17708         result->open(result,
17709                 path,
17710                 path,
17711                 DB_HASH,
17712                 DB_CREATE,
17713                 0644);
17714 #elif DB_VERSION_MAJOR >= 2
17715         DB *result = 0;
17716         db_open(path,
17717                 DB_HASH,
17718                 DB_CREATE,
17719                 0644,
17720                 (DB_ENV *) 0,
17721                 (DB_INFO *) 0,
17722                 &result);
17723 #endif /* DB_VERSION_MAJOR */
17724 #else
17725         DB *result = dbopen(path,
17726                      2,
17727                      0644,
17728                      DB_HASH,
17729                      0);
17730 #endif
17731         ${cf_cv_main_return:-return}(result != 0)
17732
17733   ;
17734   return 0;
17735 }
17736 _ACEOF
17737 rm -f conftest.$ac_objext conftest$ac_exeext
17738 if { (eval echo "$as_me:17738: \"$ac_link\"") >&5
17739   (eval $ac_link) 2>&5
17740   ac_status=$?
17741   echo "$as_me:17741: \$? = $ac_status" >&5
17742   (exit $ac_status); } &&
17743          { ac_try='test -s conftest$ac_exeext'
17744   { (eval echo "$as_me:17744: \"$ac_try\"") >&5
17745   (eval $ac_try) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit $ac_status); }; }; then
17749
17750         if test -n "$cf_db_libs" ; then
17751                 cf_cv_hashed_db_libs=$cf_db_libs
17752         else
17753                 cf_cv_hashed_db_libs=default
17754         fi
17755         LIBS="$cf_save_libs"
17756         break
17757
17758 else
17759   echo "$as_me: failed program was:" >&5
17760 cat conftest.$ac_ext >&5
17761 fi
17762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17763         LIBS="$cf_save_libs"
17764 done
17765
17766 fi
17767 echo "$as_me:17767: result: $cf_cv_hashed_db_libs" >&5
17768 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17769
17770         if test "$cf_cv_hashed_db_libs" = unknown ; then
17771                 { { echo "$as_me:17771: error: Cannot determine library for db" >&5
17772 echo "$as_me: error: Cannot determine library for db" >&2;}
17773    { (exit 1); exit 1; }; }
17774         elif test "$cf_cv_hashed_db_libs" != default ; then
17775                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17776         fi
17777 fi
17778
17779 else
17780
17781         { { echo "$as_me:17781: error: Cannot find db.h" >&5
17782 echo "$as_me: error: Cannot find db.h" >&2;}
17783    { (exit 1); exit 1; }; }
17784
17785 fi
17786
17787 fi
17788
17789 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17790         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17791         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17792 fi
17793
17794 # Just in case, check if the C compiler has a bool type.
17795
17796 echo "$as_me:17796: checking if we should include stdbool.h" >&5
17797 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17798
17799 if test "${cf_cv_header_stdbool_h+set}" = set; then
17800   echo $ECHO_N "(cached) $ECHO_C" >&6
17801 else
17802
17803         cat >conftest.$ac_ext <<_ACEOF
17804 #line 17804 "configure"
17805 #include "confdefs.h"
17806
17807 int
17808 main ()
17809 {
17810 bool foo = false
17811   ;
17812   return 0;
17813 }
17814 _ACEOF
17815 rm -f conftest.$ac_objext
17816 if { (eval echo "$as_me:17816: \"$ac_compile\"") >&5
17817   (eval $ac_compile) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); } &&
17821          { ac_try='test -s conftest.$ac_objext'
17822   { (eval echo "$as_me:17822: \"$ac_try\"") >&5
17823   (eval $ac_try) 2>&5
17824   ac_status=$?
17825   echo "$as_me:17825: \$? = $ac_status" >&5
17826   (exit $ac_status); }; }; then
17827   cf_cv_header_stdbool_h=0
17828 else
17829   echo "$as_me: failed program was:" >&5
17830 cat conftest.$ac_ext >&5
17831 cat >conftest.$ac_ext <<_ACEOF
17832 #line 17832 "configure"
17833 #include "confdefs.h"
17834
17835 #ifndef __BEOS__
17836 #include <stdbool.h>
17837 #endif
17838
17839 int
17840 main ()
17841 {
17842 bool foo = false
17843   ;
17844   return 0;
17845 }
17846 _ACEOF
17847 rm -f conftest.$ac_objext
17848 if { (eval echo "$as_me:17848: \"$ac_compile\"") >&5
17849   (eval $ac_compile) 2>&5
17850   ac_status=$?
17851   echo "$as_me:17851: \$? = $ac_status" >&5
17852   (exit $ac_status); } &&
17853          { ac_try='test -s conftest.$ac_objext'
17854   { (eval echo "$as_me:17854: \"$ac_try\"") >&5
17855   (eval $ac_try) 2>&5
17856   ac_status=$?
17857   echo "$as_me:17857: \$? = $ac_status" >&5
17858   (exit $ac_status); }; }; then
17859   cf_cv_header_stdbool_h=1
17860 else
17861   echo "$as_me: failed program was:" >&5
17862 cat conftest.$ac_ext >&5
17863 cf_cv_header_stdbool_h=0
17864 fi
17865 rm -f conftest.$ac_objext conftest.$ac_ext
17866 fi
17867 rm -f conftest.$ac_objext conftest.$ac_ext
17868 fi
17869
17870 if test "$cf_cv_header_stdbool_h" = 1
17871 then    echo "$as_me:17871: result: yes" >&5
17872 echo "${ECHO_T}yes" >&6
17873 else    echo "$as_me:17873: result: no" >&5
17874 echo "${ECHO_T}no" >&6
17875 fi
17876
17877 echo "$as_me:17877: checking for builtin bool type" >&5
17878 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17879
17880 if test "${cf_cv_cc_bool_type+set}" = set; then
17881   echo $ECHO_N "(cached) $ECHO_C" >&6
17882 else
17883
17884         cat >conftest.$ac_ext <<_ACEOF
17885 #line 17885 "configure"
17886 #include "confdefs.h"
17887
17888 #include <stdio.h>
17889 #include <sys/types.h>
17890
17891 int
17892 main ()
17893 {
17894 bool x = false
17895   ;
17896   return 0;
17897 }
17898 _ACEOF
17899 rm -f conftest.$ac_objext
17900 if { (eval echo "$as_me:17900: \"$ac_compile\"") >&5
17901   (eval $ac_compile) 2>&5
17902   ac_status=$?
17903   echo "$as_me:17903: \$? = $ac_status" >&5
17904   (exit $ac_status); } &&
17905          { ac_try='test -s conftest.$ac_objext'
17906   { (eval echo "$as_me:17906: \"$ac_try\"") >&5
17907   (eval $ac_try) 2>&5
17908   ac_status=$?
17909   echo "$as_me:17909: \$? = $ac_status" >&5
17910   (exit $ac_status); }; }; then
17911   cf_cv_cc_bool_type=1
17912 else
17913   echo "$as_me: failed program was:" >&5
17914 cat conftest.$ac_ext >&5
17915 cf_cv_cc_bool_type=0
17916 fi
17917 rm -f conftest.$ac_objext conftest.$ac_ext
17918
17919 fi
17920
17921 if test "$cf_cv_cc_bool_type" = 1
17922 then    echo "$as_me:17922: result: yes" >&5
17923 echo "${ECHO_T}yes" >&6
17924 else    echo "$as_me:17924: result: no" >&5
17925 echo "${ECHO_T}no" >&6
17926 fi
17927
17928 # Check for C++ compiler characteristics (and ensure that it's there!)
17929 if test -n "$CXX" ; then
17930         ac_ext=cc
17931 ac_cpp='$CXXCPP $CPPFLAGS'
17932 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17933 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17934 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17935 ac_main_return=return
17936
17937 if test -n "$GXX" ; then
17938 case $cf_cv_system_name in #(vi
17939 os2*) #(vi
17940         cf_stdcpp_libname=stdcpp
17941         ;;
17942 *)
17943         cf_stdcpp_libname=stdc++
17944         ;;
17945 esac
17946 echo "$as_me:17946: checking for library $cf_stdcpp_libname" >&5
17947 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17948 if test "${cf_cv_libstdcpp+set}" = set; then
17949   echo $ECHO_N "(cached) $ECHO_C" >&6
17950 else
17951
17952         cf_save="$LIBS"
17953         LIBS="-l$cf_stdcpp_libname $LIBS"
17954 cat >conftest.$ac_ext <<_ACEOF
17955 #line 17955 "configure"
17956 #include "confdefs.h"
17957
17958 #include <strstream.h>
17959 int
17960 main ()
17961 {
17962
17963 char buf[80];
17964 strstreambuf foo(buf, sizeof(buf))
17965
17966   ;
17967   return 0;
17968 }
17969 _ACEOF
17970 rm -f conftest.$ac_objext conftest$ac_exeext
17971 if { (eval echo "$as_me:17971: \"$ac_link\"") >&5
17972   (eval $ac_link) 2>&5
17973   ac_status=$?
17974   echo "$as_me:17974: \$? = $ac_status" >&5
17975   (exit $ac_status); } &&
17976          { ac_try='test -s conftest$ac_exeext'
17977   { (eval echo "$as_me:17977: \"$ac_try\"") >&5
17978   (eval $ac_try) 2>&5
17979   ac_status=$?
17980   echo "$as_me:17980: \$? = $ac_status" >&5
17981   (exit $ac_status); }; }; then
17982   cf_cv_libstdcpp=yes
17983 else
17984   echo "$as_me: failed program was:" >&5
17985 cat conftest.$ac_ext >&5
17986 cf_cv_libstdcpp=no
17987 fi
17988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17989         LIBS="$cf_save"
17990
17991 fi
17992 echo "$as_me:17992: result: $cf_cv_libstdcpp" >&5
17993 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17994 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17995 fi
17996
17997         echo "$as_me:17997: checking whether $CXX understands -c and -o together" >&5
17998 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17999 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18000   echo $ECHO_N "(cached) $ECHO_C" >&6
18001 else
18002
18003 cat > conftest.$ac_ext <<CF_EOF
18004 #include <stdio.h>
18005 int main()
18006 {
18007         ${cf_cv_main_return:-return}(0);
18008 }
18009 CF_EOF
18010 # We do the test twice because some compilers refuse to overwrite an
18011 # existing .o file with -o, though they will create one.
18012 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18013 if { (eval echo "$as_me:18013: \"$ac_try\"") >&5
18014   (eval $ac_try) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); } &&
18018   test -f conftest2.$ac_objext && { (eval echo "$as_me:18018: \"$ac_try\"") >&5
18019   (eval $ac_try) 2>&5
18020   ac_status=$?
18021   echo "$as_me:18021: \$? = $ac_status" >&5
18022   (exit $ac_status); };
18023 then
18024   eval cf_cv_prog_CXX_c_o=yes
18025 else
18026   eval cf_cv_prog_CXX_c_o=no
18027 fi
18028 rm -rf conftest*
18029
18030 fi
18031 if test $cf_cv_prog_CXX_c_o = yes; then
18032   echo "$as_me:18032: result: yes" >&5
18033 echo "${ECHO_T}yes" >&6
18034 else
18035   echo "$as_me:18035: result: no" >&5
18036 echo "${ECHO_T}no" >&6
18037 fi
18038
18039         case $GXX_VERSION in
18040         1*|2.0-6*)
18041                 cf_cxx_library=yes
18042                 ;;
18043         *-2.7*|2.7*)
18044
18045 cf_cxx_library=unknown
18046 case $cf_cv_system_name in #(vi
18047 os2*) #(vi
18048         cf_gpp_libname=gpp
18049         ;;
18050 *)
18051         cf_gpp_libname=g++
18052         ;;
18053 esac
18054 if test "$GXX" = yes; then
18055         echo "$as_me:18055: checking for lib$cf_gpp_libname" >&5
18056 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18057         cf_save="$LIBS"
18058         LIBS="-l$cf_gpp_libname $LIBS"
18059         cat >conftest.$ac_ext <<_ACEOF
18060 #line 18060 "configure"
18061 #include "confdefs.h"
18062
18063 #include <$cf_gpp_libname/builtin.h>
18064
18065 int
18066 main ()
18067 {
18068 two_arg_error_handler_t foo2 = lib_error_handler
18069   ;
18070   return 0;
18071 }
18072 _ACEOF
18073 rm -f conftest.$ac_objext conftest$ac_exeext
18074 if { (eval echo "$as_me:18074: \"$ac_link\"") >&5
18075   (eval $ac_link) 2>&5
18076   ac_status=$?
18077   echo "$as_me:18077: \$? = $ac_status" >&5
18078   (exit $ac_status); } &&
18079          { ac_try='test -s conftest$ac_exeext'
18080   { (eval echo "$as_me:18080: \"$ac_try\"") >&5
18081   (eval $ac_try) 2>&5
18082   ac_status=$?
18083   echo "$as_me:18083: \$? = $ac_status" >&5
18084   (exit $ac_status); }; }; then
18085   cf_cxx_library=yes
18086          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18087          if test "$cf_gpp_libname" = cpp ; then
18088
18089 cat >>confdefs.h <<\EOF
18090 #define HAVE_GPP_BUILTIN_H 1
18091 EOF
18092
18093          else
18094
18095 cat >>confdefs.h <<\EOF
18096 #define HAVE_GXX_BUILTIN_H 1
18097 EOF
18098
18099          fi
18100 else
18101   echo "$as_me: failed program was:" >&5
18102 cat conftest.$ac_ext >&5
18103 cat >conftest.$ac_ext <<_ACEOF
18104 #line 18104 "configure"
18105 #include "confdefs.h"
18106
18107 #include <builtin.h>
18108
18109 int
18110 main ()
18111 {
18112 two_arg_error_handler_t foo2 = lib_error_handler
18113   ;
18114   return 0;
18115 }
18116 _ACEOF
18117 rm -f conftest.$ac_objext conftest$ac_exeext
18118 if { (eval echo "$as_me:18118: \"$ac_link\"") >&5
18119   (eval $ac_link) 2>&5
18120   ac_status=$?
18121   echo "$as_me:18121: \$? = $ac_status" >&5
18122   (exit $ac_status); } &&
18123          { ac_try='test -s conftest$ac_exeext'
18124   { (eval echo "$as_me:18124: \"$ac_try\"") >&5
18125   (eval $ac_try) 2>&5
18126   ac_status=$?
18127   echo "$as_me:18127: \$? = $ac_status" >&5
18128   (exit $ac_status); }; }; then
18129   cf_cxx_library=yes
18130          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18131
18132 cat >>confdefs.h <<\EOF
18133 #define HAVE_BUILTIN_H 1
18134 EOF
18135
18136 else
18137   echo "$as_me: failed program was:" >&5
18138 cat conftest.$ac_ext >&5
18139 cf_cxx_library=no
18140 fi
18141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18142 fi
18143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18144         LIBS="$cf_save"
18145         echo "$as_me:18145: result: $cf_cxx_library" >&5
18146 echo "${ECHO_T}$cf_cxx_library" >&6
18147 fi
18148
18149                 ;;
18150         *)
18151                 cf_cxx_library=no
18152                 ;;
18153         esac
18154
18155         ac_ext=cc
18156 ac_cpp='$CXXCPP $CPPFLAGS'
18157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18158 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18160 ac_main_return=return
18161 echo "$as_me:18161: checking how to run the C++ preprocessor" >&5
18162 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18163 if test -z "$CXXCPP"; then
18164   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18165   echo $ECHO_N "(cached) $ECHO_C" >&6
18166 else
18167       # Double quotes because CXXCPP needs to be expanded
18168     for CXXCPP in "$CXX -E" "/lib/cpp"
18169     do
18170       ac_preproc_ok=false
18171 for ac_cxx_preproc_warn_flag in '' yes
18172 do
18173   # Use a header file that comes with gcc, so configuring glibc
18174   # with a fresh cross-compiler works.
18175   # On the NeXT, cc -E runs the code through the compiler's parser,
18176   # not just through cpp. "Syntax error" is here to catch this case.
18177   cat >conftest.$ac_ext <<_ACEOF
18178 #line 18178 "configure"
18179 #include "confdefs.h"
18180 #include <assert.h>
18181                      Syntax error
18182 _ACEOF
18183 if { (eval echo "$as_me:18183: \"$ac_cpp conftest.$ac_ext\"") >&5
18184   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18185   ac_status=$?
18186   egrep -v '^ *\+' conftest.er1 >conftest.err
18187   rm -f conftest.er1
18188   cat conftest.err >&5
18189   echo "$as_me:18189: \$? = $ac_status" >&5
18190   (exit $ac_status); } >/dev/null; then
18191   if test -s conftest.err; then
18192     ac_cpp_err=$ac_cxx_preproc_warn_flag
18193   else
18194     ac_cpp_err=
18195   fi
18196 else
18197   ac_cpp_err=yes
18198 fi
18199 if test -z "$ac_cpp_err"; then
18200   :
18201 else
18202   echo "$as_me: failed program was:" >&5
18203   cat conftest.$ac_ext >&5
18204   # Broken: fails on valid input.
18205 continue
18206 fi
18207 rm -f conftest.err conftest.$ac_ext
18208
18209   # OK, works on sane cases.  Now check whether non-existent headers
18210   # can be detected and how.
18211   cat >conftest.$ac_ext <<_ACEOF
18212 #line 18212 "configure"
18213 #include "confdefs.h"
18214 #include <ac_nonexistent.h>
18215 _ACEOF
18216 if { (eval echo "$as_me:18216: \"$ac_cpp conftest.$ac_ext\"") >&5
18217   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18218   ac_status=$?
18219   egrep -v '^ *\+' conftest.er1 >conftest.err
18220   rm -f conftest.er1
18221   cat conftest.err >&5
18222   echo "$as_me:18222: \$? = $ac_status" >&5
18223   (exit $ac_status); } >/dev/null; then
18224   if test -s conftest.err; then
18225     ac_cpp_err=$ac_cxx_preproc_warn_flag
18226   else
18227     ac_cpp_err=
18228   fi
18229 else
18230   ac_cpp_err=yes
18231 fi
18232 if test -z "$ac_cpp_err"; then
18233   # Broken: success on invalid input.
18234 continue
18235 else
18236   echo "$as_me: failed program was:" >&5
18237   cat conftest.$ac_ext >&5
18238   # Passes both tests.
18239 ac_preproc_ok=:
18240 break
18241 fi
18242 rm -f conftest.err conftest.$ac_ext
18243
18244 done
18245 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18246 rm -f conftest.err conftest.$ac_ext
18247 if $ac_preproc_ok; then
18248   break
18249 fi
18250
18251     done
18252     ac_cv_prog_CXXCPP=$CXXCPP
18253
18254 fi
18255   CXXCPP=$ac_cv_prog_CXXCPP
18256 else
18257   ac_cv_prog_CXXCPP=$CXXCPP
18258 fi
18259 echo "$as_me:18259: result: $CXXCPP" >&5
18260 echo "${ECHO_T}$CXXCPP" >&6
18261 ac_preproc_ok=false
18262 for ac_cxx_preproc_warn_flag in '' yes
18263 do
18264   # Use a header file that comes with gcc, so configuring glibc
18265   # with a fresh cross-compiler works.
18266   # On the NeXT, cc -E runs the code through the compiler's parser,
18267   # not just through cpp. "Syntax error" is here to catch this case.
18268   cat >conftest.$ac_ext <<_ACEOF
18269 #line 18269 "configure"
18270 #include "confdefs.h"
18271 #include <assert.h>
18272                      Syntax error
18273 _ACEOF
18274 if { (eval echo "$as_me:18274: \"$ac_cpp conftest.$ac_ext\"") >&5
18275   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18276   ac_status=$?
18277   egrep -v '^ *\+' conftest.er1 >conftest.err
18278   rm -f conftest.er1
18279   cat conftest.err >&5
18280   echo "$as_me:18280: \$? = $ac_status" >&5
18281   (exit $ac_status); } >/dev/null; then
18282   if test -s conftest.err; then
18283     ac_cpp_err=$ac_cxx_preproc_warn_flag
18284   else
18285     ac_cpp_err=
18286   fi
18287 else
18288   ac_cpp_err=yes
18289 fi
18290 if test -z "$ac_cpp_err"; then
18291   :
18292 else
18293   echo "$as_me: failed program was:" >&5
18294   cat conftest.$ac_ext >&5
18295   # Broken: fails on valid input.
18296 continue
18297 fi
18298 rm -f conftest.err conftest.$ac_ext
18299
18300   # OK, works on sane cases.  Now check whether non-existent headers
18301   # can be detected and how.
18302   cat >conftest.$ac_ext <<_ACEOF
18303 #line 18303 "configure"
18304 #include "confdefs.h"
18305 #include <ac_nonexistent.h>
18306 _ACEOF
18307 if { (eval echo "$as_me:18307: \"$ac_cpp conftest.$ac_ext\"") >&5
18308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18309   ac_status=$?
18310   egrep -v '^ *\+' conftest.er1 >conftest.err
18311   rm -f conftest.er1
18312   cat conftest.err >&5
18313   echo "$as_me:18313: \$? = $ac_status" >&5
18314   (exit $ac_status); } >/dev/null; then
18315   if test -s conftest.err; then
18316     ac_cpp_err=$ac_cxx_preproc_warn_flag
18317   else
18318     ac_cpp_err=
18319   fi
18320 else
18321   ac_cpp_err=yes
18322 fi
18323 if test -z "$ac_cpp_err"; then
18324   # Broken: success on invalid input.
18325 continue
18326 else
18327   echo "$as_me: failed program was:" >&5
18328   cat conftest.$ac_ext >&5
18329   # Passes both tests.
18330 ac_preproc_ok=:
18331 break
18332 fi
18333 rm -f conftest.err conftest.$ac_ext
18334
18335 done
18336 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18337 rm -f conftest.err conftest.$ac_ext
18338 if $ac_preproc_ok; then
18339   :
18340 else
18341   { { echo "$as_me:18341: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18342 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18343    { (exit 1); exit 1; }; }
18344 fi
18345
18346 ac_ext=cc
18347 ac_cpp='$CXXCPP $CPPFLAGS'
18348 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18349 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18350 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18351 ac_main_return=return
18352
18353 for ac_header in typeinfo
18354 do
18355 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18356 echo "$as_me:18356: checking for $ac_header" >&5
18357 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18358 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18359   echo $ECHO_N "(cached) $ECHO_C" >&6
18360 else
18361   cat >conftest.$ac_ext <<_ACEOF
18362 #line 18362 "configure"
18363 #include "confdefs.h"
18364 #include <$ac_header>
18365 _ACEOF
18366 if { (eval echo "$as_me:18366: \"$ac_cpp conftest.$ac_ext\"") >&5
18367   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18368   ac_status=$?
18369   egrep -v '^ *\+' conftest.er1 >conftest.err
18370   rm -f conftest.er1
18371   cat conftest.err >&5
18372   echo "$as_me:18372: \$? = $ac_status" >&5
18373   (exit $ac_status); } >/dev/null; then
18374   if test -s conftest.err; then
18375     ac_cpp_err=$ac_cxx_preproc_warn_flag
18376   else
18377     ac_cpp_err=
18378   fi
18379 else
18380   ac_cpp_err=yes
18381 fi
18382 if test -z "$ac_cpp_err"; then
18383   eval "$as_ac_Header=yes"
18384 else
18385   echo "$as_me: failed program was:" >&5
18386   cat conftest.$ac_ext >&5
18387   eval "$as_ac_Header=no"
18388 fi
18389 rm -f conftest.err conftest.$ac_ext
18390 fi
18391 echo "$as_me:18391: result: `eval echo '${'$as_ac_Header'}'`" >&5
18392 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18393 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18394   cat >>confdefs.h <<EOF
18395 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18396 EOF
18397
18398 fi
18399 done
18400
18401 for ac_header in iostream
18402 do
18403 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18404 echo "$as_me:18404: checking for $ac_header" >&5
18405 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18406 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18407   echo $ECHO_N "(cached) $ECHO_C" >&6
18408 else
18409   cat >conftest.$ac_ext <<_ACEOF
18410 #line 18410 "configure"
18411 #include "confdefs.h"
18412 #include <$ac_header>
18413 _ACEOF
18414 if { (eval echo "$as_me:18414: \"$ac_cpp conftest.$ac_ext\"") >&5
18415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18416   ac_status=$?
18417   egrep -v '^ *\+' conftest.er1 >conftest.err
18418   rm -f conftest.er1
18419   cat conftest.err >&5
18420   echo "$as_me:18420: \$? = $ac_status" >&5
18421   (exit $ac_status); } >/dev/null; then
18422   if test -s conftest.err; then
18423     ac_cpp_err=$ac_cxx_preproc_warn_flag
18424   else
18425     ac_cpp_err=
18426   fi
18427 else
18428   ac_cpp_err=yes
18429 fi
18430 if test -z "$ac_cpp_err"; then
18431   eval "$as_ac_Header=yes"
18432 else
18433   echo "$as_me: failed program was:" >&5
18434   cat conftest.$ac_ext >&5
18435   eval "$as_ac_Header=no"
18436 fi
18437 rm -f conftest.err conftest.$ac_ext
18438 fi
18439 echo "$as_me:18439: result: `eval echo '${'$as_ac_Header'}'`" >&5
18440 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18441 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18442   cat >>confdefs.h <<EOF
18443 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18444 EOF
18445
18446 fi
18447 done
18448
18449 if test x"$ac_cv_header_iostream" = xyes ; then
18450         echo "$as_me:18450: checking if iostream uses std-namespace" >&5
18451 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18452         cat >conftest.$ac_ext <<_ACEOF
18453 #line 18453 "configure"
18454 #include "confdefs.h"
18455
18456 #include <iostream>
18457 using std::endl;
18458 using std::cerr;
18459 int
18460 main ()
18461 {
18462
18463 cerr << "testing" << endl;
18464
18465   ;
18466   return 0;
18467 }
18468 _ACEOF
18469 rm -f conftest.$ac_objext
18470 if { (eval echo "$as_me:18470: \"$ac_compile\"") >&5
18471   (eval $ac_compile) 2>&5
18472   ac_status=$?
18473   echo "$as_me:18473: \$? = $ac_status" >&5
18474   (exit $ac_status); } &&
18475          { ac_try='test -s conftest.$ac_objext'
18476   { (eval echo "$as_me:18476: \"$ac_try\"") >&5
18477   (eval $ac_try) 2>&5
18478   ac_status=$?
18479   echo "$as_me:18479: \$? = $ac_status" >&5
18480   (exit $ac_status); }; }; then
18481   cf_iostream_namespace=yes
18482 else
18483   echo "$as_me: failed program was:" >&5
18484 cat conftest.$ac_ext >&5
18485 cf_iostream_namespace=no
18486 fi
18487 rm -f conftest.$ac_objext conftest.$ac_ext
18488         echo "$as_me:18488: result: $cf_iostream_namespace" >&5
18489 echo "${ECHO_T}$cf_iostream_namespace" >&6
18490         if test "$cf_iostream_namespace" = yes ; then
18491
18492 cat >>confdefs.h <<\EOF
18493 #define IOSTREAM_NAMESPACE 1
18494 EOF
18495
18496         fi
18497 fi
18498
18499 echo "$as_me:18499: checking if we should include stdbool.h" >&5
18500 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18501
18502 if test "${cf_cv_header_stdbool_h+set}" = set; then
18503   echo $ECHO_N "(cached) $ECHO_C" >&6
18504 else
18505
18506         cat >conftest.$ac_ext <<_ACEOF
18507 #line 18507 "configure"
18508 #include "confdefs.h"
18509
18510 int
18511 main ()
18512 {
18513 bool foo = false
18514   ;
18515   return 0;
18516 }
18517 _ACEOF
18518 rm -f conftest.$ac_objext
18519 if { (eval echo "$as_me:18519: \"$ac_compile\"") >&5
18520   (eval $ac_compile) 2>&5
18521   ac_status=$?
18522   echo "$as_me:18522: \$? = $ac_status" >&5
18523   (exit $ac_status); } &&
18524          { ac_try='test -s conftest.$ac_objext'
18525   { (eval echo "$as_me:18525: \"$ac_try\"") >&5
18526   (eval $ac_try) 2>&5
18527   ac_status=$?
18528   echo "$as_me:18528: \$? = $ac_status" >&5
18529   (exit $ac_status); }; }; then
18530   cf_cv_header_stdbool_h=0
18531 else
18532   echo "$as_me: failed program was:" >&5
18533 cat conftest.$ac_ext >&5
18534 cat >conftest.$ac_ext <<_ACEOF
18535 #line 18535 "configure"
18536 #include "confdefs.h"
18537
18538 #ifndef __BEOS__
18539 #include <stdbool.h>
18540 #endif
18541
18542 int
18543 main ()
18544 {
18545 bool foo = false
18546   ;
18547   return 0;
18548 }
18549 _ACEOF
18550 rm -f conftest.$ac_objext
18551 if { (eval echo "$as_me:18551: \"$ac_compile\"") >&5
18552   (eval $ac_compile) 2>&5
18553   ac_status=$?
18554   echo "$as_me:18554: \$? = $ac_status" >&5
18555   (exit $ac_status); } &&
18556          { ac_try='test -s conftest.$ac_objext'
18557   { (eval echo "$as_me:18557: \"$ac_try\"") >&5
18558   (eval $ac_try) 2>&5
18559   ac_status=$?
18560   echo "$as_me:18560: \$? = $ac_status" >&5
18561   (exit $ac_status); }; }; then
18562   cf_cv_header_stdbool_h=1
18563 else
18564   echo "$as_me: failed program was:" >&5
18565 cat conftest.$ac_ext >&5
18566 cf_cv_header_stdbool_h=0
18567 fi
18568 rm -f conftest.$ac_objext conftest.$ac_ext
18569 fi
18570 rm -f conftest.$ac_objext conftest.$ac_ext
18571 fi
18572
18573 if test "$cf_cv_header_stdbool_h" = 1
18574 then    echo "$as_me:18574: result: yes" >&5
18575 echo "${ECHO_T}yes" >&6
18576 else    echo "$as_me:18576: result: no" >&5
18577 echo "${ECHO_T}no" >&6
18578 fi
18579
18580 echo "$as_me:18580: checking for builtin bool type" >&5
18581 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18582
18583 if test "${cf_cv_builtin_bool+set}" = set; then
18584   echo $ECHO_N "(cached) $ECHO_C" >&6
18585 else
18586
18587         cat >conftest.$ac_ext <<_ACEOF
18588 #line 18588 "configure"
18589 #include "confdefs.h"
18590
18591 #include <stdio.h>
18592 #include <sys/types.h>
18593
18594 int
18595 main ()
18596 {
18597 bool x = false
18598   ;
18599   return 0;
18600 }
18601 _ACEOF
18602 rm -f conftest.$ac_objext
18603 if { (eval echo "$as_me:18603: \"$ac_compile\"") >&5
18604   (eval $ac_compile) 2>&5
18605   ac_status=$?
18606   echo "$as_me:18606: \$? = $ac_status" >&5
18607   (exit $ac_status); } &&
18608          { ac_try='test -s conftest.$ac_objext'
18609   { (eval echo "$as_me:18609: \"$ac_try\"") >&5
18610   (eval $ac_try) 2>&5
18611   ac_status=$?
18612   echo "$as_me:18612: \$? = $ac_status" >&5
18613   (exit $ac_status); }; }; then
18614   cf_cv_builtin_bool=1
18615 else
18616   echo "$as_me: failed program was:" >&5
18617 cat conftest.$ac_ext >&5
18618 cf_cv_builtin_bool=0
18619 fi
18620 rm -f conftest.$ac_objext conftest.$ac_ext
18621
18622 fi
18623
18624 if test "$cf_cv_builtin_bool" = 1
18625 then    echo "$as_me:18625: result: yes" >&5
18626 echo "${ECHO_T}yes" >&6
18627 else    echo "$as_me:18627: result: no" >&5
18628 echo "${ECHO_T}no" >&6
18629 fi
18630
18631 echo "$as_me:18631: checking for size of bool" >&5
18632 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18633 if test "${cf_cv_type_of_bool+set}" = set; then
18634   echo $ECHO_N "(cached) $ECHO_C" >&6
18635 else
18636
18637         rm -f cf_test.out
18638         if test "$cross_compiling" = yes; then
18639   cf_cv_type_of_bool=unknown
18640 else
18641   cat >conftest.$ac_ext <<_ACEOF
18642 #line 18642 "configure"
18643 #include "confdefs.h"
18644
18645 #include <stdlib.h>
18646 #include <stdio.h>
18647
18648 #if defined(__cplusplus)
18649
18650 #ifdef HAVE_GXX_BUILTIN_H
18651 #include <g++/builtin.h>
18652 #elif HAVE_GPP_BUILTIN_H
18653 #include <gpp/builtin.h>
18654 #elif HAVE_BUILTIN_H
18655 #include <builtin.h>
18656 #endif
18657
18658 #else
18659
18660 #if $cf_cv_header_stdbool_h
18661 #include <stdbool.h>
18662 #endif
18663
18664 #endif
18665
18666 main()
18667 {
18668         FILE *fp = fopen("cf_test.out", "w");
18669         if (fp != 0) {
18670                 bool x = true;
18671                 if ((bool)(-x) >= 0)
18672                         fputs("unsigned ", fp);
18673                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18674                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18675                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18676                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18677                 fclose(fp);
18678         }
18679         ${cf_cv_main_return:-return}(0);
18680 }
18681
18682 _ACEOF
18683 rm -f conftest$ac_exeext
18684 if { (eval echo "$as_me:18684: \"$ac_link\"") >&5
18685   (eval $ac_link) 2>&5
18686   ac_status=$?
18687   echo "$as_me:18687: \$? = $ac_status" >&5
18688   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18689   { (eval echo "$as_me:18689: \"$ac_try\"") >&5
18690   (eval $ac_try) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit $ac_status); }; }; then
18694   cf_cv_type_of_bool=`cat cf_test.out`
18695                  if test -z "$cf_cv_type_of_bool"; then
18696                    cf_cv_type_of_bool=unknown
18697                  fi
18698 else
18699   echo "$as_me: program exited with status $ac_status" >&5
18700 echo "$as_me: failed program was:" >&5
18701 cat conftest.$ac_ext >&5
18702 cf_cv_type_of_bool=unknown
18703 fi
18704 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18705 fi
18706
18707 fi
18708
18709         rm -f cf_test.out
18710 echo "$as_me:18710: result: $cf_cv_type_of_bool" >&5
18711 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18712 if test "$cf_cv_type_of_bool" = unknown ; then
18713         case .$NCURSES_BOOL in #(vi
18714         .auto|.) NCURSES_BOOL=unsigned;;
18715         esac
18716         { echo "$as_me:18716: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18717 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18718         cf_cv_type_of_bool=$NCURSES_BOOL
18719 fi
18720
18721 echo "$as_me:18721: checking for special defines needed for etip.h" >&5
18722 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18723 cf_save_CXXFLAGS="$CXXFLAGS"
18724 cf_result="none"
18725
18726 # etip.h includes ncurses.h which includes ncurses_dll.h
18727 # But ncurses_dll.h is generated - fix here.
18728 test -d include || mkdir include
18729 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
18730
18731 for cf_math in "" MATH_H
18732 do
18733 for cf_excp in "" MATH_EXCEPTION
18734 do
18735         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18736         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18737         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18738 cat >conftest.$ac_ext <<_ACEOF
18739 #line 18739 "configure"
18740 #include "confdefs.h"
18741
18742 #include <etip.h.in>
18743
18744 int
18745 main ()
18746 {
18747
18748   ;
18749   return 0;
18750 }
18751 _ACEOF
18752 rm -f conftest.$ac_objext
18753 if { (eval echo "$as_me:18753: \"$ac_compile\"") >&5
18754   (eval $ac_compile) 2>&5
18755   ac_status=$?
18756   echo "$as_me:18756: \$? = $ac_status" >&5
18757   (exit $ac_status); } &&
18758          { ac_try='test -s conftest.$ac_objext'
18759   { (eval echo "$as_me:18759: \"$ac_try\"") >&5
18760   (eval $ac_try) 2>&5
18761   ac_status=$?
18762   echo "$as_me:18762: \$? = $ac_status" >&5
18763   (exit $ac_status); }; }; then
18764
18765         test -n "$cf_math" && cat >>confdefs.h <<EOF
18766 #define ETIP_NEEDS_${cf_math} 1
18767 EOF
18768
18769         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18770 #define ETIP_NEEDS_${cf_excp} 1
18771 EOF
18772
18773         cf_result="$cf_math $cf_excp"
18774         break 2
18775
18776 else
18777   echo "$as_me: failed program was:" >&5
18778 cat conftest.$ac_ext >&5
18779 fi
18780 rm -f conftest.$ac_objext conftest.$ac_ext
18781 done
18782 done
18783 echo "$as_me:18783: result: $cf_result" >&5
18784 echo "${ECHO_T}$cf_result" >&6
18785 CXXFLAGS="$cf_save_CXXFLAGS"
18786
18787 if test -n "$CXX"; then
18788 echo "$as_me:18788: checking if $CXX accepts parameter initialization" >&5
18789 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18790 if test "${cf_cv_cpp_param_init+set}" = set; then
18791   echo $ECHO_N "(cached) $ECHO_C" >&6
18792 else
18793
18794         ac_ext=cc
18795 ac_cpp='$CXXCPP $CPPFLAGS'
18796 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18797 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18798 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18799 ac_main_return=return
18800
18801         if test "$cross_compiling" = yes; then
18802   cf_cv_cpp_param_init=unknown
18803 else
18804   cat >conftest.$ac_ext <<_ACEOF
18805 #line 18805 "configure"
18806 #include "confdefs.h"
18807
18808 class TEST {
18809 private:
18810         int value;
18811 public:
18812         TEST(int x = 1);
18813         ~TEST();
18814 };
18815
18816 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18817 {
18818         value = x;
18819 }
18820 int main() { }
18821
18822 _ACEOF
18823 rm -f conftest$ac_exeext
18824 if { (eval echo "$as_me:18824: \"$ac_link\"") >&5
18825   (eval $ac_link) 2>&5
18826   ac_status=$?
18827   echo "$as_me:18827: \$? = $ac_status" >&5
18828   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18829   { (eval echo "$as_me:18829: \"$ac_try\"") >&5
18830   (eval $ac_try) 2>&5
18831   ac_status=$?
18832   echo "$as_me:18832: \$? = $ac_status" >&5
18833   (exit $ac_status); }; }; then
18834   cf_cv_cpp_param_init=yes
18835 else
18836   echo "$as_me: program exited with status $ac_status" >&5
18837 echo "$as_me: failed program was:" >&5
18838 cat conftest.$ac_ext >&5
18839 cf_cv_cpp_param_init=no
18840 fi
18841 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18842 fi
18843         ac_ext=cc
18844 ac_cpp='$CXXCPP $CPPFLAGS'
18845 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18846 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18847 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18848 ac_main_return=return
18849
18850 fi
18851 echo "$as_me:18851: result: $cf_cv_cpp_param_init" >&5
18852 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18853 fi
18854 test "$cf_cv_cpp_param_init" = yes &&
18855 cat >>confdefs.h <<\EOF
18856 #define CPP_HAS_PARAM_INIT 1
18857 EOF
18858
18859 if test -n "$CXX"; then
18860
18861 echo "$as_me:18861: checking if $CXX accepts static_cast" >&5
18862 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18863 if test "${cf_cv_cpp_static_cast+set}" = set; then
18864   echo $ECHO_N "(cached) $ECHO_C" >&6
18865 else
18866
18867         ac_ext=cc
18868 ac_cpp='$CXXCPP $CPPFLAGS'
18869 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18870 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18871 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18872 ac_main_return=return
18873
18874         cat >conftest.$ac_ext <<_ACEOF
18875 #line 18875 "configure"
18876 #include "confdefs.h"
18877
18878 class NCursesPanel
18879 {
18880 public:
18881   NCursesPanel(int nlines,
18882                int ncols,
18883                int begin_y = 0,
18884                int begin_x = 0)
18885   {
18886   }
18887
18888   ~NCursesPanel();
18889 };
18890
18891 template<class T> class NCursesUserPanel : public NCursesPanel
18892 {
18893 public:
18894   NCursesUserPanel (int nlines,
18895                     int ncols,
18896                     int begin_y = 0,
18897                     int begin_x = 0,
18898                     const T* p_UserData = static_cast<T*>(0))
18899     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18900   {
18901   };
18902   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18903   {
18904   };
18905
18906   virtual ~NCursesUserPanel() {};
18907 };
18908
18909 int
18910 main ()
18911 {
18912
18913         const char* p_UserData = static_cast<char*>(0)
18914   ;
18915   return 0;
18916 }
18917 _ACEOF
18918 rm -f conftest.$ac_objext
18919 if { (eval echo "$as_me:18919: \"$ac_compile\"") >&5
18920   (eval $ac_compile) 2>&5
18921   ac_status=$?
18922   echo "$as_me:18922: \$? = $ac_status" >&5
18923   (exit $ac_status); } &&
18924          { ac_try='test -s conftest.$ac_objext'
18925   { (eval echo "$as_me:18925: \"$ac_try\"") >&5
18926   (eval $ac_try) 2>&5
18927   ac_status=$?
18928   echo "$as_me:18928: \$? = $ac_status" >&5
18929   (exit $ac_status); }; }; then
18930   cf_cv_cpp_static_cast=yes
18931 else
18932   echo "$as_me: failed program was:" >&5
18933 cat conftest.$ac_ext >&5
18934 cf_cv_cpp_static_cast=no
18935 fi
18936 rm -f conftest.$ac_objext conftest.$ac_ext
18937
18938         ac_ext=cc
18939 ac_cpp='$CXXCPP $CPPFLAGS'
18940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18943 ac_main_return=return
18944
18945 fi
18946 echo "$as_me:18946: result: $cf_cv_cpp_static_cast" >&5
18947 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18948
18949 fi
18950
18951 test "$cf_cv_cpp_static_cast" = yes &&
18952 cat >>confdefs.h <<\EOF
18953 #define CPP_HAS_STATIC_CAST 1
18954 EOF
18955
18956         CXX_AR='$(AR)'
18957         CXX_ARFLAGS='$(ARFLAGS)'
18958         case $cf_cv_system_name in #(vi
18959         irix*) #(vi
18960             if test "$GXX" != yes ; then
18961                 CXX_AR='$(CXX)'
18962                 CXX_ARFLAGS='-ar -o'
18963             fi
18964             ;;
18965         sco3.2v5*) #(vi
18966             CXXLDFLAGS="-u main"
18967             ;;
18968         solaris2*)
18969             if test "$GXX" != yes ; then
18970                 CXX_AR='$(CXX)'
18971                 CXX_ARFLAGS='-xar -o'
18972             fi
18973             ;;
18974         esac
18975
18976 else
18977         cf_cxx_library=no
18978         cf_cv_builtin_bool=1
18979
18980         # Just because we are not configuring against C++ right now does not
18981         # mean that a user will not want to use C++.  Some distributors disable
18982         # the C++ portion of this configuration as a shortcut (or just to avoid
18983         # compiling the demo in the c++ directory).  So we need a reasonable
18984         # default for the 'bool' type.
18985         #
18986         # Caveat: since the storage of the bool type is not standardized, it
18987         # may change.
18988
18989         if test "$NCURSES_BOOL" != auto ; then
18990                 cf_cv_type_of_bool=$NCURSES_BOOL
18991                 cf_cv_header_stdbool_h=0
18992         else
18993                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18994
18995 echo "$as_me:18995: checking for size of bool" >&5
18996 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18997 if test "${cf_cv_type_of_bool+set}" = set; then
18998   echo $ECHO_N "(cached) $ECHO_C" >&6
18999 else
19000
19001         rm -f cf_test.out
19002         if test "$cross_compiling" = yes; then
19003   cf_cv_type_of_bool=unknown
19004 else
19005   cat >conftest.$ac_ext <<_ACEOF
19006 #line 19006 "configure"
19007 #include "confdefs.h"
19008
19009 #include <stdlib.h>
19010 #include <stdio.h>
19011
19012 #if defined(__cplusplus)
19013
19014 #ifdef HAVE_GXX_BUILTIN_H
19015 #include <g++/builtin.h>
19016 #elif HAVE_GPP_BUILTIN_H
19017 #include <gpp/builtin.h>
19018 #elif HAVE_BUILTIN_H
19019 #include <builtin.h>
19020 #endif
19021
19022 #else
19023
19024 #if $cf_cv_header_stdbool_h
19025 #include <stdbool.h>
19026 #endif
19027
19028 #endif
19029
19030 main()
19031 {
19032         FILE *fp = fopen("cf_test.out", "w");
19033         if (fp != 0) {
19034                 bool x = true;
19035                 if ((bool)(-x) >= 0)
19036                         fputs("unsigned ", fp);
19037                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19038                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19039                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19040                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19041                 fclose(fp);
19042         }
19043         ${cf_cv_main_return:-return}(0);
19044 }
19045
19046 _ACEOF
19047 rm -f conftest$ac_exeext
19048 if { (eval echo "$as_me:19048: \"$ac_link\"") >&5
19049   (eval $ac_link) 2>&5
19050   ac_status=$?
19051   echo "$as_me:19051: \$? = $ac_status" >&5
19052   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19053   { (eval echo "$as_me:19053: \"$ac_try\"") >&5
19054   (eval $ac_try) 2>&5
19055   ac_status=$?
19056   echo "$as_me:19056: \$? = $ac_status" >&5
19057   (exit $ac_status); }; }; then
19058   cf_cv_type_of_bool=`cat cf_test.out`
19059                  if test -z "$cf_cv_type_of_bool"; then
19060                    cf_cv_type_of_bool=unknown
19061                  fi
19062 else
19063   echo "$as_me: program exited with status $ac_status" >&5
19064 echo "$as_me: failed program was:" >&5
19065 cat conftest.$ac_ext >&5
19066 cf_cv_type_of_bool=unknown
19067 fi
19068 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19069 fi
19070
19071 fi
19072
19073         rm -f cf_test.out
19074 echo "$as_me:19074: result: $cf_cv_type_of_bool" >&5
19075 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19076 if test "$cf_cv_type_of_bool" = unknown ; then
19077         case .$NCURSES_BOOL in #(vi
19078         .auto|.) NCURSES_BOOL=unsigned;;
19079         esac
19080         { echo "$as_me:19080: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19081 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19082         cf_cv_type_of_bool=$NCURSES_BOOL
19083 fi
19084
19085                 else
19086                         echo "$as_me:19086: checking for fallback type of bool" >&5
19087 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19088                         case "$host_cpu" in #(vi
19089                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19090                         *)      cf_cv_type_of_bool=int  ;;
19091                         esac
19092                         echo "$as_me:19092: result: $cf_cv_type_of_bool" >&5
19093 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19094                 fi
19095         fi
19096 fi
19097
19098 # If the C compiler did not declare bool, and we did not determine that the C++
19099 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19100 # ncurses library use the same type as C++ bool.  Note that this allows one to
19101 # specify the type of bool in a configure-script option and postpone
19102 # integration with the C++ compiler provided that the types are compatible.
19103 USE_CXX_BOOL=1
19104 if test $cf_cv_cc_bool_type = 1
19105 then
19106         # oops: C has a bool.  Unlikely, but C++ could differ.
19107         USE_CXX_BOOL=0
19108 elif test $cf_cv_builtin_bool = 0
19109 then
19110         # C++ has no bool
19111         USE_CXX_BOOL=0
19112 else
19113         # this is the normal case
19114         USE_CXX_BOOL='defined(__cplusplus)'
19115 fi
19116
19117 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19118
19119         if test "$cf_with_ada" != "no" ; then
19120                 if test "$with_libtool" != "no"; then
19121                         { echo "$as_me:19121: WARNING: libtool does not support Ada - disabling feature" >&5
19122 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19123                         cf_with_ada=no
19124                 fi
19125         fi
19126
19127         if test "$cf_with_ada" != "no" ; then
19128
19129 cf_ada_make=gnatmake
19130 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19131 set dummy $cf_ada_make; ac_word=$2
19132 echo "$as_me:19132: checking for $ac_word" >&5
19133 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19134 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19135   echo $ECHO_N "(cached) $ECHO_C" >&6
19136 else
19137   if test -n "$gnat_exists"; then
19138   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19139 else
19140   ac_save_IFS=$IFS; IFS=$ac_path_separator
19141 ac_dummy="$PATH"
19142 for ac_dir in $ac_dummy; do
19143   IFS=$ac_save_IFS
19144   test -z "$ac_dir" && ac_dir=.
19145   $as_executable_p "$ac_dir/$ac_word" || continue
19146 ac_cv_prog_gnat_exists="yes"
19147 echo "$as_me:19147: found $ac_dir/$ac_word" >&5
19148 break
19149 done
19150
19151   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19152 fi
19153 fi
19154 gnat_exists=$ac_cv_prog_gnat_exists
19155 if test -n "$gnat_exists"; then
19156   echo "$as_me:19156: result: $gnat_exists" >&5
19157 echo "${ECHO_T}$gnat_exists" >&6
19158 else
19159   echo "$as_me:19159: result: no" >&5
19160 echo "${ECHO_T}no" >&6
19161 fi
19162
19163 if test "$ac_cv_prog_gnat_exists" = no; then
19164    cf_ada_make=
19165    cf_cv_prog_gnat_correct=no
19166 else
19167
19168 echo "$as_me:19168: checking for gnat version" >&5
19169 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19170 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19171         grep '[0-9].[0-9][0-9]*' |\
19172     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19173 echo "$as_me:19173: result: $cf_gnat_version" >&5
19174 echo "${ECHO_T}$cf_gnat_version" >&6
19175
19176 case $cf_gnat_version in #(vi
19177 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19178         cf_cv_prog_gnat_correct=yes
19179         ;;
19180 *)
19181         { echo "$as_me:19181: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19182 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19183         cf_cv_prog_gnat_correct=no
19184         ;;
19185 esac
19186
19187    # Extract the first word of "m4", so it can be a program name with args.
19188 set dummy m4; ac_word=$2
19189 echo "$as_me:19189: checking for $ac_word" >&5
19190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19191 if test "${ac_cv_prog_M4_exists+set}" = set; then
19192   echo $ECHO_N "(cached) $ECHO_C" >&6
19193 else
19194   if test -n "$M4_exists"; then
19195   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19196 else
19197   ac_save_IFS=$IFS; IFS=$ac_path_separator
19198 ac_dummy="$PATH"
19199 for ac_dir in $ac_dummy; do
19200   IFS=$ac_save_IFS
19201   test -z "$ac_dir" && ac_dir=.
19202   $as_executable_p "$ac_dir/$ac_word" || continue
19203 ac_cv_prog_M4_exists="yes"
19204 echo "$as_me:19204: found $ac_dir/$ac_word" >&5
19205 break
19206 done
19207
19208   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19209 fi
19210 fi
19211 M4_exists=$ac_cv_prog_M4_exists
19212 if test -n "$M4_exists"; then
19213   echo "$as_me:19213: result: $M4_exists" >&5
19214 echo "${ECHO_T}$M4_exists" >&6
19215 else
19216   echo "$as_me:19216: result: no" >&5
19217 echo "${ECHO_T}no" >&6
19218 fi
19219
19220    if test "$ac_cv_prog_M4_exists" = no; then
19221       cf_cv_prog_gnat_correct=no
19222       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19223    fi
19224    if test "$cf_cv_prog_gnat_correct" = yes; then
19225       echo "$as_me:19225: checking if GNAT works" >&5
19226 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19227
19228 rm -rf conftest* *~conftest*
19229 cat >>conftest.ads <<CF_EOF
19230 procedure conftest;
19231 CF_EOF
19232 cat >>conftest.adb <<CF_EOF
19233 with Text_IO;
19234 with GNAT.OS_Lib;
19235 procedure conftest is
19236 begin
19237    Text_IO.Put ("Hello World");
19238    Text_IO.New_Line;
19239    GNAT.OS_Lib.OS_Exit (0);
19240 end conftest;
19241 CF_EOF
19242 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19243    if ( ./conftest 1>&5 2>&1 ) ; then
19244       cf_cv_prog_gnat_correct=yes
19245    else
19246       cf_cv_prog_gnat_correct=no
19247    fi
19248 else
19249    cf_cv_prog_gnat_correct=no
19250 fi
19251 rm -rf conftest* *~conftest*
19252
19253       echo "$as_me:19253: result: $cf_cv_prog_gnat_correct" >&5
19254 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19255    fi
19256 fi
19257
19258                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19259
19260         ADAFLAGS="$ADAFLAGS -gnatpn"
19261
19262         echo "$as_me:19262: checking optimization options for ADAFLAGS" >&5
19263 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19264         case "$CFLAGS" in
19265         *-g*)
19266
19267         ADAFLAGS="$ADAFLAGS -g"
19268
19269                 ;;
19270         esac
19271         case "$CFLAGS" in
19272         *-O*)
19273                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19274
19275         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19276
19277                 ;;
19278         esac
19279         echo "$as_me:19279: result: $ADAFLAGS" >&5
19280 echo "${ECHO_T}$ADAFLAGS" >&6
19281
19282 echo "$as_me:19282: checking if GNAT supports generics" >&5
19283 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19284 case $cf_gnat_version in #(vi
19285 3.[1-9]*|[4-9].*) #(vi
19286         cf_gnat_generics=yes
19287         ;;
19288 *)
19289         cf_gnat_generics=no
19290         ;;
19291 esac
19292 echo "$as_me:19292: result: $cf_gnat_generics" >&5
19293 echo "${ECHO_T}$cf_gnat_generics" >&6
19294
19295 if test "$cf_gnat_generics" = yes
19296 then
19297         cf_compile_generics=generics
19298         cf_generic_objects="\${GENOBJS}"
19299 else
19300         cf_compile_generics=
19301         cf_generic_objects=
19302 fi
19303
19304 echo "$as_me:19304: checking if GNAT supports SIGINT" >&5
19305 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19306 if test "${cf_cv_gnat_sigint+set}" = set; then
19307   echo $ECHO_N "(cached) $ECHO_C" >&6
19308 else
19309
19310 rm -rf conftest* *~conftest*
19311 cat >>conftest.ads <<CF_EOF
19312 with Ada.Interrupts.Names;
19313
19314 package ConfTest is
19315
19316    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19317    pragma Unreserve_All_Interrupts;
19318    pragma Warnings (On);
19319
19320    protected Process is
19321       procedure Stop;
19322       function Continue return Boolean;
19323       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19324    private
19325       Done : Boolean := False;
19326    end Process;
19327
19328 end ConfTest;
19329 CF_EOF
19330 cat >>conftest.adb <<CF_EOF
19331 package body ConfTest is
19332    protected body Process is
19333       procedure Stop is
19334       begin
19335          Done := True;
19336       end Stop;
19337       function Continue return Boolean is
19338       begin
19339          return not Done;
19340       end Continue;
19341    end Process;
19342 end ConfTest;
19343 CF_EOF
19344 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19345       cf_cv_gnat_sigint=yes
19346 else
19347    cf_cv_gnat_sigint=no
19348 fi
19349 rm -rf conftest* *~conftest*
19350
19351 fi
19352 echo "$as_me:19352: result: $cf_cv_gnat_sigint" >&5
19353 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19354
19355 if test $cf_cv_gnat_sigint = yes ; then
19356         USE_GNAT_SIGINT=""
19357 else
19358         USE_GNAT_SIGINT="#"
19359 fi
19360
19361 echo "$as_me:19361: checking if GNAT pragma Unreferenced works" >&5
19362 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19363 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19364   echo $ECHO_N "(cached) $ECHO_C" >&6
19365 else
19366
19367 rm -rf conftest* *~conftest*
19368 cat >>conftest.ads <<CF_EOF
19369 procedure conftest;
19370 CF_EOF
19371 cat >>conftest.adb <<CF_EOF
19372 with Text_IO;
19373 with GNAT.OS_Lib;
19374 procedure conftest is
19375    test : Integer;
19376    pragma Unreferenced (test);
19377 begin
19378    test := 1;
19379    Text_IO.Put ("Hello World");
19380    Text_IO.New_Line;
19381    GNAT.OS_Lib.OS_Exit (0);
19382 end conftest;
19383 CF_EOF
19384 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19385       cf_cv_pragma_unreferenced=yes
19386 else
19387    cf_cv_pragma_unreferenced=no
19388 fi
19389 rm -rf conftest* *~conftest*
19390
19391 fi
19392 echo "$as_me:19392: result: $cf_cv_pragma_unreferenced" >&5
19393 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19394
19395 # if the pragma is supported, use it (needed in the Trace code).
19396 if test $cf_cv_pragma_unreferenced = yes ; then
19397         PRAGMA_UNREF=TRUE
19398 else
19399         PRAGMA_UNREF=FALSE
19400 fi
19401
19402 cf_gnat_libraries=no
19403 cf_gnat_projects=no
19404
19405 echo "$as_me:19405: checking if GNAT supports project files" >&5
19406 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19407 case $cf_gnat_version in #(vi
19408 3.[0-9]*) #(vi
19409         ;;
19410 *)
19411         case $cf_cv_system_name in #(vi
19412         cygwin*) #(vi
19413                 ;;
19414         *)
19415                 mkdir conftest.src conftest.bin conftest.lib
19416                 cd conftest.src
19417                 rm -rf conftest* *~conftest*
19418                 cat >>library.gpr <<CF_EOF
19419 project Library is
19420   Kind := External ("LIB_KIND");
19421   for Library_Name use "ConfTest";
19422   for Object_Dir use ".";
19423   for Library_ALI_Dir use External("LIBRARY_DIR");
19424   for Library_Version use External ("SONAME");
19425   for Library_Kind use Kind;
19426   for Library_Dir use External("BUILD_DIR");
19427   Source_Dir := External ("SOURCE_DIR");
19428   for Source_Dirs use (Source_Dir);
19429   package Compiler is
19430      for Default_Switches ("Ada") use
19431        ("-g",
19432         "-O2",
19433         "-gnatafno",
19434         "-gnatVa",   -- All validity checks
19435         "-gnatwa");  -- Activate all optional errors
19436   end Compiler;
19437 end Library;
19438 CF_EOF
19439                 cat >>confpackage.ads <<CF_EOF
19440 package ConfPackage is
19441    procedure conftest;
19442 end ConfPackage;
19443 CF_EOF
19444                 cat >>confpackage.adb <<CF_EOF
19445 with Text_IO;
19446 package body ConfPackage is
19447    procedure conftest is
19448    begin
19449       Text_IO.Put ("Hello World");
19450       Text_IO.New_Line;
19451    end conftest;
19452 end ConfPackage;
19453 CF_EOF
19454                 if ( $cf_ada_make $ADAFLAGS \
19455                                 -Plibrary.gpr \
19456                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19457                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19458                                 -XSOURCE_DIR=`pwd` \
19459                                 -XSONAME=libConfTest.so.1 \
19460                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19461                         cf_gnat_projects=yes
19462                 fi
19463                 cd ..
19464                 if test -f conftest.lib/confpackage.ali
19465                 then
19466                         cf_gnat_libraries=yes
19467                 fi
19468                 rm -rf conftest* *~conftest*
19469                 ;;
19470         esac
19471         ;;
19472 esac
19473 echo "$as_me:19473: result: $cf_gnat_projects" >&5
19474 echo "${ECHO_T}$cf_gnat_projects" >&6
19475
19476 if test $cf_gnat_projects = yes
19477 then
19478         echo "$as_me:19478: checking if GNAT supports libraries" >&5
19479 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19480         echo "$as_me:19480: result: $cf_gnat_libraries" >&5
19481 echo "${ECHO_T}$cf_gnat_libraries" >&6
19482 fi
19483
19484 if test "$cf_gnat_projects" = yes
19485 then
19486         USE_OLD_MAKERULES="#"
19487         USE_GNAT_PROJECTS=""
19488 else
19489         USE_OLD_MAKERULES=""
19490         USE_GNAT_PROJECTS="#"
19491 fi
19492
19493 if test "$cf_gnat_libraries" = yes
19494 then
19495         USE_GNAT_LIBRARIES=""
19496 else
19497         USE_GNAT_LIBRARIES="#"
19498 fi
19499
19500 echo "$as_me:19500: checking for ada-compiler" >&5
19501 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19502
19503 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19504 if test "${with_ada_compiler+set}" = set; then
19505   withval="$with_ada_compiler"
19506   cf_ada_compiler=$withval
19507 else
19508   cf_ada_compiler=gnatmake
19509 fi;
19510
19511 echo "$as_me:19511: result: $cf_ada_compiler" >&5
19512 echo "${ECHO_T}$cf_ada_compiler" >&6
19513
19514                         cf_ada_package=terminal_interface
19515
19516 echo "$as_me:19516: checking for ada-include" >&5
19517 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19518
19519 # Check whether --with-ada-include or --without-ada-include was given.
19520 if test "${with_ada_include+set}" = set; then
19521   withval="$with_ada_include"
19522
19523 else
19524   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19525 fi; if test -n "$prefix/share/ada/adainclude" ; then
19526
19527 if test "x$prefix" != xNONE; then
19528   cf_path_syntax="$prefix"
19529 else
19530   cf_path_syntax="$ac_default_prefix"
19531 fi
19532
19533 case ".$withval" in #(vi
19534 .\$\(*\)*|.\'*\'*) #(vi
19535   ;;
19536 ..|./*|.\\*) #(vi
19537   ;;
19538 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19539   ;;
19540 .\${*prefix}*|.\${*dir}*) #(vi
19541   eval withval="$withval"
19542   case ".$withval" in #(vi
19543   .NONE/*)
19544     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19545     ;;
19546   esac
19547   ;; #(vi
19548 .no|.NONE/*)
19549   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19550   ;;
19551 *)
19552   { { echo "$as_me:19552: error: expected a pathname, not \"$withval\"" >&5
19553 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19554    { (exit 1); exit 1; }; }
19555   ;;
19556 esac
19557
19558 fi
19559 eval ADA_INCLUDE="$withval"
19560
19561 echo "$as_me:19561: result: $ADA_INCLUDE" >&5
19562 echo "${ECHO_T}$ADA_INCLUDE" >&6
19563
19564 echo "$as_me:19564: checking for ada-objects" >&5
19565 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19566
19567 # Check whether --with-ada-objects or --without-ada-objects was given.
19568 if test "${with_ada_objects+set}" = set; then
19569   withval="$with_ada_objects"
19570
19571 else
19572   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19573 fi; if test -n "$prefix/lib/ada/adalib" ; then
19574
19575 if test "x$prefix" != xNONE; then
19576   cf_path_syntax="$prefix"
19577 else
19578   cf_path_syntax="$ac_default_prefix"
19579 fi
19580
19581 case ".$withval" in #(vi
19582 .\$\(*\)*|.\'*\'*) #(vi
19583   ;;
19584 ..|./*|.\\*) #(vi
19585   ;;
19586 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19587   ;;
19588 .\${*prefix}*|.\${*dir}*) #(vi
19589   eval withval="$withval"
19590   case ".$withval" in #(vi
19591   .NONE/*)
19592     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19593     ;;
19594   esac
19595   ;; #(vi
19596 .no|.NONE/*)
19597   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19598   ;;
19599 *)
19600   { { echo "$as_me:19600: error: expected a pathname, not \"$withval\"" >&5
19601 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19602    { (exit 1); exit 1; }; }
19603   ;;
19604 esac
19605
19606 fi
19607 eval ADA_OBJECTS="$withval"
19608
19609 echo "$as_me:19609: result: $ADA_OBJECTS" >&5
19610 echo "${ECHO_T}$ADA_OBJECTS" >&6
19611
19612 echo "$as_me:19612: checking if an Ada95 shared-library should be built" >&5
19613 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19614
19615 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19616 if test "${with_ada_sharedlib+set}" = set; then
19617   withval="$with_ada_sharedlib"
19618   with_ada_sharedlib=$withval
19619 else
19620   with_ada_sharedlib=no
19621 fi;
19622 echo "$as_me:19622: result: $with_ada_sharedlib" >&5
19623 echo "${ECHO_T}$with_ada_sharedlib" >&6
19624
19625 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19626 MAKE_ADA_SHAREDLIB="#"
19627
19628 if test "x$with_ada_sharedlib" != xno
19629 then
19630         MAKE_ADA_SHAREDLIB=
19631         if test "x$with_ada_sharedlib" != xyes
19632         then
19633                 ADA_SHAREDLIB="$with_ada_sharedlib"
19634         fi
19635 fi
19636
19637                 fi
19638         fi
19639 else
19640         cf_with_ada=no
19641 fi
19642
19643 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19644 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19645 ###
19646 ### ticlib modules may be a separate library, otherwise contained in termlib.
19647 ### termlib modules may be a separate library, otherwise contained in ncurses.
19648 ###
19649 ### The of "+" or " " between the tokens controls the way the script
19650 ### chooses to split module lists into libraries.
19651 ###
19652 ### (see CF_LIB_RULES).
19653 echo "$as_me:19653: checking for library subsets" >&5
19654 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19655 LIB_SUBSETS=
19656
19657 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19658         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19659         if test "$with_ticlib" != no ; then
19660                 LIB_SUBSETS="${LIB_SUBSETS} "
19661         else
19662                 LIB_SUBSETS="${LIB_SUBSETS}+"
19663         fi
19664 fi
19665
19666 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19667 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19668
19669 if test "$with_termlib" != no ; then
19670         LIB_SUBSETS="${LIB_SUBSETS} "
19671 else
19672         LIB_SUBSETS="${LIB_SUBSETS}+"
19673 fi
19674
19675 LIB_SUBSETS="${LIB_SUBSETS}base"
19676
19677 # Most term-driver calls are to tinfo, but some like init_pair are to the
19678 # base library (so it resides in base).
19679 if test "$with_term_driver" != no ; then
19680         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19681         case $cf_cv_system_name in #(vi
19682         *mingw32*) #(vi
19683                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19684                 ;;
19685         *) #(vi
19686                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19687                 ;;
19688         esac
19689 fi
19690
19691 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19692 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19693
19694 echo "$as_me:19694: result: $LIB_SUBSETS" >&5
19695 echo "${ECHO_T}$LIB_SUBSETS" >&6
19696
19697 ### Construct the list of include-directories to be generated
19698
19699 if test "$GCC" != yes; then
19700         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19701 elif test "$includedir" != "/usr/include"; then
19702         if test "$includedir" = '${prefix}/include' ; then
19703                 if test $prefix != /usr ; then
19704                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19705                 fi
19706         else
19707                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19708         fi
19709 fi
19710 if test "$srcdir" != "."; then
19711         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19712 fi
19713 CPPFLAGS="-I. -I../include $CPPFLAGS"
19714
19715 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19716 if test "$srcdir" != "."; then
19717         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19718 fi
19719 if test "$GCC" != yes; then
19720         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19721 elif test "$includedir" != "/usr/include"; then
19722         if test "$includedir" = '${prefix}/include' ; then
19723                 if test $prefix != /usr ; then
19724                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19725                 fi
19726         else
19727                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19728         fi
19729 fi
19730
19731 ### Build up pieces for makefile rules
19732 echo "$as_me:19732: checking default library suffix" >&5
19733 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19734
19735         case $DFT_LWR_MODEL in
19736         libtool) DFT_ARG_SUFFIX=''   ;;
19737         normal)  DFT_ARG_SUFFIX=''   ;;
19738         debug)   DFT_ARG_SUFFIX='_g' ;;
19739         profile) DFT_ARG_SUFFIX='_p' ;;
19740         shared)  DFT_ARG_SUFFIX=''   ;;
19741         esac
19742         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19743 echo "$as_me:19743: result: $DFT_ARG_SUFFIX" >&5
19744 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19745
19746 echo "$as_me:19746: checking default library-dependency suffix" >&5
19747 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19748
19749         case $DFT_LWR_MODEL in #(vi
19750         libtool) #(vi
19751                 DFT_LIB_SUFFIX='.la'
19752                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19753                 ;;
19754         normal) #(vi
19755                 DFT_LIB_SUFFIX='.a'
19756                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19757                 ;;
19758         debug) #(vi
19759                 DFT_LIB_SUFFIX='_g.a'
19760                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19761                 ;;
19762         profile) #(vi
19763                 DFT_LIB_SUFFIX='_p.a'
19764                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19765                 ;;
19766         shared) #(vi
19767                 case $cf_cv_system_name in
19768                 aix[5-7]*) #(vi
19769                         DFT_LIB_SUFFIX='.a'
19770                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19771                         ;;
19772                 cygwin*|mingw*) #(vi
19773                         DFT_LIB_SUFFIX='.dll'
19774                         DFT_DEP_SUFFIX='.dll.a'
19775                         ;;
19776                 darwin*) #(vi
19777                         DFT_LIB_SUFFIX='.dylib'
19778                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19779                         ;;
19780                 hpux*) #(vi
19781                         case $target in
19782                         ia64*) #(vi
19783                                 DFT_LIB_SUFFIX='.so'
19784                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19785                                 ;;
19786                         *) #(vi
19787                                 DFT_LIB_SUFFIX='.sl'
19788                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19789                                 ;;
19790                         esac
19791                         ;;
19792                 *)      DFT_LIB_SUFFIX='.so'
19793                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19794                         ;;
19795                 esac
19796         esac
19797         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19798         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19799 echo "$as_me:19799: result: $DFT_DEP_SUFFIX" >&5
19800 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19801
19802 echo "$as_me:19802: checking default object directory" >&5
19803 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19804
19805         case $DFT_LWR_MODEL in
19806         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19807         normal)  DFT_OBJ_SUBDIR='objects' ;;
19808         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19809         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19810         shared)
19811                 case $cf_cv_system_name in #(vi
19812                 cygwin) #(vi
19813                         DFT_OBJ_SUBDIR='objects' ;;
19814                 *)
19815                         DFT_OBJ_SUBDIR='obj_s' ;;
19816                 esac
19817         esac
19818 echo "$as_me:19818: result: $DFT_OBJ_SUBDIR" >&5
19819 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19820
19821 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19822 if test "x$cf_with_cxx" = xyes ; then
19823 echo "$as_me:19823: checking c++ library-dependency suffix" >&5
19824 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19825 if test "$with_libtool" != "no"; then
19826         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19827 else
19828
19829         case normal in #(vi
19830         libtool) #(vi
19831                 CXX_LIB_SUFFIX='.la'
19832                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19833                 ;;
19834         normal) #(vi
19835                 CXX_LIB_SUFFIX='.a'
19836                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19837                 ;;
19838         debug) #(vi
19839                 CXX_LIB_SUFFIX='_g.a'
19840                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19841                 ;;
19842         profile) #(vi
19843                 CXX_LIB_SUFFIX='_p.a'
19844                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19845                 ;;
19846         shared) #(vi
19847                 case $cf_cv_system_name in
19848                 aix[5-7]*) #(vi
19849                         CXX_LIB_SUFFIX='.a'
19850                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19851                         ;;
19852                 cygwin*|mingw*) #(vi
19853                         CXX_LIB_SUFFIX='.dll'
19854                         CXX_DEP_SUFFIX='.dll.a'
19855                         ;;
19856                 darwin*) #(vi
19857                         CXX_LIB_SUFFIX='.dylib'
19858                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19859                         ;;
19860                 hpux*) #(vi
19861                         case $target in
19862                         ia64*) #(vi
19863                                 CXX_LIB_SUFFIX='.so'
19864                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19865                                 ;;
19866                         *) #(vi
19867                                 CXX_LIB_SUFFIX='.sl'
19868                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19869                                 ;;
19870                         esac
19871                         ;;
19872                 *)      CXX_LIB_SUFFIX='.so'
19873                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19874                         ;;
19875                 esac
19876         esac
19877         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19878         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19879 fi
19880 echo "$as_me:19880: result: $CXX_LIB_SUFFIX" >&5
19881 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19882
19883 fi
19884
19885 # do not want -ldl in build except as needed for -lncurses dependency
19886 if test "x$with_dlsym" = xyes ; then
19887 if test $DFT_LWR_MODEL = shared || \
19888    test $DFT_LWR_MODEL = libtool ; then
19889
19890 # remove dl library from $LIBS
19891 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19892
19893 fi
19894 fi
19895 ### Set up low-level terminfo dependencies for makefiles.
19896
19897 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19898 # do not need libdl
19899 TICS_LIST=
19900 if test "x$with_dlsym" = xyes ; then
19901
19902 # remove dl library from $SHLIB_LIST
19903 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19904
19905 fi
19906
19907 if test "$with_ticlib" != no ; then
19908
19909         if test "x$with_ticlib" != xyes ; then
19910                 TICS_NAME=$with_ticlib
19911                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19912                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19913                 TICS_LIB_SUFFIX="${with_ticlib}"
19914         else
19915                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19916                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19917                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19918         fi
19919         TICS_LDFLAGS="-L${LIB_DIR}"
19920         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19921 else
19922         TICS_LDFLAGS="-L${LIB_DIR}"
19923         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19924 fi
19925
19926 if test "$with_termlib" != no ; then
19927
19928         if test "x$with_termlib" != xyes ; then
19929                 TINFO_NAME=$with_termlib
19930                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19931                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19932                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19933                 TINFO_LIB_SUFFIX="${with_termlib}"
19934         else
19935                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19936                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19937                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19938                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19939         fi
19940
19941         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19942         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19943         if test "$DFT_LWR_MODEL" = "libtool"; then
19944                 TEST_ARGS="${TEST_DEPS}"
19945                 TEST_ARG2="${TEST_DEP2}"
19946                 TINFO_LDFLAGS="-L${LIB_DIR}"
19947                 TINFO_LIBS="$TEST_ARGS"
19948                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19949                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19950         else
19951                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19952                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19953                 if test "x$with_term_driver" != xno ; then
19954                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19955                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19956                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19957                 else
19958                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19959                         TINFO_LIBS="$TEST_ARGS"
19960                 fi
19961                 TINFO_LDFLAGS="-L${LIB_DIR}"
19962                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19963         fi
19964 else
19965         # the next lines are needed for linking libtic over libncurses
19966         TINFO_NAME=${LIB_NAME}
19967         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19968         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19969         if test "x$with_tic_depends" = xyes ; then
19970                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19971         else
19972                 TICS_LIST="$SHLIB_LIST"
19973         fi
19974
19975         TINFO_LDFLAGS="-L${LIB_DIR}"
19976         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19977 fi
19978
19979 if test "$DFT_LWR_MODEL" = shared ; then
19980         case $cf_cv_system_name in #(vi
19981         cygwin*)
19982                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19983                 TINFO_SUFFIX=.dll
19984                 ;;
19985         esac
19986 fi
19987
19988 if test "x$with_dlsym" = xyes ; then
19989
19990 # remove dl library from $TICS_LIST
19991 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19992
19993 fi
19994
19995 if test "$DFT_LWR_MODEL" = "libtool"; then
19996     OBJEXT=lo
19997 fi
19998
19999 # needed for Ada95
20000 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20001
20002 case $DFT_LWR_MODEL in
20003 normal|debug|profile)
20004
20005 if test "$GCC" = yes ; then
20006         case $cf_cv_system_name in #(
20007         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20008                 LDFLAGS_STATIC=
20009                 LDFLAGS_SHARED=
20010                 ;;
20011     *)  #( normally, except when broken
20012         LDFLAGS_STATIC=-static
20013         LDFLAGS_SHARED=-dynamic
20014         ;;
20015     esac
20016 else
20017         case $cf_cv_system_name in #(
20018         aix[4-7]*)      #( from ld manpage
20019                 LDFLAGS_STATIC=-bstatic
20020                 LDFLAGS_SHARED=-bdynamic
20021                 ;;
20022         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20023                 # We could also use just "archive" and "shared".
20024                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20025                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20026                 ;;
20027         irix*)          #( from ld manpage IRIX64
20028                 LDFLAGS_STATIC=-Bstatic
20029                 LDFLAGS_SHARED=-Bdynamic
20030                 ;;
20031         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20032                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20033                 LDFLAGS_STATIC=-noso
20034                 LDFLAGS_SHARED=-so_archive
20035                 ;;
20036         solaris2*)
20037                 LDFLAGS_STATIC=-Bstatic
20038                 LDFLAGS_SHARED=-Bdynamic
20039                 ;;
20040         esac
20041 fi
20042
20043 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20044 then
20045         echo "$as_me:20045: checking if linker supports switching between static/dynamic" >&5
20046 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20047
20048         rm -f libconftest.a
20049         cat >conftest.$ac_ext <<EOF
20050 #line 20050 "configure"
20051 #include <stdio.h>
20052 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20053 EOF
20054         if { (eval echo "$as_me:20054: \"$ac_compile\"") >&5
20055   (eval $ac_compile) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit $ac_status); } ; then
20059                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20060                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20061         fi
20062         rm -f conftest.*
20063
20064         cf_save_LIBS="$LIBS"
20065
20066         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20067         cat >conftest.$ac_ext <<_ACEOF
20068 #line 20068 "configure"
20069 #include "confdefs.h"
20070
20071 #line 20071 "configure"
20072 #include <stdio.h>
20073 int cf_ldflags_static(FILE *fp);
20074
20075 int
20076 main ()
20077 {
20078
20079         return cf_ldflags_static(stdin);
20080
20081   ;
20082   return 0;
20083 }
20084 _ACEOF
20085 rm -f conftest.$ac_objext conftest$ac_exeext
20086 if { (eval echo "$as_me:20086: \"$ac_link\"") >&5
20087   (eval $ac_link) 2>&5
20088   ac_status=$?
20089   echo "$as_me:20089: \$? = $ac_status" >&5
20090   (exit $ac_status); } &&
20091          { ac_try='test -s conftest$ac_exeext'
20092   { (eval echo "$as_me:20092: \"$ac_try\"") >&5
20093   (eval $ac_try) 2>&5
20094   ac_status=$?
20095   echo "$as_me:20095: \$? = $ac_status" >&5
20096   (exit $ac_status); }; }; then
20097
20098         # some linkers simply ignore the -dynamic
20099         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20100         *static*) # (vi
20101                 cf_ldflags_static=no
20102                 ;;
20103         *)
20104                 cf_ldflags_static=yes
20105                 ;;
20106         esac
20107
20108 else
20109   echo "$as_me: failed program was:" >&5
20110 cat conftest.$ac_ext >&5
20111 cf_ldflags_static=no
20112 fi
20113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20114
20115         rm -f libconftest.*
20116         LIBS="$cf_save_LIBS"
20117
20118         echo "$as_me:20118: result: $cf_ldflags_static" >&5
20119 echo "${ECHO_T}$cf_ldflags_static" >&6
20120
20121         if test $cf_ldflags_static != yes
20122         then
20123                 LDFLAGS_STATIC=
20124                 LDFLAGS_SHARED=
20125         fi
20126 else
20127         LDFLAGS_STATIC=
20128         LDFLAGS_SHARED=
20129 fi
20130
20131         ;;
20132 esac
20133
20134 echo "$as_me:20134: checking where we will install curses.h" >&5
20135 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20136 test "$with_overwrite" = no && \
20137 test "x$includedir" = 'x${prefix}/include' && \
20138         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20139 echo "$as_me:20139: result: $includedir" >&5
20140 echo "${ECHO_T}$includedir" >&6
20141
20142 ### Resolve a conflict between normal and wide-curses by forcing applications
20143 ### that will need libutf8 to add it to their configure script.
20144 if test "$with_overwrite" != no ; then
20145 if test "$NCURSES_LIBUTF8" = 1 ; then
20146         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20147         { echo "$as_me:20147: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20148 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20149 fi
20150 fi
20151 WITH_OVERWRITE=$with_overwrite
20152
20153 # used to separate tack out of the tree
20154 NCURSES_TREE=
20155
20156 ### predefined stuff for the test programs
20157
20158 cat >>confdefs.h <<\EOF
20159 #define HAVE_SLK_COLOR 1
20160 EOF
20161
20162 ### Construct the list of subdirectories for which we'll customize makefiles
20163 ### with the appropriate compile-rules.
20164
20165 echo "$as_me:20165: checking for src modules" >&5
20166 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20167
20168 # dependencies and linker-arguments for test-programs
20169 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20170 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20171 if test "$DFT_LWR_MODEL" = "libtool"; then
20172         TEST_ARGS="${TEST_DEPS}"
20173         TEST_ARG2="${TEST_DEP2}"
20174 else
20175         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20176         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20177 fi
20178
20179 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20180 cf_cv_src_modules=
20181 for cf_dir in $modules_to_build
20182 do
20183         if test -f $srcdir/$cf_dir/modules; then
20184
20185                 # We may/may not have tack in the distribution, though the
20186                 # makefile is.
20187                 if test $cf_dir = tack ; then
20188                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20189                                 continue
20190                         fi
20191                 fi
20192
20193                 if test -z "$cf_cv_src_modules"; then
20194                         cf_cv_src_modules=$cf_dir
20195                 else
20196                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20197                 fi
20198
20199                 # Make the ncurses_cfg.h file record the library interface files as
20200                 # well.  These are header files that are the same name as their
20201                 # directory.  Ncurses is the only library that does not follow
20202                 # that pattern.
20203                 if test $cf_dir = tack ; then
20204                         continue
20205                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20206
20207 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20208
20209                         cat >>confdefs.h <<EOF
20210 #define HAVE_${cf_have_include}_H 1
20211 EOF
20212
20213                         cat >>confdefs.h <<EOF
20214 #define HAVE_LIB${cf_have_include} 1
20215 EOF
20216
20217                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20218                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20219                         if test "$DFT_LWR_MODEL" = "libtool"; then
20220                                 TEST_ARGS="${TEST_DEPS}"
20221                                 TEST_ARG2="${TEST_DEP2}"
20222                         else
20223                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20224                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20225                         fi
20226                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20227                 fi
20228         fi
20229 done
20230 echo "$as_me:20230: result: $cf_cv_src_modules" >&5
20231 echo "${ECHO_T}$cf_cv_src_modules" >&6
20232
20233 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20234 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20235
20236 SRC_SUBDIRS=
20237 if test "x$cf_with_manpages" != xno ; then
20238         SRC_SUBDIRS="$SRC_SUBDIRS man"
20239 fi
20240 SRC_SUBDIRS="$SRC_SUBDIRS include"
20241 for cf_dir in $cf_cv_src_modules
20242 do
20243         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20244 done
20245 if test "x$cf_with_tests" != "xno" ; then
20246         SRC_SUBDIRS="$SRC_SUBDIRS test"
20247 fi
20248 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20249 if test "$cf_with_cxx_binding" != no; then
20250         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20251         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20252 fi
20253
20254 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20255 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20256
20257 ADA_SUBDIRS=
20258 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20259         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20260         ADA_SUBDIRS="gen src"
20261         if test "x$cf_with_tests" != "xno" ; then
20262                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20263         fi
20264 fi
20265
20266 SUB_MAKEFILES=
20267 for cf_dir in $SRC_SUBDIRS
20268 do
20269         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20270 done
20271
20272 if test -n "$ADA_SUBDIRS"; then
20273         for cf_dir in $ADA_SUBDIRS
20274         do
20275                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20276         done
20277
20278 fi
20279
20280 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20281    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20282    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20283 fi
20284
20285 DIRS_TO_MAKE="lib"
20286 for cf_item in $cf_list_models
20287 do
20288
20289         case $cf_item in
20290         libtool) cf_subdir='obj_lo'  ;;
20291         normal)  cf_subdir='objects' ;;
20292         debug)   cf_subdir='obj_g' ;;
20293         profile) cf_subdir='obj_p' ;;
20294         shared)
20295                 case $cf_cv_system_name in #(vi
20296                 cygwin) #(vi
20297                         cf_subdir='objects' ;;
20298                 *)
20299                         cf_subdir='obj_s' ;;
20300                 esac
20301         esac
20302
20303         for cf_item2 in $DIRS_TO_MAKE
20304         do
20305                 test $cf_item2 = $cf_subdir && break
20306         done
20307         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20308 done
20309 for cf_dir in $DIRS_TO_MAKE
20310 do
20311         test ! -d $cf_dir && mkdir $cf_dir
20312 done
20313
20314 # symbols that differ when compiling Ada95 by itself.
20315 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20316
20317 # values to use as strings
20318
20319 cat >>confdefs.h <<EOF
20320 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20321 EOF
20322
20323 cat >>confdefs.h <<EOF
20324 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20325 EOF
20326
20327 ### Now that we're done running tests, add the compiler-warnings, if any
20328
20329 cf_fix_cppflags=no
20330 cf_new_cflags=
20331 cf_new_cppflags=
20332 cf_new_extra_cppflags=
20333
20334 for cf_add_cflags in $EXTRA_CFLAGS
20335 do
20336 case $cf_fix_cppflags in
20337 no)
20338         case $cf_add_cflags in #(vi
20339         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20340                 case $cf_add_cflags in
20341                 -D*)
20342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20343
20344                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20345                                 && test -z "${cf_tst_cflags}" \
20346                                 && cf_fix_cppflags=yes
20347
20348                         if test $cf_fix_cppflags = yes ; then
20349                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20350                                 continue
20351                         elif test "${cf_tst_cflags}" = "\"'" ; then
20352                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20353                                 continue
20354                         fi
20355                         ;;
20356                 esac
20357                 case "$CPPFLAGS" in
20358                 *$cf_add_cflags) #(vi
20359                         ;;
20360                 *) #(vi
20361                         case $cf_add_cflags in #(vi
20362                         -D*)
20363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20364
20365 CPPFLAGS=`echo "$CPPFLAGS" | \
20366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20368
20369                                 ;;
20370                         esac
20371                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20372                         ;;
20373                 esac
20374                 ;;
20375         *)
20376                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20377                 ;;
20378         esac
20379         ;;
20380 yes)
20381         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20382
20383         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20384
20385         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20386                 && test -z "${cf_tst_cflags}" \
20387                 && cf_fix_cppflags=no
20388         ;;
20389 esac
20390 done
20391
20392 if test -n "$cf_new_cflags" ; then
20393
20394         CFLAGS="$CFLAGS $cf_new_cflags"
20395 fi
20396
20397 if test -n "$cf_new_cppflags" ; then
20398
20399         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20400 fi
20401
20402 if test -n "$cf_new_extra_cppflags" ; then
20403
20404         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20405 fi
20406
20407 ### Define substitutions for header files to avoid name-pollution
20408
20409 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20410         HAVE_TCGETATTR=1
20411 else
20412         HAVE_TCGETATTR=0
20413 fi
20414
20415 if test "x$ac_cv_header_termio_h" = xyes ; then
20416         HAVE_TERMIO_H=1
20417 else
20418         HAVE_TERMIO_H=0
20419 fi
20420
20421 if test "x$ac_cv_header_termios_h" = xyes ; then
20422         HAVE_TERMIOS_H=1
20423 else
20424         HAVE_TERMIOS_H=0
20425 fi
20426
20427 ################################################################################
20428 test "x$use_database" = xyes && \
20429 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20430
20431 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20432 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20433
20434 if test "x$enable_pc_files" = xyes ; then \
20435 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20436 MAKE_PC_FILES=
20437 else
20438 MAKE_PC_FILES="#"
20439 fi
20440
20441 # Extract the first word of "tic", so it can be a program name with args.
20442 set dummy tic; ac_word=$2
20443 echo "$as_me:20443: checking for $ac_word" >&5
20444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20445 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20446   echo $ECHO_N "(cached) $ECHO_C" >&6
20447 else
20448   case $TIC_PATH in
20449   [\\/]* | ?:[\\/]*)
20450   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20451   ;;
20452   *)
20453   ac_save_IFS=$IFS; IFS=$ac_path_separator
20454 ac_dummy="$PATH:/usr/local/ncurses/bin"
20455 for ac_dir in $ac_dummy; do
20456   IFS=$ac_save_IFS
20457   test -z "$ac_dir" && ac_dir=.
20458   if $as_executable_p "$ac_dir/$ac_word"; then
20459    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20460    echo "$as_me:20460: found $ac_dir/$ac_word" >&5
20461    break
20462 fi
20463 done
20464
20465   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20466   ;;
20467 esac
20468 fi
20469 TIC_PATH=$ac_cv_path_TIC_PATH
20470
20471 if test -n "$TIC_PATH"; then
20472   echo "$as_me:20472: result: $TIC_PATH" >&5
20473 echo "${ECHO_T}$TIC_PATH" >&6
20474 else
20475   echo "$as_me:20475: result: no" >&5
20476 echo "${ECHO_T}no" >&6
20477 fi
20478
20479 if test -n "$FALLBACK_LIST"
20480 then
20481         if test "$TIC_PATH" = unknown
20482         then
20483                 { echo "$as_me:20483: WARNING: no tic program found for fallbacks" >&5
20484 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20485         fi
20486 fi
20487
20488 if test "x$cf_with_tests" != xno ; then
20489         MAKE_TESTS=
20490 else
20491         MAKE_TESTS="#"
20492 fi
20493
20494 ADAHTML_DIR=../../doc/html/ada
20495
20496 SUB_SCRIPTS=
20497
20498 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"
20499 ac_config_commands="$ac_config_commands default"
20500 cat >confcache <<\_ACEOF
20501 # This file is a shell script that caches the results of configure
20502 # tests run on this system so they can be shared between configure
20503 # scripts and configure runs, see configure's option --config-cache.
20504 # It is not useful on other systems.  If it contains results you don't
20505 # want to keep, you may remove or edit it.
20506 #
20507 # config.status only pays attention to the cache file if you give it
20508 # the --recheck option to rerun configure.
20509 #
20510 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20511 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20512 # following values.
20513
20514 _ACEOF
20515
20516 # The following way of writing the cache mishandles newlines in values,
20517 # but we know of no workaround that is simple, portable, and efficient.
20518 # So, don't put newlines in cache variables' values.
20519 # Ultrix sh set writes to stderr and can't be redirected directly,
20520 # and sets the high bit in the cache file unless we assign to the vars.
20521 {
20522   (set) 2>&1 |
20523     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20524     *ac_space=\ *)
20525       # `set' does not quote correctly, so add quotes (double-quote
20526       # substitution turns \\\\ into \\, and sed turns \\ into \).
20527       sed -n \
20528         "s/'/'\\\\''/g;
20529           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20530       ;;
20531     *)
20532       # `set' quotes correctly as required by POSIX, so do not add quotes.
20533       sed -n \
20534         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20535       ;;
20536     esac;
20537 } |
20538   sed '
20539      t clear
20540      : clear
20541      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20542      t end
20543      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20544      : end' >>confcache
20545 if cmp -s $cache_file confcache; then :; else
20546   if test -w $cache_file; then
20547     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20548     cat confcache >$cache_file
20549   else
20550     echo "not updating unwritable cache $cache_file"
20551   fi
20552 fi
20553 rm -f confcache
20554
20555 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20556 # Let make expand exec_prefix.
20557 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20558
20559 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20560 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20561 # trailing colons and then remove the whole line if VPATH becomes empty
20562 # (actually we leave an empty line to preserve line numbers).
20563 if test "x$srcdir" = x.; then
20564   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20565 s/:*\$(srcdir):*/:/;
20566 s/:*\${srcdir}:*/:/;
20567 s/:*@srcdir@:*/:/;
20568 s/^\([^=]*=[    ]*\):*/\1/;
20569 s/:*$//;
20570 s/^[^=]*=[      ]*$//;
20571 }'
20572 fi
20573
20574 DEFS=-DHAVE_CONFIG_H
20575
20576 : ${CONFIG_STATUS=./config.status}
20577 ac_clean_files_save=$ac_clean_files
20578 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20579 { echo "$as_me:20579: creating $CONFIG_STATUS" >&5
20580 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20581 cat >$CONFIG_STATUS <<_ACEOF
20582 #! $SHELL
20583 # Generated automatically by configure.
20584 # Run this file to recreate the current configuration.
20585 # Compiler output produced by configure, useful for debugging
20586 # configure, is in config.log if it exists.
20587
20588 debug=false
20589 SHELL=\${CONFIG_SHELL-$SHELL}
20590 ac_cs_invocation="\$0 \$@"
20591
20592 _ACEOF
20593
20594 cat >>$CONFIG_STATUS <<\_ACEOF
20595 # Be Bourne compatible
20596 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20597   emulate sh
20598   NULLCMD=:
20599 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20600   set -o posix
20601 fi
20602
20603 # Name of the executable.
20604 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20605
20606 if expr a : '\(a\)' >/dev/null 2>&1; then
20607   as_expr=expr
20608 else
20609   as_expr=false
20610 fi
20611
20612 rm -f conf$$ conf$$.exe conf$$.file
20613 echo >conf$$.file
20614 if ln -s conf$$.file conf$$ 2>/dev/null; then
20615   # We could just check for DJGPP; but this test a) works b) is more generic
20616   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20617   if test -f conf$$.exe; then
20618     # Don't use ln at all; we don't have any links
20619     as_ln_s='cp -p'
20620   else
20621     as_ln_s='ln -s'
20622   fi
20623 elif ln conf$$.file conf$$ 2>/dev/null; then
20624   as_ln_s=ln
20625 else
20626   as_ln_s='cp -p'
20627 fi
20628 rm -f conf$$ conf$$.exe conf$$.file
20629
20630 as_executable_p="test -f"
20631
20632 # Support unset when possible.
20633 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20634   as_unset=unset
20635 else
20636   as_unset=false
20637 fi
20638
20639 # NLS nuisances.
20640 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20641 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20642 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20643 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20644 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20645 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20646 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20647 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20648
20649 # IFS
20650 # We need space, tab and new line, in precisely that order.
20651 as_nl='
20652 '
20653 IFS="   $as_nl"
20654
20655 # CDPATH.
20656 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20657
20658 exec 6>&1
20659
20660 _ACEOF
20661
20662 # Files that config.status was made for.
20663 if test -n "$ac_config_files"; then
20664   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20665 fi
20666
20667 if test -n "$ac_config_headers"; then
20668   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20669 fi
20670
20671 if test -n "$ac_config_links"; then
20672   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20673 fi
20674
20675 if test -n "$ac_config_commands"; then
20676   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20677 fi
20678
20679 cat >>$CONFIG_STATUS <<\EOF
20680
20681 ac_cs_usage="\
20682 \`$as_me' instantiates files from templates according to the
20683 current configuration.
20684
20685 Usage: $0 [OPTIONS] [FILE]...
20686
20687   -h, --help       print this help, then exit
20688   -V, --version    print version number, then exit
20689   -d, --debug      don't remove temporary files
20690       --recheck    update $as_me by reconfiguring in the same conditions
20691   --file=FILE[:TEMPLATE]
20692                    instantiate the configuration file FILE
20693   --header=FILE[:TEMPLATE]
20694                    instantiate the configuration header FILE
20695
20696 Configuration files:
20697 $config_files
20698
20699 Configuration headers:
20700 $config_headers
20701
20702 Configuration commands:
20703 $config_commands
20704
20705 Report bugs to <dickey@invisible-island.net>."
20706 EOF
20707
20708 cat >>$CONFIG_STATUS <<EOF
20709 ac_cs_version="\\
20710 config.status
20711 configured by $0, generated by GNU Autoconf 2.52.20121002,
20712   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20713
20714 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20715 Free Software Foundation, Inc.
20716 This config.status script is free software; the Free Software Foundation
20717 gives unlimited permission to copy, distribute and modify it."
20718 srcdir=$srcdir
20719 INSTALL="$INSTALL"
20720 EOF
20721
20722 cat >>$CONFIG_STATUS <<\EOF
20723 # If no file are specified by the user, then we need to provide default
20724 # value.  By we need to know if files were specified by the user.
20725 ac_need_defaults=:
20726 while test $# != 0
20727 do
20728   case $1 in
20729   --*=*)
20730     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20731     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20732     shift
20733     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20734     shift
20735     ;;
20736   -*);;
20737   *) # This is not an option, so the user has probably given explicit
20738      # arguments.
20739      ac_need_defaults=false;;
20740   esac
20741
20742   case $1 in
20743   # Handling of the options.
20744 EOF
20745 cat >>$CONFIG_STATUS <<EOF
20746   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20747     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20748     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20749 EOF
20750 cat >>$CONFIG_STATUS <<\EOF
20751   --version | --vers* | -V )
20752     echo "$ac_cs_version"; exit 0 ;;
20753   --he | --h)
20754     # Conflict between --help and --header
20755     { { echo "$as_me:20755: error: ambiguous option: $1
20756 Try \`$0 --help' for more information." >&5
20757 echo "$as_me: error: ambiguous option: $1
20758 Try \`$0 --help' for more information." >&2;}
20759    { (exit 1); exit 1; }; };;
20760   --help | --hel | -h )
20761     echo "$ac_cs_usage"; exit 0 ;;
20762   --debug | --d* | -d )
20763     debug=: ;;
20764   --file | --fil | --fi | --f )
20765     shift
20766     CONFIG_FILES="$CONFIG_FILES $1"
20767     ac_need_defaults=false;;
20768   --header | --heade | --head | --hea )
20769     shift
20770     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20771     ac_need_defaults=false;;
20772
20773   # This is an error.
20774   -*) { { echo "$as_me:20774: error: unrecognized option: $1
20775 Try \`$0 --help' for more information." >&5
20776 echo "$as_me: error: unrecognized option: $1
20777 Try \`$0 --help' for more information." >&2;}
20778    { (exit 1); exit 1; }; } ;;
20779
20780   *) ac_config_targets="$ac_config_targets $1" ;;
20781
20782   esac
20783   shift
20784 done
20785
20786 exec 5>>config.log
20787 cat >&5 << _ACEOF
20788
20789 ## ----------------------- ##
20790 ## Running config.status.  ##
20791 ## ----------------------- ##
20792
20793 This file was extended by $as_me 2.52.20121002, executed with
20794   CONFIG_FILES    = $CONFIG_FILES
20795   CONFIG_HEADERS  = $CONFIG_HEADERS
20796   CONFIG_LINKS    = $CONFIG_LINKS
20797   CONFIG_COMMANDS = $CONFIG_COMMANDS
20798   > $ac_cs_invocation
20799 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20800
20801 _ACEOF
20802 EOF
20803
20804 cat >>$CONFIG_STATUS <<EOF
20805 #
20806 # INIT-COMMANDS section.
20807 #
20808
20809 ### Special initialization commands, used to pass information from the
20810 ### configuration-run into config.status
20811
20812 AWK="$AWK"
20813 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20814 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20815 ECHO_LD="$ECHO_LD"
20816 LDCONFIG="$LDCONFIG"
20817 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20818 LIB_NAME="$LIB_NAME"
20819 LIB_PREFIX="$LIB_PREFIX"
20820 LIB_SUBSETS="$LIB_SUBSETS"
20821 LIB_SUFFIX="$LIB_SUFFIX"
20822 LIB_TRACING="$LIB_TRACING"
20823 LN_S="$LN_S"
20824 MAKE_TERMINFO="$MAKE_TERMINFO"
20825 NCURSES_MAJOR="$NCURSES_MAJOR"
20826 NCURSES_MINOR="$NCURSES_MINOR"
20827 NCURSES_OSPEED="$NCURSES_OSPEED"
20828 NCURSES_PATCH="$NCURSES_PATCH"
20829 SRC_SUBDIRS="$SRC_SUBDIRS"
20830 TERMINFO="$TERMINFO"
20831 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20832 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20833 TICS_NAME="$TICS_NAME"
20834 TIC_PATH="$TIC_PATH"
20835 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20836 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20837 TINFO_NAME="$TINFO_NAME"
20838 TINFO_SUFFIX="$TINFO_SUFFIX"
20839 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20840 WITH_CURSES_H="$with_curses_h"
20841 WITH_ECHO="${enable_echo:=yes}"
20842 WITH_OVERWRITE="$with_overwrite"
20843 cf_LIST_MODELS="$cf_list_models"
20844 cf_cv_abi_version="$cf_cv_abi_version"
20845 cf_cv_do_relink="$cf_cv_do_relink"
20846 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20847 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20848 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20849 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20850 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20851 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20852 cf_cv_rel_version="$cf_cv_rel_version"
20853 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20854 cf_cv_shared_soname='$cf_cv_shared_soname'
20855 cf_cv_shlib_version="$cf_cv_shlib_version"
20856 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20857 cf_cv_system_name="$cf_cv_system_name"
20858 cf_cv_term_driver="$with_term_driver"
20859 cf_with_ada="$cf_with_ada"
20860 cf_with_cxx_binding="$cf_with_cxx_binding"
20861 cf_with_manpages="$cf_with_manpages"
20862 cf_with_tests="$cf_with_tests"
20863 host="$host"
20864 target="$target"
20865
20866 EOF
20867
20868 cat >>$CONFIG_STATUS <<\EOF
20869 for ac_config_target in $ac_config_targets
20870 do
20871   case "$ac_config_target" in
20872   # Handling of arguments.
20873   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20874   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20875   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20876   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20877   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20878   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20879   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20880   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20881   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20882   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20883   *) { { echo "$as_me:20883: error: invalid argument: $ac_config_target" >&5
20884 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20885    { (exit 1); exit 1; }; };;
20886   esac
20887 done
20888
20889 # If the user did not use the arguments to specify the items to instantiate,
20890 # then the envvar interface is used.  Set only those that are not.
20891 # We use the long form for the default assignment because of an extremely
20892 # bizarre bug on SunOS 4.1.3.
20893 if $ac_need_defaults; then
20894   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20895   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20896   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20897 fi
20898
20899 # Create a temporary directory, and hook for its removal unless debugging.
20900 $debug ||
20901 {
20902   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20903   trap '{ (exit 1); exit 1; }' 1 2 13 15
20904 }
20905
20906 # Create a (secure) tmp directory for tmp files.
20907 : ${TMPDIR=/tmp}
20908 {
20909   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20910   test -n "$tmp" && test -d "$tmp"
20911 }  ||
20912 {
20913   tmp=$TMPDIR/cs$$-$RANDOM
20914   (umask 077 && mkdir $tmp)
20915 } ||
20916 {
20917    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20918    { (exit 1); exit 1; }
20919 }
20920
20921 EOF
20922
20923 cat >>$CONFIG_STATUS <<EOF
20924
20925 #
20926 # CONFIG_FILES section.
20927 #
20928
20929 # No need to generate the scripts if there are no CONFIG_FILES.
20930 # This happens for instance when ./config.status config.h
20931 if test -n "\$CONFIG_FILES"; then
20932   # Protect against being on the right side of a sed subst in config.status.
20933   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20934    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20935 s,@SHELL@,$SHELL,;t t
20936 s,@exec_prefix@,$exec_prefix,;t t
20937 s,@prefix@,$prefix,;t t
20938 s,@program_transform_name@,$program_transform_name,;t t
20939 s,@bindir@,$bindir,;t t
20940 s,@sbindir@,$sbindir,;t t
20941 s,@libexecdir@,$libexecdir,;t t
20942 s,@datarootdir@,$datarootdir,;t t
20943 s,@datadir@,$datadir,;t t
20944 s,@sysconfdir@,$sysconfdir,;t t
20945 s,@sharedstatedir@,$sharedstatedir,;t t
20946 s,@localstatedir@,$localstatedir,;t t
20947 s,@libdir@,$libdir,;t t
20948 s,@includedir@,$includedir,;t t
20949 s,@oldincludedir@,$oldincludedir,;t t
20950 s,@infodir@,$infodir,;t t
20951 s,@mandir@,$mandir,;t t
20952 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20953 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20954 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20955 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20956 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20957 s,@build_alias@,$build_alias,;t t
20958 s,@host_alias@,$host_alias,;t t
20959 s,@target_alias@,$target_alias,;t t
20960 s,@ECHO_C@,$ECHO_C,;t t
20961 s,@ECHO_N@,$ECHO_N,;t t
20962 s,@ECHO_T@,$ECHO_T,;t t
20963 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20964 s,@DEFS@,$DEFS,;t t
20965 s,@LIBS@,$LIBS,;t t
20966 s,@top_builddir@,$top_builddir,;t t
20967 s,@EGREP@,$EGREP,;t t
20968 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20969 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20970 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20971 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20972 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20973 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20974 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20975 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20976 s,@build@,$build,;t t
20977 s,@build_cpu@,$build_cpu,;t t
20978 s,@build_vendor@,$build_vendor,;t t
20979 s,@build_os@,$build_os,;t t
20980 s,@host@,$host,;t t
20981 s,@host_cpu@,$host_cpu,;t t
20982 s,@host_vendor@,$host_vendor,;t t
20983 s,@host_os@,$host_os,;t t
20984 s,@target@,$target,;t t
20985 s,@target_cpu@,$target_cpu,;t t
20986 s,@target_vendor@,$target_vendor,;t t
20987 s,@target_os@,$target_os,;t t
20988 s,@CC@,$CC,;t t
20989 s,@CFLAGS@,$CFLAGS,;t t
20990 s,@LDFLAGS@,$LDFLAGS,;t t
20991 s,@CPPFLAGS@,$CPPFLAGS,;t t
20992 s,@ac_ct_CC@,$ac_ct_CC,;t t
20993 s,@EXEEXT@,$EXEEXT,;t t
20994 s,@OBJEXT@,$OBJEXT,;t t
20995 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20996 s,@CPP@,$CPP,;t t
20997 s,@LDCONFIG@,$LDCONFIG,;t t
20998 s,@CXX@,$CXX,;t t
20999 s,@CXXFLAGS@,$CXXFLAGS,;t t
21000 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21001 s,@AWK@,$AWK,;t t
21002 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21003 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21004 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21005 s,@LINT@,$LINT,;t t
21006 s,@LINT_OPTS@,$LINT_OPTS,;t t
21007 s,@LN_S@,$LN_S,;t t
21008 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21009 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21010 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21011 s,@SET_MAKE@,$SET_MAKE,;t t
21012 s,@CTAGS@,$CTAGS,;t t
21013 s,@ETAGS@,$ETAGS,;t t
21014 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21015 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21016 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21017 s,@RANLIB@,$RANLIB,;t t
21018 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21019 s,@LD@,$LD,;t t
21020 s,@ac_ct_LD@,$ac_ct_LD,;t t
21021 s,@AR@,$AR,;t t
21022 s,@ac_ct_AR@,$ac_ct_AR,;t t
21023 s,@ARFLAGS@,$ARFLAGS,;t t
21024 s,@DESTDIR@,$DESTDIR,;t t
21025 s,@BUILD_CC@,$BUILD_CC,;t t
21026 s,@BUILD_CPP@,$BUILD_CPP,;t t
21027 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21028 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21029 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21030 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21031 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21032 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21033 s,@cf_list_models@,$cf_list_models,;t t
21034 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21035 s,@LIBTOOL@,$LIBTOOL,;t t
21036 s,@LT_UNDEF@,$LT_UNDEF,;t t
21037 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21038 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21039 s,@LIB_CREATE@,$LIB_CREATE,;t t
21040 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21041 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21042 s,@LIB_PREP@,$LIB_PREP,;t t
21043 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21044 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21045 s,@LIB_LINK@,$LIB_LINK,;t t
21046 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21047 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21048 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21049 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21050 s,@TICS_NAME@,$TICS_NAME,;t t
21051 s,@TINFO_NAME@,$TINFO_NAME,;t t
21052 s,@LIB_NAME@,$LIB_NAME,;t t
21053 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21054 s,@CC_G_OPT@,$CC_G_OPT,;t t
21055 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21056 s,@LD_MODEL@,$LD_MODEL,;t t
21057 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21058 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21059 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21060 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21061 s,@LINK_PROGS@,$LINK_PROGS,;t t
21062 s,@LINK_TESTS@,$LINK_TESTS,;t t
21063 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21064 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21065 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21066 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21067 s,@RPATH_LIST@,$RPATH_LIST,;t t
21068 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21069 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21070 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21071 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21072 s,@XTERM_KBS@,$XTERM_KBS,;t t
21073 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21074 s,@TERMINFO@,$TERMINFO,;t t
21075 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21076 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21077 s,@TERMPATH@,$TERMPATH,;t t
21078 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21079 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21080 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21081 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21082 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21083 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21084 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21085 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21086 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21087 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21088 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21089 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21090 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21091 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21092 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21093 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21094 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21095 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21096 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21097 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21098 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21099 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21100 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21101 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21102 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21103 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21104 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21105 s,@PTHREAD@,$PTHREAD,;t t
21106 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21107 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21108 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21109 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21110 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21111 s,@ECHO_LT@,$ECHO_LT,;t t
21112 s,@ECHO_LD@,$ECHO_LD,;t t
21113 s,@RULE_CC@,$RULE_CC,;t t
21114 s,@SHOW_CC@,$SHOW_CC,;t t
21115 s,@ECHO_CC@,$ECHO_CC,;t t
21116 s,@ECHO_LINK@,$ECHO_LINK,;t t
21117 s,@ADAFLAGS@,$ADAFLAGS,;t t
21118 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21119 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21120 s,@ADA_TRACE@,$ADA_TRACE,;t t
21121 s,@MATH_LIB@,$MATH_LIB,;t t
21122 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21123 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21124 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21125 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21126 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21127 s,@TEST_LIBS@,$TEST_LIBS,;t t
21128 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21129 s,@CXXCPP@,$CXXCPP,;t t
21130 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21131 s,@CXX_AR@,$CXX_AR,;t t
21132 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21133 s,@CXXLIBS@,$CXXLIBS,;t t
21134 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21135 s,@gnat_exists@,$gnat_exists,;t t
21136 s,@M4_exists@,$M4_exists,;t t
21137 s,@cf_ada_make@,$cf_ada_make,;t t
21138 s,@cf_compile_generics@,$cf_compile_generics,;t t
21139 s,@cf_generic_objects@,$cf_generic_objects,;t t
21140 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21141 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21142 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21143 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21144 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21145 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21146 s,@cf_ada_package@,$cf_ada_package,;t t
21147 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21148 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21149 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21150 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21151 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21152 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21153 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21154 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21155 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21156 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21157 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21158 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21159 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21160 s,@TICS_LIBS@,$TICS_LIBS,;t t
21161 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21162 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21163 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21164 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21165 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21166 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21167 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21168 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21169 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21170 s,@TICS_LIST@,$TICS_LIST,;t t
21171 s,@TINFO_LIST@,$TINFO_LIST,;t t
21172 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21173 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21174 s,@TEST_ARGS@,$TEST_ARGS,;t t
21175 s,@TEST_DEPS@,$TEST_DEPS,;t t
21176 s,@TEST_ARG2@,$TEST_ARG2,;t t
21177 s,@TEST_DEP2@,$TEST_DEP2,;t t
21178 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21179 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21180 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21181 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21182 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21183 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21184 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21185 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21186 s,@cross_compiling@,$cross_compiling,;t t
21187 s,@TIC_PATH@,$TIC_PATH,;t t
21188 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21189 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21190 CEOF
21191
21192 EOF
21193
21194   cat >>$CONFIG_STATUS <<\EOF
21195   # Split the substitutions into bite-sized pieces for seds with
21196   # small command number limits, like on Digital OSF/1 and HP-UX.
21197   ac_max_sed_lines=48
21198   ac_sed_frag=1 # Number of current file.
21199   ac_beg=1 # First line for current file.
21200   ac_end=$ac_max_sed_lines # Line after last line for current file.
21201   ac_more_lines=:
21202   ac_sed_cmds=
21203   while $ac_more_lines; do
21204     if test $ac_beg -gt 1; then
21205       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21206     else
21207       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21208     fi
21209     if test ! -s $tmp/subs.frag; then
21210       ac_more_lines=false
21211     else
21212       # The purpose of the label and of the branching condition is to
21213       # speed up the sed processing (if there are no `@' at all, there
21214       # is no need to browse any of the substitutions).
21215       # These are the two extra sed commands mentioned above.
21216       (echo ':t
21217   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21218       if test -z "$ac_sed_cmds"; then
21219         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21220       else
21221         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21222       fi
21223       ac_sed_frag=`expr $ac_sed_frag + 1`
21224       ac_beg=$ac_end
21225       ac_end=`expr $ac_end + $ac_max_sed_lines`
21226     fi
21227   done
21228   if test -z "$ac_sed_cmds"; then
21229     ac_sed_cmds=cat
21230   fi
21231 fi # test -n "$CONFIG_FILES"
21232
21233 EOF
21234 cat >>$CONFIG_STATUS <<\EOF
21235 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21236   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21237   case $ac_file in
21238   - | *:- | *:-:* ) # input from stdin
21239         cat >$tmp/stdin
21240         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21241         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21242   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21243         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21244   * )   ac_file_in=$ac_file.in ;;
21245   esac
21246
21247   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21248   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21249          X"$ac_file" : 'X\(//\)[^/]' \| \
21250          X"$ac_file" : 'X\(//\)$' \| \
21251          X"$ac_file" : 'X\(/\)' \| \
21252          .     : '\(.\)' 2>/dev/null ||
21253 echo X"$ac_file" |
21254     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21255           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21256           /^X\(\/\/\)$/{ s//\1/; q; }
21257           /^X\(\/\).*/{ s//\1/; q; }
21258           s/.*/./; q'`
21259   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21260     { case "$ac_dir" in
21261   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21262   *)                      as_incr_dir=.;;
21263 esac
21264 as_dummy="$ac_dir"
21265 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21266   case $as_mkdir_dir in
21267     # Skip DOS drivespec
21268     ?:) as_incr_dir=$as_mkdir_dir ;;
21269     *)
21270       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21271       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21272     ;;
21273   esac
21274 done; }
21275
21276     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21277     # A "../" for each directory in $ac_dir_suffix.
21278     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21279   else
21280     ac_dir_suffix= ac_dots=
21281   fi
21282
21283   case $srcdir in
21284   .)  ac_srcdir=.
21285       if test -z "$ac_dots"; then
21286          ac_top_srcdir=.
21287       else
21288          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21289       fi ;;
21290   [\\/]* | ?:[\\/]* )
21291       ac_srcdir=$srcdir$ac_dir_suffix;
21292       ac_top_srcdir=$srcdir ;;
21293   *) # Relative path.
21294     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21295     ac_top_srcdir=$ac_dots$srcdir ;;
21296   esac
21297
21298   case $INSTALL in
21299   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21300   *) ac_INSTALL=$ac_dots$INSTALL ;;
21301   esac
21302
21303   if test x"$ac_file" != x-; then
21304     { echo "$as_me:21304: creating $ac_file" >&5
21305 echo "$as_me: creating $ac_file" >&6;}
21306     rm -f "$ac_file"
21307   fi
21308   # Let's still pretend it is `configure' which instantiates (i.e., don't
21309   # use $as_me), people would be surprised to read:
21310   #    /* config.h.  Generated automatically by config.status.  */
21311   configure_input="Generated automatically from `echo $ac_file_in |
21312                                                  sed 's,.*/,,'` by configure."
21313
21314   # First look for the input files in the build tree, otherwise in the
21315   # src tree.
21316   ac_file_inputs=`IFS=:
21317     for f in $ac_file_in; do
21318       case $f in
21319       -) echo $tmp/stdin ;;
21320       [\\/$]*)
21321          # Absolute (can't be DOS-style, as IFS=:)
21322          test -f "$f" || { { echo "$as_me:21322: error: cannot find input file: $f" >&5
21323 echo "$as_me: error: cannot find input file: $f" >&2;}
21324    { (exit 1); exit 1; }; }
21325          echo $f;;
21326       *) # Relative
21327          if test -f "$f"; then
21328            # Build tree
21329            echo $f
21330          elif test -f "$srcdir/$f"; then
21331            # Source tree
21332            echo $srcdir/$f
21333          else
21334            # /dev/null tree
21335            { { echo "$as_me:21335: error: cannot find input file: $f" >&5
21336 echo "$as_me: error: cannot find input file: $f" >&2;}
21337    { (exit 1); exit 1; }; }
21338          fi;;
21339       esac
21340     done` || { (exit 1); exit 1; }
21341 EOF
21342 cat >>$CONFIG_STATUS <<\EOF
21343   ac_warn_datarootdir=no
21344   if test x"$ac_file" != x-; then
21345     for ac_item in $ac_file_inputs
21346     do
21347       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21348       if test -n "$ac_seen"; then
21349         ac_used=`grep '@datarootdir@' $ac_item`
21350         if test -z "$ac_used"; then
21351           { echo "$as_me:21351: WARNING: datarootdir was used implicitly but not set:
21352 $ac_seen" >&5
21353 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21354 $ac_seen" >&2;}
21355           ac_warn_datarootdir=yes
21356         fi
21357       fi
21358       ac_seen=`grep '${datarootdir}' $ac_item`
21359       if test -n "$ac_seen"; then
21360         { echo "$as_me:21360: WARNING: datarootdir was used explicitly but not set:
21361 $ac_seen" >&5
21362 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21363 $ac_seen" >&2;}
21364         ac_warn_datarootdir=yes
21365       fi
21366     done
21367   fi
21368
21369 if test "x$ac_warn_datarootdir" = xyes; then
21370   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21371 fi
21372
21373 EOF
21374 cat >>$CONFIG_STATUS <<EOF
21375   sed "$ac_vpsub
21376 $extrasub
21377 EOF
21378 cat >>$CONFIG_STATUS <<\EOF
21379 :t
21380 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21381 s,@configure_input@,$configure_input,;t t
21382 s,@srcdir@,$ac_srcdir,;t t
21383 s,@top_srcdir@,$ac_top_srcdir,;t t
21384 s,@INSTALL@,$ac_INSTALL,;t t
21385 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21386   rm -f $tmp/stdin
21387   if test x"$ac_file" != x-; then
21388     cp $tmp/out $ac_file
21389
21390     for ac_name in prefix exec_prefix datarootdir
21391     do
21392         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21393         if test -n "$ac_seen"; then
21394             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21395             if test -z "$ac_init"; then
21396               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21397               { echo "$as_me:21397: WARNING: Variable $ac_name is used but was not set:
21398 $ac_seen" >&5
21399 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21400 $ac_seen" >&2;}
21401             fi
21402         fi
21403     done
21404     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21405     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21406     if test -s $tmp/out; then
21407       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21408       { echo "$as_me:21408: WARNING: Some variables may not be substituted:
21409 $ac_seen" >&5
21410 echo "$as_me: WARNING: Some variables may not be substituted:
21411 $ac_seen" >&2;}
21412     fi
21413   else
21414     cat $tmp/out
21415   fi
21416   rm -f $tmp/out
21417
21418 done
21419 EOF
21420 cat >>$CONFIG_STATUS <<\EOF
21421
21422 #
21423 # CONFIG_HEADER section.
21424 #
21425
21426 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21427 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21428 #
21429 # ac_d sets the value in "#define NAME VALUE" lines.
21430 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21431 ac_dB='[        ].*$,\1#\2'
21432 ac_dC=' '
21433 ac_dD=',;t'
21434 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21435 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21436 ac_iB='\([      ]\),\1#\2define\3'
21437 ac_iC=' '
21438 ac_iD='\4,;t'
21439 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21440 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21441 ac_uB='$,\1#\2define\3'
21442 ac_uC=' '
21443 ac_uD=',;t'
21444
21445 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21446   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21447   case $ac_file in
21448   - | *:- | *:-:* ) # input from stdin
21449         cat >$tmp/stdin
21450         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21451         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21452   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21453         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21454   * )   ac_file_in=$ac_file.in ;;
21455   esac
21456
21457   test x"$ac_file" != x- && { echo "$as_me:21457: creating $ac_file" >&5
21458 echo "$as_me: creating $ac_file" >&6;}
21459
21460   # First look for the input files in the build tree, otherwise in the
21461   # src tree.
21462   ac_file_inputs=`IFS=:
21463     for f in $ac_file_in; do
21464       case $f in
21465       -) echo $tmp/stdin ;;
21466       [\\/$]*)
21467          # Absolute (can't be DOS-style, as IFS=:)
21468          test -f "$f" || { { echo "$as_me:21468: error: cannot find input file: $f" >&5
21469 echo "$as_me: error: cannot find input file: $f" >&2;}
21470    { (exit 1); exit 1; }; }
21471          echo $f;;
21472       *) # Relative
21473          if test -f "$f"; then
21474            # Build tree
21475            echo $f
21476          elif test -f "$srcdir/$f"; then
21477            # Source tree
21478            echo $srcdir/$f
21479          else
21480            # /dev/null tree
21481            { { echo "$as_me:21481: error: cannot find input file: $f" >&5
21482 echo "$as_me: error: cannot find input file: $f" >&2;}
21483    { (exit 1); exit 1; }; }
21484          fi;;
21485       esac
21486     done` || { (exit 1); exit 1; }
21487   # Remove the trailing spaces.
21488   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21489
21490 EOF
21491
21492 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21493 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21494 # be either 'cat' or 'sort'.
21495 cat confdefs.h | uniq >conftest.vals
21496
21497 # Break up conftest.vals because some shells have a limit on
21498 # the size of here documents, and old seds have small limits too.
21499
21500 rm -f conftest.tail
21501 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21502 while grep . conftest.vals >/dev/null
21503 do
21504   # Write chunks of a limited-size here document to conftest.frag.
21505   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21506   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21507   echo 'CEOF' >> $CONFIG_STATUS
21508   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21509   rm -f conftest.vals
21510   mv conftest.tail conftest.vals
21511 done
21512 rm -f conftest.vals
21513
21514 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21515 # marker @DEFS@.
21516 echo '  cat >> conftest.edit <<CEOF
21517 /@DEFS@/r conftest.frag
21518 /@DEFS@/d
21519 CEOF
21520 sed -f conftest.edit $tmp/in > $tmp/out
21521 rm -f $tmp/in
21522 mv $tmp/out $tmp/in
21523 rm -f conftest.edit conftest.frag
21524 ' >> $CONFIG_STATUS
21525
21526 cat >>$CONFIG_STATUS <<\EOF
21527   # Let's still pretend it is `configure' which instantiates (i.e., don't
21528   # use $as_me), people would be surprised to read:
21529   #    /* config.h.  Generated automatically by config.status.  */
21530   if test x"$ac_file" = x-; then
21531     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21532   else
21533     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21534   fi
21535   cat $tmp/in >>$tmp/config.h
21536   rm -f $tmp/in
21537   if test x"$ac_file" != x-; then
21538     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21539       { echo "$as_me:21539: $ac_file is unchanged" >&5
21540 echo "$as_me: $ac_file is unchanged" >&6;}
21541     else
21542       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21543          X"$ac_file" : 'X\(//\)[^/]' \| \
21544          X"$ac_file" : 'X\(//\)$' \| \
21545          X"$ac_file" : 'X\(/\)' \| \
21546          .     : '\(.\)' 2>/dev/null ||
21547 echo X"$ac_file" |
21548     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21549           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21550           /^X\(\/\/\)$/{ s//\1/; q; }
21551           /^X\(\/\).*/{ s//\1/; q; }
21552           s/.*/./; q'`
21553       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21554         { case "$ac_dir" in
21555   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21556   *)                      as_incr_dir=.;;
21557 esac
21558 as_dummy="$ac_dir"
21559 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21560   case $as_mkdir_dir in
21561     # Skip DOS drivespec
21562     ?:) as_incr_dir=$as_mkdir_dir ;;
21563     *)
21564       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21565       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21566     ;;
21567   esac
21568 done; }
21569
21570       fi
21571       rm -f $ac_file
21572       mv $tmp/config.h $ac_file
21573     fi
21574   else
21575     cat $tmp/config.h
21576     rm -f $tmp/config.h
21577   fi
21578 done
21579 EOF
21580 cat >>$CONFIG_STATUS <<\EOF
21581 #
21582 # CONFIG_COMMANDS section.
21583 #
21584 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21585   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21586   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21587
21588   case $ac_dest in
21589     default )
21590 if test "x$cf_with_tests" != xno ; then
21591
21592 for cf_dir in test
21593 do
21594         if test ! -d $srcdir/$cf_dir; then
21595                 continue
21596         elif test -f $srcdir/$cf_dir/programs; then
21597                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21598         fi
21599 done
21600
21601 fi
21602
21603 cf_prefix=$LIB_PREFIX
21604
21605 case $cf_cv_shlib_version in #(vi
21606 cygdll|mingw)
21607         TINFO_NAME=$TINFO_ARG_SUFFIX
21608         TINFO_SUFFIX=.dll
21609         ;;
21610 esac
21611
21612 if test -n "$TINFO_SUFFIX" ; then
21613         case $TINFO_SUFFIX in
21614         tw*)
21615                 TINFO_NAME="${TINFO_NAME}tw"
21616                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21617                 ;;
21618         t*)
21619                 TINFO_NAME="${TINFO_NAME}t"
21620                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21621                 ;;
21622         w*)
21623                 TINFO_NAME="${TINFO_NAME}w"
21624                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21625                 ;;
21626         esac
21627 fi
21628
21629 for cf_dir in $SRC_SUBDIRS
21630 do
21631         if test ! -d $srcdir/$cf_dir ; then
21632                 continue
21633         elif test -f $srcdir/$cf_dir/modules; then
21634
21635                 SHARED_LIB=
21636                 Libs_To_Make=
21637                 for cf_item in $cf_LIST_MODELS
21638                 do
21639
21640         case $cf_item in #(vi
21641         libtool) #(vi
21642                 cf_suffix='.la'
21643                 cf_depsuf=$cf_suffix
21644                 ;;
21645         normal) #(vi
21646                 cf_suffix='.a'
21647                 cf_depsuf=$cf_suffix
21648                 ;;
21649         debug) #(vi
21650                 cf_suffix='_g.a'
21651                 cf_depsuf=$cf_suffix
21652                 ;;
21653         profile) #(vi
21654                 cf_suffix='_p.a'
21655                 cf_depsuf=$cf_suffix
21656                 ;;
21657         shared) #(vi
21658                 case $cf_cv_system_name in
21659                 aix[5-7]*) #(vi
21660                         cf_suffix='.a'
21661                         cf_depsuf=$cf_suffix
21662                         ;;
21663                 cygwin*|mingw*) #(vi
21664                         cf_suffix='.dll'
21665                         cf_depsuf='.dll.a'
21666                         ;;
21667                 darwin*) #(vi
21668                         cf_suffix='.dylib'
21669                         cf_depsuf=$cf_suffix
21670                         ;;
21671                 hpux*) #(vi
21672                         case $target in
21673                         ia64*) #(vi
21674                                 cf_suffix='.so'
21675                                 cf_depsuf=$cf_suffix
21676                                 ;;
21677                         *) #(vi
21678                                 cf_suffix='.sl'
21679                                 cf_depsuf=$cf_suffix
21680                                 ;;
21681                         esac
21682                         ;;
21683                 *)      cf_suffix='.so'
21684                         cf_depsuf=$cf_suffix
21685                         ;;
21686                 esac
21687         esac
21688         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21689         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21690
21691                         if test $cf_item = shared ; then
21692                         if test "$cf_cv_do_symlinks" = yes ; then
21693                                 case "$cf_cv_shlib_version" in #(vi
21694                                 rel) #(vi
21695                                         case "$cf_cv_system_name" in #(vi
21696                                         darwin*)
21697                                         case .${LIB_SUFFIX} in
21698                                         .tw*)
21699                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21700                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21701                                                 ;;
21702                                         .t*)
21703                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21704                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21705                                                 ;;
21706                                         .w*)
21707                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21708                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21709                                                 ;;
21710                                         *)
21711                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21712                                                 ;;
21713                                         esac
21714                                         ;; #(vi
21715                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21716                                         esac
21717                                         ;;
21718                                 abi)
21719                                         case "$cf_cv_system_name" in #(vi
21720                                         darwin*)
21721                                         case .${LIB_SUFFIX} in
21722                                         .tw*)
21723                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21724                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21725                                                 ;;
21726                                         .t*)
21727                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21728                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21729                                                 ;;
21730                                         .w*)
21731                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21732                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21733                                                 ;;
21734                                         *)
21735                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21736                                                 ;;
21737                                         esac
21738                                         ;; #(vi
21739                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21740                                         esac
21741                                         ;;
21742                                 esac
21743                         fi
21744                         # cygwin needs import library, and has unique naming convention
21745                         # use autodetected ${cf_prefix} for import lib and static lib, but
21746                         # use 'cyg' prefix for shared lib.
21747                         case $cf_cv_shlib_version in #(vi
21748                         cygdll) #(vi
21749                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21750                                 Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_dir}${cf_cygsuf}"
21751                                 continue
21752                                 ;;
21753                         mingw)
21754                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21755                                 Libs_To_Make="$Libs_To_Make ../lib/lib${cf_dir}${cf_cygsuf}"
21756                                 continue
21757                                 ;;
21758                         esac
21759                         fi
21760                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21761                 done
21762
21763                 if test $cf_dir = ncurses ; then
21764                         cf_subsets="$LIB_SUBSETS"
21765                         cf_r_parts="$cf_subsets"
21766                         cf_liblist="$Libs_To_Make"
21767
21768                         while test -n "$cf_r_parts"
21769                         do
21770                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21771                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21772                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21773                                         cf_item=
21774                                         case $cf_l_parts in #(vi
21775                                         *termlib*) #(vi
21776                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21777                                                 ;;
21778                                         *ticlib*)
21779                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21780                                                 ;;
21781                                         *)
21782                                                 break
21783                                                 ;;
21784                                         esac
21785                                         if test -n "$cf_item"; then
21786                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21787                                         fi
21788                                 else
21789                                         break
21790                                 fi
21791                         done
21792                 else
21793                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21794                 fi
21795
21796                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21797                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21798                         $cf_dir/Makefile >$cf_dir/Makefile.out
21799                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21800
21801                 $AWK -f $srcdir/mk-0th.awk \
21802                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21803                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21804
21805                 for cf_subset in $cf_subsets
21806                 do
21807                         cf_subdirs=
21808                         for cf_item in $cf_LIST_MODELS
21809                         do
21810                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21811
21812 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21813
21814         case $cf_item in #(vi
21815         libtool) #(vi
21816                 cf_suffix='.la'
21817                 cf_depsuf=$cf_suffix
21818                 ;;
21819         normal) #(vi
21820                 cf_suffix='.a'
21821                 cf_depsuf=$cf_suffix
21822                 ;;
21823         debug) #(vi
21824                 cf_suffix='_g.a'
21825                 cf_depsuf=$cf_suffix
21826                 ;;
21827         profile) #(vi
21828                 cf_suffix='_p.a'
21829                 cf_depsuf=$cf_suffix
21830                 ;;
21831         shared) #(vi
21832                 case $cf_cv_system_name in
21833                 aix[5-7]*) #(vi
21834                         cf_suffix='.a'
21835                         cf_depsuf=$cf_suffix
21836                         ;;
21837                 cygwin*|mingw*) #(vi
21838                         cf_suffix='.dll'
21839                         cf_depsuf='.dll.a'
21840                         ;;
21841                 darwin*) #(vi
21842                         cf_suffix='.dylib'
21843                         cf_depsuf=$cf_suffix
21844                         ;;
21845                 hpux*) #(vi
21846                         case $target in
21847                         ia64*) #(vi
21848                                 cf_suffix='.so'
21849                                 cf_depsuf=$cf_suffix
21850                                 ;;
21851                         *) #(vi
21852                                 cf_suffix='.sl'
21853                                 cf_depsuf=$cf_suffix
21854                                 ;;
21855                         esac
21856                         ;;
21857                 *)      cf_suffix='.so'
21858                         cf_depsuf=$cf_suffix
21859                         ;;
21860                 esac
21861         esac
21862         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21863         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21864
21865         case $cf_item in
21866         libtool) cf_subdir='obj_lo'  ;;
21867         normal)  cf_subdir='objects' ;;
21868         debug)   cf_subdir='obj_g' ;;
21869         profile) cf_subdir='obj_p' ;;
21870         shared)
21871                 case $cf_cv_system_name in #(vi
21872                 cygwin) #(vi
21873                         cf_subdir='objects' ;;
21874                 *)
21875                         cf_subdir='obj_s' ;;
21876                 esac
21877         esac
21878
21879                         # Test for case where we build libtinfo with a different name.
21880                         cf_libname=$cf_dir
21881                         if test $cf_dir = ncurses ; then
21882                                 case $cf_subset in
21883                                 *base*)
21884                                         cf_libname=${cf_libname}$LIB_SUFFIX
21885                                         ;;
21886                                 *termlib*)
21887                                         cf_libname=$TINFO_LIB_SUFFIX
21888                                         ;;
21889                                 ticlib*)
21890                                         cf_libname=$TICS_LIB_SUFFIX
21891                                         ;;
21892                                 esac
21893                         else
21894                                 cf_libname=${cf_libname}$LIB_SUFFIX
21895                         fi
21896                         if test -n "${DFT_ARG_SUFFIX}" ; then
21897                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21898                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21899                         fi
21900
21901                         # These dependencies really are for development, not
21902                         # builds, but they are useful in porting, too.
21903                         cf_depend="../include/ncurses_cfg.h"
21904                         if test "$srcdir" = "."; then
21905                                 cf_reldir="."
21906                         else
21907                                 cf_reldir="\${srcdir}"
21908                         fi
21909
21910                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21911                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21912                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21913                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21914                         fi
21915
21916                         cf_dir_suffix=
21917                         old_cf_suffix="$cf_suffix"
21918                         if test "$cf_cv_shlib_version_infix" = yes ; then
21919                         if test -n "$LIB_SUFFIX" ; then
21920                                 case $LIB_SUFFIX in
21921                                 tw*)
21922                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21923                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21924                                         cf_dir_suffix=tw
21925                                         ;;
21926                                 t*)
21927                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21928                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21929                                         cf_dir_suffix=t
21930                                         ;;
21931                                 w*)
21932                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21933                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21934                                         cf_dir_suffix=w
21935                                         ;;
21936                                 esac
21937                         fi
21938                         fi
21939
21940                         $AWK -f $srcdir/mk-1st.awk \
21941                                 name=${cf_libname}${cf_dir_suffix} \
21942                                 traces=$LIB_TRACING \
21943                                 MODEL=$cf_ITEM \
21944                                 model=$cf_subdir \
21945                                 prefix=$cf_prefix \
21946                                 suffix=$cf_suffix \
21947                                 subset=$cf_subset \
21948                                 driver=$cf_cv_term_driver \
21949                                 SymLink="$LN_S" \
21950                                 TermlibRoot=$TINFO_NAME \
21951                                 TermlibSuffix=$TINFO_SUFFIX \
21952                                 ShlibVer=$cf_cv_shlib_version \
21953                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21954                                 ReLink=${cf_cv_do_relink:-no} \
21955                                 DoLinks=$cf_cv_do_symlinks \
21956                                 rmSoLocs=$cf_cv_rm_so_locs \
21957                                 ldconfig="$LDCONFIG" \
21958                                 overwrite=$WITH_OVERWRITE \
21959                                 depend="$cf_depend" \
21960                                 host="$host" \
21961                                 libtool_version="$LIBTOOL_VERSION" \
21962                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21963
21964                         cf_suffix="$old_cf_suffix"
21965
21966                         for cf_subdir2 in $cf_subdirs lib
21967                         do
21968                                 test $cf_subdir = $cf_subdir2 && break
21969                         done
21970                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21971                         $AWK -f $srcdir/mk-2nd.awk \
21972                                 name=$cf_dir \
21973                                 traces=$LIB_TRACING \
21974                                 MODEL=$cf_ITEM \
21975                                 model=$cf_subdir \
21976                                 subset=$cf_subset \
21977                                 srcdir=$srcdir \
21978                                 echo=$WITH_ECHO \
21979                                 crenames=$cf_cv_prog_CC_c_o \
21980                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21981                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21982                         cf_subdirs="$cf_subdirs $cf_subdir"
21983                         done
21984                 done
21985         fi
21986
21987         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
21988 done
21989
21990 for cf_dir in $SRC_SUBDIRS
21991 do
21992         if test ! -d $srcdir/$cf_dir ; then
21993                 continue
21994         fi
21995
21996         if test -f $cf_dir/Makefile ; then
21997                 case "$cf_dir" in
21998                 Ada95) #(vi
21999                         echo 'libs \' >> Makefile
22000                         echo 'install.libs \' >> Makefile
22001                         echo 'uninstall.libs ::' >> Makefile
22002                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22003                         ;;
22004                 esac
22005         fi
22006
22007         if test -f $srcdir/$cf_dir/modules; then
22008                 echo >> Makefile
22009                 if test -f $srcdir/$cf_dir/headers; then
22010 cat >> Makefile <<CF_EOF
22011 install.includes \\
22012 uninstall.includes \\
22013 CF_EOF
22014                 fi
22015 if test "$cf_dir" != "c++" ; then
22016 echo 'lint \' >> Makefile
22017 fi
22018 cat >> Makefile <<CF_EOF
22019 libs \\
22020 lintlib \\
22021 install.libs \\
22022 uninstall.libs \\
22023 install.$cf_dir \\
22024 uninstall.$cf_dir ::
22025         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22026 CF_EOF
22027         elif test -f $srcdir/$cf_dir/headers; then
22028 cat >> Makefile <<CF_EOF
22029
22030 libs \\
22031 install.libs \\
22032 uninstall.libs \\
22033 install.includes \\
22034 uninstall.includes ::
22035         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22036 CF_EOF
22037 fi
22038 done
22039
22040 cat >> Makefile <<CF_EOF
22041
22042 install.libs uninstall.libs \\
22043 install.data uninstall.data ::
22044 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22045 CF_EOF
22046
22047 if test "x$cf_with_manpages" = xyes; then
22048 cat >> Makefile <<CF_EOF
22049
22050 install.man \\
22051 uninstall.man ::
22052         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22053 CF_EOF
22054 fi
22055
22056 cat >> Makefile <<CF_EOF
22057
22058 distclean ::
22059         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22060         rm -f headers.sh headers.sed mk_shared_lib.sh
22061         rm -f edit_man.* man_alias.*
22062         rm -rf \${DIRS_TO_MAKE}
22063 CF_EOF
22064
22065 # Special case: tack's manpage lives in its own directory.
22066 if test "x$cf_with_manpages" = xyes; then
22067 if test -d tack ; then
22068 if test -f $srcdir/$tack.h; then
22069 cat >> Makefile <<CF_EOF
22070
22071 install.man \\
22072 uninstall.man ::
22073         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22074 CF_EOF
22075 fi
22076 fi
22077 fi
22078
22079 rm -f headers.sed headers.sh
22080
22081 echo creating headers.sh
22082 cat >headers.sh <<CF_EOF
22083 #! /bin/sh
22084 # This shell script is generated by the 'configure' script.  It is invoked in a
22085 # subdirectory of the build tree.  It generates a sed-script in the parent
22086 # directory that is used to adjust includes for header files that reside in a
22087 # subdirectory of /usr/include, etc.
22088 PRG=""
22089 while test \$# != 3
22090 do
22091 PRG="\$PRG \$1"; shift
22092 done
22093 DST=\$1
22094 REF=\$2
22095 SRC=\$3
22096 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22097 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22098 echo installing \$SRC in \$DST
22099 CF_EOF
22100
22101 if test $WITH_CURSES_H = yes; then
22102         cat >>headers.sh <<CF_EOF
22103 case \$DST in
22104 /*/include/*)
22105         END=\`basename \$DST\`
22106         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22107         do
22108                 NAME=\`basename \$i\`
22109                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22110         done
22111         ;;
22112 *)
22113         echo "" >> \$TMPSED
22114         ;;
22115 esac
22116 CF_EOF
22117
22118 else
22119         cat >>headers.sh <<CF_EOF
22120 case \$DST in
22121 /*/include/*)
22122         END=\`basename \$DST\`
22123         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22124         do
22125                 NAME=\`basename \$i\`
22126                 if test "\$NAME" = "curses.h"
22127                 then
22128                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22129                         NAME=ncurses.h
22130                 fi
22131                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22132         done
22133         ;;
22134 *)
22135         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22136         ;;
22137 esac
22138 CF_EOF
22139 fi
22140 cat >>headers.sh <<CF_EOF
22141 rm -f \$TMPSRC
22142 sed -f \$TMPSED \$SRC > \$TMPSRC
22143 NAME=\`basename \$SRC\`
22144 CF_EOF
22145 if test $WITH_CURSES_H != yes; then
22146         cat >>headers.sh <<CF_EOF
22147 test "\$NAME" = "curses.h" && NAME=ncurses.h
22148 CF_EOF
22149 fi
22150 cat >>headers.sh <<CF_EOF
22151 # Just in case someone gzip'd manpages, remove the conflicting copy.
22152 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22153
22154 eval \$PRG \$TMPSRC \$DST/\$NAME
22155 rm -f \$TMPSRC \$TMPSED
22156 CF_EOF
22157
22158 chmod 0755 headers.sh
22159
22160 for cf_dir in $SRC_SUBDIRS
22161 do
22162         if test ! -d $srcdir/$cf_dir ; then
22163                 continue
22164         fi
22165
22166         if test -f $srcdir/$cf_dir/headers; then
22167                 $AWK -f $srcdir/mk-hdr.awk \
22168                         subset="$LIB_SUBSETS" \
22169                         compat="$WITH_CURSES_H" \
22170                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22171         fi
22172
22173         if test -f $srcdir/$cf_dir/modules; then
22174                 if test "$cf_dir" != "c++" ; then
22175                         cat >>$cf_dir/Makefile <<"CF_EOF"
22176 depend : ${AUTO_SRC}
22177         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22178
22179 # DO NOT DELETE THIS LINE -- make depend depends on it.
22180 CF_EOF
22181                 fi
22182         fi
22183 done
22184
22185 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22186 if test -z "$USE_OLD_MAKERULES" ; then
22187         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22188 fi
22189 fi
22190  ;;
22191   esac
22192 done
22193 EOF
22194
22195 cat >>$CONFIG_STATUS <<\EOF
22196
22197 { (exit 0); exit 0; }
22198 EOF
22199 chmod +x $CONFIG_STATUS
22200 ac_clean_files=$ac_clean_files_save
22201
22202 # configure is writing to config.log, and then calls config.status.
22203 # config.status does its own redirection, appending to config.log.
22204 # Unfortunately, on DOS this fails, as config.log is still kept open
22205 # by configure, so config.status won't be able to write to it; its
22206 # output is simply discarded.  So we exec the FD to /dev/null,
22207 # effectively closing config.log, so it can be properly (re)opened and
22208 # appended to by config.status.  When coming back to configure, we
22209 # need to make the FD available again.
22210 if test "$no_create" != yes; then
22211   ac_cs_success=:
22212   exec 5>/dev/null
22213   $SHELL $CONFIG_STATUS || ac_cs_success=false
22214   exec 5>>config.log
22215   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22216   # would make configure fail if this is the last instruction.
22217   $ac_cs_success || { (exit 1); exit 1; }
22218 fi
22219 ${MAKE:-make} preinstall