]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20121017
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.558 .
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 fi;
1371
1372 ###     Save the given $CFLAGS to allow user-override.
1373 cf_user_CFLAGS="$CFLAGS"
1374
1375 ###     Default install-location
1376
1377 echo "$as_me:1377: checking for prefix" >&5
1378 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1379 if test "x$prefix" = "xNONE" ; then
1380         case "$cf_cv_system_name" in
1381                 # non-vendor systems don't have a conflict
1382         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1383                 prefix=/usr
1384                 ;;
1385         *)      prefix=$ac_default_prefix
1386                 ;;
1387         esac
1388 fi
1389 echo "$as_me:1389: result: $prefix" >&5
1390 echo "${ECHO_T}$prefix" >&6
1391
1392 if test "x$prefix" = "xNONE" ; then
1393 echo "$as_me:1393: checking for default include-directory" >&5
1394 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1395 test -n "$verbose" && echo 1>&6
1396 for cf_symbol in \
1397         $includedir \
1398         $includedir/ncurses \
1399         $prefix/include \
1400         $prefix/include/ncurses \
1401         /usr/local/include \
1402         /usr/local/include/ncurses \
1403         /usr/include \
1404         /usr/include/ncurses
1405 do
1406         cf_dir=`eval echo $cf_symbol`
1407         if test -f $cf_dir/curses.h ; then
1408         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1409                 includedir="$cf_symbol"
1410                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1411                 break
1412         fi
1413         fi
1414         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1415 done
1416 echo "$as_me:1416: result: $includedir" >&5
1417 echo "${ECHO_T}$includedir" >&6
1418 fi
1419
1420 ###     Checks for programs.
1421
1422 # Check whether --with-ada or --without-ada was given.
1423 if test "${with_ada+set}" = set; then
1424   withval="$with_ada"
1425   cf_with_ada=$withval
1426 else
1427   cf_with_ada=yes
1428 fi;
1429 if test "x$cf_with_ada" = xyes
1430 then
1431         cf_PROG_CC="gnatgcc gcc cc"
1432 else
1433         cf_PROG_CC="gcc cc"
1434 fi
1435
1436 ac_ext=c
1437 ac_cpp='$CPP $CPPFLAGS'
1438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1441 ac_main_return=return
1442 if test -n "$ac_tool_prefix"; then
1443   for ac_prog in $cf_PROG_CC
1444   do
1445     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1446 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1447 echo "$as_me:1447: checking for $ac_word" >&5
1448 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1449 if test "${ac_cv_prog_CC+set}" = set; then
1450   echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452   if test -n "$CC"; then
1453   ac_cv_prog_CC="$CC" # Let the user override the test.
1454 else
1455   ac_save_IFS=$IFS; IFS=$ac_path_separator
1456 ac_dummy="$PATH"
1457 for ac_dir in $ac_dummy; do
1458   IFS=$ac_save_IFS
1459   test -z "$ac_dir" && ac_dir=.
1460   $as_executable_p "$ac_dir/$ac_word" || continue
1461 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1462 echo "$as_me:1462: found $ac_dir/$ac_word" >&5
1463 break
1464 done
1465
1466 fi
1467 fi
1468 CC=$ac_cv_prog_CC
1469 if test -n "$CC"; then
1470   echo "$as_me:1470: result: $CC" >&5
1471 echo "${ECHO_T}$CC" >&6
1472 else
1473   echo "$as_me:1473: result: no" >&5
1474 echo "${ECHO_T}no" >&6
1475 fi
1476
1477     test -n "$CC" && break
1478   done
1479 fi
1480 if test -z "$CC"; then
1481   ac_ct_CC=$CC
1482   for ac_prog in $cf_PROG_CC
1483 do
1484   # Extract the first word of "$ac_prog", so it can be a program name with args.
1485 set dummy $ac_prog; ac_word=$2
1486 echo "$as_me:1486: checking for $ac_word" >&5
1487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1489   echo $ECHO_N "(cached) $ECHO_C" >&6
1490 else
1491   if test -n "$ac_ct_CC"; then
1492   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1493 else
1494   ac_save_IFS=$IFS; IFS=$ac_path_separator
1495 ac_dummy="$PATH"
1496 for ac_dir in $ac_dummy; do
1497   IFS=$ac_save_IFS
1498   test -z "$ac_dir" && ac_dir=.
1499   $as_executable_p "$ac_dir/$ac_word" || continue
1500 ac_cv_prog_ac_ct_CC="$ac_prog"
1501 echo "$as_me:1501: found $ac_dir/$ac_word" >&5
1502 break
1503 done
1504
1505 fi
1506 fi
1507 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1508 if test -n "$ac_ct_CC"; then
1509   echo "$as_me:1509: result: $ac_ct_CC" >&5
1510 echo "${ECHO_T}$ac_ct_CC" >&6
1511 else
1512   echo "$as_me:1512: result: no" >&5
1513 echo "${ECHO_T}no" >&6
1514 fi
1515
1516   test -n "$ac_ct_CC" && break
1517 done
1518
1519   CC=$ac_ct_CC
1520 fi
1521
1522 test -z "$CC" && { { echo "$as_me:1522: error: no acceptable cc found in \$PATH" >&5
1523 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1524    { (exit 1); exit 1; }; }
1525
1526 # Provide some information about the compiler.
1527 echo "$as_me:1527:" \
1528      "checking for C compiler version" >&5
1529 ac_compiler=`set X $ac_compile; echo $2`
1530 { (eval echo "$as_me:1530: \"$ac_compiler --version </dev/null >&5\"") >&5
1531   (eval $ac_compiler --version </dev/null >&5) 2>&5
1532   ac_status=$?
1533   echo "$as_me:1533: \$? = $ac_status" >&5
1534   (exit $ac_status); }
1535 { (eval echo "$as_me:1535: \"$ac_compiler -v </dev/null >&5\"") >&5
1536   (eval $ac_compiler -v </dev/null >&5) 2>&5
1537   ac_status=$?
1538   echo "$as_me:1538: \$? = $ac_status" >&5
1539   (exit $ac_status); }
1540 { (eval echo "$as_me:1540: \"$ac_compiler -V </dev/null >&5\"") >&5
1541   (eval $ac_compiler -V </dev/null >&5) 2>&5
1542   ac_status=$?
1543   echo "$as_me:1543: \$? = $ac_status" >&5
1544   (exit $ac_status); }
1545
1546 cat >conftest.$ac_ext <<_ACEOF
1547 #line 1547 "configure"
1548 #include "confdefs.h"
1549
1550 int
1551 main ()
1552 {
1553
1554   ;
1555   return 0;
1556 }
1557 _ACEOF
1558 ac_clean_files_save=$ac_clean_files
1559 ac_clean_files="$ac_clean_files a.out a.exe"
1560 # Try to create an executable without -o first, disregard a.out.
1561 # It will help us diagnose broken compilers, and finding out an intuition
1562 # of exeext.
1563 echo "$as_me:1563: checking for C compiler default output" >&5
1564 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1565 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1566 if { (eval echo "$as_me:1566: \"$ac_link_default\"") >&5
1567   (eval $ac_link_default) 2>&5
1568   ac_status=$?
1569   echo "$as_me:1569: \$? = $ac_status" >&5
1570   (exit $ac_status); }; then
1571   # Find the output, starting from the most likely.  This scheme is
1572 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1573 # resort.
1574 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1575                 ls a.out conftest 2>/dev/null;
1576                 ls a.* conftest.* 2>/dev/null`; do
1577   case $ac_file in
1578     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1579     a.out ) # We found the default executable, but exeext='' is most
1580             # certainly right.
1581             break;;
1582     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1583           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1584           export ac_cv_exeext
1585           break;;
1586     * ) break;;
1587   esac
1588 done
1589 else
1590   echo "$as_me: failed program was:" >&5
1591 cat conftest.$ac_ext >&5
1592 { { echo "$as_me:1592: error: C compiler cannot create executables" >&5
1593 echo "$as_me: error: C compiler cannot create executables" >&2;}
1594    { (exit 77); exit 77; }; }
1595 fi
1596
1597 ac_exeext=$ac_cv_exeext
1598 echo "$as_me:1598: result: $ac_file" >&5
1599 echo "${ECHO_T}$ac_file" >&6
1600
1601 # Check the compiler produces executables we can run.  If not, either
1602 # the compiler is broken, or we cross compile.
1603 echo "$as_me:1603: checking whether the C compiler works" >&5
1604 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1605 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1606 # If not cross compiling, check that we can run a simple program.
1607 if test "$cross_compiling" != yes; then
1608   if { ac_try='./$ac_file'
1609   { (eval echo "$as_me:1609: \"$ac_try\"") >&5
1610   (eval $ac_try) 2>&5
1611   ac_status=$?
1612   echo "$as_me:1612: \$? = $ac_status" >&5
1613   (exit $ac_status); }; }; then
1614     cross_compiling=no
1615   else
1616     if test "$cross_compiling" = maybe; then
1617         cross_compiling=yes
1618     else
1619         { { echo "$as_me:1619: error: cannot run C compiled programs.
1620 If you meant to cross compile, use \`--host'." >&5
1621 echo "$as_me: error: cannot run C compiled programs.
1622 If you meant to cross compile, use \`--host'." >&2;}
1623    { (exit 1); exit 1; }; }
1624     fi
1625   fi
1626 fi
1627 echo "$as_me:1627: result: yes" >&5
1628 echo "${ECHO_T}yes" >&6
1629
1630 rm -f a.out a.exe conftest$ac_cv_exeext
1631 ac_clean_files=$ac_clean_files_save
1632 # Check the compiler produces executables we can run.  If not, either
1633 # the compiler is broken, or we cross compile.
1634 echo "$as_me:1634: checking whether we are cross compiling" >&5
1635 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1636 echo "$as_me:1636: result: $cross_compiling" >&5
1637 echo "${ECHO_T}$cross_compiling" >&6
1638
1639 echo "$as_me:1639: checking for executable suffix" >&5
1640 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1641 if { (eval echo "$as_me:1641: \"$ac_link\"") >&5
1642   (eval $ac_link) 2>&5
1643   ac_status=$?
1644   echo "$as_me:1644: \$? = $ac_status" >&5
1645   (exit $ac_status); }; then
1646   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1647 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1648 # work properly (i.e., refer to `conftest.exe'), while it won't with
1649 # `rm'.
1650 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1651   case $ac_file in
1652     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1653     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1654           export ac_cv_exeext
1655           break;;
1656     * ) break;;
1657   esac
1658 done
1659 else
1660   { { echo "$as_me:1660: error: cannot compute EXEEXT: cannot compile and link" >&5
1661 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1662    { (exit 1); exit 1; }; }
1663 fi
1664
1665 rm -f conftest$ac_cv_exeext
1666 echo "$as_me:1666: result: $ac_cv_exeext" >&5
1667 echo "${ECHO_T}$ac_cv_exeext" >&6
1668
1669 rm -f conftest.$ac_ext
1670 EXEEXT=$ac_cv_exeext
1671 ac_exeext=$EXEEXT
1672 echo "$as_me:1672: checking for object suffix" >&5
1673 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1674 if test "${ac_cv_objext+set}" = set; then
1675   echo $ECHO_N "(cached) $ECHO_C" >&6
1676 else
1677   cat >conftest.$ac_ext <<_ACEOF
1678 #line 1678 "configure"
1679 #include "confdefs.h"
1680
1681 int
1682 main ()
1683 {
1684
1685   ;
1686   return 0;
1687 }
1688 _ACEOF
1689 rm -f conftest.o conftest.obj
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691   (eval $ac_compile) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }; then
1695   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1696   case $ac_file in
1697     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1698     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1699        break;;
1700   esac
1701 done
1702 else
1703   echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1705 { { echo "$as_me:1705: error: cannot compute OBJEXT: cannot compile" >&5
1706 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1707    { (exit 1); exit 1; }; }
1708 fi
1709
1710 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1711 fi
1712 echo "$as_me:1712: result: $ac_cv_objext" >&5
1713 echo "${ECHO_T}$ac_cv_objext" >&6
1714 OBJEXT=$ac_cv_objext
1715 ac_objext=$OBJEXT
1716 echo "$as_me:1716: checking whether we are using the GNU C compiler" >&5
1717 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1718 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1719   echo $ECHO_N "(cached) $ECHO_C" >&6
1720 else
1721   cat >conftest.$ac_ext <<_ACEOF
1722 #line 1722 "configure"
1723 #include "confdefs.h"
1724
1725 int
1726 main ()
1727 {
1728 #ifndef __GNUC__
1729        choke me
1730 #endif
1731
1732   ;
1733   return 0;
1734 }
1735 _ACEOF
1736 rm -f conftest.$ac_objext
1737 if { (eval echo "$as_me:1737: \"$ac_compile\"") >&5
1738   (eval $ac_compile) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); } &&
1742          { ac_try='test -s conftest.$ac_objext'
1743   { (eval echo "$as_me:1743: \"$ac_try\"") >&5
1744   (eval $ac_try) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); }; }; then
1748   ac_compiler_gnu=yes
1749 else
1750   echo "$as_me: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 ac_compiler_gnu=no
1753 fi
1754 rm -f conftest.$ac_objext conftest.$ac_ext
1755 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1756
1757 fi
1758 echo "$as_me:1758: result: $ac_cv_c_compiler_gnu" >&5
1759 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1760 GCC=`test $ac_compiler_gnu = yes && echo yes`
1761 ac_test_CFLAGS=${CFLAGS+set}
1762 ac_save_CFLAGS=$CFLAGS
1763 CFLAGS="-g"
1764 echo "$as_me:1764: checking whether $CC accepts -g" >&5
1765 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1766 if test "${ac_cv_prog_cc_g+set}" = set; then
1767   echo $ECHO_N "(cached) $ECHO_C" >&6
1768 else
1769   cat >conftest.$ac_ext <<_ACEOF
1770 #line 1770 "configure"
1771 #include "confdefs.h"
1772
1773 int
1774 main ()
1775 {
1776
1777   ;
1778   return 0;
1779 }
1780 _ACEOF
1781 rm -f conftest.$ac_objext
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783   (eval $ac_compile) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); } &&
1787          { ac_try='test -s conftest.$ac_objext'
1788   { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1789   (eval $ac_try) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); }; }; then
1793   ac_cv_prog_cc_g=yes
1794 else
1795   echo "$as_me: failed program was:" >&5
1796 cat conftest.$ac_ext >&5
1797 ac_cv_prog_cc_g=no
1798 fi
1799 rm -f conftest.$ac_objext conftest.$ac_ext
1800 fi
1801 echo "$as_me:1801: result: $ac_cv_prog_cc_g" >&5
1802 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1803 if test "$ac_test_CFLAGS" = set; then
1804   CFLAGS=$ac_save_CFLAGS
1805 elif test $ac_cv_prog_cc_g = yes; then
1806   if test "$GCC" = yes; then
1807     CFLAGS="-g -O2"
1808   else
1809     CFLAGS="-g"
1810   fi
1811 else
1812   if test "$GCC" = yes; then
1813     CFLAGS="-O2"
1814   else
1815     CFLAGS=
1816   fi
1817 fi
1818 # Some people use a C++ compiler to compile C.  Since we use `exit',
1819 # in C++ we need to declare it.  In case someone uses the same compiler
1820 # for both compiling C and C++ we need to have the C++ compiler decide
1821 # the declaration of exit, since it's the most demanding environment.
1822 cat >conftest.$ac_ext <<_ACEOF
1823 #ifndef __cplusplus
1824   choke me
1825 #endif
1826 _ACEOF
1827 rm -f conftest.$ac_objext
1828 if { (eval echo "$as_me:1828: \"$ac_compile\"") >&5
1829   (eval $ac_compile) 2>&5
1830   ac_status=$?
1831   echo "$as_me:1831: \$? = $ac_status" >&5
1832   (exit $ac_status); } &&
1833          { ac_try='test -s conftest.$ac_objext'
1834   { (eval echo "$as_me:1834: \"$ac_try\"") >&5
1835   (eval $ac_try) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); }; }; then
1839   for ac_declaration in \
1840    ''\
1841    '#include <stdlib.h>' \
1842    'extern "C" void std::exit (int) throw (); using std::exit;' \
1843    'extern "C" void std::exit (int); using std::exit;' \
1844    'extern "C" void exit (int) throw ();' \
1845    'extern "C" void exit (int);' \
1846    'void exit (int);'
1847 do
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851 #include <stdlib.h>
1852 $ac_declaration
1853 int
1854 main ()
1855 {
1856 exit (42);
1857   ;
1858   return 0;
1859 }
1860 _ACEOF
1861 rm -f conftest.$ac_objext
1862 if { (eval echo "$as_me:1862: \"$ac_compile\"") >&5
1863   (eval $ac_compile) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit $ac_status); } &&
1867          { ac_try='test -s conftest.$ac_objext'
1868   { (eval echo "$as_me:1868: \"$ac_try\"") >&5
1869   (eval $ac_try) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); }; }; then
1873   :
1874 else
1875   echo "$as_me: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 continue
1878 fi
1879 rm -f conftest.$ac_objext conftest.$ac_ext
1880   cat >conftest.$ac_ext <<_ACEOF
1881 #line 1881 "configure"
1882 #include "confdefs.h"
1883 $ac_declaration
1884 int
1885 main ()
1886 {
1887 exit (42);
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   break
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 fi
1909 rm -f conftest.$ac_objext conftest.$ac_ext
1910 done
1911 rm -rf conftest*
1912 if test -n "$ac_declaration"; then
1913   echo '#ifdef __cplusplus' >>confdefs.h
1914   echo $ac_declaration      >>confdefs.h
1915   echo '#endif'             >>confdefs.h
1916 fi
1917
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 fi
1922 rm -f conftest.$ac_objext conftest.$ac_ext
1923 ac_ext=c
1924 ac_cpp='$CPP $CPPFLAGS'
1925 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1926 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1928 ac_main_return=return
1929
1930 GCC_VERSION=none
1931 if test "$GCC" = yes ; then
1932         echo "$as_me:1932: checking version of $CC" >&5
1933 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1934         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(\(GCC\|Debian\)[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1935         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1936         echo "$as_me:1936: result: $GCC_VERSION" >&5
1937 echo "${ECHO_T}$GCC_VERSION" >&6
1938 fi
1939
1940 echo "$as_me:1940: checking for $CC option to accept ANSI C" >&5
1941 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1942 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1943   echo $ECHO_N "(cached) $ECHO_C" >&6
1944 else
1945   ac_cv_prog_cc_stdc=no
1946 ac_save_CC=$CC
1947 cat >conftest.$ac_ext <<_ACEOF
1948 #line 1948 "configure"
1949 #include "confdefs.h"
1950 #include <stdarg.h>
1951 #include <stdio.h>
1952 #include <sys/types.h>
1953 #include <sys/stat.h>
1954 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1955 struct buf { int x; };
1956 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1957 static char *e (p, i)
1958      char **p;
1959      int i;
1960 {
1961   return p[i];
1962 }
1963 static char *f (char * (*g) (char **, int), char **p, ...)
1964 {
1965   char *s;
1966   va_list v;
1967   va_start (v,p);
1968   s = g (p, va_arg (v,int));
1969   va_end (v);
1970   return s;
1971 }
1972 int test (int i, double x);
1973 struct s1 {int (*f) (int a);};
1974 struct s2 {int (*f) (double a);};
1975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1976 int argc;
1977 char **argv;
1978 int
1979 main ()
1980 {
1981 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 # Don't try gcc -ansi; that turns off useful extensions and
1987 # breaks some systems' header files.
1988 # AIX                   -qlanglvl=ansi
1989 # Ultrix and OSF/1      -std1
1990 # HP-UX 10.20 and later -Ae
1991 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1992 # SVR4                  -Xc -D__EXTENSIONS__
1993 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1994 do
1995   CC="$ac_save_CC $ac_arg"
1996   rm -f conftest.$ac_objext
1997 if { (eval echo "$as_me:1997: \"$ac_compile\"") >&5
1998   (eval $ac_compile) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit $ac_status); } &&
2002          { ac_try='test -s conftest.$ac_objext'
2003   { (eval echo "$as_me:2003: \"$ac_try\"") >&5
2004   (eval $ac_try) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); }; }; then
2008   ac_cv_prog_cc_stdc=$ac_arg
2009 break
2010 else
2011   echo "$as_me: failed program was:" >&5
2012 cat conftest.$ac_ext >&5
2013 fi
2014 rm -f conftest.$ac_objext
2015 done
2016 rm -f conftest.$ac_ext conftest.$ac_objext
2017 CC=$ac_save_CC
2018
2019 fi
2020
2021 case "x$ac_cv_prog_cc_stdc" in
2022   x|xno)
2023     echo "$as_me:2023: result: none needed" >&5
2024 echo "${ECHO_T}none needed" >&6 ;;
2025   *)
2026     echo "$as_me:2026: result: $ac_cv_prog_cc_stdc" >&5
2027 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2028     CC="$CC $ac_cv_prog_cc_stdc" ;;
2029 esac
2030
2031 # This should have been defined by AC_PROG_CC
2032 : ${CC:=cc}
2033
2034 echo "$as_me:2034: checking \$CC variable" >&5
2035 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2036 case "$CC" in #(vi
2037 *[\ \   ]-[IUD]*)
2038         echo "$as_me:2038: result: broken" >&5
2039 echo "${ECHO_T}broken" >&6
2040         { echo "$as_me:2040: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2041 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2042         # humor him...
2043         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2044         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2045
2046 cf_fix_cppflags=no
2047 cf_new_cflags=
2048 cf_new_cppflags=
2049 cf_new_extra_cppflags=
2050
2051 for cf_add_cflags in $cf_flags
2052 do
2053 case $cf_fix_cppflags in
2054 no)
2055         case $cf_add_cflags in #(vi
2056         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2057                 case $cf_add_cflags in
2058                 -D*)
2059                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2060
2061                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2062                                 && test -z "${cf_tst_cflags}" \
2063                                 && cf_fix_cppflags=yes
2064
2065                         if test $cf_fix_cppflags = yes ; then
2066                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2067                                 continue
2068                         elif test "${cf_tst_cflags}" = "\"'" ; then
2069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070                                 continue
2071                         fi
2072                         ;;
2073                 esac
2074                 case "$CPPFLAGS" in
2075                 *$cf_add_cflags) #(vi
2076                         ;;
2077                 *) #(vi
2078                         case $cf_add_cflags in #(vi
2079                         -D*)
2080                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2081
2082 CPPFLAGS=`echo "$CPPFLAGS" | \
2083         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2084                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2085
2086                                 ;;
2087                         esac
2088                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2089                         ;;
2090                 esac
2091                 ;;
2092         *)
2093                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2094                 ;;
2095         esac
2096         ;;
2097 yes)
2098         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2099
2100         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2101
2102         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2103                 && test -z "${cf_tst_cflags}" \
2104                 && cf_fix_cppflags=no
2105         ;;
2106 esac
2107 done
2108
2109 if test -n "$cf_new_cflags" ; then
2110
2111         CFLAGS="$CFLAGS $cf_new_cflags"
2112 fi
2113
2114 if test -n "$cf_new_cppflags" ; then
2115
2116         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2117 fi
2118
2119 if test -n "$cf_new_extra_cppflags" ; then
2120
2121         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2122 fi
2123
2124         ;;
2125 *)
2126         echo "$as_me:2126: result: ok" >&5
2127 echo "${ECHO_T}ok" >&6
2128         ;;
2129 esac
2130
2131 ac_ext=c
2132 ac_cpp='$CPP $CPPFLAGS'
2133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2136 ac_main_return=return
2137 echo "$as_me:2137: checking how to run the C preprocessor" >&5
2138 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2139 # On Suns, sometimes $CPP names a directory.
2140 if test -n "$CPP" && test -d "$CPP"; then
2141   CPP=
2142 fi
2143 if test -z "$CPP"; then
2144   if test "${ac_cv_prog_CPP+set}" = set; then
2145   echo $ECHO_N "(cached) $ECHO_C" >&6
2146 else
2147       # Double quotes because CPP needs to be expanded
2148     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2149     do
2150       ac_preproc_ok=false
2151 for ac_c_preproc_warn_flag in '' yes
2152 do
2153   # Use a header file that comes with gcc, so configuring glibc
2154   # with a fresh cross-compiler works.
2155   # On the NeXT, cc -E runs the code through the compiler's parser,
2156   # not just through cpp. "Syntax error" is here to catch this case.
2157   cat >conftest.$ac_ext <<_ACEOF
2158 #line 2158 "configure"
2159 #include "confdefs.h"
2160 #include <assert.h>
2161                      Syntax error
2162 _ACEOF
2163 if { (eval echo "$as_me:2163: \"$ac_cpp conftest.$ac_ext\"") >&5
2164   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2165   ac_status=$?
2166   egrep -v '^ *\+' conftest.er1 >conftest.err
2167   rm -f conftest.er1
2168   cat conftest.err >&5
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit $ac_status); } >/dev/null; then
2171   if test -s conftest.err; then
2172     ac_cpp_err=$ac_c_preproc_warn_flag
2173   else
2174     ac_cpp_err=
2175   fi
2176 else
2177   ac_cpp_err=yes
2178 fi
2179 if test -z "$ac_cpp_err"; then
2180   :
2181 else
2182   echo "$as_me: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   # Broken: fails on valid input.
2185 continue
2186 fi
2187 rm -f conftest.err conftest.$ac_ext
2188
2189   # OK, works on sane cases.  Now check whether non-existent headers
2190   # can be detected and how.
2191   cat >conftest.$ac_ext <<_ACEOF
2192 #line 2192 "configure"
2193 #include "confdefs.h"
2194 #include <ac_nonexistent.h>
2195 _ACEOF
2196 if { (eval echo "$as_me:2196: \"$ac_cpp conftest.$ac_ext\"") >&5
2197   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2198   ac_status=$?
2199   egrep -v '^ *\+' conftest.er1 >conftest.err
2200   rm -f conftest.er1
2201   cat conftest.err >&5
2202   echo "$as_me:2202: \$? = $ac_status" >&5
2203   (exit $ac_status); } >/dev/null; then
2204   if test -s conftest.err; then
2205     ac_cpp_err=$ac_c_preproc_warn_flag
2206   else
2207     ac_cpp_err=
2208   fi
2209 else
2210   ac_cpp_err=yes
2211 fi
2212 if test -z "$ac_cpp_err"; then
2213   # Broken: success on invalid input.
2214 continue
2215 else
2216   echo "$as_me: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   # Passes both tests.
2219 ac_preproc_ok=:
2220 break
2221 fi
2222 rm -f conftest.err conftest.$ac_ext
2223
2224 done
2225 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2226 rm -f conftest.err conftest.$ac_ext
2227 if $ac_preproc_ok; then
2228   break
2229 fi
2230
2231     done
2232     ac_cv_prog_CPP=$CPP
2233
2234 fi
2235   CPP=$ac_cv_prog_CPP
2236 else
2237   ac_cv_prog_CPP=$CPP
2238 fi
2239 echo "$as_me:2239: result: $CPP" >&5
2240 echo "${ECHO_T}$CPP" >&6
2241 ac_preproc_ok=false
2242 for ac_c_preproc_warn_flag in '' yes
2243 do
2244   # Use a header file that comes with gcc, so configuring glibc
2245   # with a fresh cross-compiler works.
2246   # On the NeXT, cc -E runs the code through the compiler's parser,
2247   # not just through cpp. "Syntax error" is here to catch this case.
2248   cat >conftest.$ac_ext <<_ACEOF
2249 #line 2249 "configure"
2250 #include "confdefs.h"
2251 #include <assert.h>
2252                      Syntax error
2253 _ACEOF
2254 if { (eval echo "$as_me:2254: \"$ac_cpp conftest.$ac_ext\"") >&5
2255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2256   ac_status=$?
2257   egrep -v '^ *\+' conftest.er1 >conftest.err
2258   rm -f conftest.er1
2259   cat conftest.err >&5
2260   echo "$as_me:2260: \$? = $ac_status" >&5
2261   (exit $ac_status); } >/dev/null; then
2262   if test -s conftest.err; then
2263     ac_cpp_err=$ac_c_preproc_warn_flag
2264   else
2265     ac_cpp_err=
2266   fi
2267 else
2268   ac_cpp_err=yes
2269 fi
2270 if test -z "$ac_cpp_err"; then
2271   :
2272 else
2273   echo "$as_me: failed program was:" >&5
2274   cat conftest.$ac_ext >&5
2275   # Broken: fails on valid input.
2276 continue
2277 fi
2278 rm -f conftest.err conftest.$ac_ext
2279
2280   # OK, works on sane cases.  Now check whether non-existent headers
2281   # can be detected and how.
2282   cat >conftest.$ac_ext <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285 #include <ac_nonexistent.h>
2286 _ACEOF
2287 if { (eval echo "$as_me:2287: \"$ac_cpp conftest.$ac_ext\"") >&5
2288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2289   ac_status=$?
2290   egrep -v '^ *\+' conftest.er1 >conftest.err
2291   rm -f conftest.er1
2292   cat conftest.err >&5
2293   echo "$as_me:2293: \$? = $ac_status" >&5
2294   (exit $ac_status); } >/dev/null; then
2295   if test -s conftest.err; then
2296     ac_cpp_err=$ac_c_preproc_warn_flag
2297   else
2298     ac_cpp_err=
2299   fi
2300 else
2301   ac_cpp_err=yes
2302 fi
2303 if test -z "$ac_cpp_err"; then
2304   # Broken: success on invalid input.
2305 continue
2306 else
2307   echo "$as_me: failed program was:" >&5
2308   cat conftest.$ac_ext >&5
2309   # Passes both tests.
2310 ac_preproc_ok=:
2311 break
2312 fi
2313 rm -f conftest.err conftest.$ac_ext
2314
2315 done
2316 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2317 rm -f conftest.err conftest.$ac_ext
2318 if $ac_preproc_ok; then
2319   :
2320 else
2321   { { echo "$as_me:2321: error: C preprocessor \"$CPP\" fails sanity check" >&5
2322 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2323    { (exit 1); exit 1; }; }
2324 fi
2325
2326 ac_ext=c
2327 ac_cpp='$CPP $CPPFLAGS'
2328 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2329 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2330 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2331 ac_main_return=return
2332
2333 if test $ac_cv_c_compiler_gnu = yes; then
2334     echo "$as_me:2334: checking whether $CC needs -traditional" >&5
2335 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2336 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2337   echo $ECHO_N "(cached) $ECHO_C" >&6
2338 else
2339     ac_pattern="Autoconf.*'x'"
2340   cat >conftest.$ac_ext <<_ACEOF
2341 #line 2341 "configure"
2342 #include "confdefs.h"
2343 #include <sgtty.h>
2344 int Autoconf = TIOCGETP;
2345 _ACEOF
2346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2347   egrep "$ac_pattern" >/dev/null 2>&1; then
2348   ac_cv_prog_gcc_traditional=yes
2349 else
2350   ac_cv_prog_gcc_traditional=no
2351 fi
2352 rm -rf conftest*
2353
2354   if test $ac_cv_prog_gcc_traditional = no; then
2355     cat >conftest.$ac_ext <<_ACEOF
2356 #line 2356 "configure"
2357 #include "confdefs.h"
2358 #include <termio.h>
2359 int Autoconf = TCGETA;
2360 _ACEOF
2361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2362   egrep "$ac_pattern" >/dev/null 2>&1; then
2363   ac_cv_prog_gcc_traditional=yes
2364 fi
2365 rm -rf conftest*
2366
2367   fi
2368 fi
2369 echo "$as_me:2369: result: $ac_cv_prog_gcc_traditional" >&5
2370 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2371   if test $ac_cv_prog_gcc_traditional = yes; then
2372     CC="$CC -traditional"
2373   fi
2374 fi
2375
2376 echo "$as_me:2376: checking whether $CC understands -c and -o together" >&5
2377 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2378 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2379   echo $ECHO_N "(cached) $ECHO_C" >&6
2380 else
2381
2382 cat > conftest.$ac_ext <<CF_EOF
2383 #include <stdio.h>
2384 int main()
2385 {
2386         ${cf_cv_main_return:-return}(0);
2387 }
2388 CF_EOF
2389 # We do the test twice because some compilers refuse to overwrite an
2390 # existing .o file with -o, though they will create one.
2391 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2392 if { (eval echo "$as_me:2392: \"$ac_try\"") >&5
2393   (eval $ac_try) 2>&5
2394   ac_status=$?
2395   echo "$as_me:2395: \$? = $ac_status" >&5
2396   (exit $ac_status); } &&
2397   test -f conftest2.$ac_objext && { (eval echo "$as_me:2397: \"$ac_try\"") >&5
2398   (eval $ac_try) 2>&5
2399   ac_status=$?
2400   echo "$as_me:2400: \$? = $ac_status" >&5
2401   (exit $ac_status); };
2402 then
2403   eval cf_cv_prog_CC_c_o=yes
2404 else
2405   eval cf_cv_prog_CC_c_o=no
2406 fi
2407 rm -rf conftest*
2408
2409 fi
2410 if test $cf_cv_prog_CC_c_o = yes; then
2411   echo "$as_me:2411: result: yes" >&5
2412 echo "${ECHO_T}yes" >&6
2413 else
2414   echo "$as_me:2414: result: no" >&5
2415 echo "${ECHO_T}no" >&6
2416 fi
2417
2418 if test "$cross_compiling" = yes ; then
2419   LDCONFIG=:
2420 else
2421 case "$cf_cv_system_name" in #(vi
2422 dragonfly*|mirbsd*|freebsd*) #(vi
2423   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2424   ;;
2425 *) LDPATH=$PATH:/sbin:/usr/sbin
2426   # Extract the first word of "ldconfig", so it can be a program name with args.
2427 set dummy ldconfig; ac_word=$2
2428 echo "$as_me:2428: checking for $ac_word" >&5
2429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2430 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433   case $LDCONFIG in
2434   [\\/]* | ?:[\\/]*)
2435   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2436   ;;
2437   *)
2438   ac_save_IFS=$IFS; IFS=$ac_path_separator
2439 ac_dummy="$LDPATH"
2440 for ac_dir in $ac_dummy; do
2441   IFS=$ac_save_IFS
2442   test -z "$ac_dir" && ac_dir=.
2443   if $as_executable_p "$ac_dir/$ac_word"; then
2444    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2445    echo "$as_me:2445: found $ac_dir/$ac_word" >&5
2446    break
2447 fi
2448 done
2449
2450   ;;
2451 esac
2452 fi
2453 LDCONFIG=$ac_cv_path_LDCONFIG
2454
2455 if test -n "$LDCONFIG"; then
2456   echo "$as_me:2456: result: $LDCONFIG" >&5
2457 echo "${ECHO_T}$LDCONFIG" >&6
2458 else
2459   echo "$as_me:2459: result: no" >&5
2460 echo "${ECHO_T}no" >&6
2461 fi
2462
2463   ;;
2464 esac
2465 fi
2466
2467 echo "$as_me:2467: checking if you want to ensure bool is consistent with C++" >&5
2468 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2469
2470 # Check whether --with-cxx or --without-cxx was given.
2471 if test "${with_cxx+set}" = set; then
2472   withval="$with_cxx"
2473   cf_with_cxx=$withval
2474 else
2475   cf_with_cxx=yes
2476 fi;
2477 echo "$as_me:2477: result: $cf_with_cxx" >&5
2478 echo "${ECHO_T}$cf_with_cxx" >&6
2479 if test "X$cf_with_cxx" = Xno ; then
2480         CXX=""
2481         GXX=""
2482 else
2483         # with autoconf 2.13, we can change the error to a warning:
2484                 ac_ext=cc
2485 ac_cpp='$CXXCPP $CPPFLAGS'
2486 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2487 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2488 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2489 ac_main_return=return
2490 if test -n "$ac_tool_prefix"; then
2491   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2492   do
2493     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2494 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2495 echo "$as_me:2495: checking for $ac_word" >&5
2496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2497 if test "${ac_cv_prog_CXX+set}" = set; then
2498   echo $ECHO_N "(cached) $ECHO_C" >&6
2499 else
2500   if test -n "$CXX"; then
2501   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2502 else
2503   ac_save_IFS=$IFS; IFS=$ac_path_separator
2504 ac_dummy="$PATH"
2505 for ac_dir in $ac_dummy; do
2506   IFS=$ac_save_IFS
2507   test -z "$ac_dir" && ac_dir=.
2508   $as_executable_p "$ac_dir/$ac_word" || continue
2509 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2510 echo "$as_me:2510: found $ac_dir/$ac_word" >&5
2511 break
2512 done
2513
2514 fi
2515 fi
2516 CXX=$ac_cv_prog_CXX
2517 if test -n "$CXX"; then
2518   echo "$as_me:2518: result: $CXX" >&5
2519 echo "${ECHO_T}$CXX" >&6
2520 else
2521   echo "$as_me:2521: result: no" >&5
2522 echo "${ECHO_T}no" >&6
2523 fi
2524
2525     test -n "$CXX" && break
2526   done
2527 fi
2528 if test -z "$CXX"; then
2529   ac_ct_CXX=$CXX
2530   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2531 do
2532   # Extract the first word of "$ac_prog", so it can be a program name with args.
2533 set dummy $ac_prog; ac_word=$2
2534 echo "$as_me:2534: checking for $ac_word" >&5
2535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2536 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2537   echo $ECHO_N "(cached) $ECHO_C" >&6
2538 else
2539   if test -n "$ac_ct_CXX"; then
2540   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2541 else
2542   ac_save_IFS=$IFS; IFS=$ac_path_separator
2543 ac_dummy="$PATH"
2544 for ac_dir in $ac_dummy; do
2545   IFS=$ac_save_IFS
2546   test -z "$ac_dir" && ac_dir=.
2547   $as_executable_p "$ac_dir/$ac_word" || continue
2548 ac_cv_prog_ac_ct_CXX="$ac_prog"
2549 echo "$as_me:2549: found $ac_dir/$ac_word" >&5
2550 break
2551 done
2552
2553 fi
2554 fi
2555 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2556 if test -n "$ac_ct_CXX"; then
2557   echo "$as_me:2557: result: $ac_ct_CXX" >&5
2558 echo "${ECHO_T}$ac_ct_CXX" >&6
2559 else
2560   echo "$as_me:2560: result: no" >&5
2561 echo "${ECHO_T}no" >&6
2562 fi
2563
2564   test -n "$ac_ct_CXX" && break
2565 done
2566 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2567
2568   CXX=$ac_ct_CXX
2569 fi
2570
2571 # Provide some information about the compiler.
2572 echo "$as_me:2572:" \
2573      "checking for C++ compiler version" >&5
2574 ac_compiler=`set X $ac_compile; echo $2`
2575 { (eval echo "$as_me:2575: \"$ac_compiler --version </dev/null >&5\"") >&5
2576   (eval $ac_compiler --version </dev/null >&5) 2>&5
2577   ac_status=$?
2578   echo "$as_me:2578: \$? = $ac_status" >&5
2579   (exit $ac_status); }
2580 { (eval echo "$as_me:2580: \"$ac_compiler -v </dev/null >&5\"") >&5
2581   (eval $ac_compiler -v </dev/null >&5) 2>&5
2582   ac_status=$?
2583   echo "$as_me:2583: \$? = $ac_status" >&5
2584   (exit $ac_status); }
2585 { (eval echo "$as_me:2585: \"$ac_compiler -V </dev/null >&5\"") >&5
2586   (eval $ac_compiler -V </dev/null >&5) 2>&5
2587   ac_status=$?
2588   echo "$as_me:2588: \$? = $ac_status" >&5
2589   (exit $ac_status); }
2590
2591 echo "$as_me:2591: checking whether we are using the GNU C++ compiler" >&5
2592 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2593 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2594   echo $ECHO_N "(cached) $ECHO_C" >&6
2595 else
2596   cat >conftest.$ac_ext <<_ACEOF
2597 #line 2597 "configure"
2598 #include "confdefs.h"
2599
2600 int
2601 main ()
2602 {
2603 #ifndef __GNUC__
2604        choke me
2605 #endif
2606
2607   ;
2608   return 0;
2609 }
2610 _ACEOF
2611 rm -f conftest.$ac_objext
2612 if { (eval echo "$as_me:2612: \"$ac_compile\"") >&5
2613   (eval $ac_compile) 2>&5
2614   ac_status=$?
2615   echo "$as_me:2615: \$? = $ac_status" >&5
2616   (exit $ac_status); } &&
2617          { ac_try='test -s conftest.$ac_objext'
2618   { (eval echo "$as_me:2618: \"$ac_try\"") >&5
2619   (eval $ac_try) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); }; }; then
2623   ac_compiler_gnu=yes
2624 else
2625   echo "$as_me: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 ac_compiler_gnu=no
2628 fi
2629 rm -f conftest.$ac_objext conftest.$ac_ext
2630 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2631
2632 fi
2633 echo "$as_me:2633: result: $ac_cv_cxx_compiler_gnu" >&5
2634 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2635 GXX=`test $ac_compiler_gnu = yes && echo yes`
2636 ac_test_CXXFLAGS=${CXXFLAGS+set}
2637 ac_save_CXXFLAGS=$CXXFLAGS
2638 CXXFLAGS="-g"
2639 echo "$as_me:2639: checking whether $CXX accepts -g" >&5
2640 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2641 if test "${ac_cv_prog_cxx_g+set}" = set; then
2642   echo $ECHO_N "(cached) $ECHO_C" >&6
2643 else
2644   cat >conftest.$ac_ext <<_ACEOF
2645 #line 2645 "configure"
2646 #include "confdefs.h"
2647
2648 int
2649 main ()
2650 {
2651
2652   ;
2653   return 0;
2654 }
2655 _ACEOF
2656 rm -f conftest.$ac_objext
2657 if { (eval echo "$as_me:2657: \"$ac_compile\"") >&5
2658   (eval $ac_compile) 2>&5
2659   ac_status=$?
2660   echo "$as_me:2660: \$? = $ac_status" >&5
2661   (exit $ac_status); } &&
2662          { ac_try='test -s conftest.$ac_objext'
2663   { (eval echo "$as_me:2663: \"$ac_try\"") >&5
2664   (eval $ac_try) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); }; }; then
2668   ac_cv_prog_cxx_g=yes
2669 else
2670   echo "$as_me: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2672 ac_cv_prog_cxx_g=no
2673 fi
2674 rm -f conftest.$ac_objext conftest.$ac_ext
2675 fi
2676 echo "$as_me:2676: result: $ac_cv_prog_cxx_g" >&5
2677 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2678 if test "$ac_test_CXXFLAGS" = set; then
2679   CXXFLAGS=$ac_save_CXXFLAGS
2680 elif test $ac_cv_prog_cxx_g = yes; then
2681   if test "$GXX" = yes; then
2682     CXXFLAGS="-g -O2"
2683   else
2684     CXXFLAGS="-g"
2685   fi
2686 else
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-O2"
2689   else
2690     CXXFLAGS=
2691   fi
2692 fi
2693 for ac_declaration in \
2694    ''\
2695    '#include <stdlib.h>' \
2696    'extern "C" void std::exit (int) throw (); using std::exit;' \
2697    'extern "C" void std::exit (int); using std::exit;' \
2698    'extern "C" void exit (int) throw ();' \
2699    'extern "C" void exit (int);' \
2700    'void exit (int);'
2701 do
2702   cat >conftest.$ac_ext <<_ACEOF
2703 #line 2703 "configure"
2704 #include "confdefs.h"
2705 #include <stdlib.h>
2706 $ac_declaration
2707 int
2708 main ()
2709 {
2710 exit (42);
2711   ;
2712   return 0;
2713 }
2714 _ACEOF
2715 rm -f conftest.$ac_objext
2716 if { (eval echo "$as_me:2716: \"$ac_compile\"") >&5
2717   (eval $ac_compile) 2>&5
2718   ac_status=$?
2719   echo "$as_me:2719: \$? = $ac_status" >&5
2720   (exit $ac_status); } &&
2721          { ac_try='test -s conftest.$ac_objext'
2722   { (eval echo "$as_me:2722: \"$ac_try\"") >&5
2723   (eval $ac_try) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); }; }; then
2727   :
2728 else
2729   echo "$as_me: failed program was:" >&5
2730 cat conftest.$ac_ext >&5
2731 continue
2732 fi
2733 rm -f conftest.$ac_objext conftest.$ac_ext
2734   cat >conftest.$ac_ext <<_ACEOF
2735 #line 2735 "configure"
2736 #include "confdefs.h"
2737 $ac_declaration
2738 int
2739 main ()
2740 {
2741 exit (42);
2742   ;
2743   return 0;
2744 }
2745 _ACEOF
2746 rm -f conftest.$ac_objext
2747 if { (eval echo "$as_me:2747: \"$ac_compile\"") >&5
2748   (eval $ac_compile) 2>&5
2749   ac_status=$?
2750   echo "$as_me:2750: \$? = $ac_status" >&5
2751   (exit $ac_status); } &&
2752          { ac_try='test -s conftest.$ac_objext'
2753   { (eval echo "$as_me:2753: \"$ac_try\"") >&5
2754   (eval $ac_try) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); }; }; then
2758   break
2759 else
2760   echo "$as_me: failed program was:" >&5
2761 cat conftest.$ac_ext >&5
2762 fi
2763 rm -f conftest.$ac_objext conftest.$ac_ext
2764 done
2765 rm -rf conftest*
2766 if test -n "$ac_declaration"; then
2767   echo '#ifdef __cplusplus' >>confdefs.h
2768   echo $ac_declaration      >>confdefs.h
2769   echo '#endif'             >>confdefs.h
2770 fi
2771
2772 ac_ext=c
2773 ac_cpp='$CPP $CPPFLAGS'
2774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2777 ac_main_return=return
2778
2779                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2780         if test "$CXX" = "g++" ; then
2781                 # Extract the first word of "g++", so it can be a program name with args.
2782 set dummy g++; ac_word=$2
2783 echo "$as_me:2783: checking for $ac_word" >&5
2784 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2785 if test "${ac_cv_path_CXX+set}" = set; then
2786   echo $ECHO_N "(cached) $ECHO_C" >&6
2787 else
2788   case $CXX in
2789   [\\/]* | ?:[\\/]*)
2790   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2791   ;;
2792   *)
2793   ac_save_IFS=$IFS; IFS=$ac_path_separator
2794 ac_dummy="$PATH"
2795 for ac_dir in $ac_dummy; do
2796   IFS=$ac_save_IFS
2797   test -z "$ac_dir" && ac_dir=.
2798   if $as_executable_p "$ac_dir/$ac_word"; then
2799    ac_cv_path_CXX="$ac_dir/$ac_word"
2800    echo "$as_me:2800: found $ac_dir/$ac_word" >&5
2801    break
2802 fi
2803 done
2804
2805   ;;
2806 esac
2807 fi
2808 CXX=$ac_cv_path_CXX
2809
2810 if test -n "$CXX"; then
2811   echo "$as_me:2811: result: $CXX" >&5
2812 echo "${ECHO_T}$CXX" >&6
2813 else
2814   echo "$as_me:2814: result: no" >&5
2815 echo "${ECHO_T}no" >&6
2816 fi
2817
2818         fi
2819         case "x$CXX" in #(vi
2820         x|xg++)
2821                 { echo "$as_me:2821: WARNING: You don't have any C++ compiler, too bad" >&5
2822 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2823                 cf_with_cxx=no; CXX=""; GXX="";
2824                 ;;
2825         esac
2826 fi
2827
2828 GXX_VERSION=none
2829 if test "$GXX" = yes; then
2830         echo "$as_me:2830: checking version of ${CXX:-g++}" >&5
2831 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2832         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2833         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2834         echo "$as_me:2834: result: $GXX_VERSION" >&5
2835 echo "${ECHO_T}$GXX_VERSION" >&6
2836 fi
2837
2838 case $GXX_VERSION in
2839 1*|2.[0-6]*)
2840         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2841         # cf_cxx_library=no
2842         { echo "$as_me:2842: WARNING: templates do not work" >&5
2843 echo "$as_me: WARNING: templates do not work" >&2;}
2844         ;;
2845 esac
2846
2847 echo "$as_me:2847: checking if you want to build C++ binding and demo" >&5
2848 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2849
2850 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2851 if test "${with_cxx_binding+set}" = set; then
2852   withval="$with_cxx_binding"
2853   cf_with_cxx_binding=$withval
2854 else
2855   cf_with_cxx_binding=$cf_with_cxx
2856 fi;
2857 echo "$as_me:2857: result: $cf_with_cxx_binding" >&5
2858 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2859
2860 echo "$as_me:2860: checking if you want to build with Ada95" >&5
2861 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2862 echo "$as_me:2862: result: $cf_with_ada" >&5
2863 echo "${ECHO_T}$cf_with_ada" >&6
2864
2865 echo "$as_me:2865: checking if you want to install manpages" >&5
2866 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2867
2868 # Check whether --with-manpages or --without-manpages was given.
2869 if test "${with_manpages+set}" = set; then
2870   withval="$with_manpages"
2871   cf_with_manpages=$withval
2872 else
2873   cf_with_manpages=yes
2874 fi;
2875 echo "$as_me:2875: result: $cf_with_manpages" >&5
2876 echo "${ECHO_T}$cf_with_manpages" >&6
2877
2878 echo "$as_me:2878: checking if you want to build programs such as tic" >&5
2879 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2880
2881 # Check whether --with-progs or --without-progs was given.
2882 if test "${with_progs+set}" = set; then
2883   withval="$with_progs"
2884   cf_with_progs=$withval
2885 else
2886   cf_with_progs=yes
2887 fi;
2888 echo "$as_me:2888: result: $cf_with_progs" >&5
2889 echo "${ECHO_T}$cf_with_progs" >&6
2890
2891 echo "$as_me:2891: checking if you want to build test-programs" >&5
2892 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2893
2894 # Check whether --with-tests or --without-tests was given.
2895 if test "${with_tests+set}" = set; then
2896   withval="$with_tests"
2897   cf_with_tests=$withval
2898 else
2899   cf_with_tests=yes
2900 fi;
2901 echo "$as_me:2901: result: $cf_with_tests" >&5
2902 echo "${ECHO_T}$cf_with_tests" >&6
2903
2904 echo "$as_me:2904: checking if you wish to install curses.h" >&5
2905 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2906
2907 # Check whether --with-curses-h or --without-curses-h was given.
2908 if test "${with_curses_h+set}" = set; then
2909   withval="$with_curses_h"
2910   with_curses_h=$withval
2911 else
2912   with_curses_h=yes
2913 fi;
2914 echo "$as_me:2914: result: $with_curses_h" >&5
2915 echo "${ECHO_T}$with_curses_h" >&6
2916
2917 modules_to_build="ncurses"
2918 if test "X$cf_with_progs" != Xno ; then
2919 modules_to_build="$modules_to_build progs tack"
2920 fi
2921 modules_to_build="$modules_to_build panel menu form"
2922
2923 test "$program_prefix" != NONE &&
2924   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2925 # Use a double $ so make ignores it.
2926 test "$program_suffix" != NONE &&
2927   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2928 # Double any \ or $.  echo might interpret backslashes.
2929 # By default was `s,x,x', remove it if useless.
2930 cat <<\_ACEOF >conftest.sed
2931 s/[\\$]/&&/g;s/;s,x,x,$//
2932 _ACEOF
2933 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2934 rm conftest.sed
2935
2936 for ac_prog in mawk gawk nawk awk
2937 do
2938   # Extract the first word of "$ac_prog", so it can be a program name with args.
2939 set dummy $ac_prog; ac_word=$2
2940 echo "$as_me:2940: checking for $ac_word" >&5
2941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2942 if test "${ac_cv_prog_AWK+set}" = set; then
2943   echo $ECHO_N "(cached) $ECHO_C" >&6
2944 else
2945   if test -n "$AWK"; then
2946   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2947 else
2948   ac_save_IFS=$IFS; IFS=$ac_path_separator
2949 ac_dummy="$PATH"
2950 for ac_dir in $ac_dummy; do
2951   IFS=$ac_save_IFS
2952   test -z "$ac_dir" && ac_dir=.
2953   $as_executable_p "$ac_dir/$ac_word" || continue
2954 ac_cv_prog_AWK="$ac_prog"
2955 echo "$as_me:2955: found $ac_dir/$ac_word" >&5
2956 break
2957 done
2958
2959 fi
2960 fi
2961 AWK=$ac_cv_prog_AWK
2962 if test -n "$AWK"; then
2963   echo "$as_me:2963: result: $AWK" >&5
2964 echo "${ECHO_T}$AWK" >&6
2965 else
2966   echo "$as_me:2966: result: no" >&5
2967 echo "${ECHO_T}no" >&6
2968 fi
2969
2970   test -n "$AWK" && break
2971 done
2972
2973 test -z "$AWK" && { { echo "$as_me:2973: error: No awk program found" >&5
2974 echo "$as_me: error: No awk program found" >&2;}
2975    { (exit 1); exit 1; }; }
2976
2977 echo "$as_me:2977: checking for egrep" >&5
2978 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2979 if test "${ac_cv_prog_egrep+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2983     then ac_cv_prog_egrep='grep -E'
2984     else ac_cv_prog_egrep='egrep'
2985     fi
2986 fi
2987 echo "$as_me:2987: result: $ac_cv_prog_egrep" >&5
2988 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2989  EGREP=$ac_cv_prog_egrep
2990
2991 test -z "$EGREP" && { { echo "$as_me:2991: error: No egrep program found" >&5
2992 echo "$as_me: error: No egrep program found" >&2;}
2993    { (exit 1); exit 1; }; }
2994
2995 # Find a good install program.  We prefer a C program (faster),
2996 # so one script is as good as another.  But avoid the broken or
2997 # incompatible versions:
2998 # SysV /etc/install, /usr/sbin/install
2999 # SunOS /usr/etc/install
3000 # IRIX /sbin/install
3001 # AIX /bin/install
3002 # AmigaOS /C/install, which installs bootblocks on floppy discs
3003 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3004 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3005 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3006 # ./install, which can be erroneously created by make from ./install.sh.
3007 echo "$as_me:3007: checking for a BSD compatible install" >&5
3008 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3009 if test -z "$INSTALL"; then
3010 if test "${ac_cv_path_install+set}" = set; then
3011   echo $ECHO_N "(cached) $ECHO_C" >&6
3012 else
3013     ac_save_IFS=$IFS; IFS=$ac_path_separator
3014   for ac_dir in $PATH; do
3015     IFS=$ac_save_IFS
3016     # Account for people who put trailing slashes in PATH elements.
3017     case $ac_dir/ in
3018     / | ./ | .// | /cC/* \
3019     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3020     | /usr/ucb/* ) ;;
3021     *)
3022       # OSF1 and SCO ODT 3.0 have their own names for install.
3023       # Don't use installbsd from OSF since it installs stuff as root
3024       # by default.
3025       for ac_prog in ginstall scoinst install; do
3026         if $as_executable_p "$ac_dir/$ac_prog"; then
3027           if test $ac_prog = install &&
3028             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3029             # AIX install.  It has an incompatible calling convention.
3030             :
3031           elif test $ac_prog = install &&
3032             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3033             # program-specific install script used by HP pwplus--don't use.
3034             :
3035           else
3036             ac_cv_path_install="$ac_dir/$ac_prog -c"
3037             break 2
3038           fi
3039         fi
3040       done
3041       ;;
3042     esac
3043   done
3044
3045 fi
3046   if test "${ac_cv_path_install+set}" = set; then
3047     INSTALL=$ac_cv_path_install
3048   else
3049     # As a last resort, use the slow shell script.  We don't cache a
3050     # path for INSTALL within a source directory, because that will
3051     # break other packages using the cache if that directory is
3052     # removed, or if the path is relative.
3053     INSTALL=$ac_install_sh
3054   fi
3055 fi
3056 echo "$as_me:3056: result: $INSTALL" >&5
3057 echo "${ECHO_T}$INSTALL" >&6
3058
3059 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3060 # It thinks the first close brace ends the variable substitution.
3061 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3062
3063 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3064
3065 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3066
3067 case $INSTALL in
3068 /*)
3069   ;;
3070 *)
3071   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3072   test -z "$cf_dir" && cf_dir=.
3073   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3074   ;;
3075 esac
3076
3077 for ac_prog in tdlint lint alint splint lclint
3078 do
3079   # Extract the first word of "$ac_prog", so it can be a program name with args.
3080 set dummy $ac_prog; ac_word=$2
3081 echo "$as_me:3081: checking for $ac_word" >&5
3082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3083 if test "${ac_cv_prog_LINT+set}" = set; then
3084   echo $ECHO_N "(cached) $ECHO_C" >&6
3085 else
3086   if test -n "$LINT"; then
3087   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3088 else
3089   ac_save_IFS=$IFS; IFS=$ac_path_separator
3090 ac_dummy="$PATH"
3091 for ac_dir in $ac_dummy; do
3092   IFS=$ac_save_IFS
3093   test -z "$ac_dir" && ac_dir=.
3094   $as_executable_p "$ac_dir/$ac_word" || continue
3095 ac_cv_prog_LINT="$ac_prog"
3096 echo "$as_me:3096: found $ac_dir/$ac_word" >&5
3097 break
3098 done
3099
3100 fi
3101 fi
3102 LINT=$ac_cv_prog_LINT
3103 if test -n "$LINT"; then
3104   echo "$as_me:3104: result: $LINT" >&5
3105 echo "${ECHO_T}$LINT" >&6
3106 else
3107   echo "$as_me:3107: result: no" >&5
3108 echo "${ECHO_T}no" >&6
3109 fi
3110
3111   test -n "$LINT" && break
3112 done
3113
3114 echo "$as_me:3114: checking whether ln -s works" >&5
3115 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3116 LN_S=$as_ln_s
3117 if test "$LN_S" = "ln -s"; then
3118   echo "$as_me:3118: result: yes" >&5
3119 echo "${ECHO_T}yes" >&6
3120 else
3121   echo "$as_me:3121: result: no, using $LN_S" >&5
3122 echo "${ECHO_T}no, using $LN_S" >&6
3123 fi
3124
3125 echo "$as_me:3125: checking if $LN_S -f options work" >&5
3126 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3127
3128 rm -f conf$$.src conf$$dst
3129 echo >conf$$.dst
3130 echo first >conf$$.src
3131 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3132         cf_prog_ln_sf=yes
3133 else
3134         cf_prog_ln_sf=no
3135 fi
3136 rm -f conf$$.dst conf$$src
3137 echo "$as_me:3137: result: $cf_prog_ln_sf" >&5
3138 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3139
3140 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3141
3142 echo "$as_me:3142: checking for long file names" >&5
3143 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3144 if test "${ac_cv_sys_long_file_names+set}" = set; then
3145   echo $ECHO_N "(cached) $ECHO_C" >&6
3146 else
3147   ac_cv_sys_long_file_names=yes
3148 # Test for long file names in all the places we know might matter:
3149 #      .                the current directory, where building will happen
3150 #      $prefix/lib      where we will be installing things
3151 #      $exec_prefix/lib likewise
3152 # eval it to expand exec_prefix.
3153 #      $TMPDIR          if set, where it might want to write temporary files
3154 # if $TMPDIR is not set:
3155 #      /tmp             where it might want to write temporary files
3156 #      /var/tmp         likewise
3157 #      /usr/tmp         likewise
3158 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3159   ac_tmpdirs=$TMPDIR
3160 else
3161   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3162 fi
3163 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3164   test -d $ac_dir || continue
3165   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3166   ac_xdir=$ac_dir/cf$$
3167   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3168   ac_tf1=$ac_xdir/conftest9012345
3169   ac_tf2=$ac_xdir/conftest9012346
3170   (echo 1 >$ac_tf1) 2>/dev/null
3171   (echo 2 >$ac_tf2) 2>/dev/null
3172   ac_val=`cat $ac_tf1 2>/dev/null`
3173   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3174     ac_cv_sys_long_file_names=no
3175     rm -rf $ac_xdir 2>/dev/null
3176     break
3177   fi
3178   rm -rf $ac_xdir 2>/dev/null
3179 done
3180 fi
3181 echo "$as_me:3181: result: $ac_cv_sys_long_file_names" >&5
3182 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3183 if test $ac_cv_sys_long_file_names = yes; then
3184
3185 cat >>confdefs.h <<\EOF
3186 #define HAVE_LONG_FILE_NAMES 1
3187 EOF
3188
3189 fi
3190
3191 # if we find pkg-config, check if we should install the ".pc" files.
3192
3193 echo "$as_me:3193: checking if you want to use pkg-config" >&5
3194 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3195
3196 # Check whether --with-pkg-config or --without-pkg-config was given.
3197 if test "${with_pkg_config+set}" = set; then
3198   withval="$with_pkg_config"
3199   cf_pkg_config=$withval
3200 else
3201   cf_pkg_config=yes
3202 fi;
3203 echo "$as_me:3203: result: $cf_pkg_config" >&5
3204 echo "${ECHO_T}$cf_pkg_config" >&6
3205
3206 case $cf_pkg_config in #(vi
3207 no) #(vi
3208         PKG_CONFIG=none
3209         ;;
3210 yes) #(vi
3211
3212 if test -n "$ac_tool_prefix"; then
3213   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3214 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3215 echo "$as_me:3215: checking for $ac_word" >&5
3216 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3217 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3218   echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220   case $PKG_CONFIG in
3221   [\\/]* | ?:[\\/]*)
3222   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3223   ;;
3224   *)
3225   ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 ac_dummy="$PATH"
3227 for ac_dir in $ac_dummy; do
3228   IFS=$ac_save_IFS
3229   test -z "$ac_dir" && ac_dir=.
3230   if $as_executable_p "$ac_dir/$ac_word"; then
3231    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3232    echo "$as_me:3232: found $ac_dir/$ac_word" >&5
3233    break
3234 fi
3235 done
3236
3237   ;;
3238 esac
3239 fi
3240 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3241
3242 if test -n "$PKG_CONFIG"; then
3243   echo "$as_me:3243: result: $PKG_CONFIG" >&5
3244 echo "${ECHO_T}$PKG_CONFIG" >&6
3245 else
3246   echo "$as_me:3246: result: no" >&5
3247 echo "${ECHO_T}no" >&6
3248 fi
3249
3250 fi
3251 if test -z "$ac_cv_path_PKG_CONFIG"; then
3252   ac_pt_PKG_CONFIG=$PKG_CONFIG
3253   # Extract the first word of "pkg-config", so it can be a program name with args.
3254 set dummy pkg-config; ac_word=$2
3255 echo "$as_me:3255: checking for $ac_word" >&5
3256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3257 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3258   echo $ECHO_N "(cached) $ECHO_C" >&6
3259 else
3260   case $ac_pt_PKG_CONFIG in
3261   [\\/]* | ?:[\\/]*)
3262   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3263   ;;
3264   *)
3265   ac_save_IFS=$IFS; IFS=$ac_path_separator
3266 ac_dummy="$PATH"
3267 for ac_dir in $ac_dummy; do
3268   IFS=$ac_save_IFS
3269   test -z "$ac_dir" && ac_dir=.
3270   if $as_executable_p "$ac_dir/$ac_word"; then
3271    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3272    echo "$as_me:3272: found $ac_dir/$ac_word" >&5
3273    break
3274 fi
3275 done
3276
3277   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3278   ;;
3279 esac
3280 fi
3281 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3282
3283 if test -n "$ac_pt_PKG_CONFIG"; then
3284   echo "$as_me:3284: result: $ac_pt_PKG_CONFIG" >&5
3285 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3286 else
3287   echo "$as_me:3287: result: no" >&5
3288 echo "${ECHO_T}no" >&6
3289 fi
3290
3291   PKG_CONFIG=$ac_pt_PKG_CONFIG
3292 else
3293   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3294 fi
3295
3296         ;;
3297 *)
3298         PKG_CONFIG=$withval
3299         ;;
3300 esac
3301
3302 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3303 if test "$PKG_CONFIG" != none ; then
3304
3305 if test "x$prefix" != xNONE; then
3306   cf_path_syntax="$prefix"
3307 else
3308   cf_path_syntax="$ac_default_prefix"
3309 fi
3310
3311 case ".$PKG_CONFIG" in #(vi
3312 .\$\(*\)*|.\'*\'*) #(vi
3313   ;;
3314 ..|./*|.\\*) #(vi
3315   ;;
3316 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3317   ;;
3318 .\${*prefix}*|.\${*dir}*) #(vi
3319   eval PKG_CONFIG="$PKG_CONFIG"
3320   case ".$PKG_CONFIG" in #(vi
3321   .NONE/*)
3322     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3323     ;;
3324   esac
3325   ;; #(vi
3326 .no|.NONE/*)
3327   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3328   ;;
3329 *)
3330   { { echo "$as_me:3330: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3331 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3332    { (exit 1); exit 1; }; }
3333   ;;
3334 esac
3335
3336 fi
3337
3338 if test "$PKG_CONFIG" != none ; then
3339         echo "$as_me:3339: checking for $PKG_CONFIG library directory" >&5
3340 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3341
3342 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3343 if test "${with_pkg_config_libdir+set}" = set; then
3344   withval="$with_pkg_config_libdir"
3345   PKG_CONFIG_LIBDIR=$withval
3346 else
3347   PKG_CONFIG_LIBDIR=yes
3348 fi;
3349
3350         case x$PKG_CONFIG_LIBDIR in #(vi
3351         x/*) #(vi
3352                 ;;
3353         xyes) #(vi
3354                 # look for the library directory using the same prefix as the executable
3355                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3356                 case x`(arch) 2>/dev/null` in #(vi
3357                 *64) #(vi
3358                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3359                         do
3360                                 if test -d $cf_config/pkgconfig
3361                                 then
3362                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3363                                         break
3364                                 fi
3365                         done
3366                         ;;
3367                 *)
3368                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3369                         ;;
3370                 esac
3371                 ;;
3372         *)
3373                 ;;
3374         esac
3375
3376         echo "$as_me:3376: result: $PKG_CONFIG_LIBDIR" >&5
3377 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3378 fi
3379
3380 if test "$PKG_CONFIG" != none ; then
3381         echo "$as_me:3381: checking if we should install .pc files for $PKG_CONFIG" >&5
3382 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3383
3384 # Check whether --enable-pc-files or --disable-pc-files was given.
3385 if test "${enable_pc_files+set}" = set; then
3386   enableval="$enable_pc_files"
3387   enable_pc_files=$enableval
3388 else
3389   enable_pc_files=no
3390 fi;
3391         echo "$as_me:3391: result: $enable_pc_files" >&5
3392 echo "${ECHO_T}$enable_pc_files" >&6
3393         if test "$enable_pc_files" != no
3394         then
3395
3396 if test "x$prefix" != xNONE; then
3397   cf_path_syntax="$prefix"
3398 else
3399   cf_path_syntax="$ac_default_prefix"
3400 fi
3401
3402 case ".$PKG_CONFIG_LIBDIR" in #(vi
3403 .\$\(*\)*|.\'*\'*) #(vi
3404   ;;
3405 ..|./*|.\\*) #(vi
3406   ;;
3407 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3408   ;;
3409 .\${*prefix}*|.\${*dir}*) #(vi
3410   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3411   case ".$PKG_CONFIG_LIBDIR" in #(vi
3412   .NONE/*)
3413     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3414     ;;
3415   esac
3416   ;; #(vi
3417 .no|.NONE/*)
3418   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3419   ;;
3420 *)
3421   { { echo "$as_me:3421: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3422 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3423    { (exit 1); exit 1; }; }
3424   ;;
3425 esac
3426
3427         fi
3428 else
3429         enable_pc_files=no
3430 fi
3431
3432 echo "$as_me:3432: checking if we should assume mixed-case filenames" >&5
3433 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3434
3435 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3436 if test "${enable_mixed_case+set}" = set; then
3437   enableval="$enable_mixed_case"
3438   enable_mixedcase=$enableval
3439 else
3440   enable_mixedcase=auto
3441 fi;
3442 echo "$as_me:3442: result: $enable_mixedcase" >&5
3443 echo "${ECHO_T}$enable_mixedcase" >&6
3444 if test "$enable_mixedcase" = "auto" ; then
3445
3446 echo "$as_me:3446: checking if filesystem supports mixed-case filenames" >&5
3447 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3448 if test "${cf_cv_mixedcase+set}" = set; then
3449   echo $ECHO_N "(cached) $ECHO_C" >&6
3450 else
3451
3452 if test "$cross_compiling" = yes ; then
3453         case $target_alias in #(vi
3454         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3455                 cf_cv_mixedcase=no
3456                 ;;
3457         *)
3458                 cf_cv_mixedcase=yes
3459                 ;;
3460         esac
3461 else
3462         rm -f conftest CONFTEST
3463         echo test >conftest
3464         if test -f CONFTEST ; then
3465                 cf_cv_mixedcase=no
3466         else
3467                 cf_cv_mixedcase=yes
3468         fi
3469         rm -f conftest CONFTEST
3470 fi
3471
3472 fi
3473 echo "$as_me:3473: result: $cf_cv_mixedcase" >&5
3474 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3475 test "$cf_cv_mixedcase" = yes &&
3476 cat >>confdefs.h <<\EOF
3477 #define MIXEDCASE_FILENAMES 1
3478 EOF
3479
3480 else
3481     cf_cv_mixedcase=$enable_mixedcase
3482     if test "x$enable_mixedcase" = "xyes" ; then
3483
3484 cat >>confdefs.h <<\EOF
3485 #define MIXEDCASE_FILENAMES 1
3486 EOF
3487
3488     fi
3489 fi
3490
3491 # do this after mixed-case option (tags/TAGS is not as important as tic).
3492 echo "$as_me:3492: checking whether ${MAKE-make} sets \${MAKE}" >&5
3493 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3494 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3495 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3496   echo $ECHO_N "(cached) $ECHO_C" >&6
3497 else
3498   cat >conftest.make <<\EOF
3499 all:
3500         @echo 'ac_maketemp="${MAKE}"'
3501 EOF
3502 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3503 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3504 if test -n "$ac_maketemp"; then
3505   eval ac_cv_prog_make_${ac_make}_set=yes
3506 else
3507   eval ac_cv_prog_make_${ac_make}_set=no
3508 fi
3509 rm -f conftest.make
3510 fi
3511 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3512   echo "$as_me:3512: result: yes" >&5
3513 echo "${ECHO_T}yes" >&6
3514   SET_MAKE=
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518   SET_MAKE="MAKE=${MAKE-make}"
3519 fi
3520
3521 for ac_prog in exctags ctags
3522 do
3523   # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_CTAGS+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   if test -n "$CTAGS"; then
3531   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3532 else
3533   ac_save_IFS=$IFS; IFS=$ac_path_separator
3534 ac_dummy="$PATH"
3535 for ac_dir in $ac_dummy; do
3536   IFS=$ac_save_IFS
3537   test -z "$ac_dir" && ac_dir=.
3538   $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_CTAGS="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3541 break
3542 done
3543
3544 fi
3545 fi
3546 CTAGS=$ac_cv_prog_CTAGS
3547 if test -n "$CTAGS"; then
3548   echo "$as_me:3548: result: $CTAGS" >&5
3549 echo "${ECHO_T}$CTAGS" >&6
3550 else
3551   echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3553 fi
3554
3555   test -n "$CTAGS" && break
3556 done
3557
3558 for ac_prog in exetags etags
3559 do
3560   # Extract the first word of "$ac_prog", so it can be a program name with args.
3561 set dummy $ac_prog; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ETAGS+set}" = set; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567   if test -n "$ETAGS"; then
3568   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3569 else
3570   ac_save_IFS=$IFS; IFS=$ac_path_separator
3571 ac_dummy="$PATH"
3572 for ac_dir in $ac_dummy; do
3573   IFS=$ac_save_IFS
3574   test -z "$ac_dir" && ac_dir=.
3575   $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ETAGS="$ac_prog"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3578 break
3579 done
3580
3581 fi
3582 fi
3583 ETAGS=$ac_cv_prog_ETAGS
3584 if test -n "$ETAGS"; then
3585   echo "$as_me:3585: result: $ETAGS" >&5
3586 echo "${ECHO_T}$ETAGS" >&6
3587 else
3588   echo "$as_me:3588: result: no" >&5
3589 echo "${ECHO_T}no" >&6
3590 fi
3591
3592   test -n "$ETAGS" && break
3593 done
3594
3595 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3596 set dummy ${CTAGS:-ctags}; ac_word=$2
3597 echo "$as_me:3597: checking for $ac_word" >&5
3598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3599 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3600   echo $ECHO_N "(cached) $ECHO_C" >&6
3601 else
3602   if test -n "$MAKE_LOWER_TAGS"; then
3603   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3604 else
3605   ac_save_IFS=$IFS; IFS=$ac_path_separator
3606 ac_dummy="$PATH"
3607 for ac_dir in $ac_dummy; do
3608   IFS=$ac_save_IFS
3609   test -z "$ac_dir" && ac_dir=.
3610   $as_executable_p "$ac_dir/$ac_word" || continue
3611 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3612 echo "$as_me:3612: found $ac_dir/$ac_word" >&5
3613 break
3614 done
3615
3616   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3617 fi
3618 fi
3619 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3620 if test -n "$MAKE_LOWER_TAGS"; then
3621   echo "$as_me:3621: result: $MAKE_LOWER_TAGS" >&5
3622 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3623 else
3624   echo "$as_me:3624: result: no" >&5
3625 echo "${ECHO_T}no" >&6
3626 fi
3627
3628 if test "$cf_cv_mixedcase" = yes ; then
3629         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3630 set dummy ${ETAGS:-etags}; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   if test -n "$MAKE_UPPER_TAGS"; then
3637   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3638 else
3639   ac_save_IFS=$IFS; IFS=$ac_path_separator
3640 ac_dummy="$PATH"
3641 for ac_dir in $ac_dummy; do
3642   IFS=$ac_save_IFS
3643   test -z "$ac_dir" && ac_dir=.
3644   $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647 break
3648 done
3649
3650   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3651 fi
3652 fi
3653 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3654 if test -n "$MAKE_UPPER_TAGS"; then
3655   echo "$as_me:3655: result: $MAKE_UPPER_TAGS" >&5
3656 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3657 else
3658   echo "$as_me:3658: result: no" >&5
3659 echo "${ECHO_T}no" >&6
3660 fi
3661
3662 else
3663         MAKE_UPPER_TAGS=no
3664 fi
3665
3666 if test "$MAKE_UPPER_TAGS" = yes ; then
3667         MAKE_UPPER_TAGS=
3668 else
3669         MAKE_UPPER_TAGS="#"
3670 fi
3671
3672 if test "$MAKE_LOWER_TAGS" = yes ; then
3673         MAKE_LOWER_TAGS=
3674 else
3675         MAKE_LOWER_TAGS="#"
3676 fi
3677
3678 echo "$as_me:3678: checking for makeflags variable" >&5
3679 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3680 if test "${cf_cv_makeflags+set}" = set; then
3681   echo $ECHO_N "(cached) $ECHO_C" >&6
3682 else
3683
3684         cf_cv_makeflags=''
3685         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3686         do
3687                 cat >cf_makeflags.tmp <<CF_EOF
3688 SHELL = /bin/sh
3689 all :
3690         @ echo '.$cf_option'
3691 CF_EOF
3692                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3693                 case "$cf_result" in
3694                 .*k)
3695                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3696                         case "$cf_result" in
3697                         .*CC=*) cf_cv_makeflags=
3698                                 ;;
3699                         *)      cf_cv_makeflags=$cf_option
3700                                 ;;
3701                         esac
3702                         break
3703                         ;;
3704                 .-)     ;;
3705                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3706                         ;;
3707                 esac
3708         done
3709         rm -f cf_makeflags.tmp
3710
3711 fi
3712 echo "$as_me:3712: result: $cf_cv_makeflags" >&5
3713 echo "${ECHO_T}$cf_cv_makeflags" >&6
3714
3715 if test -n "$ac_tool_prefix"; then
3716   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3717 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3718 echo "$as_me:3718: checking for $ac_word" >&5
3719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3720 if test "${ac_cv_prog_RANLIB+set}" = set; then
3721   echo $ECHO_N "(cached) $ECHO_C" >&6
3722 else
3723   if test -n "$RANLIB"; then
3724   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3725 else
3726   ac_save_IFS=$IFS; IFS=$ac_path_separator
3727 ac_dummy="$PATH"
3728 for ac_dir in $ac_dummy; do
3729   IFS=$ac_save_IFS
3730   test -z "$ac_dir" && ac_dir=.
3731   $as_executable_p "$ac_dir/$ac_word" || continue
3732 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3733 echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3734 break
3735 done
3736
3737 fi
3738 fi
3739 RANLIB=$ac_cv_prog_RANLIB
3740 if test -n "$RANLIB"; then
3741   echo "$as_me:3741: result: $RANLIB" >&5
3742 echo "${ECHO_T}$RANLIB" >&6
3743 else
3744   echo "$as_me:3744: result: no" >&5
3745 echo "${ECHO_T}no" >&6
3746 fi
3747
3748 fi
3749 if test -z "$ac_cv_prog_RANLIB"; then
3750   ac_ct_RANLIB=$RANLIB
3751   # Extract the first word of "ranlib", so it can be a program name with args.
3752 set dummy ranlib; ac_word=$2
3753 echo "$as_me:3753: checking for $ac_word" >&5
3754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3755 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3756   echo $ECHO_N "(cached) $ECHO_C" >&6
3757 else
3758   if test -n "$ac_ct_RANLIB"; then
3759   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3760 else
3761   ac_save_IFS=$IFS; IFS=$ac_path_separator
3762 ac_dummy="$PATH"
3763 for ac_dir in $ac_dummy; do
3764   IFS=$ac_save_IFS
3765   test -z "$ac_dir" && ac_dir=.
3766   $as_executable_p "$ac_dir/$ac_word" || continue
3767 ac_cv_prog_ac_ct_RANLIB="ranlib"
3768 echo "$as_me:3768: found $ac_dir/$ac_word" >&5
3769 break
3770 done
3771
3772   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3773 fi
3774 fi
3775 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3776 if test -n "$ac_ct_RANLIB"; then
3777   echo "$as_me:3777: result: $ac_ct_RANLIB" >&5
3778 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3779 else
3780   echo "$as_me:3780: result: no" >&5
3781 echo "${ECHO_T}no" >&6
3782 fi
3783
3784   RANLIB=$ac_ct_RANLIB
3785 else
3786   RANLIB="$ac_cv_prog_RANLIB"
3787 fi
3788
3789 if test -n "$ac_tool_prefix"; then
3790   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3791 set dummy ${ac_tool_prefix}ld; ac_word=$2
3792 echo "$as_me:3792: checking for $ac_word" >&5
3793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3794 if test "${ac_cv_prog_LD+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   if test -n "$LD"; then
3798   ac_cv_prog_LD="$LD" # Let the user override the test.
3799 else
3800   ac_save_IFS=$IFS; IFS=$ac_path_separator
3801 ac_dummy="$PATH"
3802 for ac_dir in $ac_dummy; do
3803   IFS=$ac_save_IFS
3804   test -z "$ac_dir" && ac_dir=.
3805   $as_executable_p "$ac_dir/$ac_word" || continue
3806 ac_cv_prog_LD="${ac_tool_prefix}ld"
3807 echo "$as_me:3807: found $ac_dir/$ac_word" >&5
3808 break
3809 done
3810
3811 fi
3812 fi
3813 LD=$ac_cv_prog_LD
3814 if test -n "$LD"; then
3815   echo "$as_me:3815: result: $LD" >&5
3816 echo "${ECHO_T}$LD" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822 fi
3823 if test -z "$ac_cv_prog_LD"; then
3824   ac_ct_LD=$LD
3825   # Extract the first word of "ld", so it can be a program name with args.
3826 set dummy ld; ac_word=$2
3827 echo "$as_me:3827: checking for $ac_word" >&5
3828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3829 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3830   echo $ECHO_N "(cached) $ECHO_C" >&6
3831 else
3832   if test -n "$ac_ct_LD"; then
3833   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3834 else
3835   ac_save_IFS=$IFS; IFS=$ac_path_separator
3836 ac_dummy="$PATH"
3837 for ac_dir in $ac_dummy; do
3838   IFS=$ac_save_IFS
3839   test -z "$ac_dir" && ac_dir=.
3840   $as_executable_p "$ac_dir/$ac_word" || continue
3841 ac_cv_prog_ac_ct_LD="ld"
3842 echo "$as_me:3842: found $ac_dir/$ac_word" >&5
3843 break
3844 done
3845
3846   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3847 fi
3848 fi
3849 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3850 if test -n "$ac_ct_LD"; then
3851   echo "$as_me:3851: result: $ac_ct_LD" >&5
3852 echo "${ECHO_T}$ac_ct_LD" >&6
3853 else
3854   echo "$as_me:3854: result: no" >&5
3855 echo "${ECHO_T}no" >&6
3856 fi
3857
3858   LD=$ac_ct_LD
3859 else
3860   LD="$ac_cv_prog_LD"
3861 fi
3862
3863 if test -n "$ac_tool_prefix"; then
3864   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3865 set dummy ${ac_tool_prefix}ar; ac_word=$2
3866 echo "$as_me:3866: checking for $ac_word" >&5
3867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3868 if test "${ac_cv_prog_AR+set}" = set; then
3869   echo $ECHO_N "(cached) $ECHO_C" >&6
3870 else
3871   if test -n "$AR"; then
3872   ac_cv_prog_AR="$AR" # Let the user override the test.
3873 else
3874   ac_save_IFS=$IFS; IFS=$ac_path_separator
3875 ac_dummy="$PATH"
3876 for ac_dir in $ac_dummy; do
3877   IFS=$ac_save_IFS
3878   test -z "$ac_dir" && ac_dir=.
3879   $as_executable_p "$ac_dir/$ac_word" || continue
3880 ac_cv_prog_AR="${ac_tool_prefix}ar"
3881 echo "$as_me:3881: found $ac_dir/$ac_word" >&5
3882 break
3883 done
3884
3885 fi
3886 fi
3887 AR=$ac_cv_prog_AR
3888 if test -n "$AR"; then
3889   echo "$as_me:3889: result: $AR" >&5
3890 echo "${ECHO_T}$AR" >&6
3891 else
3892   echo "$as_me:3892: result: no" >&5
3893 echo "${ECHO_T}no" >&6
3894 fi
3895
3896 fi
3897 if test -z "$ac_cv_prog_AR"; then
3898   ac_ct_AR=$AR
3899   # Extract the first word of "ar", so it can be a program name with args.
3900 set dummy ar; ac_word=$2
3901 echo "$as_me:3901: checking for $ac_word" >&5
3902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3903 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3904   echo $ECHO_N "(cached) $ECHO_C" >&6
3905 else
3906   if test -n "$ac_ct_AR"; then
3907   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3908 else
3909   ac_save_IFS=$IFS; IFS=$ac_path_separator
3910 ac_dummy="$PATH"
3911 for ac_dir in $ac_dummy; do
3912   IFS=$ac_save_IFS
3913   test -z "$ac_dir" && ac_dir=.
3914   $as_executable_p "$ac_dir/$ac_word" || continue
3915 ac_cv_prog_ac_ct_AR="ar"
3916 echo "$as_me:3916: found $ac_dir/$ac_word" >&5
3917 break
3918 done
3919
3920   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3921 fi
3922 fi
3923 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3924 if test -n "$ac_ct_AR"; then
3925   echo "$as_me:3925: result: $ac_ct_AR" >&5
3926 echo "${ECHO_T}$ac_ct_AR" >&6
3927 else
3928   echo "$as_me:3928: result: no" >&5
3929 echo "${ECHO_T}no" >&6
3930 fi
3931
3932   AR=$ac_ct_AR
3933 else
3934   AR="$ac_cv_prog_AR"
3935 fi
3936
3937 if test -n "$ac_tool_prefix"; then
3938   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3939 set dummy ${ac_tool_prefix}ar; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_AR+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$AR"; then
3946   ac_cv_prog_AR="$AR" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_AR="${ac_tool_prefix}ar"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959 fi
3960 fi
3961 AR=$ac_cv_prog_AR
3962 if test -n "$AR"; then
3963   echo "$as_me:3963: result: $AR" >&5
3964 echo "${ECHO_T}$AR" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970 fi
3971 if test -z "$ac_cv_prog_AR"; then
3972   ac_ct_AR=$AR
3973   # Extract the first word of "ar", so it can be a program name with args.
3974 set dummy ar; ac_word=$2
3975 echo "$as_me:3975: checking for $ac_word" >&5
3976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3977 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3978   echo $ECHO_N "(cached) $ECHO_C" >&6
3979 else
3980   if test -n "$ac_ct_AR"; then
3981   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3982 else
3983   ac_save_IFS=$IFS; IFS=$ac_path_separator
3984 ac_dummy="$PATH"
3985 for ac_dir in $ac_dummy; do
3986   IFS=$ac_save_IFS
3987   test -z "$ac_dir" && ac_dir=.
3988   $as_executable_p "$ac_dir/$ac_word" || continue
3989 ac_cv_prog_ac_ct_AR="ar"
3990 echo "$as_me:3990: found $ac_dir/$ac_word" >&5
3991 break
3992 done
3993
3994   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3995 fi
3996 fi
3997 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3998 if test -n "$ac_ct_AR"; then
3999   echo "$as_me:3999: result: $ac_ct_AR" >&5
4000 echo "${ECHO_T}$ac_ct_AR" >&6
4001 else
4002   echo "$as_me:4002: result: no" >&5
4003 echo "${ECHO_T}no" >&6
4004 fi
4005
4006   AR=$ac_ct_AR
4007 else
4008   AR="$ac_cv_prog_AR"
4009 fi
4010
4011 echo "$as_me:4011: checking for options to update archives" >&5
4012 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4013 if test "${cf_cv_ar_flags+set}" = set; then
4014   echo $ECHO_N "(cached) $ECHO_C" >&6
4015 else
4016
4017         cf_cv_ar_flags=unknown
4018         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4019         do
4020
4021                 # check if $ARFLAGS already contains this choice
4022                 if test "x$ARFLAGS" != "x" ; then
4023                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4024                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4025                                 cf_cv_ar_flags=
4026                                 break
4027                         fi
4028                 fi
4029
4030                 rm -f conftest.$ac_cv_objext
4031                 rm -f conftest.a
4032
4033                 cat >conftest.$ac_ext <<EOF
4034 #line 4034 "configure"
4035 int     testdata[3] = { 123, 456, 789 };
4036 EOF
4037                 if { (eval echo "$as_me:4037: \"$ac_compile\"") >&5
4038   (eval $ac_compile) 2>&5
4039   ac_status=$?
4040   echo "$as_me:4040: \$? = $ac_status" >&5
4041   (exit $ac_status); } ; then
4042                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4043                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4044                         if test -f conftest.a ; then
4045                                 cf_cv_ar_flags=$cf_ar_flags
4046                                 break
4047                         fi
4048                 else
4049                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4050
4051 echo "${as_me:-configure}:4051: testing cannot compile test-program ..." 1>&5
4052
4053                         break
4054                 fi
4055         done
4056         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4057
4058 fi
4059 echo "$as_me:4059: result: $cf_cv_ar_flags" >&5
4060 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4061
4062 if test -n "$ARFLAGS" ; then
4063         if test -n "$cf_cv_ar_flags" ; then
4064                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4065         fi
4066 else
4067         ARFLAGS=$cf_cv_ar_flags
4068 fi
4069
4070 echo "$as_me:4070: checking if you have specified an install-prefix" >&5
4071 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4072
4073 # Check whether --with-install-prefix or --without-install-prefix was given.
4074 if test "${with_install_prefix+set}" = set; then
4075   withval="$with_install_prefix"
4076   case "x$withval" in #(vi
4077         xyes|xno) #(vi
4078                 ;;
4079         *)      DESTDIR="$withval"
4080                 ;;
4081         esac
4082 fi;
4083 echo "$as_me:4083: result: $DESTDIR" >&5
4084 echo "${ECHO_T}$DESTDIR" >&6
4085
4086 ###############################################################################
4087
4088 # If we're cross-compiling, allow the user to override the tools and their
4089 # options.  The configure script is oriented toward identifying the host
4090 # compiler, etc., but we need a build compiler to generate parts of the source.
4091
4092 if test "$cross_compiling" = yes ; then
4093
4094         # defaults that we might want to override
4095         : ${BUILD_CFLAGS:=''}
4096         : ${BUILD_CPPFLAGS:=''}
4097         : ${BUILD_LDFLAGS:=''}
4098         : ${BUILD_LIBS:=''}
4099         : ${BUILD_EXEEXT:='$x'}
4100         : ${BUILD_OBJEXT:='o'}
4101
4102 # Check whether --with-build-cc or --without-build-cc was given.
4103 if test "${with_build_cc+set}" = set; then
4104   withval="$with_build_cc"
4105   BUILD_CC="$withval"
4106 else
4107   for ac_prog in gcc cc cl
4108 do
4109   # Extract the first word of "$ac_prog", so it can be a program name with args.
4110 set dummy $ac_prog; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$BUILD_CC"; then
4117   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_BUILD_CC="$ac_prog"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130 fi
4131 fi
4132 BUILD_CC=$ac_cv_prog_BUILD_CC
4133 if test -n "$BUILD_CC"; then
4134   echo "$as_me:4134: result: $BUILD_CC" >&5
4135 echo "${ECHO_T}$BUILD_CC" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141   test -n "$BUILD_CC" && break
4142 done
4143
4144 fi;
4145         echo "$as_me:4145: checking for native build C compiler" >&5
4146 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4147         echo "$as_me:4147: result: $BUILD_CC" >&5
4148 echo "${ECHO_T}$BUILD_CC" >&6
4149
4150         echo "$as_me:4150: checking for native build C preprocessor" >&5
4151 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4152
4153 # Check whether --with-build-cpp or --without-build-cpp was given.
4154 if test "${with_build_cpp+set}" = set; then
4155   withval="$with_build_cpp"
4156   BUILD_CPP="$withval"
4157 else
4158   BUILD_CPP='${BUILD_CC} -E'
4159 fi;
4160         echo "$as_me:4160: result: $BUILD_CPP" >&5
4161 echo "${ECHO_T}$BUILD_CPP" >&6
4162
4163         echo "$as_me:4163: checking for native build C flags" >&5
4164 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4165
4166 # Check whether --with-build-cflags or --without-build-cflags was given.
4167 if test "${with_build_cflags+set}" = set; then
4168   withval="$with_build_cflags"
4169   BUILD_CFLAGS="$withval"
4170 fi;
4171         echo "$as_me:4171: result: $BUILD_CFLAGS" >&5
4172 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4173
4174         echo "$as_me:4174: checking for native build C preprocessor-flags" >&5
4175 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4176
4177 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4178 if test "${with_build_cppflags+set}" = set; then
4179   withval="$with_build_cppflags"
4180   BUILD_CPPFLAGS="$withval"
4181 fi;
4182         echo "$as_me:4182: result: $BUILD_CPPFLAGS" >&5
4183 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4184
4185         echo "$as_me:4185: checking for native build linker-flags" >&5
4186 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4187
4188 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4189 if test "${with_build_ldflags+set}" = set; then
4190   withval="$with_build_ldflags"
4191   BUILD_LDFLAGS="$withval"
4192 fi;
4193         echo "$as_me:4193: result: $BUILD_LDFLAGS" >&5
4194 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4195
4196         echo "$as_me:4196: checking for native build linker-libraries" >&5
4197 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4198
4199 # Check whether --with-build-libs or --without-build-libs was given.
4200 if test "${with_build_libs+set}" = set; then
4201   withval="$with_build_libs"
4202   BUILD_LIBS="$withval"
4203 fi;
4204         echo "$as_me:4204: result: $BUILD_LIBS" >&5
4205 echo "${ECHO_T}$BUILD_LIBS" >&6
4206
4207         # this assumes we're on Unix.
4208         BUILD_EXEEXT=
4209         BUILD_OBJEXT=o
4210
4211         : ${BUILD_CC:='${CC}'}
4212
4213         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4214                 { { echo "$as_me:4214: error: Cross-build requires two compilers.
4215 Use --with-build-cc to specify the native compiler." >&5
4216 echo "$as_me: error: Cross-build requires two compilers.
4217 Use --with-build-cc to specify the native compiler." >&2;}
4218    { (exit 1); exit 1; }; }
4219         fi
4220
4221 else
4222         : ${BUILD_CC:='${CC}'}
4223         : ${BUILD_CPP:='${CPP}'}
4224         : ${BUILD_CFLAGS:='${CFLAGS}'}
4225         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4226         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4227         : ${BUILD_LIBS:='${LIBS}'}
4228         : ${BUILD_EXEEXT:='$x'}
4229         : ${BUILD_OBJEXT:='o'}
4230 fi
4231
4232 ###############################################################################
4233
4234 ### Options to allow the user to specify the set of libraries which are used.
4235 ### Use "--without-normal --with-shared" to allow the default model to be
4236 ### shared, for example.
4237 cf_list_models=""
4238
4239 echo "$as_me:4239: checking if libtool -version-number should be used" >&5
4240 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4241
4242 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4243 if test "${enable_libtool_version+set}" = set; then
4244   enableval="$enable_libtool_version"
4245   test "$enableval" != no && enableval=yes
4246   if test "$enableval" != "yes" ; then
4247     cf_libtool_version=no
4248   else
4249     cf_libtool_version=yes
4250   fi
4251 else
4252   enableval=yes
4253   cf_libtool_version=yes
4254
4255 fi;
4256 echo "$as_me:4256: result: $cf_libtool_version" >&5
4257 echo "${ECHO_T}$cf_libtool_version" >&6
4258
4259 if test "$cf_libtool_version" = yes ; then
4260         LIBTOOL_VERSION="-version-number"
4261 else
4262         LIBTOOL_VERSION="-version-info"
4263 fi
4264
4265 LIBTOOL=
4266
4267 # common library maintenance symbols that are convenient for libtool scripts:
4268 LIB_CREATE='${AR} -cr'
4269 LIB_OBJECT='${OBJECTS}'
4270 LIB_SUFFIX=.a
4271 LIB_PREP="$RANLIB"
4272
4273 # symbols used to prop libtool up to enable it to determine what it should be
4274 # doing:
4275 LIB_CLEAN=
4276 LIB_COMPILE=
4277 LIB_LINK='${CC}'
4278 LIB_INSTALL=
4279 LIB_UNINSTALL=
4280
4281 echo "$as_me:4281: checking if you want to build libraries with libtool" >&5
4282 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4283
4284 # Check whether --with-libtool or --without-libtool was given.
4285 if test "${with_libtool+set}" = set; then
4286   withval="$with_libtool"
4287   with_libtool=$withval
4288 else
4289   with_libtool=no
4290 fi;
4291 echo "$as_me:4291: result: $with_libtool" >&5
4292 echo "${ECHO_T}$with_libtool" >&6
4293 if test "$with_libtool" != "no"; then
4294
4295         if test "$with_libtool" != "yes" ; then
4296
4297 if test "x$prefix" != xNONE; then
4298   cf_path_syntax="$prefix"
4299 else
4300   cf_path_syntax="$ac_default_prefix"
4301 fi
4302
4303 case ".$with_libtool" in #(vi
4304 .\$\(*\)*|.\'*\'*) #(vi
4305   ;;
4306 ..|./*|.\\*) #(vi
4307   ;;
4308 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4309   ;;
4310 .\${*prefix}*|.\${*dir}*) #(vi
4311   eval with_libtool="$with_libtool"
4312   case ".$with_libtool" in #(vi
4313   .NONE/*)
4314     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4315     ;;
4316   esac
4317   ;; #(vi
4318 .no|.NONE/*)
4319   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4320   ;;
4321 *)
4322   { { echo "$as_me:4322: error: expected a pathname, not \"$with_libtool\"" >&5
4323 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4324    { (exit 1); exit 1; }; }
4325   ;;
4326 esac
4327
4328                 LIBTOOL=$with_libtool
4329         else
4330                 # Extract the first word of "libtool", so it can be a program name with args.
4331 set dummy libtool; ac_word=$2
4332 echo "$as_me:4332: checking for $ac_word" >&5
4333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4335   echo $ECHO_N "(cached) $ECHO_C" >&6
4336 else
4337   case $LIBTOOL in
4338   [\\/]* | ?:[\\/]*)
4339   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4340   ;;
4341   *)
4342   ac_save_IFS=$IFS; IFS=$ac_path_separator
4343 ac_dummy="$PATH"
4344 for ac_dir in $ac_dummy; do
4345   IFS=$ac_save_IFS
4346   test -z "$ac_dir" && ac_dir=.
4347   if $as_executable_p "$ac_dir/$ac_word"; then
4348    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4349    echo "$as_me:4349: found $ac_dir/$ac_word" >&5
4350    break
4351 fi
4352 done
4353
4354   ;;
4355 esac
4356 fi
4357 LIBTOOL=$ac_cv_path_LIBTOOL
4358
4359 if test -n "$LIBTOOL"; then
4360   echo "$as_me:4360: result: $LIBTOOL" >&5
4361 echo "${ECHO_T}$LIBTOOL" >&6
4362 else
4363   echo "$as_me:4363: result: no" >&5
4364 echo "${ECHO_T}no" >&6
4365 fi
4366
4367         fi
4368         if test -z "$LIBTOOL" ; then
4369                 { { echo "$as_me:4369: error: Cannot find libtool" >&5
4370 echo "$as_me: error: Cannot find libtool" >&2;}
4371    { (exit 1); exit 1; }; }
4372         fi
4373         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4374         LIB_OBJECT='${OBJECTS:.o=.lo}'
4375         LIB_SUFFIX=.la
4376         LIB_CLEAN='${LIBTOOL} --mode=clean'
4377         LIB_COMPILE='${LIBTOOL} --mode=compile'
4378         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4379         LIB_INSTALL='${LIBTOOL} --mode=install'
4380         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4381         LIB_PREP=:
4382
4383         # Show the version of libtool
4384         echo "$as_me:4384: checking version of libtool" >&5
4385 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4386
4387         # Save the version in a cache variable - this is not entirely a good
4388         # thing, but the version string from libtool is very ugly, and for
4389         # bug reports it might be useful to have the original string. "("
4390         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.].*//'`
4391         echo "$as_me:4391: result: $cf_cv_libtool_version" >&5
4392 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4393         if test -z "$cf_cv_libtool_version" ; then
4394                 { { echo "$as_me:4394: error: This is not GNU libtool" >&5
4395 echo "$as_me: error: This is not GNU libtool" >&2;}
4396    { (exit 1); exit 1; }; }
4397         fi
4398
4399         # special hack to add -no-undefined (which libtool should do for itself)
4400         LT_UNDEF=
4401         case "$cf_cv_system_name" in #(vi
4402         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4403                 LT_UNDEF=-no-undefined
4404                 ;;
4405         esac
4406
4407         # special hack to add --tag option for C++ compiler
4408         case $cf_cv_libtool_version in #(vi
4409         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4410                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4411                 LIBTOOL="$LIBTOOL --tag=CC"
4412                 ;;
4413         *)
4414                 LIBTOOL_CXX="$LIBTOOL"
4415                 ;;
4416         esac
4417 else
4418         LIBTOOL=""
4419         LIBTOOL_CXX=""
4420 fi
4421
4422 test -z "$LIBTOOL" && ECHO_LT=
4423
4424 if test "$with_libtool" != "no" ; then
4425
4426 cf_list_models="$cf_list_models libtool"
4427
4428 else
4429
4430 echo "$as_me:4430: checking if you want to build shared libraries" >&5
4431 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4432
4433 # Check whether --with-shared or --without-shared was given.
4434 if test "${with_shared+set}" = set; then
4435   withval="$with_shared"
4436   with_shared=$withval
4437 else
4438   with_shared=no
4439 fi;
4440 echo "$as_me:4440: result: $with_shared" >&5
4441 echo "${ECHO_T}$with_shared" >&6
4442 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4443
4444 echo "$as_me:4444: checking if you want to build static libraries" >&5
4445 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4446
4447 # Check whether --with-normal or --without-normal was given.
4448 if test "${with_normal+set}" = set; then
4449   withval="$with_normal"
4450   with_normal=$withval
4451 else
4452   with_normal=yes
4453 fi;
4454 echo "$as_me:4454: result: $with_normal" >&5
4455 echo "${ECHO_T}$with_normal" >&6
4456 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4457
4458 echo "$as_me:4458: checking if you want to build debug libraries" >&5
4459 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4460
4461 # Check whether --with-debug or --without-debug was given.
4462 if test "${with_debug+set}" = set; then
4463   withval="$with_debug"
4464   with_debug=$withval
4465 else
4466   with_debug=yes
4467 fi;
4468 echo "$as_me:4468: result: $with_debug" >&5
4469 echo "${ECHO_T}$with_debug" >&6
4470 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4471
4472 echo "$as_me:4472: checking if you want to build profiling libraries" >&5
4473 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4474
4475 # Check whether --with-profile or --without-profile was given.
4476 if test "${with_profile+set}" = set; then
4477   withval="$with_profile"
4478   with_profile=$withval
4479 else
4480   with_profile=no
4481 fi;
4482 echo "$as_me:4482: result: $with_profile" >&5
4483 echo "${ECHO_T}$with_profile" >&6
4484 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4485
4486 fi
4487
4488 ###############################################################################
4489
4490 echo "$as_me:4490: checking for specified models" >&5
4491 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4492 test -z "$cf_list_models" && cf_list_models=normal
4493 test "$with_libtool" != "no" && cf_list_models=libtool
4494 echo "$as_me:4494: result: $cf_list_models" >&5
4495 echo "${ECHO_T}$cf_list_models" >&6
4496
4497 ### Use the first model as the default, and save its suffix for use in building
4498 ### up test-applications.
4499 echo "$as_me:4499: checking for default model" >&5
4500 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4501 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4502 echo "$as_me:4502: result: $DFT_LWR_MODEL" >&5
4503 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4504
4505 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4506
4507 TICS_NAME=tic
4508
4509 TINFO_NAME=tinfo
4510
4511 LIB_NAME=ncurses
4512
4513 LIB_DIR=../lib
4514 LIB_2ND=../../lib
4515
4516 echo "$as_me:4516: checking if you want to have a library-prefix" >&5
4517 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4518
4519 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4520 if test "${with_lib_prefix+set}" = set; then
4521   withval="$with_lib_prefix"
4522   with_lib_prefix=$withval
4523 else
4524   with_lib_prefix=auto
4525 fi;
4526 echo "$as_me:4526: result: $with_lib_prefix" >&5
4527 echo "${ECHO_T}$with_lib_prefix" >&6
4528
4529 if test $with_lib_prefix = auto
4530 then
4531
4532         case $cf_cv_system_name in #(vi
4533         OS/2*|os2*) #(vi
4534         LIB_PREFIX=''
4535         ;;
4536         *)      LIB_PREFIX='lib'
4537         ;;
4538         esac
4539 cf_prefix=$LIB_PREFIX
4540
4541 elif test $with_lib_prefix = no
4542 then
4543         LIB_PREFIX=
4544 else
4545         LIB_PREFIX=$with_lib_prefix
4546 fi
4547
4548 LIB_SUFFIX=
4549
4550         echo "$as_me:4550: checking for PATH separator" >&5
4551 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4552         case $cf_cv_system_name in
4553         os2*)   PATH_SEPARATOR=';'  ;;
4554         *)      ${PATH_SEPARATOR:=':'}  ;;
4555         esac
4556
4557         echo "$as_me:4557: result: $PATH_SEPARATOR" >&5
4558 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4559
4560 ###############################################################################
4561
4562 echo "$as_me:4562: checking if you want to build a separate terminfo library" >&5
4563 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4564
4565 # Check whether --with-termlib or --without-termlib was given.
4566 if test "${with_termlib+set}" = set; then
4567   withval="$with_termlib"
4568   with_termlib=$withval
4569 else
4570   with_termlib=no
4571 fi;
4572 echo "$as_me:4572: result: $with_termlib" >&5
4573 echo "${ECHO_T}$with_termlib" >&6
4574
4575 echo "$as_me:4575: checking if you want to build a separate tic library" >&5
4576 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4577
4578 # Check whether --with-ticlib or --without-ticlib was given.
4579 if test "${with_ticlib+set}" = set; then
4580   withval="$with_ticlib"
4581   with_ticlib=$withval
4582 else
4583   with_ticlib=no
4584 fi;
4585 echo "$as_me:4585: result: $with_ticlib" >&5
4586 echo "${ECHO_T}$with_ticlib" >&6
4587
4588 ### Checks for special libraries, must be done up-front.
4589 SHLIB_LIST=""
4590
4591 echo "$as_me:4591: checking if you want to link with the GPM mouse library" >&5
4592 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4593
4594 # Check whether --with-gpm or --without-gpm was given.
4595 if test "${with_gpm+set}" = set; then
4596   withval="$with_gpm"
4597   with_gpm=$withval
4598 else
4599   with_gpm=maybe
4600 fi;
4601 echo "$as_me:4601: result: $with_gpm" >&5
4602 echo "${ECHO_T}$with_gpm" >&6
4603
4604 if test "$with_gpm" != no ; then
4605         echo "$as_me:4605: checking for gpm.h" >&5
4606 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4607 if test "${ac_cv_header_gpm_h+set}" = set; then
4608   echo $ECHO_N "(cached) $ECHO_C" >&6
4609 else
4610   cat >conftest.$ac_ext <<_ACEOF
4611 #line 4611 "configure"
4612 #include "confdefs.h"
4613 #include <gpm.h>
4614 _ACEOF
4615 if { (eval echo "$as_me:4615: \"$ac_cpp conftest.$ac_ext\"") >&5
4616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4617   ac_status=$?
4618   egrep -v '^ *\+' conftest.er1 >conftest.err
4619   rm -f conftest.er1
4620   cat conftest.err >&5
4621   echo "$as_me:4621: \$? = $ac_status" >&5
4622   (exit $ac_status); } >/dev/null; then
4623   if test -s conftest.err; then
4624     ac_cpp_err=$ac_c_preproc_warn_flag
4625   else
4626     ac_cpp_err=
4627   fi
4628 else
4629   ac_cpp_err=yes
4630 fi
4631 if test -z "$ac_cpp_err"; then
4632   ac_cv_header_gpm_h=yes
4633 else
4634   echo "$as_me: failed program was:" >&5
4635   cat conftest.$ac_ext >&5
4636   ac_cv_header_gpm_h=no
4637 fi
4638 rm -f conftest.err conftest.$ac_ext
4639 fi
4640 echo "$as_me:4640: result: $ac_cv_header_gpm_h" >&5
4641 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4642 if test $ac_cv_header_gpm_h = yes; then
4643
4644 cat >>confdefs.h <<\EOF
4645 #define HAVE_GPM_H 1
4646 EOF
4647
4648                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4649                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4650
4651 echo "${as_me:-configure}:4651: testing assuming we really have GPM library ..." 1>&5
4652
4653 cat >>confdefs.h <<\EOF
4654 #define HAVE_LIBGPM 1
4655 EOF
4656
4657                 else
4658                         echo "$as_me:4658: checking for Gpm_Open in -lgpm" >&5
4659 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4660 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   ac_check_lib_save_LIBS=$LIBS
4664 LIBS="-lgpm  $LIBS"
4665 cat >conftest.$ac_ext <<_ACEOF
4666 #line 4666 "configure"
4667 #include "confdefs.h"
4668
4669 /* Override any gcc2 internal prototype to avoid an error.  */
4670 #ifdef __cplusplus
4671 extern "C"
4672 #endif
4673 /* We use char because int might match the return type of a gcc2
4674    builtin and then its argument prototype would still apply.  */
4675 char Gpm_Open ();
4676 int
4677 main ()
4678 {
4679 Gpm_Open ();
4680   ;
4681   return 0;
4682 }
4683 _ACEOF
4684 rm -f conftest.$ac_objext conftest$ac_exeext
4685 if { (eval echo "$as_me:4685: \"$ac_link\"") >&5
4686   (eval $ac_link) 2>&5
4687   ac_status=$?
4688   echo "$as_me:4688: \$? = $ac_status" >&5
4689   (exit $ac_status); } &&
4690          { ac_try='test -s conftest$ac_exeext'
4691   { (eval echo "$as_me:4691: \"$ac_try\"") >&5
4692   (eval $ac_try) 2>&5
4693   ac_status=$?
4694   echo "$as_me:4694: \$? = $ac_status" >&5
4695   (exit $ac_status); }; }; then
4696   ac_cv_lib_gpm_Gpm_Open=yes
4697 else
4698   echo "$as_me: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
4700 ac_cv_lib_gpm_Gpm_Open=no
4701 fi
4702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4703 LIBS=$ac_check_lib_save_LIBS
4704 fi
4705 echo "$as_me:4705: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4706 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4707 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4708   :
4709 else
4710
4711                                 { { echo "$as_me:4711: error: Cannot link with GPM library" >&5
4712 echo "$as_me: error: Cannot link with GPM library" >&2;}
4713    { (exit 1); exit 1; }; }
4714                 fi
4715                 with_gpm=yes
4716
4717 fi
4718
4719 else
4720
4721                 test "$with_gpm" != maybe && { echo "$as_me:4721: WARNING: Cannot find GPM header" >&5
4722 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4723                 with_gpm=no
4724
4725 fi
4726
4727 fi
4728
4729 if test "$with_gpm" != no ; then
4730         echo "$as_me:4730: checking if you want to load GPM dynamically" >&5
4731 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4732
4733 # Check whether --with-dlsym or --without-dlsym was given.
4734 if test "${with_dlsym+set}" = set; then
4735   withval="$with_dlsym"
4736   with_dlsym=$withval
4737 else
4738   with_dlsym=yes
4739 fi;
4740         echo "$as_me:4740: result: $with_dlsym" >&5
4741 echo "${ECHO_T}$with_dlsym" >&6
4742         if test "x$with_dlsym" = xyes ; then
4743
4744 cf_have_dlsym=no
4745 echo "$as_me:4745: checking for dlsym" >&5
4746 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4747 if test "${ac_cv_func_dlsym+set}" = set; then
4748   echo $ECHO_N "(cached) $ECHO_C" >&6
4749 else
4750   cat >conftest.$ac_ext <<_ACEOF
4751 #line 4751 "configure"
4752 #include "confdefs.h"
4753 /* System header to define __stub macros and hopefully few prototypes,
4754     which can conflict with char dlsym (); below.  */
4755 #include <assert.h>
4756 /* Override any gcc2 internal prototype to avoid an error.  */
4757 #ifdef __cplusplus
4758 extern "C"
4759 #endif
4760 /* We use char because int might match the return type of a gcc2
4761    builtin and then its argument prototype would still apply.  */
4762 char dlsym ();
4763 char (*f) ();
4764
4765 int
4766 main ()
4767 {
4768 /* The GNU C library defines this for functions which it implements
4769     to always fail with ENOSYS.  Some functions are actually named
4770     something starting with __ and the normal name is an alias.  */
4771 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4772 choke me
4773 #else
4774 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4775 #endif
4776
4777   ;
4778   return 0;
4779 }
4780 _ACEOF
4781 rm -f conftest.$ac_objext conftest$ac_exeext
4782 if { (eval echo "$as_me:4782: \"$ac_link\"") >&5
4783   (eval $ac_link) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); } &&
4787          { ac_try='test -s conftest$ac_exeext'
4788   { (eval echo "$as_me:4788: \"$ac_try\"") >&5
4789   (eval $ac_try) 2>&5
4790   ac_status=$?
4791   echo "$as_me:4791: \$? = $ac_status" >&5
4792   (exit $ac_status); }; }; then
4793   ac_cv_func_dlsym=yes
4794 else
4795   echo "$as_me: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 ac_cv_func_dlsym=no
4798 fi
4799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4800 fi
4801 echo "$as_me:4801: result: $ac_cv_func_dlsym" >&5
4802 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4803 if test $ac_cv_func_dlsym = yes; then
4804   cf_have_dlsym=yes
4805 else
4806
4807 cf_have_libdl=no
4808 echo "$as_me:4808: checking for dlsym in -ldl" >&5
4809 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4810 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4811   echo $ECHO_N "(cached) $ECHO_C" >&6
4812 else
4813   ac_check_lib_save_LIBS=$LIBS
4814 LIBS="-ldl  $LIBS"
4815 cat >conftest.$ac_ext <<_ACEOF
4816 #line 4816 "configure"
4817 #include "confdefs.h"
4818
4819 /* Override any gcc2 internal prototype to avoid an error.  */
4820 #ifdef __cplusplus
4821 extern "C"
4822 #endif
4823 /* We use char because int might match the return type of a gcc2
4824    builtin and then its argument prototype would still apply.  */
4825 char dlsym ();
4826 int
4827 main ()
4828 {
4829 dlsym ();
4830   ;
4831   return 0;
4832 }
4833 _ACEOF
4834 rm -f conftest.$ac_objext conftest$ac_exeext
4835 if { (eval echo "$as_me:4835: \"$ac_link\"") >&5
4836   (eval $ac_link) 2>&5
4837   ac_status=$?
4838   echo "$as_me:4838: \$? = $ac_status" >&5
4839   (exit $ac_status); } &&
4840          { ac_try='test -s conftest$ac_exeext'
4841   { (eval echo "$as_me:4841: \"$ac_try\"") >&5
4842   (eval $ac_try) 2>&5
4843   ac_status=$?
4844   echo "$as_me:4844: \$? = $ac_status" >&5
4845   (exit $ac_status); }; }; then
4846   ac_cv_lib_dl_dlsym=yes
4847 else
4848   echo "$as_me: failed program was:" >&5
4849 cat conftest.$ac_ext >&5
4850 ac_cv_lib_dl_dlsym=no
4851 fi
4852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4853 LIBS=$ac_check_lib_save_LIBS
4854 fi
4855 echo "$as_me:4855: result: $ac_cv_lib_dl_dlsym" >&5
4856 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4857 if test $ac_cv_lib_dl_dlsym = yes; then
4858
4859         cf_have_dlsym=yes
4860         cf_have_libdl=yes
4861 fi
4862
4863 fi
4864
4865 if test "$cf_have_dlsym" = yes ; then
4866         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4867
4868         echo "$as_me:4868: checking whether able to link to dl*() functions" >&5
4869 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4870         cat >conftest.$ac_ext <<_ACEOF
4871 #line 4871 "configure"
4872 #include "confdefs.h"
4873 #include <dlfcn.h>
4874 int
4875 main ()
4876 {
4877
4878                 void *obj;
4879                 if ((obj = dlopen("filename", 0)) != 0) {
4880                         if (dlsym(obj, "symbolname") == 0) {
4881                         dlclose(obj);
4882                         }
4883                 }
4884   ;
4885   return 0;
4886 }
4887 _ACEOF
4888 rm -f conftest.$ac_objext conftest$ac_exeext
4889 if { (eval echo "$as_me:4889: \"$ac_link\"") >&5
4890   (eval $ac_link) 2>&5
4891   ac_status=$?
4892   echo "$as_me:4892: \$? = $ac_status" >&5
4893   (exit $ac_status); } &&
4894          { ac_try='test -s conftest$ac_exeext'
4895   { (eval echo "$as_me:4895: \"$ac_try\"") >&5
4896   (eval $ac_try) 2>&5
4897   ac_status=$?
4898   echo "$as_me:4898: \$? = $ac_status" >&5
4899   (exit $ac_status); }; }; then
4900
4901 cat >>confdefs.h <<\EOF
4902 #define HAVE_LIBDL 1
4903 EOF
4904
4905 else
4906   echo "$as_me: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908
4909                 { { echo "$as_me:4909: error: Cannot link test program for libdl" >&5
4910 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4911    { (exit 1); exit 1; }; }
4912 fi
4913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4914         echo "$as_me:4914: result: ok" >&5
4915 echo "${ECHO_T}ok" >&6
4916 else
4917         { { echo "$as_me:4917: error: Cannot find dlsym function" >&5
4918 echo "$as_me: error: Cannot find dlsym function" >&2;}
4919    { (exit 1); exit 1; }; }
4920 fi
4921
4922                 if test "x$with_gpm" != xyes ; then
4923                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4924
4925 echo "${as_me:-configure}:4925: testing assuming soname for gpm is $with_gpm ..." 1>&5
4926
4927                         cf_cv_gpm_soname="$with_gpm"
4928                 else
4929
4930 echo "$as_me:4930: checking for soname of gpm library" >&5
4931 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4932 if test "${cf_cv_gpm_soname+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935
4936 cf_cv_gpm_soname=unknown
4937 if test "$cross_compiling" != yes ; then
4938 cat >conftest.$ac_ext <<CF_EOF
4939 #include <gpm.h>
4940 int main()
4941 {
4942 if (Gpm_Open(0,0)) Gpm_Close();
4943         ${cf_cv_main_return:-return}(0);
4944 }
4945 CF_EOF
4946 cf_save_LIBS="$LIBS"
4947         LIBS="-lgpm $LIBS"
4948         if { (eval echo "$as_me:4948: \"$ac_compile\"") >&5
4949   (eval $ac_compile) 2>&5
4950   ac_status=$?
4951   echo "$as_me:4951: \$? = $ac_status" >&5
4952   (exit $ac_status); } ; then
4953                 if { (eval echo "$as_me:4953: \"$ac_link\"") >&5
4954   (eval $ac_link) 2>&5
4955   ac_status=$?
4956   echo "$as_me:4956: \$? = $ac_status" >&5
4957   (exit $ac_status); } ; then
4958                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4959                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4960                 fi
4961         fi
4962 rm -rf conftest*
4963 LIBS="$cf_save_LIBS"
4964 fi
4965
4966 fi
4967 echo "$as_me:4967: result: $cf_cv_gpm_soname" >&5
4968 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4969
4970                 fi
4971                 test "$cf_cv_gpm_soname" != "unknown" &&
4972 cat >>confdefs.h <<EOF
4973 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4974 EOF
4975
4976                 SHLIB_LIST="-ldl $SHLIB_LIST"
4977         else
4978                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4979                 TEST_LIBS="-lgpm $TEST_LIBS"
4980         fi
4981
4982 cat >>confdefs.h <<\EOF
4983 #define HAVE_LIBGPM 1
4984 EOF
4985
4986 echo "$as_me:4986: checking for Gpm_Wgetch in -lgpm" >&5
4987 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4988 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4989   echo $ECHO_N "(cached) $ECHO_C" >&6
4990 else
4991   ac_check_lib_save_LIBS=$LIBS
4992 LIBS="-lgpm  $LIBS"
4993 cat >conftest.$ac_ext <<_ACEOF
4994 #line 4994 "configure"
4995 #include "confdefs.h"
4996
4997 /* Override any gcc2 internal prototype to avoid an error.  */
4998 #ifdef __cplusplus
4999 extern "C"
5000 #endif
5001 /* We use char because int might match the return type of a gcc2
5002    builtin and then its argument prototype would still apply.  */
5003 char Gpm_Wgetch ();
5004 int
5005 main ()
5006 {
5007 Gpm_Wgetch ();
5008   ;
5009   return 0;
5010 }
5011 _ACEOF
5012 rm -f conftest.$ac_objext conftest$ac_exeext
5013 if { (eval echo "$as_me:5013: \"$ac_link\"") >&5
5014   (eval $ac_link) 2>&5
5015   ac_status=$?
5016   echo "$as_me:5016: \$? = $ac_status" >&5
5017   (exit $ac_status); } &&
5018          { ac_try='test -s conftest$ac_exeext'
5019   { (eval echo "$as_me:5019: \"$ac_try\"") >&5
5020   (eval $ac_try) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); }; }; then
5024   ac_cv_lib_gpm_Gpm_Wgetch=yes
5025 else
5026   echo "$as_me: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
5028 ac_cv_lib_gpm_Gpm_Wgetch=no
5029 fi
5030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5031 LIBS=$ac_check_lib_save_LIBS
5032 fi
5033 echo "$as_me:5033: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5034 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5035 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5036
5037 echo "$as_me:5037: checking if GPM is weakly bound to curses library" >&5
5038 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5039 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5040   echo $ECHO_N "(cached) $ECHO_C" >&6
5041 else
5042
5043 cf_cv_check_gpm_wgetch=unknown
5044 if test "$cross_compiling" != yes ; then
5045
5046 cat >conftest.$ac_ext <<CF_EOF
5047 #include <gpm.h>
5048 int main()
5049 {
5050         Gpm_Wgetch();
5051         ${cf_cv_main_return:-return}(0);
5052 }
5053 CF_EOF
5054
5055         cf_save_LIBS="$LIBS"
5056         # This only works if we can look at the symbol table.  If a shared
5057         # library is stripped for install, we cannot use that.  So we're forced
5058         # to rely on the static library, noting that some packagers may not
5059         # include it.
5060         LIBS="-static -lgpm -dynamic $LIBS"
5061         if { (eval echo "$as_me:5061: \"$ac_compile\"") >&5
5062   (eval $ac_compile) 2>&5
5063   ac_status=$?
5064   echo "$as_me:5064: \$? = $ac_status" >&5
5065   (exit $ac_status); } ; then
5066                 if { (eval echo "$as_me:5066: \"$ac_link\"") >&5
5067   (eval $ac_link) 2>&5
5068   ac_status=$?
5069   echo "$as_me:5069: \$? = $ac_status" >&5
5070   (exit $ac_status); } ; then
5071                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5072                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5073                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5074                 fi
5075         fi
5076         rm -rf conftest*
5077         LIBS="$cf_save_LIBS"
5078 fi
5079
5080 fi
5081 echo "$as_me:5081: result: $cf_cv_check_gpm_wgetch" >&5
5082 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5083
5084 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5085         { echo "$as_me:5085: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5086 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5087 fi
5088
5089 fi
5090
5091 fi
5092
5093 # not everyone has "test -c"
5094 if test -c /dev/sysmouse 2>/dev/null ; then
5095 echo "$as_me:5095: checking if you want to use sysmouse" >&5
5096 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5097
5098 # Check whether --with-sysmouse or --without-sysmouse was given.
5099 if test "${with_sysmouse+set}" = set; then
5100   withval="$with_sysmouse"
5101   cf_with_sysmouse=$withval
5102 else
5103   cf_with_sysmouse=maybe
5104 fi;
5105         if test "$cf_with_sysmouse" != no ; then
5106         cat >conftest.$ac_ext <<_ACEOF
5107 #line 5107 "configure"
5108 #include "confdefs.h"
5109
5110 #include <osreldate.h>
5111 #if (__FreeBSD_version >= 400017)
5112 #include <sys/consio.h>
5113 #include <sys/fbio.h>
5114 #else
5115 #include <machine/console.h>
5116 #endif
5117
5118 int
5119 main ()
5120 {
5121
5122         struct mouse_info the_mouse;
5123         ioctl(0, CONS_MOUSECTL, &the_mouse);
5124
5125   ;
5126   return 0;
5127 }
5128 _ACEOF
5129 rm -f conftest.$ac_objext
5130 if { (eval echo "$as_me:5130: \"$ac_compile\"") >&5
5131   (eval $ac_compile) 2>&5
5132   ac_status=$?
5133   echo "$as_me:5133: \$? = $ac_status" >&5
5134   (exit $ac_status); } &&
5135          { ac_try='test -s conftest.$ac_objext'
5136   { (eval echo "$as_me:5136: \"$ac_try\"") >&5
5137   (eval $ac_try) 2>&5
5138   ac_status=$?
5139   echo "$as_me:5139: \$? = $ac_status" >&5
5140   (exit $ac_status); }; }; then
5141   cf_with_sysmouse=yes
5142 else
5143   echo "$as_me: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 cf_with_sysmouse=no
5146 fi
5147 rm -f conftest.$ac_objext conftest.$ac_ext
5148         fi
5149 echo "$as_me:5149: result: $cf_with_sysmouse" >&5
5150 echo "${ECHO_T}$cf_with_sysmouse" >&6
5151 test "$cf_with_sysmouse" = yes &&
5152 cat >>confdefs.h <<\EOF
5153 #define USE_SYSMOUSE 1
5154 EOF
5155
5156 fi
5157
5158 if test X"$CC_G_OPT" = X"" ; then
5159         CC_G_OPT='-g'
5160         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5161 fi
5162
5163 if test X"$CXX_G_OPT" = X"" ; then
5164         CXX_G_OPT='-g'
5165         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5166 fi
5167
5168 echo "$as_me:5168: checking for default loader flags" >&5
5169 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5170 case $DFT_LWR_MODEL in
5171 libtool) LD_MODEL=''   ;;
5172 normal)  LD_MODEL=''   ;;
5173 debug)   LD_MODEL=$CC_G_OPT ;;
5174 profile) LD_MODEL='-pg';;
5175 shared)  LD_MODEL=''   ;;
5176 esac
5177 echo "$as_me:5177: result: $LD_MODEL" >&5
5178 echo "${ECHO_T}$LD_MODEL" >&6
5179
5180 case $DFT_LWR_MODEL in
5181 shared)
5182
5183 echo "$as_me:5183: checking if rpath option should be used" >&5
5184 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5185
5186 # Check whether --enable-rpath or --disable-rpath was given.
5187 if test "${enable_rpath+set}" = set; then
5188   enableval="$enable_rpath"
5189   cf_cv_enable_rpath=$enableval
5190 else
5191   cf_cv_enable_rpath=no
5192 fi;
5193 echo "$as_me:5193: result: $cf_cv_enable_rpath" >&5
5194 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5195
5196 echo "$as_me:5196: checking if shared libraries should be relinked during install" >&5
5197 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5198
5199 # Check whether --enable-relink or --disable-relink was given.
5200 if test "${enable_relink+set}" = set; then
5201   enableval="$enable_relink"
5202   cf_cv_do_relink=$enableval
5203 else
5204   cf_cv_do_relink=yes
5205 fi;
5206 echo "$as_me:5206: result: $cf_cv_do_relink" >&5
5207 echo "${ECHO_T}$cf_cv_do_relink" >&6
5208         ;;
5209 esac
5210
5211 LD_RPATH_OPT=
5212 echo "$as_me:5212: checking for an rpath option" >&5
5213 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5214 case $cf_cv_system_name in #(vi
5215 irix*) #(vi
5216         if test "$GCC" = yes; then
5217                 LD_RPATH_OPT="-Wl,-rpath,"
5218         else
5219                 LD_RPATH_OPT="-rpath "
5220         fi
5221         ;;
5222 linux*|gnu*|k*bsd*-gnu) #(vi
5223         LD_RPATH_OPT="-Wl,-rpath,"
5224         ;;
5225 openbsd[2-9].*|mirbsd*) #(vi
5226         LD_RPATH_OPT="-Wl,-rpath,"
5227         ;;
5228 dragonfly*|freebsd*) #(vi
5229         LD_RPATH_OPT="-rpath "
5230         ;;
5231 netbsd*) #(vi
5232         LD_RPATH_OPT="-Wl,-rpath,"
5233         ;;
5234 osf*|mls+*) #(vi
5235         LD_RPATH_OPT="-rpath "
5236         ;;
5237 solaris2*) #(vi
5238         LD_RPATH_OPT="-R"
5239         ;;
5240 *)
5241         ;;
5242 esac
5243 echo "$as_me:5243: result: $LD_RPATH_OPT" >&5
5244 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5245
5246 case "x$LD_RPATH_OPT" in #(vi
5247 x-R*)
5248         echo "$as_me:5248: checking if we need a space after rpath option" >&5
5249 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5250         cf_save_LIBS="$LIBS"
5251         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5252         cat >conftest.$ac_ext <<_ACEOF
5253 #line 5253 "configure"
5254 #include "confdefs.h"
5255
5256 int
5257 main ()
5258 {
5259
5260   ;
5261   return 0;
5262 }
5263 _ACEOF
5264 rm -f conftest.$ac_objext conftest$ac_exeext
5265 if { (eval echo "$as_me:5265: \"$ac_link\"") >&5
5266   (eval $ac_link) 2>&5
5267   ac_status=$?
5268   echo "$as_me:5268: \$? = $ac_status" >&5
5269   (exit $ac_status); } &&
5270          { ac_try='test -s conftest$ac_exeext'
5271   { (eval echo "$as_me:5271: \"$ac_try\"") >&5
5272   (eval $ac_try) 2>&5
5273   ac_status=$?
5274   echo "$as_me:5274: \$? = $ac_status" >&5
5275   (exit $ac_status); }; }; then
5276   cf_rpath_space=no
5277 else
5278   echo "$as_me: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5280 cf_rpath_space=yes
5281 fi
5282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5283         LIBS="$cf_save_LIBS"
5284         echo "$as_me:5284: result: $cf_rpath_space" >&5
5285 echo "${ECHO_T}$cf_rpath_space" >&6
5286         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5287         ;;
5288 esac
5289
5290         LOCAL_LDFLAGS=
5291         LOCAL_LDFLAGS2=
5292         LD_SHARED_OPTS=
5293         INSTALL_LIB="-m 644"
5294
5295         cf_cv_do_symlinks=no
5296         cf_ld_rpath_opt=
5297         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5298
5299         echo "$as_me:5299: checking if release/abi version should be used for shared libs" >&5
5300 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5301
5302 # Check whether --with-shlib-version or --without-shlib-version was given.
5303 if test "${with_shlib_version+set}" = set; then
5304   withval="$with_shlib_version"
5305   test -z "$withval" && withval=auto
5306         case $withval in #(vi
5307         yes) #(vi
5308                 cf_cv_shlib_version=auto
5309                 ;;
5310         rel|abi|auto|no) #(vi
5311                 cf_cv_shlib_version=$withval
5312                 ;;
5313         *)
5314                 { { echo "$as_me:5314: error: option value must be one of: rel, abi, auto or no" >&5
5315 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5316    { (exit 1); exit 1; }; }
5317                 ;;
5318         esac
5319
5320 else
5321   cf_cv_shlib_version=auto
5322 fi;
5323         echo "$as_me:5323: result: $cf_cv_shlib_version" >&5
5324 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5325
5326         cf_cv_rm_so_locs=no
5327
5328         # Some less-capable ports of gcc support only -fpic
5329         CC_SHARED_OPTS=
5330         if test "$GCC" = yes
5331         then
5332                 echo "$as_me:5332: checking which $CC option to use" >&5
5333 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5334                 cf_save_CFLAGS="$CFLAGS"
5335                 for CC_SHARED_OPTS in -fPIC -fpic ''
5336                 do
5337                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5338                         cat >conftest.$ac_ext <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341 #include <stdio.h>
5342 int
5343 main ()
5344 {
5345 int x = 1
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -f conftest.$ac_objext
5351 if { (eval echo "$as_me:5351: \"$ac_compile\"") >&5
5352   (eval $ac_compile) 2>&5
5353   ac_status=$?
5354   echo "$as_me:5354: \$? = $ac_status" >&5
5355   (exit $ac_status); } &&
5356          { ac_try='test -s conftest.$ac_objext'
5357   { (eval echo "$as_me:5357: \"$ac_try\"") >&5
5358   (eval $ac_try) 2>&5
5359   ac_status=$?
5360   echo "$as_me:5360: \$? = $ac_status" >&5
5361   (exit $ac_status); }; }; then
5362   break
5363 else
5364   echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 fi
5367 rm -f conftest.$ac_objext conftest.$ac_ext
5368                 done
5369                 echo "$as_me:5369: result: $CC_SHARED_OPTS" >&5
5370 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5371                 CFLAGS="$cf_save_CFLAGS"
5372         fi
5373
5374         cf_cv_shlib_version_infix=no
5375
5376         case $cf_cv_system_name in #(vi
5377         aix4.3-9*|aix[5-7]*) #(vi
5378                 if test "$GCC" = yes; then
5379                         CC_SHARED_OPTS=
5380                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5381                 else
5382                         # CC_SHARED_OPTS='-qpic=large -G'
5383                         # perhaps "-bM:SRE -bnoentry -bexpall"
5384                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5385                 fi
5386                 ;;
5387         beos*) #(vi
5388                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5389                 ;;
5390         cygwin*) #(vi
5391                 CC_SHARED_OPTS=
5392                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5393                 cf_cv_shlib_version=cygdll
5394                 cf_cv_shlib_version_infix=cygdll
5395                 cat >mk_shared_lib.sh <<-CF_EOF
5396                 #!/bin/sh
5397                 SHARED_LIB=\$1
5398                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5399                 shift
5400                 cat <<-EOF
5401                 Linking shared library
5402                 ** SHARED_LIB \$SHARED_LIB
5403                 ** IMPORT_LIB \$IMPORT_LIB
5404 EOF
5405                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5406 CF_EOF
5407                 chmod +x mk_shared_lib.sh
5408                 ;;
5409         darwin*) #(vi
5410                 EXTRA_CFLAGS="-no-cpp-precomp"
5411                 CC_SHARED_OPTS="-dynamic"
5412                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5413                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5414                 cf_cv_shlib_version_infix=yes
5415                 echo "$as_me:5415: checking if ld -search_paths_first works" >&5
5416 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5417 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5418   echo $ECHO_N "(cached) $ECHO_C" >&6
5419 else
5420
5421                         cf_save_LDFLAGS=$LDFLAGS
5422                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5423                         cat >conftest.$ac_ext <<_ACEOF
5424 #line 5424 "configure"
5425 #include "confdefs.h"
5426
5427 int
5428 main ()
5429 {
5430 int i;
5431   ;
5432   return 0;
5433 }
5434 _ACEOF
5435 rm -f conftest.$ac_objext conftest$ac_exeext
5436 if { (eval echo "$as_me:5436: \"$ac_link\"") >&5
5437   (eval $ac_link) 2>&5
5438   ac_status=$?
5439   echo "$as_me:5439: \$? = $ac_status" >&5
5440   (exit $ac_status); } &&
5441          { ac_try='test -s conftest$ac_exeext'
5442   { (eval echo "$as_me:5442: \"$ac_try\"") >&5
5443   (eval $ac_try) 2>&5
5444   ac_status=$?
5445   echo "$as_me:5445: \$? = $ac_status" >&5
5446   (exit $ac_status); }; }; then
5447   cf_cv_ldflags_search_paths_first=yes
5448 else
5449   echo "$as_me: failed program was:" >&5
5450 cat conftest.$ac_ext >&5
5451 cf_cv_ldflags_search_paths_first=no
5452 fi
5453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5454                                 LDFLAGS=$cf_save_LDFLAGS
5455 fi
5456 echo "$as_me:5456: result: $cf_cv_ldflags_search_paths_first" >&5
5457 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5458                 if test $cf_cv_ldflags_search_paths_first = yes; then
5459                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5460                 fi
5461                 ;;
5462         hpux*) #(vi
5463                 # (tested with gcc 2.7.2 -- I don't have c89)
5464                 if test "$GCC" = yes; then
5465                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5466                 else
5467                         CC_SHARED_OPTS='+Z'
5468                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5469                 fi
5470                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5471                 # HP-UX shared libraries must be executable, and should be
5472                 # readonly to exploit a quirk in the memory manager.
5473                 INSTALL_LIB="-m 555"
5474                 ;;
5475         interix*)
5476                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5477                 if test "$cf_cv_shlib_version" = rel; then
5478                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5479                 else
5480                         cf_shared_soname='`basename `'
5481                 fi
5482                 CC_SHARED_OPTS=
5483                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5484                 ;;
5485         irix*) #(vi
5486                 if test "$cf_cv_enable_rpath" = yes ; then
5487                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5488                 fi
5489                 # tested with IRIX 5.2 and 'cc'.
5490                 if test "$GCC" != yes; then
5491                         CC_SHARED_OPTS='-KPIC'
5492                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5493                 else
5494                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5495                 fi
5496                 cf_cv_rm_so_locs=yes
5497                 ;;
5498         linux*|gnu*|k*bsd*-gnu) #(vi
5499                 if test "$DFT_LWR_MODEL" = "shared" ; then
5500                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5501                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5502                 fi
5503                 if test "$cf_cv_enable_rpath" = yes ; then
5504                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5505                 fi
5506
5507         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5508         if test "$cf_cv_shlib_version" = rel; then
5509                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5510         else
5511                 cf_cv_shared_soname='`basename $@`'
5512         fi
5513
5514                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5515                 ;;
5516         mingw*) #(vi
5517                 cf_cv_shlib_version=mingw
5518                 cf_cv_shlib_version_infix=mingw
5519                 CC_SHARED_OPTS=
5520                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5521                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5522                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5523                 cat >mk_shared_lib.sh <<-CF_EOF
5524                 #!/bin/sh
5525                 SHARED_LIB=\$1
5526                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5527                 shift
5528                 cat <<-EOF
5529                 Linking shared library
5530                 ** SHARED_LIB \$SHARED_LIB
5531                 ** IMPORT_LIB \$IMPORT_LIB
5532 EOF
5533                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5534 CF_EOF
5535                 chmod +x mk_shared_lib.sh
5536                 ;;
5537         openbsd[2-9].*|mirbsd*) #(vi
5538                 if test "$DFT_LWR_MODEL" = "shared" ; then
5539                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5540                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5541                 fi
5542                 if test "$cf_cv_enable_rpath" = yes ; then
5543                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5544                 fi
5545                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5546
5547         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5548         if test "$cf_cv_shlib_version" = rel; then
5549                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5550         else
5551                 cf_cv_shared_soname='`basename $@`'
5552         fi
5553
5554                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5555                 ;;
5556         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5557                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5558                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5559                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5560                 ;;
5561         dragonfly*|freebsd*) #(vi
5562                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5563                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5564                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5565                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5566                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5567                 fi
5568
5569         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5570         if test "$cf_cv_shlib_version" = rel; then
5571                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5572         else
5573                 cf_cv_shared_soname='`basename $@`'
5574         fi
5575
5576                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5577                 ;;
5578         netbsd*) #(vi
5579                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5580                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5581                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5582                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5583                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5584                         if test "$cf_cv_shlib_version" = auto; then
5585                         if test -f /usr/libexec/ld.elf_so; then
5586                                 cf_cv_shlib_version=abi
5587                         else
5588                                 cf_cv_shlib_version=rel
5589                         fi
5590                         fi
5591
5592         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5593         if test "$cf_cv_shlib_version" = rel; then
5594                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5595         else
5596                 cf_cv_shared_soname='`basename $@`'
5597         fi
5598
5599                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5600                 else
5601                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5602                 fi
5603                 ;;
5604         osf*|mls+*) #(vi
5605                 # tested with OSF/1 V3.2 and 'cc'
5606                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5607                 # link with shared libs).
5608                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5609                 case $host_os in #(vi
5610                 osf4*)
5611                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5612                         ;;
5613                 esac
5614                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5615                 if test "$DFT_LWR_MODEL" = "shared" ; then
5616                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5617                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5618                 fi
5619                 cf_cv_rm_so_locs=yes
5620                 ;;
5621         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5622                 # tested with osr5.0.5
5623                 if test "$GCC" != yes; then
5624                         CC_SHARED_OPTS='-belf -KPIC'
5625                 fi
5626                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5627                 if test "$cf_cv_enable_rpath" = yes ; then
5628                         # only way is to set LD_RUN_PATH but no switch for it
5629                         RUN_PATH=$libdir
5630                 fi
5631                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5632                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5633                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5634                 ;;
5635         sunos4*) #(vi
5636                 # tested with SunOS 4.1.1 and gcc 2.7.0
5637                 if test "$GCC" != yes; then
5638                         CC_SHARED_OPTS='-KPIC'
5639                 fi
5640                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5641                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5642                 ;;
5643         solaris2*) #(vi
5644                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5645                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5646                 if test "$DFT_LWR_MODEL" = "shared" ; then
5647                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5648                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5649                 fi
5650                 if test "$cf_cv_enable_rpath" = yes ; then
5651                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5652                 fi
5653
5654         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5655         if test "$cf_cv_shlib_version" = rel; then
5656                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5657         else
5658                 cf_cv_shared_soname='`basename $@`'
5659         fi
5660
5661                 if test "$GCC" != yes; then
5662                         cf_save_CFLAGS="$CFLAGS"
5663                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5664                         do
5665                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5666                                 cat >conftest.$ac_ext <<_ACEOF
5667 #line 5667 "configure"
5668 #include "confdefs.h"
5669 #include <stdio.h>
5670 int
5671 main ()
5672 {
5673 printf("Hello\n");
5674   ;
5675   return 0;
5676 }
5677 _ACEOF
5678 rm -f conftest.$ac_objext
5679 if { (eval echo "$as_me:5679: \"$ac_compile\"") >&5
5680   (eval $ac_compile) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); } &&
5684          { ac_try='test -s conftest.$ac_objext'
5685   { (eval echo "$as_me:5685: \"$ac_try\"") >&5
5686   (eval $ac_try) 2>&5
5687   ac_status=$?
5688   echo "$as_me:5688: \$? = $ac_status" >&5
5689   (exit $ac_status); }; }; then
5690   break
5691 else
5692   echo "$as_me: failed program was:" >&5
5693 cat conftest.$ac_ext >&5
5694 fi
5695 rm -f conftest.$ac_objext conftest.$ac_ext
5696                         done
5697                         CFLAGS="$cf_save_CFLAGS"
5698                         CC_SHARED_OPTS=$cf_shared_opts
5699                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5700                 else
5701                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5702                 fi
5703                 ;;
5704         sysv5uw7*|unix_sv*) #(vi
5705                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5706                 if test "$GCC" != yes; then
5707                         CC_SHARED_OPTS='-KPIC'
5708                 fi
5709                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5710                 ;;
5711         *)
5712                 CC_SHARED_OPTS='unknown'
5713                 MK_SHARED_LIB='echo unknown'
5714                 ;;
5715         esac
5716
5717         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5718         case "$cf_cv_shlib_version" in #(vi
5719         rel|abi)
5720                 case "$MK_SHARED_LIB" in #(vi
5721                 *'-o $@') #(vi
5722                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5723                         ;;
5724                 *)
5725                         { echo "$as_me:5725: WARNING: ignored --with-shlib-version" >&5
5726 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5727                         ;;
5728                 esac
5729                 ;;
5730         esac
5731
5732         # RPATH_LIST is a colon-separated list of directories
5733         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5734         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5735
5736         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5737
5738 echo "${as_me:-configure}:5738: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5739
5740         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5741
5742 echo "${as_me:-configure}:5742: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5743
5744 if test "$CC_SHARED_OPTS" = "unknown"; then
5745         for model in $cf_list_models; do
5746                 if test "$model" = "shared"; then
5747                         { { echo "$as_me:5747: error: Shared libraries are not supported in this version" >&5
5748 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5749    { (exit 1); exit 1; }; }
5750                 fi
5751         done
5752 fi
5753
5754 ### If we're building with rpath, try to link non-standard libs that way too.
5755 if test "$DFT_LWR_MODEL" = "shared"; then
5756
5757 echo "$as_me:5757: checking if rpath-hack should be disabled" >&5
5758 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5759
5760 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5761 if test "${enable_rpath_hack+set}" = set; then
5762   enableval="$enable_rpath_hack"
5763   test "$enableval" != no && enableval=yes
5764   if test "$enableval" != "yes" ; then
5765     cf_disable_rpath_hack=yes
5766   else
5767     cf_disable_rpath_hack=no
5768   fi
5769 else
5770   enableval=yes
5771   cf_disable_rpath_hack=no
5772
5773 fi;
5774 echo "$as_me:5774: result: $cf_disable_rpath_hack" >&5
5775 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5776 if test "$cf_disable_rpath_hack" = no ; then
5777
5778 echo "$as_me:5778: checking for updated LDFLAGS" >&5
5779 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5780 if test -n "$LD_RPATH_OPT" ; then
5781         echo "$as_me:5781: result: maybe" >&5
5782 echo "${ECHO_T}maybe" >&6
5783
5784         for ac_prog in ldd
5785 do
5786   # Extract the first word of "$ac_prog", so it can be a program name with args.
5787 set dummy $ac_prog; ac_word=$2
5788 echo "$as_me:5788: checking for $ac_word" >&5
5789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5790 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5791   echo $ECHO_N "(cached) $ECHO_C" >&6
5792 else
5793   if test -n "$cf_ldd_prog"; then
5794   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5795 else
5796   ac_save_IFS=$IFS; IFS=$ac_path_separator
5797 ac_dummy="$PATH"
5798 for ac_dir in $ac_dummy; do
5799   IFS=$ac_save_IFS
5800   test -z "$ac_dir" && ac_dir=.
5801   $as_executable_p "$ac_dir/$ac_word" || continue
5802 ac_cv_prog_cf_ldd_prog="$ac_prog"
5803 echo "$as_me:5803: found $ac_dir/$ac_word" >&5
5804 break
5805 done
5806
5807 fi
5808 fi
5809 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5810 if test -n "$cf_ldd_prog"; then
5811   echo "$as_me:5811: result: $cf_ldd_prog" >&5
5812 echo "${ECHO_T}$cf_ldd_prog" >&6
5813 else
5814   echo "$as_me:5814: result: no" >&5
5815 echo "${ECHO_T}no" >&6
5816 fi
5817
5818   test -n "$cf_ldd_prog" && break
5819 done
5820 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5821
5822         cf_rpath_list="/usr/lib /lib"
5823         if test "$cf_ldd_prog" != no
5824         then
5825                 cf_rpath_oops=
5826
5827 cat >conftest.$ac_ext <<_ACEOF
5828 #line 5828 "configure"
5829 #include "confdefs.h"
5830 #include <stdio.h>
5831 int
5832 main ()
5833 {
5834 printf("Hello");
5835   ;
5836   return 0;
5837 }
5838 _ACEOF
5839 rm -f conftest.$ac_objext conftest$ac_exeext
5840 if { (eval echo "$as_me:5840: \"$ac_link\"") >&5
5841   (eval $ac_link) 2>&5
5842   ac_status=$?
5843   echo "$as_me:5843: \$? = $ac_status" >&5
5844   (exit $ac_status); } &&
5845          { ac_try='test -s conftest$ac_exeext'
5846   { (eval echo "$as_me:5846: \"$ac_try\"") >&5
5847   (eval $ac_try) 2>&5
5848   ac_status=$?
5849   echo "$as_me:5849: \$? = $ac_status" >&5
5850   (exit $ac_status); }; }; then
5851   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5852                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5853 else
5854   echo "$as_me: failed program was:" >&5
5855 cat conftest.$ac_ext >&5
5856 fi
5857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5858
5859                 # If we passed the link-test, but get a "not found" on a given library,
5860                 # this could be due to inept reconfiguration of gcc to make it only
5861                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
5862                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
5863                 # /usr/local libraries.
5864                 if test -n "$cf_rpath_oops"
5865                 then
5866                         for cf_rpath_src in $cf_rpath_oops
5867                         do
5868                                 for cf_rpath_dir in \
5869                                         /usr/local \
5870                                         /usr/pkg \
5871                                         /opt/sfw
5872                                 do
5873                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
5874                                         then
5875                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
5876
5877 echo "${as_me:-configure}:5877: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
5878
5879                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
5880                                                 break
5881                                         fi
5882                                 done
5883                         done
5884                 fi
5885         fi
5886
5887         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5888
5889 echo "${as_me:-configure}:5889: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5890
5891 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5892
5893 echo "${as_me:-configure}:5893: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5894
5895 cf_rpath_dst=
5896 for cf_rpath_src in $LDFLAGS
5897 do
5898         case $cf_rpath_src in #(vi
5899         -L*) #(vi
5900
5901                 # check if this refers to a directory which we will ignore
5902                 cf_rpath_skip=no
5903                 if test -n "$cf_rpath_list"
5904                 then
5905                         for cf_rpath_item in $cf_rpath_list
5906                         do
5907                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5908                                 then
5909                                         cf_rpath_skip=yes
5910                                         break
5911                                 fi
5912                         done
5913                 fi
5914
5915                 if test "$cf_rpath_skip" = no
5916                 then
5917                         # transform the option
5918                         if test "$LD_RPATH_OPT" = "-R " ; then
5919                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5920                         else
5921                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5922                         fi
5923
5924                         # if we have not already added this, add it now
5925                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5926                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5927                         then
5928                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5929
5930 echo "${as_me:-configure}:5930: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5931
5932                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5933                         fi
5934                 fi
5935                 ;;
5936         esac
5937         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5938 done
5939 LDFLAGS=$cf_rpath_dst
5940
5941 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5942
5943 echo "${as_me:-configure}:5943: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5944
5945 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5946
5947 echo "${as_me:-configure}:5947: testing ...checking LIBS $LIBS ..." 1>&5
5948
5949 cf_rpath_dst=
5950 for cf_rpath_src in $LIBS
5951 do
5952         case $cf_rpath_src in #(vi
5953         -L*) #(vi
5954
5955                 # check if this refers to a directory which we will ignore
5956                 cf_rpath_skip=no
5957                 if test -n "$cf_rpath_list"
5958                 then
5959                         for cf_rpath_item in $cf_rpath_list
5960                         do
5961                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5962                                 then
5963                                         cf_rpath_skip=yes
5964                                         break
5965                                 fi
5966                         done
5967                 fi
5968
5969                 if test "$cf_rpath_skip" = no
5970                 then
5971                         # transform the option
5972                         if test "$LD_RPATH_OPT" = "-R " ; then
5973                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5974                         else
5975                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5976                         fi
5977
5978                         # if we have not already added this, add it now
5979                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5980                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5981                         then
5982                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5983
5984 echo "${as_me:-configure}:5984: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5985
5986                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5987                         fi
5988                 fi
5989                 ;;
5990         esac
5991         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5992 done
5993 LIBS=$cf_rpath_dst
5994
5995 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
5996
5997 echo "${as_me:-configure}:5997: testing ...checked LIBS $LIBS ..." 1>&5
5998
5999         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6000
6001 echo "${as_me:-configure}:6001: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6002
6003 fi
6004
6005 fi
6006
6007 fi
6008
6009 ###############################################################################
6010
6011 ###     use option --disable-overwrite to leave out the link to -lcurses
6012 echo "$as_me:6012: checking if you wish to install ncurses overwriting curses" >&5
6013 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6014
6015 # Check whether --enable-overwrite or --disable-overwrite was given.
6016 if test "${enable_overwrite+set}" = set; then
6017   enableval="$enable_overwrite"
6018   with_overwrite=$enableval
6019 else
6020   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6021 fi;
6022 echo "$as_me:6022: result: $with_overwrite" >&5
6023 echo "${ECHO_T}$with_overwrite" >&6
6024
6025 echo "$as_me:6025: checking if external terminfo-database is used" >&5
6026 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6027
6028 # Check whether --enable-database or --disable-database was given.
6029 if test "${enable_database+set}" = set; then
6030   enableval="$enable_database"
6031   use_database=$enableval
6032 else
6033   use_database=yes
6034 fi;
6035 echo "$as_me:6035: result: $use_database" >&5
6036 echo "${ECHO_T}$use_database" >&6
6037
6038 case $host_os in #(vi
6039 os2*) #(vi
6040         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6041         ;;
6042 *) #(vi
6043         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6044         ;;
6045 esac
6046
6047 if test "$use_database" != no ; then
6048
6049 cat >>confdefs.h <<\EOF
6050 #define USE_DATABASE 1
6051 EOF
6052
6053         echo "$as_me:6053: checking which terminfo source-file will be installed" >&5
6054 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6055
6056 # Check whether --with-database or --without-database was given.
6057 if test "${with_database+set}" = set; then
6058   withval="$with_database"
6059   TERMINFO_SRC=$withval
6060 fi;
6061         echo "$as_me:6061: result: $TERMINFO_SRC" >&5
6062 echo "${ECHO_T}$TERMINFO_SRC" >&6
6063
6064         echo "$as_me:6064: checking whether to use hashed database instead of directory/tree" >&5
6065 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6066
6067 # Check whether --with-hashed-db or --without-hashed-db was given.
6068 if test "${with_hashed_db+set}" = set; then
6069   withval="$with_hashed_db"
6070
6071 else
6072   with_hashed_db=no
6073 fi;
6074         echo "$as_me:6074: result: $with_hashed_db" >&5
6075 echo "${ECHO_T}$with_hashed_db" >&6
6076 else
6077         with_hashed_db=no
6078 fi
6079
6080 echo "$as_me:6080: checking for list of fallback descriptions" >&5
6081 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6082
6083 # Check whether --with-fallbacks or --without-fallbacks was given.
6084 if test "${with_fallbacks+set}" = set; then
6085   withval="$with_fallbacks"
6086   with_fallback=$withval
6087 else
6088   with_fallback=
6089 fi;
6090 echo "$as_me:6090: result: $with_fallback" >&5
6091 echo "${ECHO_T}$with_fallback" >&6
6092 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6093
6094 echo "$as_me:6094: checking if you want modern xterm or antique" >&5
6095 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6096
6097 # Check whether --with-xterm-new or --without-xterm-new was given.
6098 if test "${with_xterm_new+set}" = set; then
6099   withval="$with_xterm_new"
6100   with_xterm_new=$withval
6101 else
6102   with_xterm_new=yes
6103 fi;
6104 case $with_xterm_new in
6105 no)     with_xterm_new=xterm-old;;
6106 *)      with_xterm_new=xterm-new;;
6107 esac
6108 echo "$as_me:6108: result: $with_xterm_new" >&5
6109 echo "${ECHO_T}$with_xterm_new" >&6
6110 WHICH_XTERM=$with_xterm_new
6111
6112 echo "$as_me:6112: checking if xterm backspace sends BS or DEL" >&5
6113 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6114
6115 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6116 if test "${with_xterm_kbs+set}" = set; then
6117   withval="$with_xterm_kbs"
6118   with_xterm_kbs=$withval
6119 else
6120   with_xterm_kbs=BS
6121 fi;
6122 case x$with_xterm_kbs in
6123 xyes|xno|xBS|xbs|x8)
6124         with_xterm_kbs=BS
6125         ;;
6126 xDEL|xdel|x127)
6127         with_xterm_kbs=DEL
6128         ;;
6129 *)
6130         with_xterm_kbs=$withval
6131         ;;
6132 esac
6133 echo "$as_me:6133: result: $with_xterm_kbs" >&5
6134 echo "${ECHO_T}$with_xterm_kbs" >&6
6135 XTERM_KBS=$with_xterm_kbs
6136
6137 MAKE_TERMINFO=
6138 if test "$use_database" = no ; then
6139         TERMINFO="${datadir}/terminfo"
6140         MAKE_TERMINFO="#"
6141 else
6142
6143 echo "$as_me:6143: checking for list of terminfo directories" >&5
6144 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6145
6146 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6147 if test "${with_terminfo_dirs+set}" = set; then
6148   withval="$with_terminfo_dirs"
6149
6150 else
6151   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6152 fi;
6153 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6154 cf_dst_path=
6155 for cf_src_path in $withval
6156 do
6157
6158 if test "x$prefix" != xNONE; then
6159   cf_path_syntax="$prefix"
6160 else
6161   cf_path_syntax="$ac_default_prefix"
6162 fi
6163
6164 case ".$cf_src_path" in #(vi
6165 .\$\(*\)*|.\'*\'*) #(vi
6166   ;;
6167 ..|./*|.\\*) #(vi
6168   ;;
6169 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6170   ;;
6171 .\${*prefix}*|.\${*dir}*) #(vi
6172   eval cf_src_path="$cf_src_path"
6173   case ".$cf_src_path" in #(vi
6174   .NONE/*)
6175     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6176     ;;
6177   esac
6178   ;; #(vi
6179 .no|.NONE/*)
6180   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6181   ;;
6182 *)
6183   { { echo "$as_me:6183: error: expected a pathname, not \"$cf_src_path\"" >&5
6184 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6185    { (exit 1); exit 1; }; }
6186   ;;
6187 esac
6188
6189   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6190   cf_dst_path="${cf_dst_path}${cf_src_path}"
6191 done
6192 IFS="$ac_save_ifs"
6193
6194 eval TERMINFO_DIRS="$cf_dst_path"
6195
6196 echo "$as_me:6196: result: $TERMINFO_DIRS" >&5
6197 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6198 test -n "$TERMINFO_DIRS" &&
6199 cat >>confdefs.h <<EOF
6200 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6201 EOF
6202
6203 echo "$as_me:6203: checking for default terminfo directory" >&5
6204 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6205
6206 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6207 if test "${with_default_terminfo_dir+set}" = set; then
6208   withval="$with_default_terminfo_dir"
6209
6210 else
6211   withval="${TERMINFO:-${datadir}/terminfo}"
6212 fi; if test -n "${datadir}/terminfo" ; then
6213
6214 if test "x$prefix" != xNONE; then
6215   cf_path_syntax="$prefix"
6216 else
6217   cf_path_syntax="$ac_default_prefix"
6218 fi
6219
6220 case ".$withval" in #(vi
6221 .\$\(*\)*|.\'*\'*) #(vi
6222   ;;
6223 ..|./*|.\\*) #(vi
6224   ;;
6225 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6226   ;;
6227 .\${*prefix}*|.\${*dir}*) #(vi
6228   eval withval="$withval"
6229   case ".$withval" in #(vi
6230   .NONE/*)
6231     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6232     ;;
6233   esac
6234   ;; #(vi
6235 .no|.NONE/*)
6236   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6237   ;;
6238 *)
6239   { { echo "$as_me:6239: error: expected a pathname, not \"$withval\"" >&5
6240 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6241    { (exit 1); exit 1; }; }
6242   ;;
6243 esac
6244
6245 fi
6246 eval TERMINFO="$withval"
6247
6248 echo "$as_me:6248: result: $TERMINFO" >&5
6249 echo "${ECHO_T}$TERMINFO" >&6
6250
6251 cat >>confdefs.h <<EOF
6252 #define TERMINFO "$TERMINFO"
6253 EOF
6254
6255 fi
6256
6257 ###     use option --disable-big-core to make tic run on small machines
6258 ###     We need 4Mb, check if we can allocate 50% more than that.
6259 echo "$as_me:6259: checking if big-core option selected" >&5
6260 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6261
6262 # Check whether --enable-big-core or --disable-big-core was given.
6263 if test "${enable_big_core+set}" = set; then
6264   enableval="$enable_big_core"
6265   with_big_core=$enableval
6266 else
6267   if test "$cross_compiling" = yes; then
6268   with_big_core=no
6269 else
6270   cat >conftest.$ac_ext <<_ACEOF
6271 #line 6271 "configure"
6272 #include "confdefs.h"
6273
6274 #include <stdlib.h>
6275 #include <string.h>
6276 int main() {
6277         unsigned long n = 6000000L;
6278         char *s = malloc(n);
6279         if (s != 0)
6280                 s[0] = s[n-1] = 0;
6281         ${cf_cv_main_return:-return}(s == 0);
6282 }
6283 _ACEOF
6284 rm -f conftest$ac_exeext
6285 if { (eval echo "$as_me:6285: \"$ac_link\"") >&5
6286   (eval $ac_link) 2>&5
6287   ac_status=$?
6288   echo "$as_me:6288: \$? = $ac_status" >&5
6289   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6290   { (eval echo "$as_me:6290: \"$ac_try\"") >&5
6291   (eval $ac_try) 2>&5
6292   ac_status=$?
6293   echo "$as_me:6293: \$? = $ac_status" >&5
6294   (exit $ac_status); }; }; then
6295   with_big_core=yes
6296 else
6297   echo "$as_me: program exited with status $ac_status" >&5
6298 echo "$as_me: failed program was:" >&5
6299 cat conftest.$ac_ext >&5
6300 with_big_core=no
6301 fi
6302 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6303 fi
6304 fi;
6305 echo "$as_me:6305: result: $with_big_core" >&5
6306 echo "${ECHO_T}$with_big_core" >&6
6307 test "x$with_big_core" = "xyes" &&
6308 cat >>confdefs.h <<\EOF
6309 #define HAVE_BIG_CORE 1
6310 EOF
6311
6312 ### ISO C only guarantees 512-char strings, we have tables which load faster
6313 ### when constructed using "big" strings.  More than the C compiler, the awk
6314 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6315 echo "$as_me:6315: checking if big-strings option selected" >&5
6316 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6317
6318 # Check whether --enable-big-strings or --disable-big-strings was given.
6319 if test "${enable_big_strings+set}" = set; then
6320   enableval="$enable_big_strings"
6321   with_big_strings=$enableval
6322 else
6323
6324         case x$AWK in #(vi
6325         x)
6326                 eval with_big_strings=no
6327                 ;;
6328         *) #(vi
6329                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6330                         | $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
6331                         eval with_big_strings=yes
6332                 else
6333                         eval with_big_strings=no
6334                 fi
6335                 ;;
6336         esac
6337
6338 fi;
6339 echo "$as_me:6339: result: $with_big_strings" >&5
6340 echo "${ECHO_T}$with_big_strings" >&6
6341
6342 USE_BIG_STRINGS=0
6343 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6344
6345 ###     use option --enable-termcap to compile in the termcap fallback support
6346 echo "$as_me:6346: checking if you want termcap-fallback support" >&5
6347 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6348
6349 # Check whether --enable-termcap or --disable-termcap was given.
6350 if test "${enable_termcap+set}" = set; then
6351   enableval="$enable_termcap"
6352   with_termcap=$enableval
6353 else
6354   with_termcap=no
6355 fi;
6356 echo "$as_me:6356: result: $with_termcap" >&5
6357 echo "${ECHO_T}$with_termcap" >&6
6358
6359 if test "x$with_termcap" != "xyes" ; then
6360         if test "$use_database" = no ; then
6361                 if test -z "$with_fallback" ; then
6362                         { { echo "$as_me:6362: error: You have disabled the database w/o specifying fallbacks" >&5
6363 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6364    { (exit 1); exit 1; }; }
6365                 fi
6366         fi
6367
6368 cat >>confdefs.h <<\EOF
6369 #define PURE_TERMINFO 1
6370 EOF
6371
6372 else
6373
6374 if test "$with_ticlib" != no ; then
6375         { { echo "$as_me:6375: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6376 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6377    { (exit 1); exit 1; }; }
6378 fi
6379
6380 cat >>confdefs.h <<\EOF
6381 #define USE_TERMCAP 1
6382 EOF
6383
6384 echo "$as_me:6384: checking for list of termcap files" >&5
6385 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6386
6387 # Check whether --with-termpath or --without-termpath was given.
6388 if test "${with_termpath+set}" = set; then
6389   withval="$with_termpath"
6390
6391 else
6392   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6393 fi;
6394 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6395 cf_dst_path=
6396 for cf_src_path in $withval
6397 do
6398
6399 if test "x$prefix" != xNONE; then
6400   cf_path_syntax="$prefix"
6401 else
6402   cf_path_syntax="$ac_default_prefix"
6403 fi
6404
6405 case ".$cf_src_path" in #(vi
6406 .\$\(*\)*|.\'*\'*) #(vi
6407   ;;
6408 ..|./*|.\\*) #(vi
6409   ;;
6410 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6411   ;;
6412 .\${*prefix}*|.\${*dir}*) #(vi
6413   eval cf_src_path="$cf_src_path"
6414   case ".$cf_src_path" in #(vi
6415   .NONE/*)
6416     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6417     ;;
6418   esac
6419   ;; #(vi
6420 .no|.NONE/*)
6421   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6422   ;;
6423 *)
6424   { { echo "$as_me:6424: error: expected a pathname, not \"$cf_src_path\"" >&5
6425 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6426    { (exit 1); exit 1; }; }
6427   ;;
6428 esac
6429
6430   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6431   cf_dst_path="${cf_dst_path}${cf_src_path}"
6432 done
6433 IFS="$ac_save_ifs"
6434
6435 eval TERMPATH="$cf_dst_path"
6436
6437 echo "$as_me:6437: result: $TERMPATH" >&5
6438 echo "${ECHO_T}$TERMPATH" >&6
6439 test -n "$TERMPATH" &&
6440 cat >>confdefs.h <<EOF
6441 #define TERMPATH "$TERMPATH"
6442 EOF
6443
6444 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6445 echo "$as_me:6445: checking if fast termcap-loader is needed" >&5
6446 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6447
6448 # Check whether --enable-getcap or --disable-getcap was given.
6449 if test "${enable_getcap+set}" = set; then
6450   enableval="$enable_getcap"
6451   with_getcap=$enableval
6452 else
6453   with_getcap=no
6454 fi;
6455 echo "$as_me:6455: result: $with_getcap" >&5
6456 echo "${ECHO_T}$with_getcap" >&6
6457 test "x$with_getcap" = "xyes" &&
6458 cat >>confdefs.h <<\EOF
6459 #define USE_GETCAP 1
6460 EOF
6461
6462 echo "$as_me:6462: checking if translated termcaps will be cached in ~/.terminfo" >&5
6463 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6464
6465 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6466 if test "${enable_getcap_cache+set}" = set; then
6467   enableval="$enable_getcap_cache"
6468   with_getcap_cache=$enableval
6469 else
6470   with_getcap_cache=no
6471 fi;
6472 echo "$as_me:6472: result: $with_getcap_cache" >&5
6473 echo "${ECHO_T}$with_getcap_cache" >&6
6474 test "x$with_getcap_cache" = "xyes" &&
6475 cat >>confdefs.h <<\EOF
6476 #define USE_GETCAP_CACHE 1
6477 EOF
6478
6479 fi
6480
6481 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6482 echo "$as_me:6482: checking if ~/.terminfo is wanted" >&5
6483 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6484
6485 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6486 if test "${enable_home_terminfo+set}" = set; then
6487   enableval="$enable_home_terminfo"
6488   with_home_terminfo=$enableval
6489 else
6490   with_home_terminfo=yes
6491 fi;
6492 echo "$as_me:6492: result: $with_home_terminfo" >&5
6493 echo "${ECHO_T}$with_home_terminfo" >&6
6494 test "x$with_home_terminfo" = "xyes" &&
6495 cat >>confdefs.h <<\EOF
6496 #define USE_HOME_TERMINFO 1
6497 EOF
6498
6499 echo "$as_me:6499: checking if you want to use restricted environment when running as root" >&5
6500 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6501
6502 # Check whether --enable-root-environ or --disable-root-environ was given.
6503 if test "${enable_root_environ+set}" = set; then
6504   enableval="$enable_root_environ"
6505   with_root_environ=$enableval
6506 else
6507   with_root_environ=yes
6508 fi;
6509 echo "$as_me:6509: result: $with_root_environ" >&5
6510 echo "${ECHO_T}$with_root_environ" >&6
6511 test "x$with_root_environ" = xyes &&
6512 cat >>confdefs.h <<\EOF
6513 #define USE_ROOT_ENVIRON 1
6514 EOF
6515
6516 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6517 ###   to reduce storage requirements for the terminfo database.
6518
6519 for ac_func in \
6520         remove \
6521         unlink
6522 do
6523 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6524 echo "$as_me:6524: checking for $ac_func" >&5
6525 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6526 if eval "test \"\${$as_ac_var+set}\" = set"; then
6527   echo $ECHO_N "(cached) $ECHO_C" >&6
6528 else
6529   cat >conftest.$ac_ext <<_ACEOF
6530 #line 6530 "configure"
6531 #include "confdefs.h"
6532 /* System header to define __stub macros and hopefully few prototypes,
6533     which can conflict with char $ac_func (); below.  */
6534 #include <assert.h>
6535 /* Override any gcc2 internal prototype to avoid an error.  */
6536 #ifdef __cplusplus
6537 extern "C"
6538 #endif
6539 /* We use char because int might match the return type of a gcc2
6540    builtin and then its argument prototype would still apply.  */
6541 char $ac_func ();
6542 char (*f) ();
6543
6544 int
6545 main ()
6546 {
6547 /* The GNU C library defines this for functions which it implements
6548     to always fail with ENOSYS.  Some functions are actually named
6549     something starting with __ and the normal name is an alias.  */
6550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6551 choke me
6552 #else
6553 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6554 #endif
6555
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext conftest$ac_exeext
6561 if { (eval echo "$as_me:6561: \"$ac_link\"") >&5
6562   (eval $ac_link) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); } &&
6566          { ac_try='test -s conftest$ac_exeext'
6567   { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572   eval "$as_ac_var=yes"
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 eval "$as_ac_var=no"
6577 fi
6578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6579 fi
6580 echo "$as_me:6580: result: `eval echo '${'$as_ac_var'}'`" >&5
6581 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6582 if test `eval echo '${'$as_ac_var'}'` = yes; then
6583   cat >>confdefs.h <<EOF
6584 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6585 EOF
6586
6587 fi
6588 done
6589
6590 if test "$cross_compiling" = yes ; then
6591
6592 for ac_func in \
6593                 link \
6594                 symlink
6595 do
6596 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6597 echo "$as_me:6597: checking for $ac_func" >&5
6598 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6599 if eval "test \"\${$as_ac_var+set}\" = set"; then
6600   echo $ECHO_N "(cached) $ECHO_C" >&6
6601 else
6602   cat >conftest.$ac_ext <<_ACEOF
6603 #line 6603 "configure"
6604 #include "confdefs.h"
6605 /* System header to define __stub macros and hopefully few prototypes,
6606     which can conflict with char $ac_func (); below.  */
6607 #include <assert.h>
6608 /* Override any gcc2 internal prototype to avoid an error.  */
6609 #ifdef __cplusplus
6610 extern "C"
6611 #endif
6612 /* We use char because int might match the return type of a gcc2
6613    builtin and then its argument prototype would still apply.  */
6614 char $ac_func ();
6615 char (*f) ();
6616
6617 int
6618 main ()
6619 {
6620 /* The GNU C library defines this for functions which it implements
6621     to always fail with ENOSYS.  Some functions are actually named
6622     something starting with __ and the normal name is an alias.  */
6623 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6624 choke me
6625 #else
6626 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6627 #endif
6628
6629   ;
6630   return 0;
6631 }
6632 _ACEOF
6633 rm -f conftest.$ac_objext conftest$ac_exeext
6634 if { (eval echo "$as_me:6634: \"$ac_link\"") >&5
6635   (eval $ac_link) 2>&5
6636   ac_status=$?
6637   echo "$as_me:6637: \$? = $ac_status" >&5
6638   (exit $ac_status); } &&
6639          { ac_try='test -s conftest$ac_exeext'
6640   { (eval echo "$as_me:6640: \"$ac_try\"") >&5
6641   (eval $ac_try) 2>&5
6642   ac_status=$?
6643   echo "$as_me:6643: \$? = $ac_status" >&5
6644   (exit $ac_status); }; }; then
6645   eval "$as_ac_var=yes"
6646 else
6647   echo "$as_me: failed program was:" >&5
6648 cat conftest.$ac_ext >&5
6649 eval "$as_ac_var=no"
6650 fi
6651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6652 fi
6653 echo "$as_me:6653: result: `eval echo '${'$as_ac_var'}'`" >&5
6654 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6655 if test `eval echo '${'$as_ac_var'}'` = yes; then
6656   cat >>confdefs.h <<EOF
6657 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6658 EOF
6659
6660 fi
6661 done
6662
6663 else
6664         echo "$as_me:6664: checking if link/symlink functions work" >&5
6665 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6666 if test "${cf_cv_link_funcs+set}" = set; then
6667   echo $ECHO_N "(cached) $ECHO_C" >&6
6668 else
6669
6670                 cf_cv_link_funcs=
6671                 for cf_func in link symlink ; do
6672                         if test "$cross_compiling" = yes; then
6673
6674                         eval 'ac_cv_func_'$cf_func'=error'
6675 else
6676   cat >conftest.$ac_ext <<_ACEOF
6677 #line 6677 "configure"
6678 #include "confdefs.h"
6679
6680 #include <sys/types.h>
6681 #include <sys/stat.h>
6682 #ifdef HAVE_UNISTD_H
6683 #include <unistd.h>
6684 #endif
6685 int main()
6686 {
6687         int fail = 0;
6688         char *src = "config.log";
6689         char *dst = "conftest.chk";
6690         struct stat src_sb;
6691         struct stat dst_sb;
6692
6693         stat(src, &src_sb);
6694         fail = ($cf_func("config.log", "conftest.chk") < 0)
6695             || (stat(dst, &dst_sb) < 0)
6696             || (dst_sb.st_mtime != src_sb.st_mtime);
6697 #ifdef HAVE_UNLINK
6698         unlink(dst);
6699 #else
6700         remove(dst);
6701 #endif
6702         ${cf_cv_main_return:-return} (fail);
6703 }
6704
6705 _ACEOF
6706 rm -f conftest$ac_exeext
6707 if { (eval echo "$as_me:6707: \"$ac_link\"") >&5
6708   (eval $ac_link) 2>&5
6709   ac_status=$?
6710   echo "$as_me:6710: \$? = $ac_status" >&5
6711   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6712   { (eval echo "$as_me:6712: \"$ac_try\"") >&5
6713   (eval $ac_try) 2>&5
6714   ac_status=$?
6715   echo "$as_me:6715: \$? = $ac_status" >&5
6716   (exit $ac_status); }; }; then
6717
6718                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6719                         eval 'ac_cv_func_'$cf_func'=yes'
6720 else
6721   echo "$as_me: program exited with status $ac_status" >&5
6722 echo "$as_me: failed program was:" >&5
6723 cat conftest.$ac_ext >&5
6724
6725                         eval 'ac_cv_func_'$cf_func'=no'
6726 fi
6727 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6728 fi
6729                 done
6730                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6731
6732 fi
6733 echo "$as_me:6733: result: $cf_cv_link_funcs" >&5
6734 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6735         test "$ac_cv_func_link"    = yes &&
6736 cat >>confdefs.h <<\EOF
6737 #define HAVE_LINK 1
6738 EOF
6739
6740         test "$ac_cv_func_symlink" = yes &&
6741 cat >>confdefs.h <<\EOF
6742 #define HAVE_SYMLINK 1
6743 EOF
6744
6745 fi
6746
6747 with_links=no
6748 with_symlinks=no
6749
6750 # soft links (symbolic links) are useful for some systems where hard links do
6751 # not work, or to make it simpler to copy terminfo trees around.
6752 if test "x$ac_cv_func_symlink" = xyes ; then
6753     echo "$as_me:6753: checking if tic should use symbolic links" >&5
6754 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6755
6756 # Check whether --enable-symlinks or --disable-symlinks was given.
6757 if test "${enable_symlinks+set}" = set; then
6758   enableval="$enable_symlinks"
6759   with_symlinks=$enableval
6760 else
6761   with_symlinks=no
6762 fi;
6763     echo "$as_me:6763: result: $with_symlinks" >&5
6764 echo "${ECHO_T}$with_symlinks" >&6
6765 fi
6766
6767 # If we have hard links and did not choose to use soft links instead, there is
6768 # no reason to make this choice optional - use the hard links.
6769 if test "$with_symlinks" = no ; then
6770     echo "$as_me:6770: checking if tic should use hard links" >&5
6771 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6772     if test "x$ac_cv_func_link" = xyes ; then
6773         with_links=yes
6774     else
6775         with_links=no
6776     fi
6777     echo "$as_me:6777: result: $with_links" >&5
6778 echo "${ECHO_T}$with_links" >&6
6779 fi
6780
6781 test "x$with_links" = xyes &&
6782 cat >>confdefs.h <<\EOF
6783 #define USE_LINKS 1
6784 EOF
6785
6786 test "x$with_symlinks" = xyes &&
6787 cat >>confdefs.h <<\EOF
6788 #define USE_SYMLINKS 1
6789 EOF
6790
6791 ###   use option --enable-broken-linker to force on use of broken-linker support
6792 echo "$as_me:6792: checking if you want broken-linker support code" >&5
6793 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6794
6795 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6796 if test "${enable_broken_linker+set}" = set; then
6797   enableval="$enable_broken_linker"
6798   with_broken_linker=$enableval
6799 else
6800   with_broken_linker=${BROKEN_LINKER:-no}
6801 fi;
6802 echo "$as_me:6802: result: $with_broken_linker" >&5
6803 echo "${ECHO_T}$with_broken_linker" >&6
6804
6805 BROKEN_LINKER=0
6806 if test "x$with_broken_linker" = xyes ; then
6807
6808 cat >>confdefs.h <<\EOF
6809 #define BROKEN_LINKER 1
6810 EOF
6811
6812         BROKEN_LINKER=1
6813 elif test "$DFT_LWR_MODEL" = shared ; then
6814         case $cf_cv_system_name in #(vi
6815         cygwin*)
6816
6817 cat >>confdefs.h <<\EOF
6818 #define BROKEN_LINKER 1
6819 EOF
6820
6821                 BROKEN_LINKER=1
6822                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6823
6824 echo "${as_me:-configure}:6824: testing cygwin linker is broken anyway ..." 1>&5
6825
6826                 ;;
6827         esac
6828 fi
6829
6830 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6831 echo "$as_me:6831: checking if tputs should process BSD-style prefix padding" >&5
6832 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6833
6834 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6835 if test "${enable_bsdpad+set}" = set; then
6836   enableval="$enable_bsdpad"
6837   with_bsdpad=$enableval
6838 else
6839   with_bsdpad=no
6840 fi;
6841 echo "$as_me:6841: result: $with_bsdpad" >&5
6842 echo "${ECHO_T}$with_bsdpad" >&6
6843 test "x$with_bsdpad" = xyes &&
6844 cat >>confdefs.h <<\EOF
6845 #define BSD_TPUTS 1
6846 EOF
6847
6848 ###   use option --enable-widec to turn on use of wide-character support
6849 NCURSES_CH_T=chtype
6850 NCURSES_LIBUTF8=0
6851
6852 NEED_WCHAR_H=0
6853 NCURSES_MBSTATE_T=0
6854 NCURSES_WCHAR_T=0
6855 NCURSES_WINT_T=0
6856
6857 # Check to define _XOPEN_SOURCE "automatically"
6858
6859 cf_XOPEN_SOURCE=500
6860 cf_POSIX_C_SOURCE=199506L
6861 cf_xopen_source=
6862
6863 case $host_os in #(vi
6864 aix[4-7]*) #(vi
6865         cf_xopen_source="-D_ALL_SOURCE"
6866         ;;
6867 cygwin) #(vi
6868         cf_XOPEN_SOURCE=600
6869         ;;
6870 darwin[0-8].*) #(vi
6871         cf_xopen_source="-D_APPLE_C_SOURCE"
6872         ;;
6873 darwin*) #(vi
6874         cf_xopen_source="-D_DARWIN_C_SOURCE"
6875         cf_XOPEN_SOURCE=
6876         ;;
6877 freebsd*|dragonfly*) #(vi
6878         # 5.x headers associate
6879         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6880         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6881         cf_POSIX_C_SOURCE=200112L
6882         cf_XOPEN_SOURCE=600
6883         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6884         ;;
6885 hpux11*) #(vi
6886         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6887         ;;
6888 hpux*) #(vi
6889         cf_xopen_source="-D_HPUX_SOURCE"
6890         ;;
6891 irix[56].*) #(vi
6892         cf_xopen_source="-D_SGI_SOURCE"
6893         cf_XOPEN_SOURCE=
6894         ;;
6895 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6896
6897 echo "$as_me:6897: checking if we must define _GNU_SOURCE" >&5
6898 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6899 if test "${cf_cv_gnu_source+set}" = set; then
6900   echo $ECHO_N "(cached) $ECHO_C" >&6
6901 else
6902
6903 cat >conftest.$ac_ext <<_ACEOF
6904 #line 6904 "configure"
6905 #include "confdefs.h"
6906 #include <sys/types.h>
6907 int
6908 main ()
6909 {
6910
6911 #ifndef _XOPEN_SOURCE
6912 make an error
6913 #endif
6914   ;
6915   return 0;
6916 }
6917 _ACEOF
6918 rm -f conftest.$ac_objext
6919 if { (eval echo "$as_me:6919: \"$ac_compile\"") >&5
6920   (eval $ac_compile) 2>&5
6921   ac_status=$?
6922   echo "$as_me:6922: \$? = $ac_status" >&5
6923   (exit $ac_status); } &&
6924          { ac_try='test -s conftest.$ac_objext'
6925   { (eval echo "$as_me:6925: \"$ac_try\"") >&5
6926   (eval $ac_try) 2>&5
6927   ac_status=$?
6928   echo "$as_me:6928: \$? = $ac_status" >&5
6929   (exit $ac_status); }; }; then
6930   cf_cv_gnu_source=no
6931 else
6932   echo "$as_me: failed program was:" >&5
6933 cat conftest.$ac_ext >&5
6934 cf_save="$CPPFLAGS"
6935          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6936          cat >conftest.$ac_ext <<_ACEOF
6937 #line 6937 "configure"
6938 #include "confdefs.h"
6939 #include <sys/types.h>
6940 int
6941 main ()
6942 {
6943
6944 #ifdef _XOPEN_SOURCE
6945 make an error
6946 #endif
6947   ;
6948   return 0;
6949 }
6950 _ACEOF
6951 rm -f conftest.$ac_objext
6952 if { (eval echo "$as_me:6952: \"$ac_compile\"") >&5
6953   (eval $ac_compile) 2>&5
6954   ac_status=$?
6955   echo "$as_me:6955: \$? = $ac_status" >&5
6956   (exit $ac_status); } &&
6957          { ac_try='test -s conftest.$ac_objext'
6958   { (eval echo "$as_me:6958: \"$ac_try\"") >&5
6959   (eval $ac_try) 2>&5
6960   ac_status=$?
6961   echo "$as_me:6961: \$? = $ac_status" >&5
6962   (exit $ac_status); }; }; then
6963   cf_cv_gnu_source=no
6964 else
6965   echo "$as_me: failed program was:" >&5
6966 cat conftest.$ac_ext >&5
6967 cf_cv_gnu_source=yes
6968 fi
6969 rm -f conftest.$ac_objext conftest.$ac_ext
6970         CPPFLAGS="$cf_save"
6971
6972 fi
6973 rm -f conftest.$ac_objext conftest.$ac_ext
6974
6975 fi
6976 echo "$as_me:6976: result: $cf_cv_gnu_source" >&5
6977 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6978 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6979
6980         ;;
6981 mirbsd*) #(vi
6982         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
6983         cf_XOPEN_SOURCE=
6984
6985 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6986
6987 cf_save_CFLAGS="$CFLAGS"
6988 cf_save_CPPFLAGS="$CPPFLAGS"
6989
6990 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6991         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6992                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6993
6994 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6995         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6996                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6997
6998 echo "$as_me:6998: checking if we should define _POSIX_C_SOURCE" >&5
6999 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7000 if test "${cf_cv_posix_c_source+set}" = set; then
7001   echo $ECHO_N "(cached) $ECHO_C" >&6
7002 else
7003
7004 echo "${as_me:-configure}:7004: testing if the symbol is already defined go no further ..." 1>&5
7005
7006         cat >conftest.$ac_ext <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7009 #include <sys/types.h>
7010 int
7011 main ()
7012 {
7013
7014 #ifndef _POSIX_C_SOURCE
7015 make an error
7016 #endif
7017   ;
7018   return 0;
7019 }
7020 _ACEOF
7021 rm -f conftest.$ac_objext
7022 if { (eval echo "$as_me:7022: \"$ac_compile\"") >&5
7023   (eval $ac_compile) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); } &&
7027          { ac_try='test -s conftest.$ac_objext'
7028   { (eval echo "$as_me:7028: \"$ac_try\"") >&5
7029   (eval $ac_try) 2>&5
7030   ac_status=$?
7031   echo "$as_me:7031: \$? = $ac_status" >&5
7032   (exit $ac_status); }; }; then
7033   cf_cv_posix_c_source=no
7034 else
7035   echo "$as_me: failed program was:" >&5
7036 cat conftest.$ac_ext >&5
7037 cf_want_posix_source=no
7038          case .$cf_POSIX_C_SOURCE in #(vi
7039          .[12]??*) #(vi
7040                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7041                 ;;
7042          .2) #(vi
7043                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7044                 cf_want_posix_source=yes
7045                 ;;
7046          .*)
7047                 cf_want_posix_source=yes
7048                 ;;
7049          esac
7050          if test "$cf_want_posix_source" = yes ; then
7051                 cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 #include <sys/types.h>
7055 int
7056 main ()
7057 {
7058
7059 #ifdef _POSIX_SOURCE
7060 make an error
7061 #endif
7062   ;
7063   return 0;
7064 }
7065 _ACEOF
7066 rm -f conftest.$ac_objext
7067 if { (eval echo "$as_me:7067: \"$ac_compile\"") >&5
7068   (eval $ac_compile) 2>&5
7069   ac_status=$?
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit $ac_status); } &&
7072          { ac_try='test -s conftest.$ac_objext'
7073   { (eval echo "$as_me:7073: \"$ac_try\"") >&5
7074   (eval $ac_try) 2>&5
7075   ac_status=$?
7076   echo "$as_me:7076: \$? = $ac_status" >&5
7077   (exit $ac_status); }; }; then
7078   :
7079 else
7080   echo "$as_me: failed program was:" >&5
7081 cat conftest.$ac_ext >&5
7082 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7083 fi
7084 rm -f conftest.$ac_objext conftest.$ac_ext
7085          fi
7086
7087 echo "${as_me:-configure}:7087: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7088
7089          CFLAGS="$cf_trim_CFLAGS"
7090          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7091
7092 echo "${as_me:-configure}:7092: testing if the second compile does not leave our definition intact error ..." 1>&5
7093
7094          cat >conftest.$ac_ext <<_ACEOF
7095 #line 7095 "configure"
7096 #include "confdefs.h"
7097 #include <sys/types.h>
7098 int
7099 main ()
7100 {
7101
7102 #ifndef _POSIX_C_SOURCE
7103 make an error
7104 #endif
7105   ;
7106   return 0;
7107 }
7108 _ACEOF
7109 rm -f conftest.$ac_objext
7110 if { (eval echo "$as_me:7110: \"$ac_compile\"") >&5
7111   (eval $ac_compile) 2>&5
7112   ac_status=$?
7113   echo "$as_me:7113: \$? = $ac_status" >&5
7114   (exit $ac_status); } &&
7115          { ac_try='test -s conftest.$ac_objext'
7116   { (eval echo "$as_me:7116: \"$ac_try\"") >&5
7117   (eval $ac_try) 2>&5
7118   ac_status=$?
7119   echo "$as_me:7119: \$? = $ac_status" >&5
7120   (exit $ac_status); }; }; then
7121   :
7122 else
7123   echo "$as_me: failed program was:" >&5
7124 cat conftest.$ac_ext >&5
7125 cf_cv_posix_c_source=no
7126 fi
7127 rm -f conftest.$ac_objext conftest.$ac_ext
7128          CFLAGS="$cf_save_CFLAGS"
7129          CPPFLAGS="$cf_save_CPPFLAGS"
7130
7131 fi
7132 rm -f conftest.$ac_objext conftest.$ac_ext
7133
7134 fi
7135 echo "$as_me:7135: result: $cf_cv_posix_c_source" >&5
7136 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7137
7138 if test "$cf_cv_posix_c_source" != no ; then
7139         CFLAGS="$cf_trim_CFLAGS"
7140         CPPFLAGS="$cf_trim_CPPFLAGS"
7141
7142 cf_fix_cppflags=no
7143 cf_new_cflags=
7144 cf_new_cppflags=
7145 cf_new_extra_cppflags=
7146
7147 for cf_add_cflags in $cf_cv_posix_c_source
7148 do
7149 case $cf_fix_cppflags in
7150 no)
7151         case $cf_add_cflags in #(vi
7152         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7153                 case $cf_add_cflags in
7154                 -D*)
7155                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7156
7157                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7158                                 && test -z "${cf_tst_cflags}" \
7159                                 && cf_fix_cppflags=yes
7160
7161                         if test $cf_fix_cppflags = yes ; then
7162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7163                                 continue
7164                         elif test "${cf_tst_cflags}" = "\"'" ; then
7165                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7166                                 continue
7167                         fi
7168                         ;;
7169                 esac
7170                 case "$CPPFLAGS" in
7171                 *$cf_add_cflags) #(vi
7172                         ;;
7173                 *) #(vi
7174                         case $cf_add_cflags in #(vi
7175                         -D*)
7176                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7177
7178 CPPFLAGS=`echo "$CPPFLAGS" | \
7179         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7180                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7181
7182                                 ;;
7183                         esac
7184                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7185                         ;;
7186                 esac
7187                 ;;
7188         *)
7189                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7190                 ;;
7191         esac
7192         ;;
7193 yes)
7194         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7195
7196         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7197
7198         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7199                 && test -z "${cf_tst_cflags}" \
7200                 && cf_fix_cppflags=no
7201         ;;
7202 esac
7203 done
7204
7205 if test -n "$cf_new_cflags" ; then
7206
7207         CFLAGS="$CFLAGS $cf_new_cflags"
7208 fi
7209
7210 if test -n "$cf_new_cppflags" ; then
7211
7212         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7213 fi
7214
7215 if test -n "$cf_new_extra_cppflags" ; then
7216
7217         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7218 fi
7219
7220 fi
7221
7222         ;;
7223 netbsd*) #(vi
7224         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7225         ;;
7226 openbsd[4-9]*) #(vi
7227         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7228         cf_xopen_source="-D_BSD_SOURCE"
7229         cf_XOPEN_SOURCE=600
7230         ;;
7231 openbsd*) #(vi
7232         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7233         ;;
7234 osf[45]*) #(vi
7235         cf_xopen_source="-D_OSF_SOURCE"
7236         ;;
7237 nto-qnx*) #(vi
7238         cf_xopen_source="-D_QNX_SOURCE"
7239         ;;
7240 sco*) #(vi
7241         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7242         ;;
7243 solaris2.*) #(vi
7244         cf_xopen_source="-D__EXTENSIONS__"
7245         ;;
7246 *)
7247
7248 echo "$as_me:7248: checking if we should define _XOPEN_SOURCE" >&5
7249 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7250 if test "${cf_cv_xopen_source+set}" = set; then
7251   echo $ECHO_N "(cached) $ECHO_C" >&6
7252 else
7253
7254         cat >conftest.$ac_ext <<_ACEOF
7255 #line 7255 "configure"
7256 #include "confdefs.h"
7257
7258 #include <stdlib.h>
7259 #include <string.h>
7260 #include <sys/types.h>
7261
7262 int
7263 main ()
7264 {
7265
7266 #ifndef _XOPEN_SOURCE
7267 make an error
7268 #endif
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 rm -f conftest.$ac_objext
7274 if { (eval echo "$as_me:7274: \"$ac_compile\"") >&5
7275   (eval $ac_compile) 2>&5
7276   ac_status=$?
7277   echo "$as_me:7277: \$? = $ac_status" >&5
7278   (exit $ac_status); } &&
7279          { ac_try='test -s conftest.$ac_objext'
7280   { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281   (eval $ac_try) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit $ac_status); }; }; then
7285   cf_cv_xopen_source=no
7286 else
7287   echo "$as_me: failed program was:" >&5
7288 cat conftest.$ac_ext >&5
7289 cf_save="$CPPFLAGS"
7290          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7291          cat >conftest.$ac_ext <<_ACEOF
7292 #line 7292 "configure"
7293 #include "confdefs.h"
7294
7295 #include <stdlib.h>
7296 #include <string.h>
7297 #include <sys/types.h>
7298
7299 int
7300 main ()
7301 {
7302
7303 #ifdef _XOPEN_SOURCE
7304 make an error
7305 #endif
7306   ;
7307   return 0;
7308 }
7309 _ACEOF
7310 rm -f conftest.$ac_objext
7311 if { (eval echo "$as_me:7311: \"$ac_compile\"") >&5
7312   (eval $ac_compile) 2>&5
7313   ac_status=$?
7314   echo "$as_me:7314: \$? = $ac_status" >&5
7315   (exit $ac_status); } &&
7316          { ac_try='test -s conftest.$ac_objext'
7317   { (eval echo "$as_me:7317: \"$ac_try\"") >&5
7318   (eval $ac_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); }; }; then
7322   cf_cv_xopen_source=no
7323 else
7324   echo "$as_me: failed program was:" >&5
7325 cat conftest.$ac_ext >&5
7326 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7327 fi
7328 rm -f conftest.$ac_objext conftest.$ac_ext
7329         CPPFLAGS="$cf_save"
7330
7331 fi
7332 rm -f conftest.$ac_objext conftest.$ac_ext
7333
7334 fi
7335 echo "$as_me:7335: result: $cf_cv_xopen_source" >&5
7336 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7337
7338 if test "$cf_cv_xopen_source" != no ; then
7339
7340 CFLAGS=`echo "$CFLAGS" | \
7341         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7342                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7343
7344 CPPFLAGS=`echo "$CPPFLAGS" | \
7345         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7346                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7347
7348         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7349
7350 cf_fix_cppflags=no
7351 cf_new_cflags=
7352 cf_new_cppflags=
7353 cf_new_extra_cppflags=
7354
7355 for cf_add_cflags in $cf_temp_xopen_source
7356 do
7357 case $cf_fix_cppflags in
7358 no)
7359         case $cf_add_cflags in #(vi
7360         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7361                 case $cf_add_cflags in
7362                 -D*)
7363                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7364
7365                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7366                                 && test -z "${cf_tst_cflags}" \
7367                                 && cf_fix_cppflags=yes
7368
7369                         if test $cf_fix_cppflags = yes ; then
7370                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7371                                 continue
7372                         elif test "${cf_tst_cflags}" = "\"'" ; then
7373                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7374                                 continue
7375                         fi
7376                         ;;
7377                 esac
7378                 case "$CPPFLAGS" in
7379                 *$cf_add_cflags) #(vi
7380                         ;;
7381                 *) #(vi
7382                         case $cf_add_cflags in #(vi
7383                         -D*)
7384                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7385
7386 CPPFLAGS=`echo "$CPPFLAGS" | \
7387         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7388                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7389
7390                                 ;;
7391                         esac
7392                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7393                         ;;
7394                 esac
7395                 ;;
7396         *)
7397                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7398                 ;;
7399         esac
7400         ;;
7401 yes)
7402         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7403
7404         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7405
7406         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7407                 && test -z "${cf_tst_cflags}" \
7408                 && cf_fix_cppflags=no
7409         ;;
7410 esac
7411 done
7412
7413 if test -n "$cf_new_cflags" ; then
7414
7415         CFLAGS="$CFLAGS $cf_new_cflags"
7416 fi
7417
7418 if test -n "$cf_new_cppflags" ; then
7419
7420         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7421 fi
7422
7423 if test -n "$cf_new_extra_cppflags" ; then
7424
7425         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7426 fi
7427
7428 fi
7429
7430 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7431
7432 cf_save_CFLAGS="$CFLAGS"
7433 cf_save_CPPFLAGS="$CPPFLAGS"
7434
7435 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7436         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7437                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7438
7439 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7440         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7441                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7442
7443 echo "$as_me:7443: checking if we should define _POSIX_C_SOURCE" >&5
7444 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7445 if test "${cf_cv_posix_c_source+set}" = set; then
7446   echo $ECHO_N "(cached) $ECHO_C" >&6
7447 else
7448
7449 echo "${as_me:-configure}:7449: testing if the symbol is already defined go no further ..." 1>&5
7450
7451         cat >conftest.$ac_ext <<_ACEOF
7452 #line 7452 "configure"
7453 #include "confdefs.h"
7454 #include <sys/types.h>
7455 int
7456 main ()
7457 {
7458
7459 #ifndef _POSIX_C_SOURCE
7460 make an error
7461 #endif
7462   ;
7463   return 0;
7464 }
7465 _ACEOF
7466 rm -f conftest.$ac_objext
7467 if { (eval echo "$as_me:7467: \"$ac_compile\"") >&5
7468   (eval $ac_compile) 2>&5
7469   ac_status=$?
7470   echo "$as_me:7470: \$? = $ac_status" >&5
7471   (exit $ac_status); } &&
7472          { ac_try='test -s conftest.$ac_objext'
7473   { (eval echo "$as_me:7473: \"$ac_try\"") >&5
7474   (eval $ac_try) 2>&5
7475   ac_status=$?
7476   echo "$as_me:7476: \$? = $ac_status" >&5
7477   (exit $ac_status); }; }; then
7478   cf_cv_posix_c_source=no
7479 else
7480   echo "$as_me: failed program was:" >&5
7481 cat conftest.$ac_ext >&5
7482 cf_want_posix_source=no
7483          case .$cf_POSIX_C_SOURCE in #(vi
7484          .[12]??*) #(vi
7485                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7486                 ;;
7487          .2) #(vi
7488                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7489                 cf_want_posix_source=yes
7490                 ;;
7491          .*)
7492                 cf_want_posix_source=yes
7493                 ;;
7494          esac
7495          if test "$cf_want_posix_source" = yes ; then
7496                 cat >conftest.$ac_ext <<_ACEOF
7497 #line 7497 "configure"
7498 #include "confdefs.h"
7499 #include <sys/types.h>
7500 int
7501 main ()
7502 {
7503
7504 #ifdef _POSIX_SOURCE
7505 make an error
7506 #endif
7507   ;
7508   return 0;
7509 }
7510 _ACEOF
7511 rm -f conftest.$ac_objext
7512 if { (eval echo "$as_me:7512: \"$ac_compile\"") >&5
7513   (eval $ac_compile) 2>&5
7514   ac_status=$?
7515   echo "$as_me:7515: \$? = $ac_status" >&5
7516   (exit $ac_status); } &&
7517          { ac_try='test -s conftest.$ac_objext'
7518   { (eval echo "$as_me:7518: \"$ac_try\"") >&5
7519   (eval $ac_try) 2>&5
7520   ac_status=$?
7521   echo "$as_me:7521: \$? = $ac_status" >&5
7522   (exit $ac_status); }; }; then
7523   :
7524 else
7525   echo "$as_me: failed program was:" >&5
7526 cat conftest.$ac_ext >&5
7527 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7528 fi
7529 rm -f conftest.$ac_objext conftest.$ac_ext
7530          fi
7531
7532 echo "${as_me:-configure}:7532: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7533
7534          CFLAGS="$cf_trim_CFLAGS"
7535          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7536
7537 echo "${as_me:-configure}:7537: testing if the second compile does not leave our definition intact error ..." 1>&5
7538
7539          cat >conftest.$ac_ext <<_ACEOF
7540 #line 7540 "configure"
7541 #include "confdefs.h"
7542 #include <sys/types.h>
7543 int
7544 main ()
7545 {
7546
7547 #ifndef _POSIX_C_SOURCE
7548 make an error
7549 #endif
7550   ;
7551   return 0;
7552 }
7553 _ACEOF
7554 rm -f conftest.$ac_objext
7555 if { (eval echo "$as_me:7555: \"$ac_compile\"") >&5
7556   (eval $ac_compile) 2>&5
7557   ac_status=$?
7558   echo "$as_me:7558: \$? = $ac_status" >&5
7559   (exit $ac_status); } &&
7560          { ac_try='test -s conftest.$ac_objext'
7561   { (eval echo "$as_me:7561: \"$ac_try\"") >&5
7562   (eval $ac_try) 2>&5
7563   ac_status=$?
7564   echo "$as_me:7564: \$? = $ac_status" >&5
7565   (exit $ac_status); }; }; then
7566   :
7567 else
7568   echo "$as_me: failed program was:" >&5
7569 cat conftest.$ac_ext >&5
7570 cf_cv_posix_c_source=no
7571 fi
7572 rm -f conftest.$ac_objext conftest.$ac_ext
7573          CFLAGS="$cf_save_CFLAGS"
7574          CPPFLAGS="$cf_save_CPPFLAGS"
7575
7576 fi
7577 rm -f conftest.$ac_objext conftest.$ac_ext
7578
7579 fi
7580 echo "$as_me:7580: result: $cf_cv_posix_c_source" >&5
7581 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7582
7583 if test "$cf_cv_posix_c_source" != no ; then
7584         CFLAGS="$cf_trim_CFLAGS"
7585         CPPFLAGS="$cf_trim_CPPFLAGS"
7586
7587 cf_fix_cppflags=no
7588 cf_new_cflags=
7589 cf_new_cppflags=
7590 cf_new_extra_cppflags=
7591
7592 for cf_add_cflags in $cf_cv_posix_c_source
7593 do
7594 case $cf_fix_cppflags in
7595 no)
7596         case $cf_add_cflags in #(vi
7597         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7598                 case $cf_add_cflags in
7599                 -D*)
7600                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7601
7602                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7603                                 && test -z "${cf_tst_cflags}" \
7604                                 && cf_fix_cppflags=yes
7605
7606                         if test $cf_fix_cppflags = yes ; then
7607                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7608                                 continue
7609                         elif test "${cf_tst_cflags}" = "\"'" ; then
7610                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7611                                 continue
7612                         fi
7613                         ;;
7614                 esac
7615                 case "$CPPFLAGS" in
7616                 *$cf_add_cflags) #(vi
7617                         ;;
7618                 *) #(vi
7619                         case $cf_add_cflags in #(vi
7620                         -D*)
7621                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7622
7623 CPPFLAGS=`echo "$CPPFLAGS" | \
7624         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7625                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7626
7627                                 ;;
7628                         esac
7629                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7630                         ;;
7631                 esac
7632                 ;;
7633         *)
7634                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7635                 ;;
7636         esac
7637         ;;
7638 yes)
7639         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7640
7641         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7642
7643         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7644                 && test -z "${cf_tst_cflags}" \
7645                 && cf_fix_cppflags=no
7646         ;;
7647 esac
7648 done
7649
7650 if test -n "$cf_new_cflags" ; then
7651
7652         CFLAGS="$CFLAGS $cf_new_cflags"
7653 fi
7654
7655 if test -n "$cf_new_cppflags" ; then
7656
7657         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7658 fi
7659
7660 if test -n "$cf_new_extra_cppflags" ; then
7661
7662         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7663 fi
7664
7665 fi
7666
7667         ;;
7668 esac
7669
7670 if test -n "$cf_xopen_source" ; then
7671
7672 cf_fix_cppflags=no
7673 cf_new_cflags=
7674 cf_new_cppflags=
7675 cf_new_extra_cppflags=
7676
7677 for cf_add_cflags in $cf_xopen_source
7678 do
7679 case $cf_fix_cppflags in
7680 no)
7681         case $cf_add_cflags in #(vi
7682         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7683                 case $cf_add_cflags in
7684                 -D*)
7685                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7686
7687                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7688                                 && test -z "${cf_tst_cflags}" \
7689                                 && cf_fix_cppflags=yes
7690
7691                         if test $cf_fix_cppflags = yes ; then
7692                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7693                                 continue
7694                         elif test "${cf_tst_cflags}" = "\"'" ; then
7695                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7696                                 continue
7697                         fi
7698                         ;;
7699                 esac
7700                 case "$CPPFLAGS" in
7701                 *$cf_add_cflags) #(vi
7702                         ;;
7703                 *) #(vi
7704                         case $cf_add_cflags in #(vi
7705                         -D*)
7706                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7707
7708 CPPFLAGS=`echo "$CPPFLAGS" | \
7709         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7710                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7711
7712                                 ;;
7713                         esac
7714                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7715                         ;;
7716                 esac
7717                 ;;
7718         *)
7719                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7720                 ;;
7721         esac
7722         ;;
7723 yes)
7724         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7725
7726         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7727
7728         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7729                 && test -z "${cf_tst_cflags}" \
7730                 && cf_fix_cppflags=no
7731         ;;
7732 esac
7733 done
7734
7735 if test -n "$cf_new_cflags" ; then
7736
7737         CFLAGS="$CFLAGS $cf_new_cflags"
7738 fi
7739
7740 if test -n "$cf_new_cppflags" ; then
7741
7742         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7743 fi
7744
7745 if test -n "$cf_new_extra_cppflags" ; then
7746
7747         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7748 fi
7749
7750 fi
7751
7752 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7753         echo "$as_me:7753: checking if _XOPEN_SOURCE really is set" >&5
7754 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7755         cat >conftest.$ac_ext <<_ACEOF
7756 #line 7756 "configure"
7757 #include "confdefs.h"
7758 #include <stdlib.h>
7759 int
7760 main ()
7761 {
7762
7763 #ifndef _XOPEN_SOURCE
7764 make an error
7765 #endif
7766   ;
7767   return 0;
7768 }
7769 _ACEOF
7770 rm -f conftest.$ac_objext
7771 if { (eval echo "$as_me:7771: \"$ac_compile\"") >&5
7772   (eval $ac_compile) 2>&5
7773   ac_status=$?
7774   echo "$as_me:7774: \$? = $ac_status" >&5
7775   (exit $ac_status); } &&
7776          { ac_try='test -s conftest.$ac_objext'
7777   { (eval echo "$as_me:7777: \"$ac_try\"") >&5
7778   (eval $ac_try) 2>&5
7779   ac_status=$?
7780   echo "$as_me:7780: \$? = $ac_status" >&5
7781   (exit $ac_status); }; }; then
7782   cf_XOPEN_SOURCE_set=yes
7783 else
7784   echo "$as_me: failed program was:" >&5
7785 cat conftest.$ac_ext >&5
7786 cf_XOPEN_SOURCE_set=no
7787 fi
7788 rm -f conftest.$ac_objext conftest.$ac_ext
7789         echo "$as_me:7789: result: $cf_XOPEN_SOURCE_set" >&5
7790 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7791         if test $cf_XOPEN_SOURCE_set = yes
7792         then
7793                 cat >conftest.$ac_ext <<_ACEOF
7794 #line 7794 "configure"
7795 #include "confdefs.h"
7796 #include <stdlib.h>
7797 int
7798 main ()
7799 {
7800
7801 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7802 make an error
7803 #endif
7804   ;
7805   return 0;
7806 }
7807 _ACEOF
7808 rm -f conftest.$ac_objext
7809 if { (eval echo "$as_me:7809: \"$ac_compile\"") >&5
7810   (eval $ac_compile) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit $ac_status); } &&
7814          { ac_try='test -s conftest.$ac_objext'
7815   { (eval echo "$as_me:7815: \"$ac_try\"") >&5
7816   (eval $ac_try) 2>&5
7817   ac_status=$?
7818   echo "$as_me:7818: \$? = $ac_status" >&5
7819   (exit $ac_status); }; }; then
7820   cf_XOPEN_SOURCE_set_ok=yes
7821 else
7822   echo "$as_me: failed program was:" >&5
7823 cat conftest.$ac_ext >&5
7824 cf_XOPEN_SOURCE_set_ok=no
7825 fi
7826 rm -f conftest.$ac_objext conftest.$ac_ext
7827                 if test $cf_XOPEN_SOURCE_set_ok = no
7828                 then
7829                         { echo "$as_me:7829: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7830 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7831                 fi
7832         else
7833
7834 echo "$as_me:7834: checking if we should define _XOPEN_SOURCE" >&5
7835 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7836 if test "${cf_cv_xopen_source+set}" = set; then
7837   echo $ECHO_N "(cached) $ECHO_C" >&6
7838 else
7839
7840         cat >conftest.$ac_ext <<_ACEOF
7841 #line 7841 "configure"
7842 #include "confdefs.h"
7843
7844 #include <stdlib.h>
7845 #include <string.h>
7846 #include <sys/types.h>
7847
7848 int
7849 main ()
7850 {
7851
7852 #ifndef _XOPEN_SOURCE
7853 make an error
7854 #endif
7855   ;
7856   return 0;
7857 }
7858 _ACEOF
7859 rm -f conftest.$ac_objext
7860 if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
7861   (eval $ac_compile) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); } &&
7865          { ac_try='test -s conftest.$ac_objext'
7866   { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7867   (eval $ac_try) 2>&5
7868   ac_status=$?
7869   echo "$as_me:7869: \$? = $ac_status" >&5
7870   (exit $ac_status); }; }; then
7871   cf_cv_xopen_source=no
7872 else
7873   echo "$as_me: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 cf_save="$CPPFLAGS"
7876          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7877          cat >conftest.$ac_ext <<_ACEOF
7878 #line 7878 "configure"
7879 #include "confdefs.h"
7880
7881 #include <stdlib.h>
7882 #include <string.h>
7883 #include <sys/types.h>
7884
7885 int
7886 main ()
7887 {
7888
7889 #ifdef _XOPEN_SOURCE
7890 make an error
7891 #endif
7892   ;
7893   return 0;
7894 }
7895 _ACEOF
7896 rm -f conftest.$ac_objext
7897 if { (eval echo "$as_me:7897: \"$ac_compile\"") >&5
7898   (eval $ac_compile) 2>&5
7899   ac_status=$?
7900   echo "$as_me:7900: \$? = $ac_status" >&5
7901   (exit $ac_status); } &&
7902          { ac_try='test -s conftest.$ac_objext'
7903   { (eval echo "$as_me:7903: \"$ac_try\"") >&5
7904   (eval $ac_try) 2>&5
7905   ac_status=$?
7906   echo "$as_me:7906: \$? = $ac_status" >&5
7907   (exit $ac_status); }; }; then
7908   cf_cv_xopen_source=no
7909 else
7910   echo "$as_me: failed program was:" >&5
7911 cat conftest.$ac_ext >&5
7912 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7913 fi
7914 rm -f conftest.$ac_objext conftest.$ac_ext
7915         CPPFLAGS="$cf_save"
7916
7917 fi
7918 rm -f conftest.$ac_objext conftest.$ac_ext
7919
7920 fi
7921 echo "$as_me:7921: result: $cf_cv_xopen_source" >&5
7922 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7923
7924 if test "$cf_cv_xopen_source" != no ; then
7925
7926 CFLAGS=`echo "$CFLAGS" | \
7927         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7928                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7929
7930 CPPFLAGS=`echo "$CPPFLAGS" | \
7931         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7932                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7933
7934         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7935
7936 cf_fix_cppflags=no
7937 cf_new_cflags=
7938 cf_new_cppflags=
7939 cf_new_extra_cppflags=
7940
7941 for cf_add_cflags in $cf_temp_xopen_source
7942 do
7943 case $cf_fix_cppflags in
7944 no)
7945         case $cf_add_cflags in #(vi
7946         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7947                 case $cf_add_cflags in
7948                 -D*)
7949                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7950
7951                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7952                                 && test -z "${cf_tst_cflags}" \
7953                                 && cf_fix_cppflags=yes
7954
7955                         if test $cf_fix_cppflags = yes ; then
7956                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7957                                 continue
7958                         elif test "${cf_tst_cflags}" = "\"'" ; then
7959                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7960                                 continue
7961                         fi
7962                         ;;
7963                 esac
7964                 case "$CPPFLAGS" in
7965                 *$cf_add_cflags) #(vi
7966                         ;;
7967                 *) #(vi
7968                         case $cf_add_cflags in #(vi
7969                         -D*)
7970                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7971
7972 CPPFLAGS=`echo "$CPPFLAGS" | \
7973         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7974                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7975
7976                                 ;;
7977                         esac
7978                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7979                         ;;
7980                 esac
7981                 ;;
7982         *)
7983                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7984                 ;;
7985         esac
7986         ;;
7987 yes)
7988         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7989
7990         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7991
7992         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7993                 && test -z "${cf_tst_cflags}" \
7994                 && cf_fix_cppflags=no
7995         ;;
7996 esac
7997 done
7998
7999 if test -n "$cf_new_cflags" ; then
8000
8001         CFLAGS="$CFLAGS $cf_new_cflags"
8002 fi
8003
8004 if test -n "$cf_new_cppflags" ; then
8005
8006         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8007 fi
8008
8009 if test -n "$cf_new_extra_cppflags" ; then
8010
8011         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8012 fi
8013
8014 fi
8015
8016         fi
8017 fi
8018
8019 # Work around breakage on OS X
8020
8021 echo "$as_me:8021: checking if SIGWINCH is defined" >&5
8022 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8023 if test "${cf_cv_define_sigwinch+set}" = set; then
8024   echo $ECHO_N "(cached) $ECHO_C" >&6
8025 else
8026
8027         cat >conftest.$ac_ext <<_ACEOF
8028 #line 8028 "configure"
8029 #include "confdefs.h"
8030
8031 #include <sys/types.h>
8032 #include <sys/signal.h>
8033
8034 int
8035 main ()
8036 {
8037 int x = SIGWINCH
8038   ;
8039   return 0;
8040 }
8041 _ACEOF
8042 rm -f conftest.$ac_objext
8043 if { (eval echo "$as_me:8043: \"$ac_compile\"") >&5
8044   (eval $ac_compile) 2>&5
8045   ac_status=$?
8046   echo "$as_me:8046: \$? = $ac_status" >&5
8047   (exit $ac_status); } &&
8048          { ac_try='test -s conftest.$ac_objext'
8049   { (eval echo "$as_me:8049: \"$ac_try\"") >&5
8050   (eval $ac_try) 2>&5
8051   ac_status=$?
8052   echo "$as_me:8052: \$? = $ac_status" >&5
8053   (exit $ac_status); }; }; then
8054   cf_cv_define_sigwinch=yes
8055 else
8056   echo "$as_me: failed program was:" >&5
8057 cat conftest.$ac_ext >&5
8058 cat >conftest.$ac_ext <<_ACEOF
8059 #line 8059 "configure"
8060 #include "confdefs.h"
8061
8062 #undef _XOPEN_SOURCE
8063 #undef _POSIX_SOURCE
8064 #undef _POSIX_C_SOURCE
8065 #include <sys/types.h>
8066 #include <sys/signal.h>
8067
8068 int
8069 main ()
8070 {
8071 int x = SIGWINCH
8072   ;
8073   return 0;
8074 }
8075 _ACEOF
8076 rm -f conftest.$ac_objext
8077 if { (eval echo "$as_me:8077: \"$ac_compile\"") >&5
8078   (eval $ac_compile) 2>&5
8079   ac_status=$?
8080   echo "$as_me:8080: \$? = $ac_status" >&5
8081   (exit $ac_status); } &&
8082          { ac_try='test -s conftest.$ac_objext'
8083   { (eval echo "$as_me:8083: \"$ac_try\"") >&5
8084   (eval $ac_try) 2>&5
8085   ac_status=$?
8086   echo "$as_me:8086: \$? = $ac_status" >&5
8087   (exit $ac_status); }; }; then
8088   cf_cv_define_sigwinch=maybe
8089 else
8090   echo "$as_me: failed program was:" >&5
8091 cat conftest.$ac_ext >&5
8092 cf_cv_define_sigwinch=no
8093 fi
8094 rm -f conftest.$ac_objext conftest.$ac_ext
8095
8096 fi
8097 rm -f conftest.$ac_objext conftest.$ac_ext
8098
8099 fi
8100 echo "$as_me:8100: result: $cf_cv_define_sigwinch" >&5
8101 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8102
8103 if test "$cf_cv_define_sigwinch" = maybe ; then
8104 echo "$as_me:8104: checking for actual SIGWINCH definition" >&5
8105 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8106 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8107   echo $ECHO_N "(cached) $ECHO_C" >&6
8108 else
8109
8110 cf_cv_fixup_sigwinch=unknown
8111 cf_sigwinch=32
8112 while test $cf_sigwinch != 1
8113 do
8114         cat >conftest.$ac_ext <<_ACEOF
8115 #line 8115 "configure"
8116 #include "confdefs.h"
8117
8118 #undef _XOPEN_SOURCE
8119 #undef _POSIX_SOURCE
8120 #undef _POSIX_C_SOURCE
8121 #include <sys/types.h>
8122 #include <sys/signal.h>
8123
8124 int
8125 main ()
8126 {
8127
8128 #if SIGWINCH != $cf_sigwinch
8129 make an error
8130 #endif
8131 int x = SIGWINCH
8132   ;
8133   return 0;
8134 }
8135 _ACEOF
8136 rm -f conftest.$ac_objext
8137 if { (eval echo "$as_me:8137: \"$ac_compile\"") >&5
8138   (eval $ac_compile) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); } &&
8142          { ac_try='test -s conftest.$ac_objext'
8143   { (eval echo "$as_me:8143: \"$ac_try\"") >&5
8144   (eval $ac_try) 2>&5
8145   ac_status=$?
8146   echo "$as_me:8146: \$? = $ac_status" >&5
8147   (exit $ac_status); }; }; then
8148   cf_cv_fixup_sigwinch=$cf_sigwinch
8149          break
8150 else
8151   echo "$as_me: failed program was:" >&5
8152 cat conftest.$ac_ext >&5
8153 fi
8154 rm -f conftest.$ac_objext conftest.$ac_ext
8155
8156 cf_sigwinch=`expr $cf_sigwinch - 1`
8157 done
8158
8159 fi
8160 echo "$as_me:8160: result: $cf_cv_fixup_sigwinch" >&5
8161 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8162
8163         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8164                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8165         fi
8166 fi
8167
8168 # Checks for CODESET support.
8169
8170   echo "$as_me:8170: checking for nl_langinfo and CODESET" >&5
8171 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8172 if test "${am_cv_langinfo_codeset+set}" = set; then
8173   echo $ECHO_N "(cached) $ECHO_C" >&6
8174 else
8175   cat >conftest.$ac_ext <<_ACEOF
8176 #line 8176 "configure"
8177 #include "confdefs.h"
8178 #include <langinfo.h>
8179 int
8180 main ()
8181 {
8182 char* cs = nl_langinfo(CODESET);
8183   ;
8184   return 0;
8185 }
8186 _ACEOF
8187 rm -f conftest.$ac_objext conftest$ac_exeext
8188 if { (eval echo "$as_me:8188: \"$ac_link\"") >&5
8189   (eval $ac_link) 2>&5
8190   ac_status=$?
8191   echo "$as_me:8191: \$? = $ac_status" >&5
8192   (exit $ac_status); } &&
8193          { ac_try='test -s conftest$ac_exeext'
8194   { (eval echo "$as_me:8194: \"$ac_try\"") >&5
8195   (eval $ac_try) 2>&5
8196   ac_status=$?
8197   echo "$as_me:8197: \$? = $ac_status" >&5
8198   (exit $ac_status); }; }; then
8199   am_cv_langinfo_codeset=yes
8200 else
8201   echo "$as_me: failed program was:" >&5
8202 cat conftest.$ac_ext >&5
8203 am_cv_langinfo_codeset=no
8204 fi
8205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8206
8207 fi
8208 echo "$as_me:8208: result: $am_cv_langinfo_codeset" >&5
8209 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8210   if test $am_cv_langinfo_codeset = yes; then
8211
8212 cat >>confdefs.h <<\EOF
8213 #define HAVE_LANGINFO_CODESET 1
8214 EOF
8215
8216   fi
8217
8218 # use these variables to work around a defect in gcc's fixincludes.
8219 NCURSES_OK_WCHAR_T=
8220 NCURSES_OK_WINT_T=
8221
8222 echo "$as_me:8222: checking if you want wide-character code" >&5
8223 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8224
8225 # Check whether --enable-widec or --disable-widec was given.
8226 if test "${enable_widec+set}" = set; then
8227   enableval="$enable_widec"
8228   with_widec=$enableval
8229 else
8230   with_widec=no
8231 fi;
8232 echo "$as_me:8232: result: $with_widec" >&5
8233 echo "${ECHO_T}$with_widec" >&6
8234 if test "x$with_widec" = xyes ; then
8235         LIB_SUFFIX="w${LIB_SUFFIX}"
8236
8237 cat >>confdefs.h <<\EOF
8238 #define USE_WIDEC_SUPPORT 1
8239 EOF
8240
8241 cat >>confdefs.h <<\EOF
8242 #define NCURSES_WIDECHAR 1
8243 EOF
8244
8245 echo "$as_me:8245: checking if wchar.h can be used as is" >&5
8246 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8247 if test "${cf_cv_wchar_h_okay+set}" = set; then
8248   echo $ECHO_N "(cached) $ECHO_C" >&6
8249 else
8250
8251 cat >conftest.$ac_ext <<_ACEOF
8252 #line 8252 "configure"
8253 #include "confdefs.h"
8254
8255 #include <stdlib.h>
8256 #include <wchar.h>
8257
8258 int
8259 main ()
8260 {
8261
8262         wint_t foo = 0;
8263         int bar = iswpunct(foo)
8264   ;
8265   return 0;
8266 }
8267 _ACEOF
8268 rm -f conftest.$ac_objext
8269 if { (eval echo "$as_me:8269: \"$ac_compile\"") >&5
8270   (eval $ac_compile) 2>&5
8271   ac_status=$?
8272   echo "$as_me:8272: \$? = $ac_status" >&5
8273   (exit $ac_status); } &&
8274          { ac_try='test -s conftest.$ac_objext'
8275   { (eval echo "$as_me:8275: \"$ac_try\"") >&5
8276   (eval $ac_try) 2>&5
8277   ac_status=$?
8278   echo "$as_me:8278: \$? = $ac_status" >&5
8279   (exit $ac_status); }; }; then
8280   cf_cv_wchar_h_okay=yes
8281 else
8282   echo "$as_me: failed program was:" >&5
8283 cat conftest.$ac_ext >&5
8284 cf_cv_wchar_h_okay=no
8285 fi
8286 rm -f conftest.$ac_objext conftest.$ac_ext
8287 fi
8288 echo "$as_me:8288: result: $cf_cv_wchar_h_okay" >&5
8289 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8290
8291 if test $cf_cv_wchar_h_okay = no
8292 then
8293
8294 echo "$as_me:8294: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8295 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8296 cat >conftest.$ac_ext <<_ACEOF
8297 #line 8297 "configure"
8298 #include "confdefs.h"
8299 #include <sys/types.h>
8300
8301 int
8302 main ()
8303 {
8304
8305 #ifndef _XOPEN_SOURCE_EXTENDED
8306 make an error
8307 #endif
8308   ;
8309   return 0;
8310 }
8311 _ACEOF
8312 rm -f conftest.$ac_objext
8313 if { (eval echo "$as_me:8313: \"$ac_compile\"") >&5
8314   (eval $ac_compile) 2>&5
8315   ac_status=$?
8316   echo "$as_me:8316: \$? = $ac_status" >&5
8317   (exit $ac_status); } &&
8318          { ac_try='test -s conftest.$ac_objext'
8319   { (eval echo "$as_me:8319: \"$ac_try\"") >&5
8320   (eval $ac_try) 2>&5
8321   ac_status=$?
8322   echo "$as_me:8322: \$? = $ac_status" >&5
8323   (exit $ac_status); }; }; then
8324   cf_result=no
8325 else
8326   echo "$as_me: failed program was:" >&5
8327 cat conftest.$ac_ext >&5
8328 cf_result=yes
8329 fi
8330 rm -f conftest.$ac_objext conftest.$ac_ext
8331 echo "$as_me:8331: result: $cf_result" >&5
8332 echo "${ECHO_T}$cf_result" >&6
8333
8334 if test "$cf_result" = yes ; then
8335         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8336 elif test "x" != "x" ; then
8337         echo "$as_me:8337: checking checking for compatible value versus " >&5
8338 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8339         cat >conftest.$ac_ext <<_ACEOF
8340 #line 8340 "configure"
8341 #include "confdefs.h"
8342 #include <sys/types.h>
8343
8344 int
8345 main ()
8346 {
8347
8348 #if _XOPEN_SOURCE_EXTENDED- < 0
8349 make an error
8350 #endif
8351   ;
8352   return 0;
8353 }
8354 _ACEOF
8355 rm -f conftest.$ac_objext
8356 if { (eval echo "$as_me:8356: \"$ac_compile\"") >&5
8357   (eval $ac_compile) 2>&5
8358   ac_status=$?
8359   echo "$as_me:8359: \$? = $ac_status" >&5
8360   (exit $ac_status); } &&
8361          { ac_try='test -s conftest.$ac_objext'
8362   { (eval echo "$as_me:8362: \"$ac_try\"") >&5
8363   (eval $ac_try) 2>&5
8364   ac_status=$?
8365   echo "$as_me:8365: \$? = $ac_status" >&5
8366   (exit $ac_status); }; }; then
8367   cf_result=yes
8368 else
8369   echo "$as_me: failed program was:" >&5
8370 cat conftest.$ac_ext >&5
8371 cf_result=no
8372 fi
8373 rm -f conftest.$ac_objext conftest.$ac_ext
8374         echo "$as_me:8374: result: $cf_result" >&5
8375 echo "${ECHO_T}$cf_result" >&6
8376         if test "$cf_result" = no ; then
8377                 # perhaps we can override it - try...
8378                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8379         fi
8380 fi
8381
8382 fi
8383
8384         # with_overwrite=no
8385         NCURSES_CH_T=cchar_t
8386
8387 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8388 do
8389 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8390 echo "$as_me:8390: checking for $ac_func" >&5
8391 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8392 if eval "test \"\${$as_ac_var+set}\" = set"; then
8393   echo $ECHO_N "(cached) $ECHO_C" >&6
8394 else
8395   cat >conftest.$ac_ext <<_ACEOF
8396 #line 8396 "configure"
8397 #include "confdefs.h"
8398 /* System header to define __stub macros and hopefully few prototypes,
8399     which can conflict with char $ac_func (); below.  */
8400 #include <assert.h>
8401 /* Override any gcc2 internal prototype to avoid an error.  */
8402 #ifdef __cplusplus
8403 extern "C"
8404 #endif
8405 /* We use char because int might match the return type of a gcc2
8406    builtin and then its argument prototype would still apply.  */
8407 char $ac_func ();
8408 char (*f) ();
8409
8410 int
8411 main ()
8412 {
8413 /* The GNU C library defines this for functions which it implements
8414     to always fail with ENOSYS.  Some functions are actually named
8415     something starting with __ and the normal name is an alias.  */
8416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8417 choke me
8418 #else
8419 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8420 #endif
8421
8422   ;
8423   return 0;
8424 }
8425 _ACEOF
8426 rm -f conftest.$ac_objext conftest$ac_exeext
8427 if { (eval echo "$as_me:8427: \"$ac_link\"") >&5
8428   (eval $ac_link) 2>&5
8429   ac_status=$?
8430   echo "$as_me:8430: \$? = $ac_status" >&5
8431   (exit $ac_status); } &&
8432          { ac_try='test -s conftest$ac_exeext'
8433   { (eval echo "$as_me:8433: \"$ac_try\"") >&5
8434   (eval $ac_try) 2>&5
8435   ac_status=$?
8436   echo "$as_me:8436: \$? = $ac_status" >&5
8437   (exit $ac_status); }; }; then
8438   eval "$as_ac_var=yes"
8439 else
8440   echo "$as_me: failed program was:" >&5
8441 cat conftest.$ac_ext >&5
8442 eval "$as_ac_var=no"
8443 fi
8444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8445 fi
8446 echo "$as_me:8446: result: `eval echo '${'$as_ac_var'}'`" >&5
8447 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8448 if test `eval echo '${'$as_ac_var'}'` = yes; then
8449   cat >>confdefs.h <<EOF
8450 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8451 EOF
8452
8453 fi
8454 done
8455
8456         if test "x$ac_cv_func_putwc" != xyes ; then
8457
8458 echo "$as_me:8458: checking for multibyte character support" >&5
8459 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8460 if test "${cf_cv_utf8_lib+set}" = set; then
8461   echo $ECHO_N "(cached) $ECHO_C" >&6
8462 else
8463
8464         cf_save_LIBS="$LIBS"
8465         cat >conftest.$ac_ext <<_ACEOF
8466 #line 8466 "configure"
8467 #include "confdefs.h"
8468
8469 #include <stdlib.h>
8470 int
8471 main ()
8472 {
8473 putwc(0,0);
8474   ;
8475   return 0;
8476 }
8477 _ACEOF
8478 rm -f conftest.$ac_objext conftest$ac_exeext
8479 if { (eval echo "$as_me:8479: \"$ac_link\"") >&5
8480   (eval $ac_link) 2>&5
8481   ac_status=$?
8482   echo "$as_me:8482: \$? = $ac_status" >&5
8483   (exit $ac_status); } &&
8484          { ac_try='test -s conftest$ac_exeext'
8485   { (eval echo "$as_me:8485: \"$ac_try\"") >&5
8486   (eval $ac_try) 2>&5
8487   ac_status=$?
8488   echo "$as_me:8488: \$? = $ac_status" >&5
8489   (exit $ac_status); }; }; then
8490   cf_cv_utf8_lib=yes
8491 else
8492   echo "$as_me: failed program was:" >&5
8493 cat conftest.$ac_ext >&5
8494
8495 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8496 # will be set on completion of the AC_TRY_LINK below.
8497 cf_cv_header_path_utf8=
8498 cf_cv_library_path_utf8=
8499
8500 echo "${as_me:-configure}:8500: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8501
8502 cf_save_LIBS="$LIBS"
8503
8504 cat >conftest.$ac_ext <<_ACEOF
8505 #line 8505 "configure"
8506 #include "confdefs.h"
8507
8508 #include <libutf8.h>
8509 int
8510 main ()
8511 {
8512 putwc(0,0);
8513   ;
8514   return 0;
8515 }
8516 _ACEOF
8517 rm -f conftest.$ac_objext conftest$ac_exeext
8518 if { (eval echo "$as_me:8518: \"$ac_link\"") >&5
8519   (eval $ac_link) 2>&5
8520   ac_status=$?
8521   echo "$as_me:8521: \$? = $ac_status" >&5
8522   (exit $ac_status); } &&
8523          { ac_try='test -s conftest$ac_exeext'
8524   { (eval echo "$as_me:8524: \"$ac_try\"") >&5
8525   (eval $ac_try) 2>&5
8526   ac_status=$?
8527   echo "$as_me:8527: \$? = $ac_status" >&5
8528   (exit $ac_status); }; }; then
8529
8530         cf_cv_find_linkage_utf8=yes
8531         cf_cv_header_path_utf8=/usr/include
8532         cf_cv_library_path_utf8=/usr/lib
8533
8534 else
8535   echo "$as_me: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8537
8538 LIBS="-lutf8  $cf_save_LIBS"
8539
8540 cat >conftest.$ac_ext <<_ACEOF
8541 #line 8541 "configure"
8542 #include "confdefs.h"
8543
8544 #include <libutf8.h>
8545 int
8546 main ()
8547 {
8548 putwc(0,0);
8549   ;
8550   return 0;
8551 }
8552 _ACEOF
8553 rm -f conftest.$ac_objext conftest$ac_exeext
8554 if { (eval echo "$as_me:8554: \"$ac_link\"") >&5
8555   (eval $ac_link) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); } &&
8559          { ac_try='test -s conftest$ac_exeext'
8560   { (eval echo "$as_me:8560: \"$ac_try\"") >&5
8561   (eval $ac_try) 2>&5
8562   ac_status=$?
8563   echo "$as_me:8563: \$? = $ac_status" >&5
8564   (exit $ac_status); }; }; then
8565
8566         cf_cv_find_linkage_utf8=yes
8567         cf_cv_header_path_utf8=/usr/include
8568         cf_cv_library_path_utf8=/usr/lib
8569         cf_cv_library_file_utf8="-lutf8"
8570
8571 else
8572   echo "$as_me: failed program was:" >&5
8573 cat conftest.$ac_ext >&5
8574
8575         cf_cv_find_linkage_utf8=no
8576         LIBS="$cf_save_LIBS"
8577
8578     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8579
8580 echo "${as_me:-configure}:8580: testing find linkage for utf8 library ..." 1>&5
8581
8582 echo "${as_me:-configure}:8582: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8583
8584     cf_save_CPPFLAGS="$CPPFLAGS"
8585     cf_test_CPPFLAGS="$CPPFLAGS"
8586
8587 cf_search=
8588
8589 # collect the current set of include-directories from compiler flags
8590 cf_header_path_list=""
8591 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8592         for cf_header_path in $CPPFLAGS $CFLAGS
8593         do
8594                 case $cf_header_path in #(vi
8595                 -I*)
8596                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8597
8598 test "$cf_header_path" != "NONE" && \
8599 test -d "$cf_header_path" && \
8600  {
8601         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8602         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8603         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8604         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8605         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8606         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8607 }
8608
8609                         cf_header_path_list="$cf_header_path_list $cf_search"
8610                         ;;
8611                 esac
8612         done
8613 fi
8614
8615 # add the variations for the package we are looking for
8616
8617 cf_search=
8618
8619 test "/usr" != "$prefix" && \
8620 test -d "/usr" && \
8621 (test $prefix = NONE || test "/usr" != "$prefix") && {
8622         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8623         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8624         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8625         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8626         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8627         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8628 }
8629
8630 test "$prefix" != "NONE" && \
8631 test -d "$prefix" && \
8632  {
8633         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8634         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8635         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8636         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8637         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8638         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8639 }
8640
8641 test "/usr/local" != "$prefix" && \
8642 test -d "/usr/local" && \
8643 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8644         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8645         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8646         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8647         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8648         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8649         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8650 }
8651
8652 test "/opt" != "$prefix" && \
8653 test -d "/opt" && \
8654 (test $prefix = NONE || test "/opt" != "$prefix") && {
8655         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8656         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8657         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8658         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8659         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8660         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8661 }
8662
8663 test "$HOME" != "$prefix" && \
8664 test -d "$HOME" && \
8665 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8666         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8667         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8668         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8669         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8670         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8671         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8672 }
8673
8674 test "$includedir" != NONE && \
8675 test "$includedir" != "/usr/include" && \
8676 test -d "$includedir" && {
8677         test -d $includedir &&    cf_search="$cf_search $includedir"
8678         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8679 }
8680
8681 test "$oldincludedir" != NONE && \
8682 test "$oldincludedir" != "/usr/include" && \
8683 test -d "$oldincludedir" && {
8684         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8685         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8686 }
8687
8688 cf_search="$cf_search $cf_header_path_list"
8689
8690     for cf_cv_header_path_utf8 in $cf_search
8691     do
8692       if test -d $cf_cv_header_path_utf8 ; then
8693         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8694
8695 echo "${as_me:-configure}:8695: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8696
8697         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8698         cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8701
8702 #include <libutf8.h>
8703 int
8704 main ()
8705 {
8706 putwc(0,0);
8707   ;
8708   return 0;
8709 }
8710 _ACEOF
8711 rm -f conftest.$ac_objext
8712 if { (eval echo "$as_me:8712: \"$ac_compile\"") >&5
8713   (eval $ac_compile) 2>&5
8714   ac_status=$?
8715   echo "$as_me:8715: \$? = $ac_status" >&5
8716   (exit $ac_status); } &&
8717          { ac_try='test -s conftest.$ac_objext'
8718   { (eval echo "$as_me:8718: \"$ac_try\"") >&5
8719   (eval $ac_try) 2>&5
8720   ac_status=$?
8721   echo "$as_me:8721: \$? = $ac_status" >&5
8722   (exit $ac_status); }; }; then
8723
8724             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8725
8726 echo "${as_me:-configure}:8726: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8727
8728             cf_cv_find_linkage_utf8=maybe
8729             cf_test_CPPFLAGS="$CPPFLAGS"
8730             break
8731 else
8732   echo "$as_me: failed program was:" >&5
8733 cat conftest.$ac_ext >&5
8734
8735             CPPFLAGS="$cf_save_CPPFLAGS"
8736
8737 fi
8738 rm -f conftest.$ac_objext conftest.$ac_ext
8739       fi
8740     done
8741
8742     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8743
8744 echo "${as_me:-configure}:8744: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8745
8746       cf_save_LIBS="$LIBS"
8747       cf_save_LDFLAGS="$LDFLAGS"
8748
8749       if test "$cf_cv_find_linkage_utf8" != yes ; then
8750
8751 cf_search=
8752 cf_library_path_list=""
8753 if test -n "${LDFLAGS}${LIBS}" ; then
8754         for cf_library_path in $LDFLAGS $LIBS
8755         do
8756                 case $cf_library_path in #(vi
8757                 -L*)
8758                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8759
8760 test "$cf_library_path" != "NONE" && \
8761 test -d "$cf_library_path" && \
8762  {
8763         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8764         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8765         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8766         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8767         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8768         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8769 }
8770
8771                         cf_library_path_list="$cf_library_path_list $cf_search"
8772                         ;;
8773                 esac
8774         done
8775 fi
8776
8777 cf_search=
8778
8779 test "/usr" != "$prefix" && \
8780 test -d "/usr" && \
8781 (test $prefix = NONE || test "/usr" != "$prefix") && {
8782         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8783         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8784         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8785         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8786         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8787         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8788 }
8789
8790 test "$prefix" != "NONE" && \
8791 test -d "$prefix" && \
8792  {
8793         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8794         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8795         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8796         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8797         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8798         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8799 }
8800
8801 test "/usr/local" != "$prefix" && \
8802 test -d "/usr/local" && \
8803 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8804         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8805         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8806         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8807         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8808         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8809         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8810 }
8811
8812 test "/opt" != "$prefix" && \
8813 test -d "/opt" && \
8814 (test $prefix = NONE || test "/opt" != "$prefix") && {
8815         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8816         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8817         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8818         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8819         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8820         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8821 }
8822
8823 test "$HOME" != "$prefix" && \
8824 test -d "$HOME" && \
8825 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8826         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8827         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8828         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8829         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8830         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8831         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8832 }
8833
8834 cf_search="$cf_library_path_list $cf_search"
8835
8836         for cf_cv_library_path_utf8 in $cf_search
8837         do
8838           if test -d $cf_cv_library_path_utf8 ; then
8839             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8840
8841 echo "${as_me:-configure}:8841: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8842
8843             CPPFLAGS="$cf_test_CPPFLAGS"
8844             LIBS="-lutf8  $cf_save_LIBS"
8845             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8846             cat >conftest.$ac_ext <<_ACEOF
8847 #line 8847 "configure"
8848 #include "confdefs.h"
8849
8850 #include <libutf8.h>
8851 int
8852 main ()
8853 {
8854 putwc(0,0);
8855   ;
8856   return 0;
8857 }
8858 _ACEOF
8859 rm -f conftest.$ac_objext conftest$ac_exeext
8860 if { (eval echo "$as_me:8860: \"$ac_link\"") >&5
8861   (eval $ac_link) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); } &&
8865          { ac_try='test -s conftest$ac_exeext'
8866   { (eval echo "$as_me:8866: \"$ac_try\"") >&5
8867   (eval $ac_try) 2>&5
8868   ac_status=$?
8869   echo "$as_me:8869: \$? = $ac_status" >&5
8870   (exit $ac_status); }; }; then
8871
8872                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8873
8874 echo "${as_me:-configure}:8874: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8875
8876                 cf_cv_find_linkage_utf8=yes
8877                 cf_cv_library_file_utf8="-lutf8"
8878                 break
8879 else
8880   echo "$as_me: failed program was:" >&5
8881 cat conftest.$ac_ext >&5
8882
8883                 CPPFLAGS="$cf_save_CPPFLAGS"
8884                 LIBS="$cf_save_LIBS"
8885                 LDFLAGS="$cf_save_LDFLAGS"
8886
8887 fi
8888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8889           fi
8890         done
8891         CPPFLAGS="$cf_save_CPPFLAGS"
8892         LDFLAGS="$cf_save_LDFLAGS"
8893       fi
8894
8895     else
8896       cf_cv_find_linkage_utf8=no
8897     fi
8898
8899 fi
8900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8901
8902 fi
8903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8904
8905 LIBS="$cf_save_LIBS"
8906
8907 if test "$cf_cv_find_linkage_utf8" = yes ; then
8908 cf_cv_utf8_lib=add-on
8909 else
8910 cf_cv_utf8_lib=no
8911 fi
8912
8913 fi
8914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8915 fi
8916 echo "$as_me:8916: result: $cf_cv_utf8_lib" >&5
8917 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8918
8919 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8920 # ncurses/ncursesw:
8921 if test "$cf_cv_utf8_lib" = "add-on" ; then
8922
8923 cat >>confdefs.h <<\EOF
8924 #define HAVE_LIBUTF8_H 1
8925 EOF
8926
8927 if test -n "$cf_cv_header_path_utf8" ; then
8928   for cf_add_incdir in $cf_cv_header_path_utf8
8929   do
8930         while test $cf_add_incdir != /usr/include
8931         do
8932           if test -d $cf_add_incdir
8933           then
8934                 cf_have_incdir=no
8935                 if test -n "$CFLAGS$CPPFLAGS" ; then
8936                   # a loop is needed to ensure we can add subdirs of existing dirs
8937                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8938                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8939                           cf_have_incdir=yes; break
8940                         fi
8941                   done
8942                 fi
8943
8944                 if test "$cf_have_incdir" = no ; then
8945                   if test "$cf_add_incdir" = /usr/local/include ; then
8946                         if test "$GCC" = yes
8947                         then
8948                           cf_save_CPPFLAGS=$CPPFLAGS
8949                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8950                           cat >conftest.$ac_ext <<_ACEOF
8951 #line 8951 "configure"
8952 #include "confdefs.h"
8953 #include <stdio.h>
8954 int
8955 main ()
8956 {
8957 printf("Hello")
8958   ;
8959   return 0;
8960 }
8961 _ACEOF
8962 rm -f conftest.$ac_objext
8963 if { (eval echo "$as_me:8963: \"$ac_compile\"") >&5
8964   (eval $ac_compile) 2>&5
8965   ac_status=$?
8966   echo "$as_me:8966: \$? = $ac_status" >&5
8967   (exit $ac_status); } &&
8968          { ac_try='test -s conftest.$ac_objext'
8969   { (eval echo "$as_me:8969: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); }; }; then
8974   :
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 cat conftest.$ac_ext >&5
8978 cf_have_incdir=yes
8979 fi
8980 rm -f conftest.$ac_objext conftest.$ac_ext
8981                           CPPFLAGS=$cf_save_CPPFLAGS
8982                         fi
8983                   fi
8984                 fi
8985
8986                 if test "$cf_have_incdir" = no ; then
8987                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8988
8989 echo "${as_me:-configure}:8989: testing adding $cf_add_incdir to include-path ..." 1>&5
8990
8991                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8992
8993                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8994                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8995                   cf_add_incdir="$cf_top_incdir"
8996                 else
8997                   break
8998                 fi
8999           fi
9000         done
9001   done
9002 fi
9003
9004 if test -n "$cf_cv_library_path_utf8" ; then
9005   for cf_add_libdir in $cf_cv_library_path_utf8
9006   do
9007     if test $cf_add_libdir = /usr/lib ; then
9008       :
9009     elif test -d $cf_add_libdir
9010     then
9011       cf_have_libdir=no
9012       if test -n "$LDFLAGS$LIBS" ; then
9013         # a loop is needed to ensure we can add subdirs of existing dirs
9014         for cf_test_libdir in $LDFLAGS $LIBS ; do
9015           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9016             cf_have_libdir=yes; break
9017           fi
9018         done
9019       fi
9020       if test "$cf_have_libdir" = no ; then
9021         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9022
9023 echo "${as_me:-configure}:9023: testing adding $cf_add_libdir to library-path ..." 1>&5
9024
9025         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9026       fi
9027     fi
9028   done
9029 fi
9030
9031         LIBS="$cf_cv_library_file_utf8 $LIBS"
9032 fi
9033
9034                 if test "$cf_cv_utf8_lib" != no ; then
9035                         NCURSES_LIBUTF8=1
9036                 fi
9037         fi
9038
9039 # This is needed on Tru64 5.0 to declare mbstate_t
9040 echo "$as_me:9040: checking if we must include wchar.h to declare mbstate_t" >&5
9041 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9042 if test "${cf_cv_mbstate_t+set}" = set; then
9043   echo $ECHO_N "(cached) $ECHO_C" >&6
9044 else
9045
9046 cat >conftest.$ac_ext <<_ACEOF
9047 #line 9047 "configure"
9048 #include "confdefs.h"
9049
9050 #include <stdlib.h>
9051 #include <stdarg.h>
9052 #include <stdio.h>
9053 #ifdef HAVE_LIBUTF8_H
9054 #include <libutf8.h>
9055 #endif
9056 int
9057 main ()
9058 {
9059 mbstate_t state
9060   ;
9061   return 0;
9062 }
9063 _ACEOF
9064 rm -f conftest.$ac_objext
9065 if { (eval echo "$as_me:9065: \"$ac_compile\"") >&5
9066   (eval $ac_compile) 2>&5
9067   ac_status=$?
9068   echo "$as_me:9068: \$? = $ac_status" >&5
9069   (exit $ac_status); } &&
9070          { ac_try='test -s conftest.$ac_objext'
9071   { (eval echo "$as_me:9071: \"$ac_try\"") >&5
9072   (eval $ac_try) 2>&5
9073   ac_status=$?
9074   echo "$as_me:9074: \$? = $ac_status" >&5
9075   (exit $ac_status); }; }; then
9076   cf_cv_mbstate_t=no
9077 else
9078   echo "$as_me: failed program was:" >&5
9079 cat conftest.$ac_ext >&5
9080 cat >conftest.$ac_ext <<_ACEOF
9081 #line 9081 "configure"
9082 #include "confdefs.h"
9083
9084 #include <stdlib.h>
9085 #include <stdarg.h>
9086 #include <stdio.h>
9087 #include <wchar.h>
9088 #ifdef HAVE_LIBUTF8_H
9089 #include <libutf8.h>
9090 #endif
9091 int
9092 main ()
9093 {
9094 mbstate_t value
9095   ;
9096   return 0;
9097 }
9098 _ACEOF
9099 rm -f conftest.$ac_objext
9100 if { (eval echo "$as_me:9100: \"$ac_compile\"") >&5
9101   (eval $ac_compile) 2>&5
9102   ac_status=$?
9103   echo "$as_me:9103: \$? = $ac_status" >&5
9104   (exit $ac_status); } &&
9105          { ac_try='test -s conftest.$ac_objext'
9106   { (eval echo "$as_me:9106: \"$ac_try\"") >&5
9107   (eval $ac_try) 2>&5
9108   ac_status=$?
9109   echo "$as_me:9109: \$? = $ac_status" >&5
9110   (exit $ac_status); }; }; then
9111   cf_cv_mbstate_t=yes
9112 else
9113   echo "$as_me: failed program was:" >&5
9114 cat conftest.$ac_ext >&5
9115 cf_cv_mbstate_t=unknown
9116 fi
9117 rm -f conftest.$ac_objext conftest.$ac_ext
9118 fi
9119 rm -f conftest.$ac_objext conftest.$ac_ext
9120 fi
9121 echo "$as_me:9121: result: $cf_cv_mbstate_t" >&5
9122 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9123
9124 if test "$cf_cv_mbstate_t" = yes ; then
9125
9126 cat >>confdefs.h <<\EOF
9127 #define NEED_WCHAR_H 1
9128 EOF
9129
9130         NEED_WCHAR_H=1
9131 fi
9132
9133 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9134 if test "$cf_cv_mbstate_t" = unknown ; then
9135         NCURSES_MBSTATE_T=1
9136 fi
9137
9138 # This is needed on Tru64 5.0 to declare wchar_t
9139 echo "$as_me:9139: checking if we must include wchar.h to declare wchar_t" >&5
9140 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9141 if test "${cf_cv_wchar_t+set}" = set; then
9142   echo $ECHO_N "(cached) $ECHO_C" >&6
9143 else
9144
9145 cat >conftest.$ac_ext <<_ACEOF
9146 #line 9146 "configure"
9147 #include "confdefs.h"
9148
9149 #include <stdlib.h>
9150 #include <stdarg.h>
9151 #include <stdio.h>
9152 #ifdef HAVE_LIBUTF8_H
9153 #include <libutf8.h>
9154 #endif
9155 int
9156 main ()
9157 {
9158 wchar_t state
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_wchar_t=no
9176 else
9177   echo "$as_me: failed program was:" >&5
9178 cat conftest.$ac_ext >&5
9179 cat >conftest.$ac_ext <<_ACEOF
9180 #line 9180 "configure"
9181 #include "confdefs.h"
9182
9183 #include <stdlib.h>
9184 #include <stdarg.h>
9185 #include <stdio.h>
9186 #include <wchar.h>
9187 #ifdef HAVE_LIBUTF8_H
9188 #include <libutf8.h>
9189 #endif
9190 int
9191 main ()
9192 {
9193 wchar_t value
9194   ;
9195   return 0;
9196 }
9197 _ACEOF
9198 rm -f conftest.$ac_objext
9199 if { (eval echo "$as_me:9199: \"$ac_compile\"") >&5
9200   (eval $ac_compile) 2>&5
9201   ac_status=$?
9202   echo "$as_me:9202: \$? = $ac_status" >&5
9203   (exit $ac_status); } &&
9204          { ac_try='test -s conftest.$ac_objext'
9205   { (eval echo "$as_me:9205: \"$ac_try\"") >&5
9206   (eval $ac_try) 2>&5
9207   ac_status=$?
9208   echo "$as_me:9208: \$? = $ac_status" >&5
9209   (exit $ac_status); }; }; then
9210   cf_cv_wchar_t=yes
9211 else
9212   echo "$as_me: failed program was:" >&5
9213 cat conftest.$ac_ext >&5
9214 cf_cv_wchar_t=unknown
9215 fi
9216 rm -f conftest.$ac_objext conftest.$ac_ext
9217 fi
9218 rm -f conftest.$ac_objext conftest.$ac_ext
9219 fi
9220 echo "$as_me:9220: result: $cf_cv_wchar_t" >&5
9221 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9222
9223 if test "$cf_cv_wchar_t" = yes ; then
9224
9225 cat >>confdefs.h <<\EOF
9226 #define NEED_WCHAR_H 1
9227 EOF
9228
9229         NEED_WCHAR_H=1
9230 fi
9231
9232 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9233 if test "$cf_cv_wchar_t" = unknown ; then
9234         NCURSES_WCHAR_T=1
9235 fi
9236
9237 # if we find wchar_t in either place, use substitution to provide a fallback.
9238 if test "$cf_cv_wchar_t" != unknown ; then
9239         NCURSES_OK_WCHAR_T=1
9240 fi
9241
9242 # This is needed on Tru64 5.0 to declare wint_t
9243 echo "$as_me:9243: checking if we must include wchar.h to declare wint_t" >&5
9244 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9245 if test "${cf_cv_wint_t+set}" = set; then
9246   echo $ECHO_N "(cached) $ECHO_C" >&6
9247 else
9248
9249 cat >conftest.$ac_ext <<_ACEOF
9250 #line 9250 "configure"
9251 #include "confdefs.h"
9252
9253 #include <stdlib.h>
9254 #include <stdarg.h>
9255 #include <stdio.h>
9256 #ifdef HAVE_LIBUTF8_H
9257 #include <libutf8.h>
9258 #endif
9259 int
9260 main ()
9261 {
9262 wint_t state
9263   ;
9264   return 0;
9265 }
9266 _ACEOF
9267 rm -f conftest.$ac_objext
9268 if { (eval echo "$as_me:9268: \"$ac_compile\"") >&5
9269   (eval $ac_compile) 2>&5
9270   ac_status=$?
9271   echo "$as_me:9271: \$? = $ac_status" >&5
9272   (exit $ac_status); } &&
9273          { ac_try='test -s conftest.$ac_objext'
9274   { (eval echo "$as_me:9274: \"$ac_try\"") >&5
9275   (eval $ac_try) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); }; }; then
9279   cf_cv_wint_t=no
9280 else
9281   echo "$as_me: failed program was:" >&5
9282 cat conftest.$ac_ext >&5
9283 cat >conftest.$ac_ext <<_ACEOF
9284 #line 9284 "configure"
9285 #include "confdefs.h"
9286
9287 #include <stdlib.h>
9288 #include <stdarg.h>
9289 #include <stdio.h>
9290 #include <wchar.h>
9291 #ifdef HAVE_LIBUTF8_H
9292 #include <libutf8.h>
9293 #endif
9294 int
9295 main ()
9296 {
9297 wint_t value
9298   ;
9299   return 0;
9300 }
9301 _ACEOF
9302 rm -f conftest.$ac_objext
9303 if { (eval echo "$as_me:9303: \"$ac_compile\"") >&5
9304   (eval $ac_compile) 2>&5
9305   ac_status=$?
9306   echo "$as_me:9306: \$? = $ac_status" >&5
9307   (exit $ac_status); } &&
9308          { ac_try='test -s conftest.$ac_objext'
9309   { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9310   (eval $ac_try) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit $ac_status); }; }; then
9314   cf_cv_wint_t=yes
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 cat conftest.$ac_ext >&5
9318 cf_cv_wint_t=unknown
9319 fi
9320 rm -f conftest.$ac_objext conftest.$ac_ext
9321 fi
9322 rm -f conftest.$ac_objext conftest.$ac_ext
9323 fi
9324 echo "$as_me:9324: result: $cf_cv_wint_t" >&5
9325 echo "${ECHO_T}$cf_cv_wint_t" >&6
9326
9327 if test "$cf_cv_wint_t" = yes ; then
9328
9329 cat >>confdefs.h <<\EOF
9330 #define NEED_WCHAR_H 1
9331 EOF
9332
9333         NEED_WCHAR_H=1
9334 fi
9335
9336 # if we do not find wint_t in either place, use substitution to provide a fallback.
9337 if test "$cf_cv_wint_t" = unknown ; then
9338         NCURSES_WINT_T=1
9339 fi
9340
9341 # if we find wint_t in either place, use substitution to provide a fallback.
9342 if test "$cf_cv_wint_t" != unknown ; then
9343         NCURSES_OK_WINT_T=1
9344 fi
9345
9346         if test "$NCURSES_MBSTATE_T" != 0; then
9347
9348 cat >>confdefs.h <<\EOF
9349 #define NEED_MBSTATE_T_DEF 1
9350 EOF
9351
9352         fi
9353 fi
9354
9355 ###   use option --disable-lp64 to allow long chtype
9356 case $cf_cv_abi_version in
9357 [345]*)
9358         default_with_lp64=no
9359         ;;
9360 *)
9361         default_with_lp64=yes
9362         ;;
9363 esac
9364
9365 echo "$as_me:9365: checking whether to enable _LP64 definition in curses.h" >&5
9366 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9367
9368 # Check whether --enable-lp64 or --disable-lp64 was given.
9369 if test "${enable_lp64+set}" = set; then
9370   enableval="$enable_lp64"
9371   with_lp64=$enableval
9372 else
9373   with_lp64=$default_with_lp64
9374 fi;
9375 echo "$as_me:9375: result: $with_lp64" >&5
9376 echo "${ECHO_T}$with_lp64" >&6
9377
9378 if test "x$with_lp64" = xyes ; then
9379         cf_cv_enable_lp64=1
9380 else
9381         cf_cv_enable_lp64=0
9382 fi
9383
9384 # Check whether --enable-largefile or --disable-largefile was given.
9385 if test "${enable_largefile+set}" = set; then
9386   enableval="$enable_largefile"
9387
9388 fi;
9389 if test "$enable_largefile" != no; then
9390
9391   echo "$as_me:9391: checking for special C compiler options needed for large files" >&5
9392 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9393 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9394   echo $ECHO_N "(cached) $ECHO_C" >&6
9395 else
9396   ac_cv_sys_largefile_CC=no
9397      if test "$GCC" != yes; then
9398        ac_save_CC=$CC
9399        while :; do
9400          # IRIX 6.2 and later do not support large files by default,
9401          # so use the C compiler's -n32 option if that helps.
9402          cat >conftest.$ac_ext <<_ACEOF
9403 #line 9403 "configure"
9404 #include "confdefs.h"
9405 #include <sys/types.h>
9406  /* Check that off_t can represent 2**63 - 1 correctly.
9407     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9408     since some C++ compilers masquerading as C compilers
9409     incorrectly reject 9223372036854775807.  */
9410 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9411   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9412                        && LARGE_OFF_T % 2147483647 == 1)
9413                       ? 1 : -1];
9414 int
9415 main ()
9416 {
9417
9418   ;
9419   return 0;
9420 }
9421 _ACEOF
9422          rm -f conftest.$ac_objext
9423 if { (eval echo "$as_me:9423: \"$ac_compile\"") >&5
9424   (eval $ac_compile) 2>&5
9425   ac_status=$?
9426   echo "$as_me:9426: \$? = $ac_status" >&5
9427   (exit $ac_status); } &&
9428          { ac_try='test -s conftest.$ac_objext'
9429   { (eval echo "$as_me:9429: \"$ac_try\"") >&5
9430   (eval $ac_try) 2>&5
9431   ac_status=$?
9432   echo "$as_me:9432: \$? = $ac_status" >&5
9433   (exit $ac_status); }; }; then
9434   break
9435 else
9436   echo "$as_me: failed program was:" >&5
9437 cat conftest.$ac_ext >&5
9438 fi
9439 rm -f conftest.$ac_objext
9440          CC="$CC -n32"
9441          rm -f conftest.$ac_objext
9442 if { (eval echo "$as_me:9442: \"$ac_compile\"") >&5
9443   (eval $ac_compile) 2>&5
9444   ac_status=$?
9445   echo "$as_me:9445: \$? = $ac_status" >&5
9446   (exit $ac_status); } &&
9447          { ac_try='test -s conftest.$ac_objext'
9448   { (eval echo "$as_me:9448: \"$ac_try\"") >&5
9449   (eval $ac_try) 2>&5
9450   ac_status=$?
9451   echo "$as_me:9451: \$? = $ac_status" >&5
9452   (exit $ac_status); }; }; then
9453   ac_cv_sys_largefile_CC=' -n32'; break
9454 else
9455   echo "$as_me: failed program was:" >&5
9456 cat conftest.$ac_ext >&5
9457 fi
9458 rm -f conftest.$ac_objext
9459          break
9460        done
9461        CC=$ac_save_CC
9462        rm -f conftest.$ac_ext
9463     fi
9464 fi
9465 echo "$as_me:9465: result: $ac_cv_sys_largefile_CC" >&5
9466 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9467   if test "$ac_cv_sys_largefile_CC" != no; then
9468     CC=$CC$ac_cv_sys_largefile_CC
9469   fi
9470
9471   echo "$as_me:9471: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9472 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9473 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9474   echo $ECHO_N "(cached) $ECHO_C" >&6
9475 else
9476   while :; do
9477   ac_cv_sys_file_offset_bits=no
9478   cat >conftest.$ac_ext <<_ACEOF
9479 #line 9479 "configure"
9480 #include "confdefs.h"
9481 #include <sys/types.h>
9482  /* Check that off_t can represent 2**63 - 1 correctly.
9483     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9484     since some C++ compilers masquerading as C compilers
9485     incorrectly reject 9223372036854775807.  */
9486 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9487   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9488                        && LARGE_OFF_T % 2147483647 == 1)
9489                       ? 1 : -1];
9490 int
9491 main ()
9492 {
9493
9494   ;
9495   return 0;
9496 }
9497 _ACEOF
9498 rm -f conftest.$ac_objext
9499 if { (eval echo "$as_me:9499: \"$ac_compile\"") >&5
9500   (eval $ac_compile) 2>&5
9501   ac_status=$?
9502   echo "$as_me:9502: \$? = $ac_status" >&5
9503   (exit $ac_status); } &&
9504          { ac_try='test -s conftest.$ac_objext'
9505   { (eval echo "$as_me:9505: \"$ac_try\"") >&5
9506   (eval $ac_try) 2>&5
9507   ac_status=$?
9508   echo "$as_me:9508: \$? = $ac_status" >&5
9509   (exit $ac_status); }; }; then
9510   break
9511 else
9512   echo "$as_me: failed program was:" >&5
9513 cat conftest.$ac_ext >&5
9514 fi
9515 rm -f conftest.$ac_objext conftest.$ac_ext
9516   cat >conftest.$ac_ext <<_ACEOF
9517 #line 9517 "configure"
9518 #include "confdefs.h"
9519 #define _FILE_OFFSET_BITS 64
9520 #include <sys/types.h>
9521  /* Check that off_t can represent 2**63 - 1 correctly.
9522     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9523     since some C++ compilers masquerading as C compilers
9524     incorrectly reject 9223372036854775807.  */
9525 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9526   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9527                        && LARGE_OFF_T % 2147483647 == 1)
9528                       ? 1 : -1];
9529 int
9530 main ()
9531 {
9532
9533   ;
9534   return 0;
9535 }
9536 _ACEOF
9537 rm -f conftest.$ac_objext
9538 if { (eval echo "$as_me:9538: \"$ac_compile\"") >&5
9539   (eval $ac_compile) 2>&5
9540   ac_status=$?
9541   echo "$as_me:9541: \$? = $ac_status" >&5
9542   (exit $ac_status); } &&
9543          { ac_try='test -s conftest.$ac_objext'
9544   { (eval echo "$as_me:9544: \"$ac_try\"") >&5
9545   (eval $ac_try) 2>&5
9546   ac_status=$?
9547   echo "$as_me:9547: \$? = $ac_status" >&5
9548   (exit $ac_status); }; }; then
9549   ac_cv_sys_file_offset_bits=64; break
9550 else
9551   echo "$as_me: failed program was:" >&5
9552 cat conftest.$ac_ext >&5
9553 fi
9554 rm -f conftest.$ac_objext conftest.$ac_ext
9555   break
9556 done
9557 fi
9558 echo "$as_me:9558: result: $ac_cv_sys_file_offset_bits" >&5
9559 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9560 if test "$ac_cv_sys_file_offset_bits" != no; then
9561
9562 cat >>confdefs.h <<EOF
9563 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9564 EOF
9565
9566 fi
9567 rm -rf conftest*
9568   echo "$as_me:9568: checking for _LARGE_FILES value needed for large files" >&5
9569 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9570 if test "${ac_cv_sys_large_files+set}" = set; then
9571   echo $ECHO_N "(cached) $ECHO_C" >&6
9572 else
9573   while :; do
9574   ac_cv_sys_large_files=no
9575   cat >conftest.$ac_ext <<_ACEOF
9576 #line 9576 "configure"
9577 #include "confdefs.h"
9578 #include <sys/types.h>
9579  /* Check that off_t can represent 2**63 - 1 correctly.
9580     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9581     since some C++ compilers masquerading as C compilers
9582     incorrectly reject 9223372036854775807.  */
9583 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9584   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9585                        && LARGE_OFF_T % 2147483647 == 1)
9586                       ? 1 : -1];
9587 int
9588 main ()
9589 {
9590
9591   ;
9592   return 0;
9593 }
9594 _ACEOF
9595 rm -f conftest.$ac_objext
9596 if { (eval echo "$as_me:9596: \"$ac_compile\"") >&5
9597   (eval $ac_compile) 2>&5
9598   ac_status=$?
9599   echo "$as_me:9599: \$? = $ac_status" >&5
9600   (exit $ac_status); } &&
9601          { ac_try='test -s conftest.$ac_objext'
9602   { (eval echo "$as_me:9602: \"$ac_try\"") >&5
9603   (eval $ac_try) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); }; }; then
9607   break
9608 else
9609   echo "$as_me: failed program was:" >&5
9610 cat conftest.$ac_ext >&5
9611 fi
9612 rm -f conftest.$ac_objext conftest.$ac_ext
9613   cat >conftest.$ac_ext <<_ACEOF
9614 #line 9614 "configure"
9615 #include "confdefs.h"
9616 #define _LARGE_FILES 1
9617 #include <sys/types.h>
9618  /* Check that off_t can represent 2**63 - 1 correctly.
9619     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9620     since some C++ compilers masquerading as C compilers
9621     incorrectly reject 9223372036854775807.  */
9622 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9623   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9624                        && LARGE_OFF_T % 2147483647 == 1)
9625                       ? 1 : -1];
9626 int
9627 main ()
9628 {
9629
9630   ;
9631   return 0;
9632 }
9633 _ACEOF
9634 rm -f conftest.$ac_objext
9635 if { (eval echo "$as_me:9635: \"$ac_compile\"") >&5
9636   (eval $ac_compile) 2>&5
9637   ac_status=$?
9638   echo "$as_me:9638: \$? = $ac_status" >&5
9639   (exit $ac_status); } &&
9640          { ac_try='test -s conftest.$ac_objext'
9641   { (eval echo "$as_me:9641: \"$ac_try\"") >&5
9642   (eval $ac_try) 2>&5
9643   ac_status=$?
9644   echo "$as_me:9644: \$? = $ac_status" >&5
9645   (exit $ac_status); }; }; then
9646   ac_cv_sys_large_files=1; break
9647 else
9648   echo "$as_me: failed program was:" >&5
9649 cat conftest.$ac_ext >&5
9650 fi
9651 rm -f conftest.$ac_objext conftest.$ac_ext
9652   break
9653 done
9654 fi
9655 echo "$as_me:9655: result: $ac_cv_sys_large_files" >&5
9656 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9657 if test "$ac_cv_sys_large_files" != no; then
9658
9659 cat >>confdefs.h <<EOF
9660 #define _LARGE_FILES $ac_cv_sys_large_files
9661 EOF
9662
9663 fi
9664 rm -rf conftest*
9665 fi
9666
9667     if test "$enable_largefile" != no ; then
9668         echo "$as_me:9668: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9669 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9670 if test "${ac_cv_sys_largefile_source+set}" = set; then
9671   echo $ECHO_N "(cached) $ECHO_C" >&6
9672 else
9673   while :; do
9674   ac_cv_sys_largefile_source=no
9675   cat >conftest.$ac_ext <<_ACEOF
9676 #line 9676 "configure"
9677 #include "confdefs.h"
9678 #include <stdio.h>
9679 int
9680 main ()
9681 {
9682 return !fseeko;
9683   ;
9684   return 0;
9685 }
9686 _ACEOF
9687 rm -f conftest.$ac_objext
9688 if { (eval echo "$as_me:9688: \"$ac_compile\"") >&5
9689   (eval $ac_compile) 2>&5
9690   ac_status=$?
9691   echo "$as_me:9691: \$? = $ac_status" >&5
9692   (exit $ac_status); } &&
9693          { ac_try='test -s conftest.$ac_objext'
9694   { (eval echo "$as_me:9694: \"$ac_try\"") >&5
9695   (eval $ac_try) 2>&5
9696   ac_status=$?
9697   echo "$as_me:9697: \$? = $ac_status" >&5
9698   (exit $ac_status); }; }; then
9699   break
9700 else
9701   echo "$as_me: failed program was:" >&5
9702 cat conftest.$ac_ext >&5
9703 fi
9704 rm -f conftest.$ac_objext conftest.$ac_ext
9705   cat >conftest.$ac_ext <<_ACEOF
9706 #line 9706 "configure"
9707 #include "confdefs.h"
9708 #define _LARGEFILE_SOURCE 1
9709 #include <stdio.h>
9710 int
9711 main ()
9712 {
9713 return !fseeko;
9714   ;
9715   return 0;
9716 }
9717 _ACEOF
9718 rm -f conftest.$ac_objext
9719 if { (eval echo "$as_me:9719: \"$ac_compile\"") >&5
9720   (eval $ac_compile) 2>&5
9721   ac_status=$?
9722   echo "$as_me:9722: \$? = $ac_status" >&5
9723   (exit $ac_status); } &&
9724          { ac_try='test -s conftest.$ac_objext'
9725   { (eval echo "$as_me:9725: \"$ac_try\"") >&5
9726   (eval $ac_try) 2>&5
9727   ac_status=$?
9728   echo "$as_me:9728: \$? = $ac_status" >&5
9729   (exit $ac_status); }; }; then
9730   ac_cv_sys_largefile_source=1; break
9731 else
9732   echo "$as_me: failed program was:" >&5
9733 cat conftest.$ac_ext >&5
9734 fi
9735 rm -f conftest.$ac_objext conftest.$ac_ext
9736   break
9737 done
9738 fi
9739 echo "$as_me:9739: result: $ac_cv_sys_largefile_source" >&5
9740 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9741 if test "$ac_cv_sys_largefile_source" != no; then
9742
9743 cat >>confdefs.h <<EOF
9744 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9745 EOF
9746
9747 fi
9748 rm -rf conftest*
9749
9750 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9751 # in glibc 2.1.3, but that breaks too many other things.
9752 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9753 echo "$as_me:9753: checking for fseeko" >&5
9754 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9755 if test "${ac_cv_func_fseeko+set}" = set; then
9756   echo $ECHO_N "(cached) $ECHO_C" >&6
9757 else
9758   cat >conftest.$ac_ext <<_ACEOF
9759 #line 9759 "configure"
9760 #include "confdefs.h"
9761 #include <stdio.h>
9762 int
9763 main ()
9764 {
9765 return fseeko && fseeko (stdin, 0, 0);
9766   ;
9767   return 0;
9768 }
9769 _ACEOF
9770 rm -f conftest.$ac_objext conftest$ac_exeext
9771 if { (eval echo "$as_me:9771: \"$ac_link\"") >&5
9772   (eval $ac_link) 2>&5
9773   ac_status=$?
9774   echo "$as_me:9774: \$? = $ac_status" >&5
9775   (exit $ac_status); } &&
9776          { ac_try='test -s conftest$ac_exeext'
9777   { (eval echo "$as_me:9777: \"$ac_try\"") >&5
9778   (eval $ac_try) 2>&5
9779   ac_status=$?
9780   echo "$as_me:9780: \$? = $ac_status" >&5
9781   (exit $ac_status); }; }; then
9782   ac_cv_func_fseeko=yes
9783 else
9784   echo "$as_me: failed program was:" >&5
9785 cat conftest.$ac_ext >&5
9786 ac_cv_func_fseeko=no
9787 fi
9788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9789 fi
9790 echo "$as_me:9790: result: $ac_cv_func_fseeko" >&5
9791 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9792 if test $ac_cv_func_fseeko = yes; then
9793
9794 cat >>confdefs.h <<\EOF
9795 #define HAVE_FSEEKO 1
9796 EOF
9797
9798 fi
9799
9800         # Normally we would collect these definitions in the config.h,
9801         # but (like _XOPEN_SOURCE), some environments rely on having these
9802         # defined before any of the system headers are included.  Another
9803         # case comes up with C++, e.g., on AIX the compiler compiles the
9804         # header files by themselves before looking at the body files it is
9805         # told to compile.  For ncurses, those header files do not include
9806         # the config.h
9807         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9808         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9809         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9810
9811         echo "$as_me:9811: checking whether to use struct dirent64" >&5
9812 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9813 if test "${cf_cv_struct_dirent64+set}" = set; then
9814   echo $ECHO_N "(cached) $ECHO_C" >&6
9815 else
9816
9817                 cat >conftest.$ac_ext <<_ACEOF
9818 #line 9818 "configure"
9819 #include "confdefs.h"
9820
9821 #include <sys/types.h>
9822 #include <dirent.h>
9823
9824 int
9825 main ()
9826 {
9827
9828                 /* if transitional largefile support is setup, this is true */
9829                 extern struct dirent64 * readdir(DIR *);
9830                 struct dirent64 *x = readdir((DIR *)0);
9831                 struct dirent *y = readdir((DIR *)0);
9832                 int z = x - y;
9833
9834   ;
9835   return 0;
9836 }
9837 _ACEOF
9838 rm -f conftest.$ac_objext
9839 if { (eval echo "$as_me:9839: \"$ac_compile\"") >&5
9840   (eval $ac_compile) 2>&5
9841   ac_status=$?
9842   echo "$as_me:9842: \$? = $ac_status" >&5
9843   (exit $ac_status); } &&
9844          { ac_try='test -s conftest.$ac_objext'
9845   { (eval echo "$as_me:9845: \"$ac_try\"") >&5
9846   (eval $ac_try) 2>&5
9847   ac_status=$?
9848   echo "$as_me:9848: \$? = $ac_status" >&5
9849   (exit $ac_status); }; }; then
9850   cf_cv_struct_dirent64=yes
9851 else
9852   echo "$as_me: failed program was:" >&5
9853 cat conftest.$ac_ext >&5
9854 cf_cv_struct_dirent64=no
9855 fi
9856 rm -f conftest.$ac_objext conftest.$ac_ext
9857
9858 fi
9859 echo "$as_me:9859: result: $cf_cv_struct_dirent64" >&5
9860 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9861         test "$cf_cv_struct_dirent64" = yes &&
9862 cat >>confdefs.h <<\EOF
9863 #define HAVE_STRUCT_DIRENT64 1
9864 EOF
9865
9866     fi
9867
9868 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9869 echo "$as_me:9869: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9870 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9871
9872 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9873 if test "${enable_tparm_varargs+set}" = set; then
9874   enableval="$enable_tparm_varargs"
9875   with_tparm_varargs=$enableval
9876 else
9877   with_tparm_varargs=yes
9878 fi;
9879 echo "$as_me:9879: result: $with_tparm_varargs" >&5
9880 echo "${ECHO_T}$with_tparm_varargs" >&6
9881 NCURSES_TPARM_VARARGS=0
9882 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
9883
9884 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9885 if test "$with_ticlib" != no ; then
9886 echo "$as_me:9886: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9887 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9888
9889 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9890 if test "${enable_tic_depends+set}" = set; then
9891   enableval="$enable_tic_depends"
9892   with_tic_depends=$enableval
9893 else
9894   with_tic_depends=yes
9895 fi;
9896 echo "$as_me:9896: result: $with_tic_depends" >&5
9897 echo "${ECHO_T}$with_tic_depends" >&6
9898 else
9899         with_tic_depends=no
9900 fi
9901
9902 ###   use option --with-bool to override bool's type
9903 echo "$as_me:9903: checking for type of bool" >&5
9904 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9905
9906 # Check whether --with-bool or --without-bool was given.
9907 if test "${with_bool+set}" = set; then
9908   withval="$with_bool"
9909   NCURSES_BOOL="$withval"
9910 else
9911   NCURSES_BOOL=auto
9912 fi;
9913 echo "$as_me:9913: result: $NCURSES_BOOL" >&5
9914 echo "${ECHO_T}$NCURSES_BOOL" >&6
9915
9916 echo "$as_me:9916: checking for alternate terminal capabilities file" >&5
9917 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9918
9919 # Check whether --with-caps or --without-caps was given.
9920 if test "${with_caps+set}" = set; then
9921   withval="$with_caps"
9922   TERMINFO_CAPS=Caps.$withval
9923 else
9924   TERMINFO_CAPS=Caps
9925 fi;
9926 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9927 echo "$as_me:9927: result: $TERMINFO_CAPS" >&5
9928 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9929
9930 ###   use option --with-chtype to override chtype's type
9931 echo "$as_me:9931: checking for type of chtype" >&5
9932 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9933
9934 # Check whether --with-chtype or --without-chtype was given.
9935 if test "${with_chtype+set}" = set; then
9936   withval="$with_chtype"
9937   NCURSES_CHTYPE="$withval"
9938 else
9939   NCURSES_CHTYPE=auto
9940 fi;
9941 echo "$as_me:9941: result: $NCURSES_CHTYPE" >&5
9942 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9943
9944 ###   use option --with-ospeed to override ospeed's type
9945 echo "$as_me:9945: checking for type of ospeed" >&5
9946 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9947
9948 # Check whether --with-ospeed or --without-ospeed was given.
9949 if test "${with_ospeed+set}" = set; then
9950   withval="$with_ospeed"
9951   NCURSES_OSPEED="$withval"
9952 else
9953   NCURSES_OSPEED=short
9954 fi;
9955 echo "$as_me:9955: result: $NCURSES_OSPEED" >&5
9956 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9957
9958 ###   use option --with-mmask-t to override mmask_t's type
9959 echo "$as_me:9959: checking for type of mmask_t" >&5
9960 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9961
9962 # Check whether --with-mmask-t or --without-mmask-t was given.
9963 if test "${with_mmask_t+set}" = set; then
9964   withval="$with_mmask_t"
9965   NCURSES_MMASK_T="$withval"
9966 else
9967   NCURSES_MMASK_T=auto
9968 fi;
9969 echo "$as_me:9969: result: $NCURSES_MMASK_T" >&5
9970 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9971
9972 ###   use option --with-ccharw-max to override CCHARW_MAX size
9973 echo "$as_me:9973: checking for size CCHARW_MAX" >&5
9974 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9975
9976 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9977 if test "${with_ccharw_max+set}" = set; then
9978   withval="$with_ccharw_max"
9979   NCURSES_CCHARW_MAX="$withval"
9980 else
9981   NCURSES_CCHARW_MAX=5
9982 fi;
9983 echo "$as_me:9983: result: $NCURSES_CCHARW_MAX" >&5
9984 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9985
9986 ###   use option --with-tparm-arg to override tparm's argument type
9987 echo "$as_me:9987: checking for type of tparm args" >&5
9988 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
9989
9990 # Check whether --with-tparm-arg or --without-tparm-arg was given.
9991 if test "${with_tparm_arg+set}" = set; then
9992   withval="$with_tparm_arg"
9993   NCURSES_TPARM_ARG="$withval"
9994 else
9995   NCURSES_TPARM_ARG=long
9996 fi;
9997 echo "$as_me:9997: result: $NCURSES_TPARM_ARG" >&5
9998 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
9999
10000 ### Enable compiling-in rcs id's
10001 echo "$as_me:10001: checking if RCS identifiers should be compiled-in" >&5
10002 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10003
10004 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10005 if test "${with_rcs_ids+set}" = set; then
10006   withval="$with_rcs_ids"
10007   with_rcs_ids=$withval
10008 else
10009   with_rcs_ids=no
10010 fi;
10011 echo "$as_me:10011: result: $with_rcs_ids" >&5
10012 echo "${ECHO_T}$with_rcs_ids" >&6
10013 test "x$with_rcs_ids" = xyes &&
10014 cat >>confdefs.h <<\EOF
10015 #define USE_RCS_IDS 1
10016 EOF
10017
10018 ###############################################################################
10019
10020 echo "$as_me:10020: checking format of man-pages" >&5
10021 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10022
10023 # Check whether --with-manpage-format or --without-manpage-format was given.
10024 if test "${with_manpage_format+set}" = set; then
10025   withval="$with_manpage_format"
10026   MANPAGE_FORMAT=$withval
10027 else
10028   MANPAGE_FORMAT=unknown
10029 fi;
10030
10031 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10032 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10033
10034 cf_unknown=
10035
10036 case $MANPAGE_FORMAT in
10037 unknown)
10038   if test -z "$MANPATH" ; then
10039     MANPATH="/usr/man:/usr/share/man"
10040   fi
10041
10042   # look for the 'date' man-page (it's most likely to be installed!)
10043   MANPAGE_FORMAT=
10044   cf_preform=no
10045   cf_catonly=yes
10046   cf_example=date
10047
10048   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10049   for cf_dir in $MANPATH; do
10050     test -z "$cf_dir" && cf_dir=/usr/man
10051     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
10052     do
10053       cf_test=`echo $cf_name | sed -e 's/*//'`
10054       if test "x$cf_test" = "x$cf_name" ; then
10055
10056         case "$cf_name" in
10057         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10058         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10059         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10060         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10061         esac
10062
10063         case "$cf_name" in
10064         $cf_dir/man*)
10065           cf_catonly=no
10066           ;;
10067         $cf_dir/cat*)
10068           cf_preform=yes
10069           ;;
10070         esac
10071         break
10072       fi
10073
10074       # if we found a match in either man* or cat*, stop looking
10075       if test -n "$MANPAGE_FORMAT" ; then
10076         cf_found=no
10077         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10078         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10079         case "$cf_name" in
10080         $cf_dir/cat*)
10081           cf_found=yes
10082           ;;
10083         esac
10084         test $cf_found=yes && break
10085       fi
10086     done
10087     # only check the first directory in $MANPATH where we find manpages
10088     if test -n "$MANPAGE_FORMAT" ; then
10089        break
10090     fi
10091   done
10092   # if we did not find the example, just assume it is normal
10093   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10094   IFS="$ac_save_ifs"
10095   ;;
10096 *)
10097   for cf_option in $MANPAGE_FORMAT; do
10098      case $cf_option in #(vi
10099      gzip|compress|BSDI|normal|formatted|catonly)
10100        ;;
10101      *)
10102        cf_unknown="$cf_unknown $cf_option"
10103        ;;
10104      esac
10105   done
10106   ;;
10107 esac
10108
10109 echo "$as_me:10109: result: $MANPAGE_FORMAT" >&5
10110 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10111 if test -n "$cf_unknown" ; then
10112   { echo "$as_me:10112: WARNING: Unexpected manpage-format $cf_unknown" >&5
10113 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10114 fi
10115
10116 echo "$as_me:10116: checking for manpage renaming" >&5
10117 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10118
10119 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10120 if test "${with_manpage_renames+set}" = set; then
10121   withval="$with_manpage_renames"
10122   MANPAGE_RENAMES=$withval
10123 else
10124   MANPAGE_RENAMES=yes
10125 fi;
10126
10127 case ".$MANPAGE_RENAMES" in #(vi
10128 .no) #(vi
10129   ;;
10130 .|.yes)
10131   # Debian 'man' program?
10132   if test -f /etc/debian_version ; then
10133     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10134   else
10135     MANPAGE_RENAMES=no
10136   fi
10137   ;;
10138 esac
10139
10140 if test "$MANPAGE_RENAMES" != no ; then
10141   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10142     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10143   elif test ! -f $MANPAGE_RENAMES ; then
10144     { { echo "$as_me:10144: error: not a filename: $MANPAGE_RENAMES" >&5
10145 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10146    { (exit 1); exit 1; }; }
10147   fi
10148
10149   test ! -d man && mkdir man
10150
10151   # Construct a sed-script to perform renaming within man-pages
10152   if test -n "$MANPAGE_RENAMES" ; then
10153     test ! -d man && mkdir man
10154     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10155   fi
10156 fi
10157
10158 echo "$as_me:10158: result: $MANPAGE_RENAMES" >&5
10159 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10160
10161 echo "$as_me:10161: checking if manpage aliases will be installed" >&5
10162 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10163
10164 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10165 if test "${with_manpage_aliases+set}" = set; then
10166   withval="$with_manpage_aliases"
10167   MANPAGE_ALIASES=$withval
10168 else
10169   MANPAGE_ALIASES=yes
10170 fi;
10171
10172 echo "$as_me:10172: result: $MANPAGE_ALIASES" >&5
10173 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10174
10175 case "x$LN_S" in #(vi
10176 xln*) #(vi
10177         cf_use_symlinks=yes
10178         ;;
10179 *)
10180         cf_use_symlinks=no
10181         ;;
10182 esac
10183
10184 MANPAGE_SYMLINKS=no
10185 if test "$MANPAGE_ALIASES" = yes ; then
10186 echo "$as_me:10186: checking if manpage symlinks should be used" >&5
10187 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10188
10189 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10190 if test "${with_manpage_symlinks+set}" = set; then
10191   withval="$with_manpage_symlinks"
10192   MANPAGE_SYMLINKS=$withval
10193 else
10194   MANPAGE_SYMLINKS=$cf_use_symlinks
10195 fi;
10196
10197 if test "$$cf_use_symlinks" = no; then
10198 if test "$MANPAGE_SYMLINKS" = yes ; then
10199         { echo "$as_me:10199: WARNING: cannot make symlinks" >&5
10200 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10201         MANPAGE_SYMLINKS=no
10202 fi
10203 fi
10204
10205 echo "$as_me:10205: result: $MANPAGE_SYMLINKS" >&5
10206 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10207 fi
10208
10209 echo "$as_me:10209: checking for manpage tbl" >&5
10210 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10211
10212 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10213 if test "${with_manpage_tbl+set}" = set; then
10214   withval="$with_manpage_tbl"
10215   MANPAGE_TBL=$withval
10216 else
10217   MANPAGE_TBL=no
10218 fi;
10219
10220 echo "$as_me:10220: result: $MANPAGE_TBL" >&5
10221 echo "${ECHO_T}$MANPAGE_TBL" >&6
10222
10223   if test "$prefix" = "NONE" ; then
10224      cf_prefix="$ac_default_prefix"
10225   else
10226      cf_prefix="$prefix"
10227   fi
10228
10229   case "$MANPAGE_FORMAT" in # (vi
10230   *catonly*) # (vi
10231     cf_format=yes
10232     cf_inboth=no
10233     ;;
10234   *formatted*) # (vi
10235     cf_format=yes
10236     cf_inboth=yes
10237     ;;
10238   *)
10239     cf_format=no
10240     cf_inboth=no
10241     ;;
10242   esac
10243
10244 test ! -d man && mkdir man
10245
10246 cf_so_strip=
10247 cf_compress=
10248 case "$MANPAGE_FORMAT" in #(vi
10249 *compress*) #(vi
10250         cf_so_strip="Z"
10251         cf_compress=compress
10252   ;;
10253 *gzip*)
10254         cf_so_strip="gz"
10255         cf_compress=gzip
10256   ;;
10257 esac
10258
10259 cf_edit_man=./edit_man.sh
10260 cf_man_alias=`pwd`/man_alias.sed
10261
10262 cat >$cf_edit_man <<CF_EOF
10263 #! /bin/sh
10264 # this script is generated by the configure-script CF_MAN_PAGES macro.
10265
10266 prefix="$cf_prefix"
10267 datarootdir="$datarootdir"
10268 datadir="$datadir"
10269
10270 NCURSES_MAJOR="$NCURSES_MAJOR"
10271 NCURSES_MINOR="$NCURSES_MINOR"
10272 NCURSES_PATCH="$NCURSES_PATCH"
10273
10274 NCURSES_OSPEED="$NCURSES_OSPEED"
10275 TERMINFO="$TERMINFO"
10276
10277 INSTALL="$INSTALL"
10278 INSTALL_DATA="$INSTALL_DATA"
10279
10280 transform="$program_transform_name"
10281
10282 TMP=\${TMPDIR:=/tmp}/man\$\$
10283 trap "rm -f \$TMP" 0 1 2 5 15
10284
10285 form=\$1
10286 shift || exit 1
10287
10288 verb=\$1
10289 shift || exit 1
10290
10291 mandir=\$1
10292 shift || exit 1
10293
10294 srcdir=\$1
10295 top_srcdir=\$srcdir/..
10296 shift || exit 1
10297
10298 if test "\$form" = normal ; then
10299         if test "$cf_format" = yes ; then
10300         if test "$cf_inboth" = no ; then
10301                 sh \$0 format \$verb \$mandir \$srcdir \$*
10302                 exit $?
10303         fi
10304         fi
10305         cf_subdir=\$mandir/man
10306         cf_tables=$MANPAGE_TBL
10307 else
10308         cf_subdir=\$mandir/cat
10309         cf_tables=yes
10310 fi
10311
10312 # process the list of source-files
10313 for i in \$* ; do
10314 case \$i in #(vi
10315 *.orig|*.rej) ;; #(vi
10316 *.[0-9]*)
10317         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10318         if test \$verb = installing ; then
10319         if test ! -d \$cf_subdir\${section} ; then
10320                 mkdir -p \$cf_subdir\$section
10321         fi
10322         fi
10323
10324         # replace variables in man page
10325         if test ! -f $cf_man_alias ; then
10326 cat >>$cf_man_alias <<-CF_EOF2
10327                 s,@DATADIR@,\$datadir,g
10328                 s,@TERMINFO@,\$TERMINFO,g
10329                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10330                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10331                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10332                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10333 CF_EOF
10334
10335         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10336         do
10337                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10338                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10339 cat >>$cf_edit_man <<-CF_EOF
10340                 s,@$cf_NAME@,$cf_name,g
10341 CF_EOF
10342         done
10343
10344 cat >>$cf_edit_man <<CF_EOF
10345 CF_EOF2
10346                 echo "...made $cf_man_alias"
10347         fi
10348
10349         aliases=
10350         cf_source=\`basename \$i\`
10351         inalias=\$cf_source
10352         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10353         if test ! -f \$inalias ; then
10354                 echo .. skipped \$cf_source
10355                 continue
10356         fi
10357 CF_EOF
10358
10359 if test "$MANPAGE_ALIASES" != no ; then
10360 cat >>$cf_edit_man <<CF_EOF
10361         nCurses=ignore.3x
10362         test $with_curses_h = yes && nCurses=ncurses.3x
10363         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10364 CF_EOF
10365 fi
10366
10367 if test "$MANPAGE_RENAMES" = no ; then
10368 cat >>$cf_edit_man <<CF_EOF
10369         # perform program transformations for section 1 man pages
10370         if test \$section = 1 ; then
10371                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10372         else
10373                 cf_target=\$cf_subdir\${section}/\$cf_source
10374         fi
10375 CF_EOF
10376 else
10377 cat >>$cf_edit_man <<CF_EOF
10378         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10379         if test -z "\$cf_target" ; then
10380                 echo '? missing rename for '\$cf_source
10381                 cf_target="\$cf_source"
10382         fi
10383         cf_target="\$cf_subdir\${section}/\${cf_target}"
10384
10385 CF_EOF
10386 fi
10387
10388 cat >>$cf_edit_man <<CF_EOF
10389         sed     -f $cf_man_alias \\
10390 CF_EOF
10391
10392 if test -f $MANPAGE_RENAMES ; then
10393 cat >>$cf_edit_man <<CF_EOF
10394                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10395 CF_EOF
10396 else
10397 cat >>$cf_edit_man <<CF_EOF
10398                 < \$i >\$TMP
10399 CF_EOF
10400 fi
10401
10402 cat >>$cf_edit_man <<CF_EOF
10403 if test \$cf_tables = yes ; then
10404         tbl \$TMP >\$TMP.out
10405         mv \$TMP.out \$TMP
10406 fi
10407 CF_EOF
10408
10409 if test $with_overwrite != yes ; then
10410 cat >>$cf_edit_man <<CF_EOF
10411         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10412         mv \$TMP.out \$TMP
10413 CF_EOF
10414 fi
10415
10416 if test $with_curses_h != yes ; then
10417 cat >>$cf_edit_man <<CF_EOF
10418         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10419         mv \$TMP.out \$TMP
10420 CF_EOF
10421 fi
10422
10423 cat >>$cf_edit_man <<CF_EOF
10424         if test \$form = format ; then
10425                 nroff -man \$TMP >\$TMP.out
10426                 mv \$TMP.out \$TMP
10427         fi
10428 CF_EOF
10429
10430 if test -n "$cf_compress" ; then
10431 cat >>$cf_edit_man <<CF_EOF
10432         if test \$verb = installing ; then
10433         if ( $cf_compress -f \$TMP )
10434         then
10435                 mv \$TMP.$cf_so_strip \$TMP
10436         fi
10437         fi
10438         cf_target="\$cf_target.$cf_so_strip"
10439 CF_EOF
10440 fi
10441
10442 case "$MANPAGE_FORMAT" in #(vi
10443 *BSDI*)
10444 cat >>$cf_edit_man <<CF_EOF
10445         if test \$form = format ; then
10446                 # BSDI installs only .0 suffixes in the cat directories
10447                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10448         fi
10449 CF_EOF
10450   ;;
10451 esac
10452
10453 cat >>$cf_edit_man <<CF_EOF
10454         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10455         if test \$verb = installing ; then
10456                 echo \$verb \$cf_target
10457                 \$INSTALL_DATA \$TMP \$cf_target
10458                 test -d \$cf_subdir\${section} &&
10459                 test -n "\$aliases" && (
10460                         cd \$cf_subdir\${section} && (
10461                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10462                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10463                                 cf_target=\`basename \$cf_target\`
10464                                 for cf_alias in \$aliases
10465                                 do
10466                                         if test \$section = 1 ; then
10467                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10468                                         fi
10469
10470                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10471                                                 if test -f \$cf_alias\${suffix} ; then
10472                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10473                                                         then
10474                                                                 continue
10475                                                         fi
10476                                                 fi
10477                                                 echo .. \$verb alias \$cf_alias\${suffix}
10478 CF_EOF
10479 case "x$LN_S" in #(vi
10480 *-f) #(vi
10481 cat >>$cf_edit_man <<CF_EOF
10482                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10483 CF_EOF
10484         ;;
10485 *)
10486 cat >>$cf_edit_man <<CF_EOF
10487                                                 rm -f \$cf_alias\${suffix}
10488                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10489 CF_EOF
10490         ;;
10491 esac
10492 cat >>$cf_edit_man <<CF_EOF
10493                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10494                                                 echo ".so \$cf_source" >\$TMP
10495 CF_EOF
10496 if test -n "$cf_compress" ; then
10497 cat >>$cf_edit_man <<CF_EOF
10498                                                 if test -n "$cf_so_strip" ; then
10499                                                         $cf_compress -f \$TMP
10500                                                         mv \$TMP.$cf_so_strip \$TMP
10501                                                 fi
10502 CF_EOF
10503 fi
10504 cat >>$cf_edit_man <<CF_EOF
10505                                                 echo .. \$verb alias \$cf_alias\${suffix}
10506                                                 rm -f \$cf_alias\${suffix}
10507                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10508                                         fi
10509                                 done
10510                         )
10511                 )
10512         elif test \$verb = removing ; then
10513                 test -f \$cf_target && (
10514                         echo \$verb \$cf_target
10515                         rm -f \$cf_target
10516                 )
10517                 test -d \$cf_subdir\${section} &&
10518                 test -n "\$aliases" && (
10519                         cd \$cf_subdir\${section} && (
10520                                 for cf_alias in \$aliases
10521                                 do
10522                                         if test \$section = 1 ; then
10523                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10524                                         fi
10525
10526                                         echo .. \$verb alias \$cf_alias\${suffix}
10527                                         rm -f \$cf_alias\${suffix}
10528                                 done
10529                         )
10530                 )
10531         else
10532 #               echo ".hy 0"
10533                 cat \$TMP
10534         fi
10535         ;;
10536 esac
10537 done
10538
10539 if test $cf_inboth = yes ; then
10540 if test \$form != format ; then
10541         sh \$0 format \$verb \$mandir \$srcdir \$*
10542 fi
10543 fi
10544
10545 exit 0
10546 CF_EOF
10547 chmod 755 $cf_edit_man
10548
10549 ###############################################################################
10550
10551 ### Note that some functions (such as const) are normally disabled anyway.
10552 echo "$as_me:10552: checking if you want to build with function extensions" >&5
10553 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10554
10555 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10556 if test "${enable_ext_funcs+set}" = set; then
10557   enableval="$enable_ext_funcs"
10558   with_ext_funcs=$enableval
10559 else
10560   with_ext_funcs=yes
10561 fi;
10562 echo "$as_me:10562: result: $with_ext_funcs" >&5
10563 echo "${ECHO_T}$with_ext_funcs" >&6
10564 if test "x$with_ext_funcs" = xyes ; then
10565         NCURSES_EXT_FUNCS=1
10566
10567 cat >>confdefs.h <<\EOF
10568 #define HAVE_ASSUME_DEFAULT_COLORS 1
10569 EOF
10570
10571 cat >>confdefs.h <<\EOF
10572 #define HAVE_CURSES_VERSION 1
10573 EOF
10574
10575 cat >>confdefs.h <<\EOF
10576 #define HAVE_HAS_KEY 1
10577 EOF
10578
10579 cat >>confdefs.h <<\EOF
10580 #define HAVE_RESIZETERM 1
10581 EOF
10582
10583 cat >>confdefs.h <<\EOF
10584 #define HAVE_RESIZE_TERM 1
10585 EOF
10586
10587 cat >>confdefs.h <<\EOF
10588 #define HAVE_TERM_ENTRY_H 1
10589 EOF
10590
10591 cat >>confdefs.h <<\EOF
10592 #define HAVE_USE_DEFAULT_COLORS 1
10593 EOF
10594
10595 cat >>confdefs.h <<\EOF
10596 #define HAVE_USE_SCREEN 1
10597 EOF
10598
10599 cat >>confdefs.h <<\EOF
10600 #define HAVE_USE_WINDOW 1
10601 EOF
10602
10603 cat >>confdefs.h <<\EOF
10604 #define HAVE_WRESIZE 1
10605 EOF
10606
10607 cat >>confdefs.h <<\EOF
10608 #define NCURSES_EXT_FUNCS 1
10609 EOF
10610
10611         GENERATED_EXT_FUNCS=generated
10612 else
10613         NCURSES_EXT_FUNCS=0
10614         GENERATED_EXT_FUNCS=
10615 fi
10616
10617 echo "$as_me:10617: checking if you want to build with experimental SCREEN extensions" >&5
10618 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10619
10620 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10621 if test "${enable_sp_funcs+set}" = set; then
10622   enableval="$enable_sp_funcs"
10623   with_sp_funcs=$enableval
10624 else
10625   with_sp_funcs=no
10626 fi;
10627 echo "$as_me:10627: result: $with_sp_funcs" >&5
10628 echo "${ECHO_T}$with_sp_funcs" >&6
10629 if test "x$with_sp_funcs" = xyes ; then
10630         NCURSES_SP_FUNCS=1
10631
10632 cat >>confdefs.h <<\EOF
10633 #define NCURSES_SP_FUNCS 1
10634 EOF
10635
10636         GENERATED_SP_FUNCS=generated
10637 else
10638         NCURSES_SP_FUNCS=0
10639         GENERATED_SP_FUNCS=
10640 fi
10641
10642 echo "$as_me:10642: checking if you want to build with experimental terminal-driver" >&5
10643 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10644
10645 # Check whether --enable-term-driver or --disable-term-driver was given.
10646 if test "${enable_term_driver+set}" = set; then
10647   enableval="$enable_term_driver"
10648   with_term_driver=$enableval
10649 else
10650   with_term_driver=no
10651 fi;
10652 echo "$as_me:10652: result: $with_term_driver" >&5
10653 echo "${ECHO_T}$with_term_driver" >&6
10654 if test "x$with_term_driver" = xyes ; then
10655
10656 cat >>confdefs.h <<\EOF
10657 #define USE_TERM_DRIVER 1
10658 EOF
10659
10660         if test "x$with_sp_funcs" != xyes ; then
10661                 { { echo "$as_me:10661: error: The term-driver option relies upon sp-funcs" >&5
10662 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10663    { (exit 1); exit 1; }; }
10664         fi
10665 fi
10666
10667 ###   use option --enable-const to turn on use of const beyond that in XSI.
10668 echo "$as_me:10668: checking for extended use of const keyword" >&5
10669 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10670
10671 # Check whether --enable-const or --disable-const was given.
10672 if test "${enable_const+set}" = set; then
10673   enableval="$enable_const"
10674   with_ext_const=$enableval
10675 else
10676   with_ext_const=no
10677 fi;
10678 echo "$as_me:10678: result: $with_ext_const" >&5
10679 echo "${ECHO_T}$with_ext_const" >&6
10680 NCURSES_CONST='/*nothing*/'
10681 if test "x$with_ext_const" = xyes ; then
10682         NCURSES_CONST=const
10683 fi
10684
10685 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10686 echo "$as_me:10686: checking if you want to use extended colors" >&5
10687 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10688
10689 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10690 if test "${enable_ext_colors+set}" = set; then
10691   enableval="$enable_ext_colors"
10692   with_ext_colors=$enableval
10693 else
10694   with_ext_colors=no
10695 fi;
10696 echo "$as_me:10696: result: $with_ext_colors" >&5
10697 echo "${ECHO_T}$with_ext_colors" >&6
10698 NCURSES_EXT_COLORS=0
10699 if test "x$with_ext_colors" = xyes ; then
10700         if test "x$with_widec" != xyes ; then
10701                 { { echo "$as_me:10701: error: This option applies only to wide-character library" >&5
10702 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10703    { (exit 1); exit 1; }; }
10704         else
10705                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10706
10707 if test "${with_abi_version+set}" != set; then
10708         case $cf_cv_rel_version in
10709         5.*)
10710                 cf_cv_rel_version=6.0
10711                 cf_cv_abi_version=6
10712                 { echo "$as_me:10712: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10713 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10714                 ;;
10715         esac
10716 fi
10717
10718         fi
10719         NCURSES_EXT_COLORS=1
10720
10721 cat >>confdefs.h <<\EOF
10722 #define NCURSES_EXT_COLORS 1
10723 EOF
10724
10725 fi
10726
10727 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10728 echo "$as_me:10728: checking if you want to use extended mouse encoding" >&5
10729 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10730
10731 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10732 if test "${enable_ext_mouse+set}" = set; then
10733   enableval="$enable_ext_mouse"
10734   with_ext_mouse=$enableval
10735 else
10736   with_ext_mouse=no
10737 fi;
10738 echo "$as_me:10738: result: $with_ext_mouse" >&5
10739 echo "${ECHO_T}$with_ext_mouse" >&6
10740 NCURSES_MOUSE_VERSION=1
10741 if test "x$with_ext_mouse" = xyes ; then
10742         NCURSES_MOUSE_VERSION=2
10743
10744 if test "${with_abi_version+set}" != set; then
10745         case $cf_cv_rel_version in
10746         5.*)
10747                 cf_cv_rel_version=6.0
10748                 cf_cv_abi_version=6
10749                 { echo "$as_me:10749: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10750 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10751                 ;;
10752         esac
10753 fi
10754
10755 fi
10756
10757 echo "$as_me:10757: checking if you want \$NCURSES_NO_PADDING code" >&5
10758 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10759
10760 # Check whether --enable-no-padding or --disable-no-padding was given.
10761 if test "${enable_no_padding+set}" = set; then
10762   enableval="$enable_no_padding"
10763   with_no_padding=$enableval
10764 else
10765   with_no_padding=$with_ext_funcs
10766 fi;
10767 echo "$as_me:10767: result: $with_no_padding" >&5
10768 echo "${ECHO_T}$with_no_padding" >&6
10769 test "x$with_no_padding" = xyes &&
10770 cat >>confdefs.h <<\EOF
10771 #define NCURSES_NO_PADDING 1
10772 EOF
10773
10774 echo "$as_me:10774: checking for ANSI C header files" >&5
10775 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10776 if test "${ac_cv_header_stdc+set}" = set; then
10777   echo $ECHO_N "(cached) $ECHO_C" >&6
10778 else
10779   cat >conftest.$ac_ext <<_ACEOF
10780 #line 10780 "configure"
10781 #include "confdefs.h"
10782 #include <stdlib.h>
10783 #include <stdarg.h>
10784 #include <string.h>
10785 #include <float.h>
10786
10787 _ACEOF
10788 if { (eval echo "$as_me:10788: \"$ac_cpp conftest.$ac_ext\"") >&5
10789   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10790   ac_status=$?
10791   egrep -v '^ *\+' conftest.er1 >conftest.err
10792   rm -f conftest.er1
10793   cat conftest.err >&5
10794   echo "$as_me:10794: \$? = $ac_status" >&5
10795   (exit $ac_status); } >/dev/null; then
10796   if test -s conftest.err; then
10797     ac_cpp_err=$ac_c_preproc_warn_flag
10798   else
10799     ac_cpp_err=
10800   fi
10801 else
10802   ac_cpp_err=yes
10803 fi
10804 if test -z "$ac_cpp_err"; then
10805   ac_cv_header_stdc=yes
10806 else
10807   echo "$as_me: failed program was:" >&5
10808   cat conftest.$ac_ext >&5
10809   ac_cv_header_stdc=no
10810 fi
10811 rm -f conftest.err conftest.$ac_ext
10812
10813 if test $ac_cv_header_stdc = yes; then
10814   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10815   cat >conftest.$ac_ext <<_ACEOF
10816 #line 10816 "configure"
10817 #include "confdefs.h"
10818 #include <string.h>
10819
10820 _ACEOF
10821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10822   egrep "memchr" >/dev/null 2>&1; then
10823   :
10824 else
10825   ac_cv_header_stdc=no
10826 fi
10827 rm -rf conftest*
10828
10829 fi
10830
10831 if test $ac_cv_header_stdc = yes; then
10832   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10833   cat >conftest.$ac_ext <<_ACEOF
10834 #line 10834 "configure"
10835 #include "confdefs.h"
10836 #include <stdlib.h>
10837
10838 _ACEOF
10839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10840   egrep "free" >/dev/null 2>&1; then
10841   :
10842 else
10843   ac_cv_header_stdc=no
10844 fi
10845 rm -rf conftest*
10846
10847 fi
10848
10849 if test $ac_cv_header_stdc = yes; then
10850   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10851   if test "$cross_compiling" = yes; then
10852   :
10853 else
10854   cat >conftest.$ac_ext <<_ACEOF
10855 #line 10855 "configure"
10856 #include "confdefs.h"
10857 #include <ctype.h>
10858 #if ((' ' & 0x0FF) == 0x020)
10859 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10860 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10861 #else
10862 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10863                      || ('j' <= (c) && (c) <= 'r') \
10864                      || ('s' <= (c) && (c) <= 'z'))
10865 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10866 #endif
10867
10868 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10869 int
10870 main ()
10871 {
10872   int i;
10873   for (i = 0; i < 256; i++)
10874     if (XOR (islower (i), ISLOWER (i))
10875         || toupper (i) != TOUPPER (i))
10876       $ac_main_return(2);
10877   $ac_main_return (0);
10878 }
10879 _ACEOF
10880 rm -f conftest$ac_exeext
10881 if { (eval echo "$as_me:10881: \"$ac_link\"") >&5
10882   (eval $ac_link) 2>&5
10883   ac_status=$?
10884   echo "$as_me:10884: \$? = $ac_status" >&5
10885   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10886   { (eval echo "$as_me:10886: \"$ac_try\"") >&5
10887   (eval $ac_try) 2>&5
10888   ac_status=$?
10889   echo "$as_me:10889: \$? = $ac_status" >&5
10890   (exit $ac_status); }; }; then
10891   :
10892 else
10893   echo "$as_me: program exited with status $ac_status" >&5
10894 echo "$as_me: failed program was:" >&5
10895 cat conftest.$ac_ext >&5
10896 ac_cv_header_stdc=no
10897 fi
10898 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10899 fi
10900 fi
10901 fi
10902 echo "$as_me:10902: result: $ac_cv_header_stdc" >&5
10903 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10904 if test $ac_cv_header_stdc = yes; then
10905
10906 cat >>confdefs.h <<\EOF
10907 #define STDC_HEADERS 1
10908 EOF
10909
10910 fi
10911
10912 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10913
10914 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10915                   inttypes.h stdint.h unistd.h
10916 do
10917 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10918 echo "$as_me:10918: checking for $ac_header" >&5
10919 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10920 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10921   echo $ECHO_N "(cached) $ECHO_C" >&6
10922 else
10923   cat >conftest.$ac_ext <<_ACEOF
10924 #line 10924 "configure"
10925 #include "confdefs.h"
10926 $ac_includes_default
10927 #include <$ac_header>
10928 _ACEOF
10929 rm -f conftest.$ac_objext
10930 if { (eval echo "$as_me:10930: \"$ac_compile\"") >&5
10931   (eval $ac_compile) 2>&5
10932   ac_status=$?
10933   echo "$as_me:10933: \$? = $ac_status" >&5
10934   (exit $ac_status); } &&
10935          { ac_try='test -s conftest.$ac_objext'
10936   { (eval echo "$as_me:10936: \"$ac_try\"") >&5
10937   (eval $ac_try) 2>&5
10938   ac_status=$?
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); }; }; then
10941   eval "$as_ac_Header=yes"
10942 else
10943   echo "$as_me: failed program was:" >&5
10944 cat conftest.$ac_ext >&5
10945 eval "$as_ac_Header=no"
10946 fi
10947 rm -f conftest.$ac_objext conftest.$ac_ext
10948 fi
10949 echo "$as_me:10949: result: `eval echo '${'$as_ac_Header'}'`" >&5
10950 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10951 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10952   cat >>confdefs.h <<EOF
10953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10954 EOF
10955
10956 fi
10957 done
10958
10959 echo "$as_me:10959: checking for signed char" >&5
10960 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10961 if test "${ac_cv_type_signed_char+set}" = set; then
10962   echo $ECHO_N "(cached) $ECHO_C" >&6
10963 else
10964   cat >conftest.$ac_ext <<_ACEOF
10965 #line 10965 "configure"
10966 #include "confdefs.h"
10967 $ac_includes_default
10968 int
10969 main ()
10970 {
10971 if ((signed char *) 0)
10972   return 0;
10973 if (sizeof (signed char))
10974   return 0;
10975   ;
10976   return 0;
10977 }
10978 _ACEOF
10979 rm -f conftest.$ac_objext
10980 if { (eval echo "$as_me:10980: \"$ac_compile\"") >&5
10981   (eval $ac_compile) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit $ac_status); } &&
10985          { ac_try='test -s conftest.$ac_objext'
10986   { (eval echo "$as_me:10986: \"$ac_try\"") >&5
10987   (eval $ac_try) 2>&5
10988   ac_status=$?
10989   echo "$as_me:10989: \$? = $ac_status" >&5
10990   (exit $ac_status); }; }; then
10991   ac_cv_type_signed_char=yes
10992 else
10993   echo "$as_me: failed program was:" >&5
10994 cat conftest.$ac_ext >&5
10995 ac_cv_type_signed_char=no
10996 fi
10997 rm -f conftest.$ac_objext conftest.$ac_ext
10998 fi
10999 echo "$as_me:10999: result: $ac_cv_type_signed_char" >&5
11000 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11001
11002 echo "$as_me:11002: checking size of signed char" >&5
11003 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11004 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11005   echo $ECHO_N "(cached) $ECHO_C" >&6
11006 else
11007   if test "$ac_cv_type_signed_char" = yes; then
11008   if test "$cross_compiling" = yes; then
11009   # Depending upon the size, compute the lo and hi bounds.
11010 cat >conftest.$ac_ext <<_ACEOF
11011 #line 11011 "configure"
11012 #include "confdefs.h"
11013 $ac_includes_default
11014 int
11015 main ()
11016 {
11017 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11018   ;
11019   return 0;
11020 }
11021 _ACEOF
11022 rm -f conftest.$ac_objext
11023 if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5
11024   (eval $ac_compile) 2>&5
11025   ac_status=$?
11026   echo "$as_me:11026: \$? = $ac_status" >&5
11027   (exit $ac_status); } &&
11028          { ac_try='test -s conftest.$ac_objext'
11029   { (eval echo "$as_me:11029: \"$ac_try\"") >&5
11030   (eval $ac_try) 2>&5
11031   ac_status=$?
11032   echo "$as_me:11032: \$? = $ac_status" >&5
11033   (exit $ac_status); }; }; then
11034   ac_lo=0 ac_mid=0
11035   while :; do
11036     cat >conftest.$ac_ext <<_ACEOF
11037 #line 11037 "configure"
11038 #include "confdefs.h"
11039 $ac_includes_default
11040 int
11041 main ()
11042 {
11043 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11044   ;
11045   return 0;
11046 }
11047 _ACEOF
11048 rm -f conftest.$ac_objext
11049 if { (eval echo "$as_me:11049: \"$ac_compile\"") >&5
11050   (eval $ac_compile) 2>&5
11051   ac_status=$?
11052   echo "$as_me:11052: \$? = $ac_status" >&5
11053   (exit $ac_status); } &&
11054          { ac_try='test -s conftest.$ac_objext'
11055   { (eval echo "$as_me:11055: \"$ac_try\"") >&5
11056   (eval $ac_try) 2>&5
11057   ac_status=$?
11058   echo "$as_me:11058: \$? = $ac_status" >&5
11059   (exit $ac_status); }; }; then
11060   ac_hi=$ac_mid; break
11061 else
11062   echo "$as_me: failed program was:" >&5
11063 cat conftest.$ac_ext >&5
11064 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11065 fi
11066 rm -f conftest.$ac_objext conftest.$ac_ext
11067   done
11068 else
11069   echo "$as_me: failed program was:" >&5
11070 cat conftest.$ac_ext >&5
11071 ac_hi=-1 ac_mid=-1
11072   while :; do
11073     cat >conftest.$ac_ext <<_ACEOF
11074 #line 11074 "configure"
11075 #include "confdefs.h"
11076 $ac_includes_default
11077 int
11078 main ()
11079 {
11080 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11081   ;
11082   return 0;
11083 }
11084 _ACEOF
11085 rm -f conftest.$ac_objext
11086 if { (eval echo "$as_me:11086: \"$ac_compile\"") >&5
11087   (eval $ac_compile) 2>&5
11088   ac_status=$?
11089   echo "$as_me:11089: \$? = $ac_status" >&5
11090   (exit $ac_status); } &&
11091          { ac_try='test -s conftest.$ac_objext'
11092   { (eval echo "$as_me:11092: \"$ac_try\"") >&5
11093   (eval $ac_try) 2>&5
11094   ac_status=$?
11095   echo "$as_me:11095: \$? = $ac_status" >&5
11096   (exit $ac_status); }; }; then
11097   ac_lo=$ac_mid; break
11098 else
11099   echo "$as_me: failed program was:" >&5
11100 cat conftest.$ac_ext >&5
11101 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11102 fi
11103 rm -f conftest.$ac_objext conftest.$ac_ext
11104   done
11105 fi
11106 rm -f conftest.$ac_objext conftest.$ac_ext
11107 # Binary search between lo and hi bounds.
11108 while test "x$ac_lo" != "x$ac_hi"; do
11109   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11110   cat >conftest.$ac_ext <<_ACEOF
11111 #line 11111 "configure"
11112 #include "confdefs.h"
11113 $ac_includes_default
11114 int
11115 main ()
11116 {
11117 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11118   ;
11119   return 0;
11120 }
11121 _ACEOF
11122 rm -f conftest.$ac_objext
11123 if { (eval echo "$as_me:11123: \"$ac_compile\"") >&5
11124   (eval $ac_compile) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); } &&
11128          { ac_try='test -s conftest.$ac_objext'
11129   { (eval echo "$as_me:11129: \"$ac_try\"") >&5
11130   (eval $ac_try) 2>&5
11131   ac_status=$?
11132   echo "$as_me:11132: \$? = $ac_status" >&5
11133   (exit $ac_status); }; }; then
11134   ac_hi=$ac_mid
11135 else
11136   echo "$as_me: failed program was:" >&5
11137 cat conftest.$ac_ext >&5
11138 ac_lo=`expr $ac_mid + 1`
11139 fi
11140 rm -f conftest.$ac_objext conftest.$ac_ext
11141 done
11142 ac_cv_sizeof_signed_char=$ac_lo
11143 else
11144   if test "$cross_compiling" = yes; then
11145   { { echo "$as_me:11145: error: cannot run test program while cross compiling" >&5
11146 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11147    { (exit 1); exit 1; }; }
11148 else
11149   cat >conftest.$ac_ext <<_ACEOF
11150 #line 11150 "configure"
11151 #include "confdefs.h"
11152 $ac_includes_default
11153 int
11154 main ()
11155 {
11156 FILE *f = fopen ("conftest.val", "w");
11157 if (!f)
11158   $ac_main_return (1);
11159 fprintf (f, "%d", (sizeof (signed char)));
11160 fclose (f);
11161   ;
11162   return 0;
11163 }
11164 _ACEOF
11165 rm -f conftest$ac_exeext
11166 if { (eval echo "$as_me:11166: \"$ac_link\"") >&5
11167   (eval $ac_link) 2>&5
11168   ac_status=$?
11169   echo "$as_me:11169: \$? = $ac_status" >&5
11170   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11171   { (eval echo "$as_me:11171: \"$ac_try\"") >&5
11172   (eval $ac_try) 2>&5
11173   ac_status=$?
11174   echo "$as_me:11174: \$? = $ac_status" >&5
11175   (exit $ac_status); }; }; then
11176   ac_cv_sizeof_signed_char=`cat conftest.val`
11177 else
11178   echo "$as_me: program exited with status $ac_status" >&5
11179 echo "$as_me: failed program was:" >&5
11180 cat conftest.$ac_ext >&5
11181 fi
11182 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11183 fi
11184 fi
11185 rm -f conftest.val
11186 else
11187   ac_cv_sizeof_signed_char=0
11188 fi
11189 fi
11190 echo "$as_me:11190: result: $ac_cv_sizeof_signed_char" >&5
11191 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11192 cat >>confdefs.h <<EOF
11193 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11194 EOF
11195
11196 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11197         NCURSES_SBOOL="signed char"
11198 else
11199         NCURSES_SBOOL="char"
11200 fi
11201 echo "$as_me:11201: checking if you want to use signed Boolean array in term.h" >&5
11202 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11203
11204 # Check whether --enable-signed-char or --disable-signed-char was given.
11205 if test "${enable_signed_char+set}" = set; then
11206   enableval="$enable_signed_char"
11207   with_signed_char=$enableval
11208 else
11209   with_signed_char=no
11210 fi;
11211 echo "$as_me:11211: result: $with_signed_char" >&5
11212 echo "${ECHO_T}$with_signed_char" >&6
11213 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11214
11215 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11216 echo "$as_me:11216: checking if you want SIGWINCH handler" >&5
11217 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11218
11219 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11220 if test "${enable_sigwinch+set}" = set; then
11221   enableval="$enable_sigwinch"
11222   with_sigwinch=$enableval
11223 else
11224   with_sigwinch=$with_ext_funcs
11225 fi;
11226 echo "$as_me:11226: result: $with_sigwinch" >&5
11227 echo "${ECHO_T}$with_sigwinch" >&6
11228 test "x$with_sigwinch" = xyes &&
11229 cat >>confdefs.h <<\EOF
11230 #define USE_SIGWINCH 1
11231 EOF
11232
11233 ###   use option --enable-tcap-names to allow user to define new capabilities
11234 echo "$as_me:11234: checking if you want user-definable terminal capabilities like termcap" >&5
11235 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11236
11237 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11238 if test "${enable_tcap_names+set}" = set; then
11239   enableval="$enable_tcap_names"
11240   with_tcap_names=$enableval
11241 else
11242   with_tcap_names=$with_ext_funcs
11243 fi;
11244 echo "$as_me:11244: result: $with_tcap_names" >&5
11245 echo "${ECHO_T}$with_tcap_names" >&6
11246 NCURSES_XNAMES=0
11247 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11248
11249 ###############################################################################
11250 # These options are relatively safe to experiment with.
11251
11252 echo "$as_me:11252: checking if you want all development code" >&5
11253 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11254
11255 # Check whether --with-develop or --without-develop was given.
11256 if test "${with_develop+set}" = set; then
11257   withval="$with_develop"
11258   with_develop=$withval
11259 else
11260   with_develop=no
11261 fi;
11262 echo "$as_me:11262: result: $with_develop" >&5
11263 echo "${ECHO_T}$with_develop" >&6
11264
11265 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11266 echo "$as_me:11266: checking if you want hard-tabs code" >&5
11267 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11268
11269 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11270 if test "${enable_hard_tabs+set}" = set; then
11271   enableval="$enable_hard_tabs"
11272
11273 else
11274   enable_hard_tabs=$with_develop
11275 fi;
11276 echo "$as_me:11276: result: $enable_hard_tabs" >&5
11277 echo "${ECHO_T}$enable_hard_tabs" >&6
11278 test "x$enable_hard_tabs" = xyes &&
11279 cat >>confdefs.h <<\EOF
11280 #define USE_HARD_TABS 1
11281 EOF
11282
11283 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11284 echo "$as_me:11284: checking if you want limited support for xmc" >&5
11285 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11286
11287 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11288 if test "${enable_xmc_glitch+set}" = set; then
11289   enableval="$enable_xmc_glitch"
11290
11291 else
11292   enable_xmc_glitch=$with_develop
11293 fi;
11294 echo "$as_me:11294: result: $enable_xmc_glitch" >&5
11295 echo "${ECHO_T}$enable_xmc_glitch" >&6
11296 test "x$enable_xmc_glitch" = xyes &&
11297 cat >>confdefs.h <<\EOF
11298 #define USE_XMC_SUPPORT 1
11299 EOF
11300
11301 ###############################################################################
11302 # These are just experimental, probably should not be in a package:
11303
11304 echo "$as_me:11304: checking if you do not want to assume colors are white-on-black" >&5
11305 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11306
11307 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11308 if test "${enable_assumed_color+set}" = set; then
11309   enableval="$enable_assumed_color"
11310   with_assumed_color=$enableval
11311 else
11312   with_assumed_color=yes
11313 fi;
11314 echo "$as_me:11314: result: $with_assumed_color" >&5
11315 echo "${ECHO_T}$with_assumed_color" >&6
11316 test "x$with_assumed_color" = xyes &&
11317 cat >>confdefs.h <<\EOF
11318 #define USE_ASSUMED_COLOR 1
11319 EOF
11320
11321 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11322 echo "$as_me:11322: checking if you want hashmap scrolling-optimization code" >&5
11323 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11324
11325 # Check whether --enable-hashmap or --disable-hashmap was given.
11326 if test "${enable_hashmap+set}" = set; then
11327   enableval="$enable_hashmap"
11328   with_hashmap=$enableval
11329 else
11330   with_hashmap=yes
11331 fi;
11332 echo "$as_me:11332: result: $with_hashmap" >&5
11333 echo "${ECHO_T}$with_hashmap" >&6
11334 test "x$with_hashmap" = xyes &&
11335 cat >>confdefs.h <<\EOF
11336 #define USE_HASHMAP 1
11337 EOF
11338
11339 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11340 echo "$as_me:11340: checking if you want colorfgbg code" >&5
11341 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11342
11343 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11344 if test "${enable_colorfgbg+set}" = set; then
11345   enableval="$enable_colorfgbg"
11346   with_colorfgbg=$enableval
11347 else
11348   with_colorfgbg=no
11349 fi;
11350 echo "$as_me:11350: result: $with_colorfgbg" >&5
11351 echo "${ECHO_T}$with_colorfgbg" >&6
11352 test "x$with_colorfgbg" = xyes &&
11353 cat >>confdefs.h <<\EOF
11354 #define USE_COLORFGBG 1
11355 EOF
11356
11357 ###   use option --enable-interop to turn on use of bindings used for interop
11358 echo "$as_me:11358: checking if you want interop bindings" >&5
11359 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11360
11361 # Check whether --enable-interop or --disable-interop was given.
11362 if test "${enable_interop+set}" = set; then
11363   enableval="$enable_interop"
11364   with_exp_interop=$enableval
11365 else
11366   with_exp_interop=no
11367 fi;
11368 echo "$as_me:11368: result: $with_exp_interop" >&5
11369 echo "${ECHO_T}$with_exp_interop" >&6
11370
11371 NCURSES_INTEROP_FUNCS=0
11372 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11373
11374 # This is still experimental (20080329), but should ultimately be moved to
11375 # the script-block --with-normal, etc.
11376
11377 echo "$as_me:11377: checking if you want to link with the pthread library" >&5
11378 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11379
11380 # Check whether --with-pthread or --without-pthread was given.
11381 if test "${with_pthread+set}" = set; then
11382   withval="$with_pthread"
11383   with_pthread=$withval
11384 else
11385   with_pthread=no
11386 fi;
11387 echo "$as_me:11387: result: $with_pthread" >&5
11388 echo "${ECHO_T}$with_pthread" >&6
11389
11390 if test "$with_pthread" != no ; then
11391     echo "$as_me:11391: checking for pthread.h" >&5
11392 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11393 if test "${ac_cv_header_pthread_h+set}" = set; then
11394   echo $ECHO_N "(cached) $ECHO_C" >&6
11395 else
11396   cat >conftest.$ac_ext <<_ACEOF
11397 #line 11397 "configure"
11398 #include "confdefs.h"
11399 #include <pthread.h>
11400 _ACEOF
11401 if { (eval echo "$as_me:11401: \"$ac_cpp conftest.$ac_ext\"") >&5
11402   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11403   ac_status=$?
11404   egrep -v '^ *\+' conftest.er1 >conftest.err
11405   rm -f conftest.er1
11406   cat conftest.err >&5
11407   echo "$as_me:11407: \$? = $ac_status" >&5
11408   (exit $ac_status); } >/dev/null; then
11409   if test -s conftest.err; then
11410     ac_cpp_err=$ac_c_preproc_warn_flag
11411   else
11412     ac_cpp_err=
11413   fi
11414 else
11415   ac_cpp_err=yes
11416 fi
11417 if test -z "$ac_cpp_err"; then
11418   ac_cv_header_pthread_h=yes
11419 else
11420   echo "$as_me: failed program was:" >&5
11421   cat conftest.$ac_ext >&5
11422   ac_cv_header_pthread_h=no
11423 fi
11424 rm -f conftest.err conftest.$ac_ext
11425 fi
11426 echo "$as_me:11426: result: $ac_cv_header_pthread_h" >&5
11427 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11428 if test $ac_cv_header_pthread_h = yes; then
11429
11430 cat >>confdefs.h <<\EOF
11431 #define HAVE_PTHREADS_H 1
11432 EOF
11433
11434         for cf_lib_pthread in pthread c_r
11435         do
11436             echo "$as_me:11436: checking if we can link with the $cf_lib_pthread library" >&5
11437 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11438             cf_save_LIBS="$LIBS"
11439             LIBS="-l$cf_lib_pthread $LIBS"
11440             cat >conftest.$ac_ext <<_ACEOF
11441 #line 11441 "configure"
11442 #include "confdefs.h"
11443
11444 #include <pthread.h>
11445
11446 int
11447 main ()
11448 {
11449
11450                 int rc = pthread_create(0,0,0,0);
11451                 int r2 = pthread_mutexattr_settype(0, 0);
11452
11453   ;
11454   return 0;
11455 }
11456 _ACEOF
11457 rm -f conftest.$ac_objext conftest$ac_exeext
11458 if { (eval echo "$as_me:11458: \"$ac_link\"") >&5
11459   (eval $ac_link) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit $ac_status); } &&
11463          { ac_try='test -s conftest$ac_exeext'
11464   { (eval echo "$as_me:11464: \"$ac_try\"") >&5
11465   (eval $ac_try) 2>&5
11466   ac_status=$?
11467   echo "$as_me:11467: \$? = $ac_status" >&5
11468   (exit $ac_status); }; }; then
11469   with_pthread=yes
11470 else
11471   echo "$as_me: failed program was:" >&5
11472 cat conftest.$ac_ext >&5
11473 with_pthread=no
11474 fi
11475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11476             LIBS="$cf_save_LIBS"
11477             echo "$as_me:11477: result: $with_pthread" >&5
11478 echo "${ECHO_T}$with_pthread" >&6
11479             test "$with_pthread" = yes && break
11480         done
11481
11482         if test "$with_pthread" = yes ; then
11483             LIBS="-l$cf_lib_pthread $LIBS"
11484
11485 cat >>confdefs.h <<\EOF
11486 #define HAVE_LIBPTHREADS 1
11487 EOF
11488
11489         else
11490             { { echo "$as_me:11490: error: Cannot link with pthread library" >&5
11491 echo "$as_me: error: Cannot link with pthread library" >&2;}
11492    { (exit 1); exit 1; }; }
11493         fi
11494
11495 fi
11496
11497 fi
11498
11499 if test "x$with_pthread" != xno; then
11500         echo "$as_me:11500: checking for pthread_kill" >&5
11501 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11502 if test "${ac_cv_func_pthread_kill+set}" = set; then
11503   echo $ECHO_N "(cached) $ECHO_C" >&6
11504 else
11505   cat >conftest.$ac_ext <<_ACEOF
11506 #line 11506 "configure"
11507 #include "confdefs.h"
11508 /* System header to define __stub macros and hopefully few prototypes,
11509     which can conflict with char pthread_kill (); below.  */
11510 #include <assert.h>
11511 /* Override any gcc2 internal prototype to avoid an error.  */
11512 #ifdef __cplusplus
11513 extern "C"
11514 #endif
11515 /* We use char because int might match the return type of a gcc2
11516    builtin and then its argument prototype would still apply.  */
11517 char pthread_kill ();
11518 char (*f) ();
11519
11520 int
11521 main ()
11522 {
11523 /* The GNU C library defines this for functions which it implements
11524     to always fail with ENOSYS.  Some functions are actually named
11525     something starting with __ and the normal name is an alias.  */
11526 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11527 choke me
11528 #else
11529 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11530 #endif
11531
11532   ;
11533   return 0;
11534 }
11535 _ACEOF
11536 rm -f conftest.$ac_objext conftest$ac_exeext
11537 if { (eval echo "$as_me:11537: \"$ac_link\"") >&5
11538   (eval $ac_link) 2>&5
11539   ac_status=$?
11540   echo "$as_me:11540: \$? = $ac_status" >&5
11541   (exit $ac_status); } &&
11542          { ac_try='test -s conftest$ac_exeext'
11543   { (eval echo "$as_me:11543: \"$ac_try\"") >&5
11544   (eval $ac_try) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit $ac_status); }; }; then
11548   ac_cv_func_pthread_kill=yes
11549 else
11550   echo "$as_me: failed program was:" >&5
11551 cat conftest.$ac_ext >&5
11552 ac_cv_func_pthread_kill=no
11553 fi
11554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11555 fi
11556 echo "$as_me:11556: result: $ac_cv_func_pthread_kill" >&5
11557 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11558 if test $ac_cv_func_pthread_kill = yes; then
11559
11560                 echo "$as_me:11560: checking if you want to allow EINTR in wgetch with pthreads" >&5
11561 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11562
11563 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11564 if test "${enable_pthreads_eintr+set}" = set; then
11565   enableval="$enable_pthreads_eintr"
11566   use_pthreads_eintr=$enableval
11567 else
11568   use_pthreads_eintr=no
11569 fi;
11570                 echo "$as_me:11570: result: $use_pthreads_eintr" >&5
11571 echo "${ECHO_T}$use_pthreads_eintr" >&6
11572                 if test "x$use_pthreads_eintr" = xyes ; then
11573
11574 cat >>confdefs.h <<\EOF
11575 #define USE_PTHREADS_EINTR 1
11576 EOF
11577
11578                 fi
11579 fi
11580
11581         echo "$as_me:11581: checking if you want to use weak-symbols for pthreads" >&5
11582 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11583
11584 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11585 if test "${enable_weak_symbols+set}" = set; then
11586   enableval="$enable_weak_symbols"
11587   use_weak_symbols=$enableval
11588 else
11589   use_weak_symbols=no
11590 fi;
11591         echo "$as_me:11591: result: $use_weak_symbols" >&5
11592 echo "${ECHO_T}$use_weak_symbols" >&6
11593         if test "x$use_weak_symbols" = xyes ; then
11594
11595 echo "$as_me:11595: checking if $CC supports weak symbols" >&5
11596 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11597 if test "${cf_cv_weak_symbols+set}" = set; then
11598   echo $ECHO_N "(cached) $ECHO_C" >&6
11599 else
11600
11601 cat >conftest.$ac_ext <<_ACEOF
11602 #line 11602 "configure"
11603 #include "confdefs.h"
11604
11605 #include <stdio.h>
11606 int
11607 main ()
11608 {
11609
11610 #if defined(__GNUC__)
11611 #  if defined __USE_ISOC99
11612 #    define _cat_pragma(exp)    _Pragma(#exp)
11613 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11614 #  else
11615 #    define _weak_pragma(exp)
11616 #  endif
11617 #  define _declare(name)        __extension__ extern __typeof__(name) name
11618 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11619 #endif
11620
11621 weak_symbol(fopen);
11622
11623   ;
11624   return 0;
11625 }
11626 _ACEOF
11627 rm -f conftest.$ac_objext
11628 if { (eval echo "$as_me:11628: \"$ac_compile\"") >&5
11629   (eval $ac_compile) 2>&5
11630   ac_status=$?
11631   echo "$as_me:11631: \$? = $ac_status" >&5
11632   (exit $ac_status); } &&
11633          { ac_try='test -s conftest.$ac_objext'
11634   { (eval echo "$as_me:11634: \"$ac_try\"") >&5
11635   (eval $ac_try) 2>&5
11636   ac_status=$?
11637   echo "$as_me:11637: \$? = $ac_status" >&5
11638   (exit $ac_status); }; }; then
11639   cf_cv_weak_symbols=yes
11640 else
11641   echo "$as_me: failed program was:" >&5
11642 cat conftest.$ac_ext >&5
11643 cf_cv_weak_symbols=no
11644 fi
11645 rm -f conftest.$ac_objext conftest.$ac_ext
11646
11647 fi
11648 echo "$as_me:11648: result: $cf_cv_weak_symbols" >&5
11649 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11650
11651         else
11652                 cf_cv_weak_symbols=no
11653         fi
11654
11655         if test "x$cf_cv_weak_symbols" = xyes ; then
11656
11657 cat >>confdefs.h <<\EOF
11658 #define USE_WEAK_SYMBOLS 1
11659 EOF
11660
11661         fi
11662 fi
11663
11664 PTHREAD=
11665 if test "x$with_pthread" = "xyes" ; then
11666
11667 cat >>confdefs.h <<\EOF
11668 #define USE_PTHREADS 1
11669 EOF
11670
11671     enable_reentrant=yes
11672     if test "x$cf_cv_weak_symbols" = xyes ; then
11673         PTHREAD=-lpthread
11674     fi
11675 fi
11676
11677 # Reentrant code has to be opaque; there's little advantage to making ncurses
11678 # opaque outside of that, so there is no --enable-opaque option.  We can use
11679 # this option without --with-pthreads, but this will be always set for
11680 # pthreads.
11681 echo "$as_me:11681: checking if you want experimental reentrant code" >&5
11682 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11683
11684 # Check whether --enable-reentrant or --disable-reentrant was given.
11685 if test "${enable_reentrant+set}" = set; then
11686   enableval="$enable_reentrant"
11687   with_reentrant=$enableval
11688 else
11689   with_reentrant=no
11690 fi;
11691 echo "$as_me:11691: result: $with_reentrant" >&5
11692 echo "${ECHO_T}$with_reentrant" >&6
11693 if test "x$with_reentrant" = xyes ; then
11694         cf_cv_enable_reentrant=1
11695         cf_cv_enable_opaque="NCURSES_INTERNALS"
11696         NCURSES_OPAQUE=1
11697         NCURSES_SIZE_T=int
11698         if test "x$cf_cv_weak_symbols" = xyes ; then
11699
11700 # remove pthread library from $LIBS
11701 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11702
11703                 TEST_LIBS="-lpthread $TEST_LIBS"
11704                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11705         else
11706                 LIB_SUFFIX="t${LIB_SUFFIX}"
11707         fi
11708
11709 cat >>confdefs.h <<\EOF
11710 #define USE_REENTRANT 1
11711 EOF
11712
11713 if test "${with_abi_version+set}" != set; then
11714         case $cf_cv_rel_version in
11715         5.*)
11716                 cf_cv_rel_version=6.0
11717                 cf_cv_abi_version=6
11718                 { echo "$as_me:11718: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11719 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11720                 ;;
11721         esac
11722 fi
11723
11724 else
11725         cf_cv_enable_reentrant=0
11726         cf_cv_enable_opaque="NCURSES_OPAQUE"
11727         NCURSES_OPAQUE=0
11728         NCURSES_SIZE_T=short
11729 fi
11730
11731 ### Allow using a different wrap-prefix
11732 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11733         echo "$as_me:11733: checking for prefix used to wrap public variables" >&5
11734 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11735
11736 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11737 if test "${with_wrap_prefix+set}" = set; then
11738   withval="$with_wrap_prefix"
11739   NCURSES_WRAP_PREFIX=$withval
11740 else
11741   NCURSES_WRAP_PREFIX=_nc_
11742 fi;
11743         echo "$as_me:11743: result: $NCURSES_WRAP_PREFIX" >&5
11744 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11745 else
11746         NCURSES_WRAP_PREFIX=_nc_
11747 fi
11748
11749 cat >>confdefs.h <<EOF
11750 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11751 EOF
11752
11753 echo "$as_me:11753: checking if you want experimental safe-sprintf code" >&5
11754 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11755
11756 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11757 if test "${enable_safe_sprintf+set}" = set; then
11758   enableval="$enable_safe_sprintf"
11759   with_safe_sprintf=$enableval
11760 else
11761   with_safe_sprintf=no
11762 fi;
11763 echo "$as_me:11763: result: $with_safe_sprintf" >&5
11764 echo "${ECHO_T}$with_safe_sprintf" >&6
11765 test "x$with_safe_sprintf" = xyes &&
11766 cat >>confdefs.h <<\EOF
11767 #define USE_SAFE_SPRINTF 1
11768 EOF
11769
11770 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11771 # when hashmap is used scroll hints are useless
11772 if test "$with_hashmap" = no ; then
11773 echo "$as_me:11773: checking if you want to experiment without scrolling-hints code" >&5
11774 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11775
11776 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11777 if test "${enable_scroll_hints+set}" = set; then
11778   enableval="$enable_scroll_hints"
11779   with_scroll_hints=$enableval
11780 else
11781   with_scroll_hints=yes
11782 fi;
11783 echo "$as_me:11783: result: $with_scroll_hints" >&5
11784 echo "${ECHO_T}$with_scroll_hints" >&6
11785 test "x$with_scroll_hints" = xyes &&
11786 cat >>confdefs.h <<\EOF
11787 #define USE_SCROLL_HINTS 1
11788 EOF
11789
11790 fi
11791
11792 echo "$as_me:11792: checking if you want experimental wgetch-events code" >&5
11793 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11794
11795 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11796 if test "${enable_wgetch_events+set}" = set; then
11797   enableval="$enable_wgetch_events"
11798   with_wgetch_events=$enableval
11799 else
11800   with_wgetch_events=no
11801 fi;
11802 echo "$as_me:11802: result: $with_wgetch_events" >&5
11803 echo "${ECHO_T}$with_wgetch_events" >&6
11804 test "x$with_wgetch_events" = xyes &&
11805 cat >>confdefs.h <<\EOF
11806 #define NCURSES_WGETCH_EVENTS 1
11807 EOF
11808
11809 ###############################################################################
11810
11811 ###     use option --disable-echo to suppress full display compiling commands
11812
11813 echo "$as_me:11813: checking if you want to see long compiling messages" >&5
11814 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11815
11816 # Check whether --enable-echo or --disable-echo was given.
11817 if test "${enable_echo+set}" = set; then
11818   enableval="$enable_echo"
11819   test "$enableval" != no && enableval=yes
11820   if test "$enableval" != "yes" ; then
11821
11822     ECHO_LT='--silent'
11823     ECHO_LD='@echo linking $@;'
11824     RULE_CC='@echo compiling $<'
11825     SHOW_CC='@echo compiling $@'
11826     ECHO_CC='@'
11827
11828   else
11829
11830     ECHO_LT=''
11831     ECHO_LD=''
11832     RULE_CC=''
11833     SHOW_CC=''
11834     ECHO_CC=''
11835
11836   fi
11837 else
11838   enableval=yes
11839
11840     ECHO_LT=''
11841     ECHO_LD=''
11842     RULE_CC=''
11843     SHOW_CC=''
11844     ECHO_CC=''
11845
11846 fi;
11847 echo "$as_me:11847: result: $enableval" >&5
11848 echo "${ECHO_T}$enableval" >&6
11849
11850 if test "x$enable_echo" = xyes; then
11851         ECHO_LINK=
11852 else
11853         ECHO_LINK='@ echo linking $@ ... ;'
11854         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11855         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11856 fi
11857
11858 ###     use option --enable-warnings to turn on all gcc warnings
11859 echo "$as_me:11859: checking if you want to see compiler warnings" >&5
11860 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11861
11862 # Check whether --enable-warnings or --disable-warnings was given.
11863 if test "${enable_warnings+set}" = set; then
11864   enableval="$enable_warnings"
11865   with_warnings=$enableval
11866 fi;
11867 echo "$as_me:11867: result: $with_warnings" >&5
11868 echo "${ECHO_T}$with_warnings" >&6
11869
11870 if test "x$with_warnings" = "xyes"; then
11871
11872         ADAFLAGS="$ADAFLAGS -gnatg"
11873
11874 INTEL_COMPILER=no
11875
11876 if test "$GCC" = yes ; then
11877         case $host_os in
11878         linux*|gnu*)
11879                 echo "$as_me:11879: checking if this is really Intel C compiler" >&5
11880 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11881                 cf_save_CFLAGS="$CFLAGS"
11882                 CFLAGS="$CFLAGS -no-gcc"
11883                 cat >conftest.$ac_ext <<_ACEOF
11884 #line 11884 "configure"
11885 #include "confdefs.h"
11886
11887 int
11888 main ()
11889 {
11890
11891 #ifdef __INTEL_COMPILER
11892 #else
11893 make an error
11894 #endif
11895
11896   ;
11897   return 0;
11898 }
11899 _ACEOF
11900 rm -f conftest.$ac_objext
11901 if { (eval echo "$as_me:11901: \"$ac_compile\"") >&5
11902   (eval $ac_compile) 2>&5
11903   ac_status=$?
11904   echo "$as_me:11904: \$? = $ac_status" >&5
11905   (exit $ac_status); } &&
11906          { ac_try='test -s conftest.$ac_objext'
11907   { (eval echo "$as_me:11907: \"$ac_try\"") >&5
11908   (eval $ac_try) 2>&5
11909   ac_status=$?
11910   echo "$as_me:11910: \$? = $ac_status" >&5
11911   (exit $ac_status); }; }; then
11912   INTEL_COMPILER=yes
11913 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11914
11915 else
11916   echo "$as_me: failed program was:" >&5
11917 cat conftest.$ac_ext >&5
11918 fi
11919 rm -f conftest.$ac_objext conftest.$ac_ext
11920                 CFLAGS="$cf_save_CFLAGS"
11921                 echo "$as_me:11921: result: $INTEL_COMPILER" >&5
11922 echo "${ECHO_T}$INTEL_COMPILER" >&6
11923                 ;;
11924         esac
11925 fi
11926
11927 CLANG_COMPILER=no
11928
11929 if test "$GCC" = yes ; then
11930         echo "$as_me:11930: checking if this is really Clang C compiler" >&5
11931 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11932         cf_save_CFLAGS="$CFLAGS"
11933         CFLAGS="$CFLAGS -Qunused-arguments"
11934         cat >conftest.$ac_ext <<_ACEOF
11935 #line 11935 "configure"
11936 #include "confdefs.h"
11937
11938 int
11939 main ()
11940 {
11941
11942 #ifdef __clang__
11943 #else
11944 make an error
11945 #endif
11946
11947   ;
11948   return 0;
11949 }
11950 _ACEOF
11951 rm -f conftest.$ac_objext
11952 if { (eval echo "$as_me:11952: \"$ac_compile\"") >&5
11953   (eval $ac_compile) 2>&5
11954   ac_status=$?
11955   echo "$as_me:11955: \$? = $ac_status" >&5
11956   (exit $ac_status); } &&
11957          { ac_try='test -s conftest.$ac_objext'
11958   { (eval echo "$as_me:11958: \"$ac_try\"") >&5
11959   (eval $ac_try) 2>&5
11960   ac_status=$?
11961   echo "$as_me:11961: \$? = $ac_status" >&5
11962   (exit $ac_status); }; }; then
11963   CLANG_COMPILER=yes
11964 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
11965
11966 else
11967   echo "$as_me: failed program was:" >&5
11968 cat conftest.$ac_ext >&5
11969 fi
11970 rm -f conftest.$ac_objext conftest.$ac_ext
11971         CFLAGS="$cf_save_CFLAGS"
11972         echo "$as_me:11972: result: $CLANG_COMPILER" >&5
11973 echo "${ECHO_T}$CLANG_COMPILER" >&6
11974 fi
11975
11976 cat > conftest.$ac_ext <<EOF
11977 #line 11977 "${as_me:-configure}"
11978 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11979 EOF
11980
11981 if test "$INTEL_COMPILER" = yes
11982 then
11983 # The "-wdXXX" options suppress warnings:
11984 # remark #1419: external declaration in primary source file
11985 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11986 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11987 # remark #193: zero used for undefined preprocessing identifier
11988 # remark #593: variable "curs_sb_left_arrow" was set but never used
11989 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11990 # remark #869: parameter "tw" was never referenced
11991 # remark #981: operands are evaluated in unspecified order
11992 # warning #279: controlling expression is constant
11993
11994         { echo "$as_me:11994: checking for $CC warning options..." >&5
11995 echo "$as_me: checking for $CC warning options..." >&6;}
11996         cf_save_CFLAGS="$CFLAGS"
11997         EXTRA_CFLAGS="-Wall"
11998         for cf_opt in \
11999                 wd1419 \
12000                 wd1683 \
12001                 wd1684 \
12002                 wd193 \
12003                 wd593 \
12004                 wd279 \
12005                 wd810 \
12006                 wd869 \
12007                 wd981
12008         do
12009                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12010                 if { (eval echo "$as_me:12010: \"$ac_compile\"") >&5
12011   (eval $ac_compile) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit $ac_status); }; then
12015                         test -n "$verbose" && echo "$as_me:12015: result: ... -$cf_opt" >&5
12016 echo "${ECHO_T}... -$cf_opt" >&6
12017                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12018                 fi
12019         done
12020         CFLAGS="$cf_save_CFLAGS"
12021
12022 elif test "$GCC" = yes
12023 then
12024         { echo "$as_me:12024: checking for $CC warning options..." >&5
12025 echo "$as_me: checking for $CC warning options..." >&6;}
12026         cf_save_CFLAGS="$CFLAGS"
12027         EXTRA_CFLAGS=
12028         cf_warn_CONST=""
12029         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12030         for cf_opt in W Wall \
12031                 Wbad-function-cast \
12032                 Wcast-align \
12033                 Wcast-qual \
12034                 Winline \
12035                 Wmissing-declarations \
12036                 Wmissing-prototypes \
12037                 Wnested-externs \
12038                 Wpointer-arith \
12039                 Wshadow \
12040                 Wstrict-prototypes \
12041                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12042         do
12043                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12044                 if { (eval echo "$as_me:12044: \"$ac_compile\"") >&5
12045   (eval $ac_compile) 2>&5
12046   ac_status=$?
12047   echo "$as_me:12047: \$? = $ac_status" >&5
12048   (exit $ac_status); }; then
12049                         test -n "$verbose" && echo "$as_me:12049: result: ... -$cf_opt" >&5
12050 echo "${ECHO_T}... -$cf_opt" >&6
12051                         case $cf_opt in #(vi
12052                         Wcast-qual) #(vi
12053                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12054                                 ;;
12055                         Winline) #(vi
12056                                 case $GCC_VERSION in
12057                                 [34].*)
12058                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12059
12060 echo "${as_me:-configure}:12060: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12061
12062                                         continue;;
12063                                 esac
12064                                 ;;
12065                         Wpointer-arith) #(vi
12066                                 case $GCC_VERSION in
12067                                 [12].*)
12068                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12069
12070 echo "${as_me:-configure}:12070: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12071
12072                                         continue;;
12073                                 esac
12074                                 ;;
12075                         esac
12076                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12077                 fi
12078         done
12079         CFLAGS="$cf_save_CFLAGS"
12080 fi
12081 rm -rf conftest*
12082
12083         if test "x$cf_with_cxx" = xyes ; then
12084
12085 INTEL_CPLUSPLUS=no
12086
12087 if test "$GCC" = yes ; then
12088         case $host_os in
12089         linux*|gnu*)
12090                 echo "$as_me:12090: checking if this is really Intel C++ compiler" >&5
12091 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12092                 cf_save_CFLAGS="$CXXFLAGS"
12093                 CXXFLAGS="$CXXFLAGS -no-gcc"
12094                 cat >conftest.$ac_ext <<_ACEOF
12095 #line 12095 "configure"
12096 #include "confdefs.h"
12097
12098 int
12099 main ()
12100 {
12101
12102 #ifdef __INTEL_COMPILER
12103 #else
12104 make an error
12105 #endif
12106
12107   ;
12108   return 0;
12109 }
12110 _ACEOF
12111 rm -f conftest.$ac_objext
12112 if { (eval echo "$as_me:12112: \"$ac_compile\"") >&5
12113   (eval $ac_compile) 2>&5
12114   ac_status=$?
12115   echo "$as_me:12115: \$? = $ac_status" >&5
12116   (exit $ac_status); } &&
12117          { ac_try='test -s conftest.$ac_objext'
12118   { (eval echo "$as_me:12118: \"$ac_try\"") >&5
12119   (eval $ac_try) 2>&5
12120   ac_status=$?
12121   echo "$as_me:12121: \$? = $ac_status" >&5
12122   (exit $ac_status); }; }; then
12123   INTEL_CPLUSPLUS=yes
12124 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12125
12126 else
12127   echo "$as_me: failed program was:" >&5
12128 cat conftest.$ac_ext >&5
12129 fi
12130 rm -f conftest.$ac_objext conftest.$ac_ext
12131                 CXXFLAGS="$cf_save_CFLAGS"
12132                 echo "$as_me:12132: result: $INTEL_CPLUSPLUS" >&5
12133 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12134                 ;;
12135         esac
12136 fi
12137
12138 CLANG_CPLUSPLUS=no
12139
12140 if test "$GCC" = yes ; then
12141         echo "$as_me:12141: checking if this is really Clang C++ compiler" >&5
12142 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12143         cf_save_CFLAGS="$CXXFLAGS"
12144         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12145         cat >conftest.$ac_ext <<_ACEOF
12146 #line 12146 "configure"
12147 #include "confdefs.h"
12148
12149 int
12150 main ()
12151 {
12152
12153 #ifdef __clang__
12154 #else
12155 make an error
12156 #endif
12157
12158   ;
12159   return 0;
12160 }
12161 _ACEOF
12162 rm -f conftest.$ac_objext
12163 if { (eval echo "$as_me:12163: \"$ac_compile\"") >&5
12164   (eval $ac_compile) 2>&5
12165   ac_status=$?
12166   echo "$as_me:12166: \$? = $ac_status" >&5
12167   (exit $ac_status); } &&
12168          { ac_try='test -s conftest.$ac_objext'
12169   { (eval echo "$as_me:12169: \"$ac_try\"") >&5
12170   (eval $ac_try) 2>&5
12171   ac_status=$?
12172   echo "$as_me:12172: \$? = $ac_status" >&5
12173   (exit $ac_status); }; }; then
12174   CLANG_CPLUSPLUS=yes
12175 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12176
12177 else
12178   echo "$as_me: failed program was:" >&5
12179 cat conftest.$ac_ext >&5
12180 fi
12181 rm -f conftest.$ac_objext conftest.$ac_ext
12182         CXXFLAGS="$cf_save_CFLAGS"
12183         echo "$as_me:12183: result: $CLANG_CPLUSPLUS" >&5
12184 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12185 fi
12186
12187 ac_ext=cc
12188 ac_cpp='$CXXCPP $CPPFLAGS'
12189 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12190 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12191 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12192 ac_main_return=return
12193
12194 cat > conftest.$ac_ext <<EOF
12195 #line 12195 "configure"
12196 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12197 EOF
12198
12199 if test "$INTEL_CPLUSPLUS" = yes
12200 then
12201 # The "-wdXXX" options suppress warnings:
12202 # remark #1419: external declaration in primary source file
12203 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12204 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12205 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12206 # remark #193: zero used for undefined preprocessing identifier
12207 # remark #593: variable "curs_sb_left_arrow" was set but never used
12208 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12209 # remark #869: parameter "tw" was never referenced
12210 # remark #981: operands are evaluated in unspecified order
12211 # warning #269: invalid format string conversion
12212
12213         { echo "$as_me:12213: checking for $CC warning options..." >&5
12214 echo "$as_me: checking for $CC warning options..." >&6;}
12215         cf_save_CXXFLAGS="$CXXFLAGS"
12216         EXTRA_CXXFLAGS="-Wall"
12217         for cf_opt in \
12218                 wd1419 \
12219                 wd1682 \
12220                 wd1683 \
12221                 wd1684 \
12222                 wd193 \
12223                 wd279 \
12224                 wd593 \
12225                 wd810 \
12226                 wd869 \
12227                 wd981
12228         do
12229                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12230                 if { (eval echo "$as_me:12230: \"$ac_compile\"") >&5
12231   (eval $ac_compile) 2>&5
12232   ac_status=$?
12233   echo "$as_me:12233: \$? = $ac_status" >&5
12234   (exit $ac_status); }; then
12235                         test -n "$verbose" && echo "$as_me:12235: result: ... -$cf_opt" >&5
12236 echo "${ECHO_T}... -$cf_opt" >&6
12237                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12238                 fi
12239         done
12240         CXXFLAGS="$cf_save_CXXFLAGS"
12241
12242 elif test "$GXX" = yes
12243 then
12244         { echo "$as_me:12244: checking for $CXX warning options..." >&5
12245 echo "$as_me: checking for $CXX warning options..." >&6;}
12246         cf_save_CXXFLAGS="$CXXFLAGS"
12247         EXTRA_CXXFLAGS="-W -Wall"
12248         cf_gxx_extra_warnings=""
12249         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12250         case "$GCC_VERSION" in
12251         [1-2].*)
12252                 ;;
12253         *)
12254                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12255                 ;;
12256         esac
12257         for cf_opt in \
12258                 Wabi \
12259                 fabi-version=0 \
12260                 Woverloaded-virtual \
12261                 Wsign-promo \
12262                 Wsynth \
12263                 Wold-style-cast \
12264                 Wcast-align \
12265                 Wcast-qual \
12266                 Wmissing-prototypes \
12267                 Wpointer-arith \
12268                 Wshadow \
12269                 Wstrict-prototypes \
12270                 Wundef $cf_gxx_extra_warnings Wno-unused
12271         do
12272                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12273                 if { (eval echo "$as_me:12273: \"$ac_compile\"") >&5
12274   (eval $ac_compile) 2>&5
12275   ac_status=$?
12276   echo "$as_me:12276: \$? = $ac_status" >&5
12277   (exit $ac_status); }; then
12278                         test -n "$verbose" && echo "$as_me:12278: result: ... -$cf_opt" >&5
12279 echo "${ECHO_T}... -$cf_opt" >&6
12280                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12281                 else
12282                         test -n "$verbose" && echo "$as_me:12282: result: ... no -$cf_opt" >&5
12283 echo "${ECHO_T}... no -$cf_opt" >&6
12284                 fi
12285         done
12286         CXXFLAGS="$cf_save_CXXFLAGS"
12287 fi
12288
12289 rm -rf conftest*
12290 ac_ext=c
12291 ac_cpp='$CPP $CPPFLAGS'
12292 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12293 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12294 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12295 ac_main_return=return
12296
12297         fi
12298 fi
12299
12300 if test "$GCC" = yes
12301 then
12302 cat > conftest.i <<EOF
12303 #ifndef GCC_PRINTF
12304 #define GCC_PRINTF 0
12305 #endif
12306 #ifndef GCC_SCANF
12307 #define GCC_SCANF 0
12308 #endif
12309 #ifndef GCC_NORETURN
12310 #define GCC_NORETURN /* nothing */
12311 #endif
12312 #ifndef GCC_UNUSED
12313 #define GCC_UNUSED /* nothing */
12314 #endif
12315 EOF
12316 if test "$GCC" = yes
12317 then
12318         { echo "$as_me:12318: checking for $CC __attribute__ directives..." >&5
12319 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12320 cat > conftest.$ac_ext <<EOF
12321 #line 12321 "${as_me:-configure}"
12322 #include "confdefs.h"
12323 #include "conftest.h"
12324 #include "conftest.i"
12325 #if     GCC_PRINTF
12326 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12327 #else
12328 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12329 #endif
12330 #if     GCC_SCANF
12331 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12332 #else
12333 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12334 #endif
12335 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12336 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12337 extern void foo(void) GCC_NORETURN;
12338 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12339 EOF
12340         cf_printf_attribute=no
12341         cf_scanf_attribute=no
12342         for cf_attribute in scanf printf unused noreturn
12343         do
12344
12345 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12346
12347                 cf_directive="__attribute__(($cf_attribute))"
12348                 echo "checking for $CC $cf_directive" 1>&5
12349
12350                 case $cf_attribute in #(vi
12351                 printf) #(vi
12352                         cf_printf_attribute=yes
12353                         cat >conftest.h <<EOF
12354 #define GCC_$cf_ATTRIBUTE 1
12355 EOF
12356                         ;;
12357                 scanf) #(vi
12358                         cf_scanf_attribute=yes
12359                         cat >conftest.h <<EOF
12360 #define GCC_$cf_ATTRIBUTE 1
12361 EOF
12362                         ;;
12363                 *) #(vi
12364                         cat >conftest.h <<EOF
12365 #define GCC_$cf_ATTRIBUTE $cf_directive
12366 EOF
12367                         ;;
12368                 esac
12369
12370                 if { (eval echo "$as_me:12370: \"$ac_compile\"") >&5
12371   (eval $ac_compile) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit $ac_status); }; then
12375                         test -n "$verbose" && echo "$as_me:12375: result: ... $cf_attribute" >&5
12376 echo "${ECHO_T}... $cf_attribute" >&6
12377                         cat conftest.h >>confdefs.h
12378                         case $cf_attribute in #(vi
12379                         noreturn) #(vi
12380
12381 cat >>confdefs.h <<EOF
12382 #define GCC_NORETURN $cf_directive
12383 EOF
12384
12385                                 ;;
12386                         printf) #(vi
12387                                 cf_value='/* nothing */'
12388                                 if test "$cf_printf_attribute" != no ; then
12389                                         cf_value='__attribute__((format(printf,fmt,var)))'
12390
12391 cat >>confdefs.h <<\EOF
12392 #define GCC_PRINTF 1
12393 EOF
12394
12395                                 fi
12396
12397 cat >>confdefs.h <<EOF
12398 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12399 EOF
12400
12401                                 ;;
12402                         scanf) #(vi
12403                                 cf_value='/* nothing */'
12404                                 if test "$cf_scanf_attribute" != no ; then
12405                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12406
12407 cat >>confdefs.h <<\EOF
12408 #define GCC_SCANF 1
12409 EOF
12410
12411                                 fi
12412
12413 cat >>confdefs.h <<EOF
12414 #define GCC_SCANFLIKE(fmt,var) $cf_value
12415 EOF
12416
12417                                 ;;
12418                         unused) #(vi
12419
12420 cat >>confdefs.h <<EOF
12421 #define GCC_UNUSED $cf_directive
12422 EOF
12423
12424                                 ;;
12425                         esac
12426                 fi
12427         done
12428 else
12429         fgrep define conftest.i >>confdefs.h
12430 fi
12431 rm -rf conftest*
12432 fi
12433
12434 echo "$as_me:12434: checking if you want to work around bogus compiler/loader warnings" >&5
12435 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12436
12437 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12438 if test "${enable_string_hacks+set}" = set; then
12439   enableval="$enable_string_hacks"
12440   with_string_hacks=$enableval
12441 else
12442   with_string_hacks=no
12443 fi;
12444 echo "$as_me:12444: result: $with_string_hacks" >&5
12445 echo "${ECHO_T}$with_string_hacks" >&6
12446
12447 if test "x$with_string_hacks" = "xyes"; then
12448
12449 cat >>confdefs.h <<\EOF
12450 #define USE_STRING_HACKS 1
12451 EOF
12452
12453         { echo "$as_me:12453: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12454 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12455
12456 for ac_func in strlcat strlcpy snprintf
12457 do
12458 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12459 echo "$as_me:12459: checking for $ac_func" >&5
12460 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12461 if eval "test \"\${$as_ac_var+set}\" = set"; then
12462   echo $ECHO_N "(cached) $ECHO_C" >&6
12463 else
12464   cat >conftest.$ac_ext <<_ACEOF
12465 #line 12465 "configure"
12466 #include "confdefs.h"
12467 /* System header to define __stub macros and hopefully few prototypes,
12468     which can conflict with char $ac_func (); below.  */
12469 #include <assert.h>
12470 /* Override any gcc2 internal prototype to avoid an error.  */
12471 #ifdef __cplusplus
12472 extern "C"
12473 #endif
12474 /* We use char because int might match the return type of a gcc2
12475    builtin and then its argument prototype would still apply.  */
12476 char $ac_func ();
12477 char (*f) ();
12478
12479 int
12480 main ()
12481 {
12482 /* The GNU C library defines this for functions which it implements
12483     to always fail with ENOSYS.  Some functions are actually named
12484     something starting with __ and the normal name is an alias.  */
12485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12486 choke me
12487 #else
12488 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12489 #endif
12490
12491   ;
12492   return 0;
12493 }
12494 _ACEOF
12495 rm -f conftest.$ac_objext conftest$ac_exeext
12496 if { (eval echo "$as_me:12496: \"$ac_link\"") >&5
12497   (eval $ac_link) 2>&5
12498   ac_status=$?
12499   echo "$as_me:12499: \$? = $ac_status" >&5
12500   (exit $ac_status); } &&
12501          { ac_try='test -s conftest$ac_exeext'
12502   { (eval echo "$as_me:12502: \"$ac_try\"") >&5
12503   (eval $ac_try) 2>&5
12504   ac_status=$?
12505   echo "$as_me:12505: \$? = $ac_status" >&5
12506   (exit $ac_status); }; }; then
12507   eval "$as_ac_var=yes"
12508 else
12509   echo "$as_me: failed program was:" >&5
12510 cat conftest.$ac_ext >&5
12511 eval "$as_ac_var=no"
12512 fi
12513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12514 fi
12515 echo "$as_me:12515: result: `eval echo '${'$as_ac_var'}'`" >&5
12516 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12517 if test `eval echo '${'$as_ac_var'}'` = yes; then
12518   cat >>confdefs.h <<EOF
12519 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12520 EOF
12521
12522 fi
12523 done
12524
12525 fi
12526
12527 ###     use option --enable-assertions to turn on generation of assertion code
12528 echo "$as_me:12528: checking if you want to enable runtime assertions" >&5
12529 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12530
12531 # Check whether --enable-assertions or --disable-assertions was given.
12532 if test "${enable_assertions+set}" = set; then
12533   enableval="$enable_assertions"
12534   with_assertions=$enableval
12535 else
12536   with_assertions=no
12537 fi;
12538 echo "$as_me:12538: result: $with_assertions" >&5
12539 echo "${ECHO_T}$with_assertions" >&6
12540 if test -n "$GCC"
12541 then
12542         if test "$with_assertions" = no
12543         then
12544                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12545         else
12546
12547         ADAFLAGS="$ADAFLAGS -gnata"
12548
12549         fi
12550 fi
12551
12552 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12553
12554 echo "$as_me:12554: checking if you want to use dmalloc for testing" >&5
12555 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12556
12557 # Check whether --with-dmalloc or --without-dmalloc was given.
12558 if test "${with_dmalloc+set}" = set; then
12559   withval="$with_dmalloc"
12560
12561 cat >>confdefs.h <<EOF
12562 #define USE_DMALLOC 1
12563 EOF
12564
12565         : ${with_cflags:=-g}
12566         : ${with_no_leaks:=yes}
12567          with_dmalloc=yes
12568 else
12569   with_dmalloc=
12570 fi;
12571 echo "$as_me:12571: result: ${with_dmalloc:-no}" >&5
12572 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12573
12574 case .$with_cflags in #(vi
12575 .*-g*)
12576         case .$CFLAGS in #(vi
12577         .*-g*) #(vi
12578                 ;;
12579         *)
12580
12581 cf_fix_cppflags=no
12582 cf_new_cflags=
12583 cf_new_cppflags=
12584 cf_new_extra_cppflags=
12585
12586 for cf_add_cflags in -g
12587 do
12588 case $cf_fix_cppflags in
12589 no)
12590         case $cf_add_cflags in #(vi
12591         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12592                 case $cf_add_cflags in
12593                 -D*)
12594                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12595
12596                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12597                                 && test -z "${cf_tst_cflags}" \
12598                                 && cf_fix_cppflags=yes
12599
12600                         if test $cf_fix_cppflags = yes ; then
12601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12602                                 continue
12603                         elif test "${cf_tst_cflags}" = "\"'" ; then
12604                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12605                                 continue
12606                         fi
12607                         ;;
12608                 esac
12609                 case "$CPPFLAGS" in
12610                 *$cf_add_cflags) #(vi
12611                         ;;
12612                 *) #(vi
12613                         case $cf_add_cflags in #(vi
12614                         -D*)
12615                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12616
12617 CPPFLAGS=`echo "$CPPFLAGS" | \
12618         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12619                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12620
12621                                 ;;
12622                         esac
12623                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12624                         ;;
12625                 esac
12626                 ;;
12627         *)
12628                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12629                 ;;
12630         esac
12631         ;;
12632 yes)
12633         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12634
12635         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12636
12637         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12638                 && test -z "${cf_tst_cflags}" \
12639                 && cf_fix_cppflags=no
12640         ;;
12641 esac
12642 done
12643
12644 if test -n "$cf_new_cflags" ; then
12645
12646         CFLAGS="$CFLAGS $cf_new_cflags"
12647 fi
12648
12649 if test -n "$cf_new_cppflags" ; then
12650
12651         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12652 fi
12653
12654 if test -n "$cf_new_extra_cppflags" ; then
12655
12656         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12657 fi
12658
12659                 ;;
12660         esac
12661         ;;
12662 esac
12663
12664 if test "$with_dmalloc" = yes ; then
12665         echo "$as_me:12665: checking for dmalloc.h" >&5
12666 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12667 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12668   echo $ECHO_N "(cached) $ECHO_C" >&6
12669 else
12670   cat >conftest.$ac_ext <<_ACEOF
12671 #line 12671 "configure"
12672 #include "confdefs.h"
12673 #include <dmalloc.h>
12674 _ACEOF
12675 if { (eval echo "$as_me:12675: \"$ac_cpp conftest.$ac_ext\"") >&5
12676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12677   ac_status=$?
12678   egrep -v '^ *\+' conftest.er1 >conftest.err
12679   rm -f conftest.er1
12680   cat conftest.err >&5
12681   echo "$as_me:12681: \$? = $ac_status" >&5
12682   (exit $ac_status); } >/dev/null; then
12683   if test -s conftest.err; then
12684     ac_cpp_err=$ac_c_preproc_warn_flag
12685   else
12686     ac_cpp_err=
12687   fi
12688 else
12689   ac_cpp_err=yes
12690 fi
12691 if test -z "$ac_cpp_err"; then
12692   ac_cv_header_dmalloc_h=yes
12693 else
12694   echo "$as_me: failed program was:" >&5
12695   cat conftest.$ac_ext >&5
12696   ac_cv_header_dmalloc_h=no
12697 fi
12698 rm -f conftest.err conftest.$ac_ext
12699 fi
12700 echo "$as_me:12700: result: $ac_cv_header_dmalloc_h" >&5
12701 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12702 if test $ac_cv_header_dmalloc_h = yes; then
12703
12704 echo "$as_me:12704: checking for dmalloc_debug in -ldmalloc" >&5
12705 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12706 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12707   echo $ECHO_N "(cached) $ECHO_C" >&6
12708 else
12709   ac_check_lib_save_LIBS=$LIBS
12710 LIBS="-ldmalloc  $LIBS"
12711 cat >conftest.$ac_ext <<_ACEOF
12712 #line 12712 "configure"
12713 #include "confdefs.h"
12714
12715 /* Override any gcc2 internal prototype to avoid an error.  */
12716 #ifdef __cplusplus
12717 extern "C"
12718 #endif
12719 /* We use char because int might match the return type of a gcc2
12720    builtin and then its argument prototype would still apply.  */
12721 char dmalloc_debug ();
12722 int
12723 main ()
12724 {
12725 dmalloc_debug ();
12726   ;
12727   return 0;
12728 }
12729 _ACEOF
12730 rm -f conftest.$ac_objext conftest$ac_exeext
12731 if { (eval echo "$as_me:12731: \"$ac_link\"") >&5
12732   (eval $ac_link) 2>&5
12733   ac_status=$?
12734   echo "$as_me:12734: \$? = $ac_status" >&5
12735   (exit $ac_status); } &&
12736          { ac_try='test -s conftest$ac_exeext'
12737   { (eval echo "$as_me:12737: \"$ac_try\"") >&5
12738   (eval $ac_try) 2>&5
12739   ac_status=$?
12740   echo "$as_me:12740: \$? = $ac_status" >&5
12741   (exit $ac_status); }; }; then
12742   ac_cv_lib_dmalloc_dmalloc_debug=yes
12743 else
12744   echo "$as_me: failed program was:" >&5
12745 cat conftest.$ac_ext >&5
12746 ac_cv_lib_dmalloc_dmalloc_debug=no
12747 fi
12748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12749 LIBS=$ac_check_lib_save_LIBS
12750 fi
12751 echo "$as_me:12751: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12752 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12753 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12754   cat >>confdefs.h <<EOF
12755 #define HAVE_LIBDMALLOC 1
12756 EOF
12757
12758   LIBS="-ldmalloc $LIBS"
12759
12760 fi
12761
12762 fi
12763
12764 fi
12765
12766 echo "$as_me:12766: checking if you want to use dbmalloc for testing" >&5
12767 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12768
12769 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12770 if test "${with_dbmalloc+set}" = set; then
12771   withval="$with_dbmalloc"
12772
12773 cat >>confdefs.h <<EOF
12774 #define USE_DBMALLOC 1
12775 EOF
12776
12777         : ${with_cflags:=-g}
12778         : ${with_no_leaks:=yes}
12779          with_dbmalloc=yes
12780 else
12781   with_dbmalloc=
12782 fi;
12783 echo "$as_me:12783: result: ${with_dbmalloc:-no}" >&5
12784 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12785
12786 case .$with_cflags in #(vi
12787 .*-g*)
12788         case .$CFLAGS in #(vi
12789         .*-g*) #(vi
12790                 ;;
12791         *)
12792
12793 cf_fix_cppflags=no
12794 cf_new_cflags=
12795 cf_new_cppflags=
12796 cf_new_extra_cppflags=
12797
12798 for cf_add_cflags in -g
12799 do
12800 case $cf_fix_cppflags in
12801 no)
12802         case $cf_add_cflags in #(vi
12803         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12804                 case $cf_add_cflags in
12805                 -D*)
12806                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12807
12808                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12809                                 && test -z "${cf_tst_cflags}" \
12810                                 && cf_fix_cppflags=yes
12811
12812                         if test $cf_fix_cppflags = yes ; then
12813                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12814                                 continue
12815                         elif test "${cf_tst_cflags}" = "\"'" ; then
12816                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12817                                 continue
12818                         fi
12819                         ;;
12820                 esac
12821                 case "$CPPFLAGS" in
12822                 *$cf_add_cflags) #(vi
12823                         ;;
12824                 *) #(vi
12825                         case $cf_add_cflags in #(vi
12826                         -D*)
12827                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12828
12829 CPPFLAGS=`echo "$CPPFLAGS" | \
12830         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12831                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12832
12833                                 ;;
12834                         esac
12835                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12836                         ;;
12837                 esac
12838                 ;;
12839         *)
12840                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12841                 ;;
12842         esac
12843         ;;
12844 yes)
12845         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12846
12847         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12848
12849         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12850                 && test -z "${cf_tst_cflags}" \
12851                 && cf_fix_cppflags=no
12852         ;;
12853 esac
12854 done
12855
12856 if test -n "$cf_new_cflags" ; then
12857
12858         CFLAGS="$CFLAGS $cf_new_cflags"
12859 fi
12860
12861 if test -n "$cf_new_cppflags" ; then
12862
12863         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12864 fi
12865
12866 if test -n "$cf_new_extra_cppflags" ; then
12867
12868         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12869 fi
12870
12871                 ;;
12872         esac
12873         ;;
12874 esac
12875
12876 if test "$with_dbmalloc" = yes ; then
12877         echo "$as_me:12877: checking for dbmalloc.h" >&5
12878 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12879 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12880   echo $ECHO_N "(cached) $ECHO_C" >&6
12881 else
12882   cat >conftest.$ac_ext <<_ACEOF
12883 #line 12883 "configure"
12884 #include "confdefs.h"
12885 #include <dbmalloc.h>
12886 _ACEOF
12887 if { (eval echo "$as_me:12887: \"$ac_cpp conftest.$ac_ext\"") >&5
12888   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12889   ac_status=$?
12890   egrep -v '^ *\+' conftest.er1 >conftest.err
12891   rm -f conftest.er1
12892   cat conftest.err >&5
12893   echo "$as_me:12893: \$? = $ac_status" >&5
12894   (exit $ac_status); } >/dev/null; then
12895   if test -s conftest.err; then
12896     ac_cpp_err=$ac_c_preproc_warn_flag
12897   else
12898     ac_cpp_err=
12899   fi
12900 else
12901   ac_cpp_err=yes
12902 fi
12903 if test -z "$ac_cpp_err"; then
12904   ac_cv_header_dbmalloc_h=yes
12905 else
12906   echo "$as_me: failed program was:" >&5
12907   cat conftest.$ac_ext >&5
12908   ac_cv_header_dbmalloc_h=no
12909 fi
12910 rm -f conftest.err conftest.$ac_ext
12911 fi
12912 echo "$as_me:12912: result: $ac_cv_header_dbmalloc_h" >&5
12913 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12914 if test $ac_cv_header_dbmalloc_h = yes; then
12915
12916 echo "$as_me:12916: checking for debug_malloc in -ldbmalloc" >&5
12917 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12918 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12919   echo $ECHO_N "(cached) $ECHO_C" >&6
12920 else
12921   ac_check_lib_save_LIBS=$LIBS
12922 LIBS="-ldbmalloc  $LIBS"
12923 cat >conftest.$ac_ext <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926
12927 /* Override any gcc2 internal prototype to avoid an error.  */
12928 #ifdef __cplusplus
12929 extern "C"
12930 #endif
12931 /* We use char because int might match the return type of a gcc2
12932    builtin and then its argument prototype would still apply.  */
12933 char debug_malloc ();
12934 int
12935 main ()
12936 {
12937 debug_malloc ();
12938   ;
12939   return 0;
12940 }
12941 _ACEOF
12942 rm -f conftest.$ac_objext conftest$ac_exeext
12943 if { (eval echo "$as_me:12943: \"$ac_link\"") >&5
12944   (eval $ac_link) 2>&5
12945   ac_status=$?
12946   echo "$as_me:12946: \$? = $ac_status" >&5
12947   (exit $ac_status); } &&
12948          { ac_try='test -s conftest$ac_exeext'
12949   { (eval echo "$as_me:12949: \"$ac_try\"") >&5
12950   (eval $ac_try) 2>&5
12951   ac_status=$?
12952   echo "$as_me:12952: \$? = $ac_status" >&5
12953   (exit $ac_status); }; }; then
12954   ac_cv_lib_dbmalloc_debug_malloc=yes
12955 else
12956   echo "$as_me: failed program was:" >&5
12957 cat conftest.$ac_ext >&5
12958 ac_cv_lib_dbmalloc_debug_malloc=no
12959 fi
12960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12961 LIBS=$ac_check_lib_save_LIBS
12962 fi
12963 echo "$as_me:12963: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12964 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12965 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12966   cat >>confdefs.h <<EOF
12967 #define HAVE_LIBDBMALLOC 1
12968 EOF
12969
12970   LIBS="-ldbmalloc $LIBS"
12971
12972 fi
12973
12974 fi
12975
12976 fi
12977
12978 echo "$as_me:12978: checking if you want to use valgrind for testing" >&5
12979 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12980
12981 # Check whether --with-valgrind or --without-valgrind was given.
12982 if test "${with_valgrind+set}" = set; then
12983   withval="$with_valgrind"
12984
12985 cat >>confdefs.h <<EOF
12986 #define USE_VALGRIND 1
12987 EOF
12988
12989         : ${with_cflags:=-g}
12990         : ${with_no_leaks:=yes}
12991          with_valgrind=yes
12992 else
12993   with_valgrind=
12994 fi;
12995 echo "$as_me:12995: result: ${with_valgrind:-no}" >&5
12996 echo "${ECHO_T}${with_valgrind:-no}" >&6
12997
12998 case .$with_cflags in #(vi
12999 .*-g*)
13000         case .$CFLAGS in #(vi
13001         .*-g*) #(vi
13002                 ;;
13003         *)
13004
13005 cf_fix_cppflags=no
13006 cf_new_cflags=
13007 cf_new_cppflags=
13008 cf_new_extra_cppflags=
13009
13010 for cf_add_cflags in -g
13011 do
13012 case $cf_fix_cppflags in
13013 no)
13014         case $cf_add_cflags in #(vi
13015         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13016                 case $cf_add_cflags in
13017                 -D*)
13018                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13019
13020                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13021                                 && test -z "${cf_tst_cflags}" \
13022                                 && cf_fix_cppflags=yes
13023
13024                         if test $cf_fix_cppflags = yes ; then
13025                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13026                                 continue
13027                         elif test "${cf_tst_cflags}" = "\"'" ; then
13028                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13029                                 continue
13030                         fi
13031                         ;;
13032                 esac
13033                 case "$CPPFLAGS" in
13034                 *$cf_add_cflags) #(vi
13035                         ;;
13036                 *) #(vi
13037                         case $cf_add_cflags in #(vi
13038                         -D*)
13039                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13040
13041 CPPFLAGS=`echo "$CPPFLAGS" | \
13042         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13043                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13044
13045                                 ;;
13046                         esac
13047                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13048                         ;;
13049                 esac
13050                 ;;
13051         *)
13052                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13053                 ;;
13054         esac
13055         ;;
13056 yes)
13057         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13058
13059         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13060
13061         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13062                 && test -z "${cf_tst_cflags}" \
13063                 && cf_fix_cppflags=no
13064         ;;
13065 esac
13066 done
13067
13068 if test -n "$cf_new_cflags" ; then
13069
13070         CFLAGS="$CFLAGS $cf_new_cflags"
13071 fi
13072
13073 if test -n "$cf_new_cppflags" ; then
13074
13075         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13076 fi
13077
13078 if test -n "$cf_new_extra_cppflags" ; then
13079
13080         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13081 fi
13082
13083                 ;;
13084         esac
13085         ;;
13086 esac
13087
13088 echo "$as_me:13088: checking if you want to perform memory-leak testing" >&5
13089 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13090
13091 # Check whether --enable-leaks or --disable-leaks was given.
13092 if test "${enable_leaks+set}" = set; then
13093   enableval="$enable_leaks"
13094   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13095 else
13096   : ${with_no_leaks:=no}
13097 fi;
13098 echo "$as_me:13098: result: $with_no_leaks" >&5
13099 echo "${ECHO_T}$with_no_leaks" >&6
13100
13101 if test "$with_no_leaks" = yes ; then
13102
13103 cat >>confdefs.h <<\EOF
13104 #define NO_LEAKS 1
13105 EOF
13106
13107 cat >>confdefs.h <<\EOF
13108 #define YY_NO_LEAKS 1
13109 EOF
13110
13111 fi
13112
13113 cat >>confdefs.h <<\EOF
13114 #define HAVE_NC_ALLOC_H 1
13115 EOF
13116
13117 ###     use option --enable-expanded to generate certain macros as functions
13118
13119 # Check whether --enable-expanded or --disable-expanded was given.
13120 if test "${enable_expanded+set}" = set; then
13121   enableval="$enable_expanded"
13122   test "x$enableval" = xyes &&
13123 cat >>confdefs.h <<\EOF
13124 #define NCURSES_EXPANDED 1
13125 EOF
13126
13127 fi;
13128
13129 ###     use option --disable-macros to suppress macros in favor of functions
13130
13131 # Check whether --enable-macros or --disable-macros was given.
13132 if test "${enable_macros+set}" = set; then
13133   enableval="$enable_macros"
13134   test "$enableval" = no &&
13135 cat >>confdefs.h <<\EOF
13136 #define NCURSES_NOMACROS 1
13137 EOF
13138
13139 fi;
13140
13141 # Normally we only add trace() to the debug-library.  Allow this to be
13142 # extended to all models of the ncurses library:
13143 cf_all_traces=no
13144 case "$CFLAGS $CPPFLAGS" in
13145 *-DTRACE*)
13146         cf_all_traces=yes
13147         ;;
13148 esac
13149
13150 echo "$as_me:13150: checking whether to add trace feature to all models" >&5
13151 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13152
13153 # Check whether --with-trace or --without-trace was given.
13154 if test "${with_trace+set}" = set; then
13155   withval="$with_trace"
13156   cf_with_trace=$withval
13157 else
13158   cf_with_trace=$cf_all_traces
13159 fi;
13160 echo "$as_me:13160: result: $cf_with_trace" >&5
13161 echo "${ECHO_T}$cf_with_trace" >&6
13162
13163 if test "x$cf_with_trace" = xyes ; then
13164         LIB_TRACING=all
13165         ADA_TRACE=TRUE
13166
13167 cf_fix_cppflags=no
13168 cf_new_cflags=
13169 cf_new_cppflags=
13170 cf_new_extra_cppflags=
13171
13172 for cf_add_cflags in -DTRACE
13173 do
13174 case $cf_fix_cppflags in
13175 no)
13176         case $cf_add_cflags in #(vi
13177         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13178                 case $cf_add_cflags in
13179                 -D*)
13180                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13181
13182                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13183                                 && test -z "${cf_tst_cflags}" \
13184                                 && cf_fix_cppflags=yes
13185
13186                         if test $cf_fix_cppflags = yes ; then
13187                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13188                                 continue
13189                         elif test "${cf_tst_cflags}" = "\"'" ; then
13190                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13191                                 continue
13192                         fi
13193                         ;;
13194                 esac
13195                 case "$CPPFLAGS" in
13196                 *$cf_add_cflags) #(vi
13197                         ;;
13198                 *) #(vi
13199                         case $cf_add_cflags in #(vi
13200                         -D*)
13201                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13202
13203 CPPFLAGS=`echo "$CPPFLAGS" | \
13204         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13205                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13206
13207                                 ;;
13208                         esac
13209                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13210                         ;;
13211                 esac
13212                 ;;
13213         *)
13214                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13215                 ;;
13216         esac
13217         ;;
13218 yes)
13219         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13220
13221         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13222
13223         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13224                 && test -z "${cf_tst_cflags}" \
13225                 && cf_fix_cppflags=no
13226         ;;
13227 esac
13228 done
13229
13230 if test -n "$cf_new_cflags" ; then
13231
13232         CFLAGS="$CFLAGS $cf_new_cflags"
13233 fi
13234
13235 if test -n "$cf_new_cppflags" ; then
13236
13237         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13238 fi
13239
13240 if test -n "$cf_new_extra_cppflags" ; then
13241
13242         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13243 fi
13244
13245 else
13246         LIB_TRACING=DEBUG
13247         ADA_TRACE=FALSE
13248 fi
13249
13250 ###     Checks for libraries.
13251 case $cf_cv_system_name in #(vi
13252 *mingw32*) #(vi
13253         ;;
13254 *)
13255 echo "$as_me:13255: checking for gettimeofday" >&5
13256 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13257 if test "${ac_cv_func_gettimeofday+set}" = set; then
13258   echo $ECHO_N "(cached) $ECHO_C" >&6
13259 else
13260   cat >conftest.$ac_ext <<_ACEOF
13261 #line 13261 "configure"
13262 #include "confdefs.h"
13263 /* System header to define __stub macros and hopefully few prototypes,
13264     which can conflict with char gettimeofday (); below.  */
13265 #include <assert.h>
13266 /* Override any gcc2 internal prototype to avoid an error.  */
13267 #ifdef __cplusplus
13268 extern "C"
13269 #endif
13270 /* We use char because int might match the return type of a gcc2
13271    builtin and then its argument prototype would still apply.  */
13272 char gettimeofday ();
13273 char (*f) ();
13274
13275 int
13276 main ()
13277 {
13278 /* The GNU C library defines this for functions which it implements
13279     to always fail with ENOSYS.  Some functions are actually named
13280     something starting with __ and the normal name is an alias.  */
13281 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13282 choke me
13283 #else
13284 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13285 #endif
13286
13287   ;
13288   return 0;
13289 }
13290 _ACEOF
13291 rm -f conftest.$ac_objext conftest$ac_exeext
13292 if { (eval echo "$as_me:13292: \"$ac_link\"") >&5
13293   (eval $ac_link) 2>&5
13294   ac_status=$?
13295   echo "$as_me:13295: \$? = $ac_status" >&5
13296   (exit $ac_status); } &&
13297          { ac_try='test -s conftest$ac_exeext'
13298   { (eval echo "$as_me:13298: \"$ac_try\"") >&5
13299   (eval $ac_try) 2>&5
13300   ac_status=$?
13301   echo "$as_me:13301: \$? = $ac_status" >&5
13302   (exit $ac_status); }; }; then
13303   ac_cv_func_gettimeofday=yes
13304 else
13305   echo "$as_me: failed program was:" >&5
13306 cat conftest.$ac_ext >&5
13307 ac_cv_func_gettimeofday=no
13308 fi
13309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13310 fi
13311 echo "$as_me:13311: result: $ac_cv_func_gettimeofday" >&5
13312 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13313 if test $ac_cv_func_gettimeofday = yes; then
13314
13315 cat >>confdefs.h <<\EOF
13316 #define HAVE_GETTIMEOFDAY 1
13317 EOF
13318
13319 else
13320
13321 echo "$as_me:13321: checking for gettimeofday in -lbsd" >&5
13322 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13323 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13324   echo $ECHO_N "(cached) $ECHO_C" >&6
13325 else
13326   ac_check_lib_save_LIBS=$LIBS
13327 LIBS="-lbsd  $LIBS"
13328 cat >conftest.$ac_ext <<_ACEOF
13329 #line 13329 "configure"
13330 #include "confdefs.h"
13331
13332 /* Override any gcc2 internal prototype to avoid an error.  */
13333 #ifdef __cplusplus
13334 extern "C"
13335 #endif
13336 /* We use char because int might match the return type of a gcc2
13337    builtin and then its argument prototype would still apply.  */
13338 char gettimeofday ();
13339 int
13340 main ()
13341 {
13342 gettimeofday ();
13343   ;
13344   return 0;
13345 }
13346 _ACEOF
13347 rm -f conftest.$ac_objext conftest$ac_exeext
13348 if { (eval echo "$as_me:13348: \"$ac_link\"") >&5
13349   (eval $ac_link) 2>&5
13350   ac_status=$?
13351   echo "$as_me:13351: \$? = $ac_status" >&5
13352   (exit $ac_status); } &&
13353          { ac_try='test -s conftest$ac_exeext'
13354   { (eval echo "$as_me:13354: \"$ac_try\"") >&5
13355   (eval $ac_try) 2>&5
13356   ac_status=$?
13357   echo "$as_me:13357: \$? = $ac_status" >&5
13358   (exit $ac_status); }; }; then
13359   ac_cv_lib_bsd_gettimeofday=yes
13360 else
13361   echo "$as_me: failed program was:" >&5
13362 cat conftest.$ac_ext >&5
13363 ac_cv_lib_bsd_gettimeofday=no
13364 fi
13365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13366 LIBS=$ac_check_lib_save_LIBS
13367 fi
13368 echo "$as_me:13368: result: $ac_cv_lib_bsd_gettimeofday" >&5
13369 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13370 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13371
13372 cat >>confdefs.h <<\EOF
13373 #define HAVE_GETTIMEOFDAY 1
13374 EOF
13375
13376         LIBS="-lbsd $LIBS"
13377 fi
13378
13379 fi
13380         ;;
13381 esac
13382
13383 echo "$as_me:13383: checking if -lm needed for math functions" >&5
13384 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13385 if test "${cf_cv_need_libm+set}" = set; then
13386   echo $ECHO_N "(cached) $ECHO_C" >&6
13387 else
13388
13389         cat >conftest.$ac_ext <<_ACEOF
13390 #line 13390 "configure"
13391 #include "confdefs.h"
13392
13393         #include <stdio.h>
13394         #include <math.h>
13395
13396 int
13397 main ()
13398 {
13399 double x = rand(); printf("result = %g\n", sin(x))
13400   ;
13401   return 0;
13402 }
13403 _ACEOF
13404 rm -f conftest.$ac_objext conftest$ac_exeext
13405 if { (eval echo "$as_me:13405: \"$ac_link\"") >&5
13406   (eval $ac_link) 2>&5
13407   ac_status=$?
13408   echo "$as_me:13408: \$? = $ac_status" >&5
13409   (exit $ac_status); } &&
13410          { ac_try='test -s conftest$ac_exeext'
13411   { (eval echo "$as_me:13411: \"$ac_try\"") >&5
13412   (eval $ac_try) 2>&5
13413   ac_status=$?
13414   echo "$as_me:13414: \$? = $ac_status" >&5
13415   (exit $ac_status); }; }; then
13416   cf_cv_need_libm=no
13417 else
13418   echo "$as_me: failed program was:" >&5
13419 cat conftest.$ac_ext >&5
13420 cf_cv_need_libm=yes
13421 fi
13422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13423 fi
13424 echo "$as_me:13424: result: $cf_cv_need_libm" >&5
13425 echo "${ECHO_T}$cf_cv_need_libm" >&6
13426 if test "$cf_cv_need_libm" = yes
13427 then
13428 MATH_LIB=-lm
13429 fi
13430
13431 ###     Checks for header files.
13432 echo "$as_me:13432: checking for ANSI C header files" >&5
13433 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13434 if test "${ac_cv_header_stdc+set}" = set; then
13435   echo $ECHO_N "(cached) $ECHO_C" >&6
13436 else
13437   cat >conftest.$ac_ext <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440 #include <stdlib.h>
13441 #include <stdarg.h>
13442 #include <string.h>
13443 #include <float.h>
13444
13445 _ACEOF
13446 if { (eval echo "$as_me:13446: \"$ac_cpp conftest.$ac_ext\"") >&5
13447   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13448   ac_status=$?
13449   egrep -v '^ *\+' conftest.er1 >conftest.err
13450   rm -f conftest.er1
13451   cat conftest.err >&5
13452   echo "$as_me:13452: \$? = $ac_status" >&5
13453   (exit $ac_status); } >/dev/null; then
13454   if test -s conftest.err; then
13455     ac_cpp_err=$ac_c_preproc_warn_flag
13456   else
13457     ac_cpp_err=
13458   fi
13459 else
13460   ac_cpp_err=yes
13461 fi
13462 if test -z "$ac_cpp_err"; then
13463   ac_cv_header_stdc=yes
13464 else
13465   echo "$as_me: failed program was:" >&5
13466   cat conftest.$ac_ext >&5
13467   ac_cv_header_stdc=no
13468 fi
13469 rm -f conftest.err conftest.$ac_ext
13470
13471 if test $ac_cv_header_stdc = yes; then
13472   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13473   cat >conftest.$ac_ext <<_ACEOF
13474 #line 13474 "configure"
13475 #include "confdefs.h"
13476 #include <string.h>
13477
13478 _ACEOF
13479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13480   egrep "memchr" >/dev/null 2>&1; then
13481   :
13482 else
13483   ac_cv_header_stdc=no
13484 fi
13485 rm -rf conftest*
13486
13487 fi
13488
13489 if test $ac_cv_header_stdc = yes; then
13490   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13491   cat >conftest.$ac_ext <<_ACEOF
13492 #line 13492 "configure"
13493 #include "confdefs.h"
13494 #include <stdlib.h>
13495
13496 _ACEOF
13497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13498   egrep "free" >/dev/null 2>&1; then
13499   :
13500 else
13501   ac_cv_header_stdc=no
13502 fi
13503 rm -rf conftest*
13504
13505 fi
13506
13507 if test $ac_cv_header_stdc = yes; then
13508   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13509   if test "$cross_compiling" = yes; then
13510   :
13511 else
13512   cat >conftest.$ac_ext <<_ACEOF
13513 #line 13513 "configure"
13514 #include "confdefs.h"
13515 #include <ctype.h>
13516 #if ((' ' & 0x0FF) == 0x020)
13517 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13518 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13519 #else
13520 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13521                      || ('j' <= (c) && (c) <= 'r') \
13522                      || ('s' <= (c) && (c) <= 'z'))
13523 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13524 #endif
13525
13526 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13527 int
13528 main ()
13529 {
13530   int i;
13531   for (i = 0; i < 256; i++)
13532     if (XOR (islower (i), ISLOWER (i))
13533         || toupper (i) != TOUPPER (i))
13534       $ac_main_return(2);
13535   $ac_main_return (0);
13536 }
13537 _ACEOF
13538 rm -f conftest$ac_exeext
13539 if { (eval echo "$as_me:13539: \"$ac_link\"") >&5
13540   (eval $ac_link) 2>&5
13541   ac_status=$?
13542   echo "$as_me:13542: \$? = $ac_status" >&5
13543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13544   { (eval echo "$as_me:13544: \"$ac_try\"") >&5
13545   (eval $ac_try) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit $ac_status); }; }; then
13549   :
13550 else
13551   echo "$as_me: program exited with status $ac_status" >&5
13552 echo "$as_me: failed program was:" >&5
13553 cat conftest.$ac_ext >&5
13554 ac_cv_header_stdc=no
13555 fi
13556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13557 fi
13558 fi
13559 fi
13560 echo "$as_me:13560: result: $ac_cv_header_stdc" >&5
13561 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13562 if test $ac_cv_header_stdc = yes; then
13563
13564 cat >>confdefs.h <<\EOF
13565 #define STDC_HEADERS 1
13566 EOF
13567
13568 fi
13569
13570 ac_header_dirent=no
13571 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13572   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13573 echo "$as_me:13573: checking for $ac_hdr that defines DIR" >&5
13574 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13575 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13576   echo $ECHO_N "(cached) $ECHO_C" >&6
13577 else
13578   cat >conftest.$ac_ext <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581 #include <sys/types.h>
13582 #include <$ac_hdr>
13583
13584 int
13585 main ()
13586 {
13587 if ((DIR *) 0)
13588 return 0;
13589   ;
13590   return 0;
13591 }
13592 _ACEOF
13593 rm -f conftest.$ac_objext
13594 if { (eval echo "$as_me:13594: \"$ac_compile\"") >&5
13595   (eval $ac_compile) 2>&5
13596   ac_status=$?
13597   echo "$as_me:13597: \$? = $ac_status" >&5
13598   (exit $ac_status); } &&
13599          { ac_try='test -s conftest.$ac_objext'
13600   { (eval echo "$as_me:13600: \"$ac_try\"") >&5
13601   (eval $ac_try) 2>&5
13602   ac_status=$?
13603   echo "$as_me:13603: \$? = $ac_status" >&5
13604   (exit $ac_status); }; }; then
13605   eval "$as_ac_Header=yes"
13606 else
13607   echo "$as_me: failed program was:" >&5
13608 cat conftest.$ac_ext >&5
13609 eval "$as_ac_Header=no"
13610 fi
13611 rm -f conftest.$ac_objext conftest.$ac_ext
13612 fi
13613 echo "$as_me:13613: result: `eval echo '${'$as_ac_Header'}'`" >&5
13614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13616   cat >>confdefs.h <<EOF
13617 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13618 EOF
13619
13620 ac_header_dirent=$ac_hdr; break
13621 fi
13622
13623 done
13624 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13625 if test $ac_header_dirent = dirent.h; then
13626   echo "$as_me:13626: checking for opendir in -ldir" >&5
13627 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13628 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13629   echo $ECHO_N "(cached) $ECHO_C" >&6
13630 else
13631   ac_check_lib_save_LIBS=$LIBS
13632 LIBS="-ldir  $LIBS"
13633 cat >conftest.$ac_ext <<_ACEOF
13634 #line 13634 "configure"
13635 #include "confdefs.h"
13636
13637 /* Override any gcc2 internal prototype to avoid an error.  */
13638 #ifdef __cplusplus
13639 extern "C"
13640 #endif
13641 /* We use char because int might match the return type of a gcc2
13642    builtin and then its argument prototype would still apply.  */
13643 char opendir ();
13644 int
13645 main ()
13646 {
13647 opendir ();
13648   ;
13649   return 0;
13650 }
13651 _ACEOF
13652 rm -f conftest.$ac_objext conftest$ac_exeext
13653 if { (eval echo "$as_me:13653: \"$ac_link\"") >&5
13654   (eval $ac_link) 2>&5
13655   ac_status=$?
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit $ac_status); } &&
13658          { ac_try='test -s conftest$ac_exeext'
13659   { (eval echo "$as_me:13659: \"$ac_try\"") >&5
13660   (eval $ac_try) 2>&5
13661   ac_status=$?
13662   echo "$as_me:13662: \$? = $ac_status" >&5
13663   (exit $ac_status); }; }; then
13664   ac_cv_lib_dir_opendir=yes
13665 else
13666   echo "$as_me: failed program was:" >&5
13667 cat conftest.$ac_ext >&5
13668 ac_cv_lib_dir_opendir=no
13669 fi
13670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13671 LIBS=$ac_check_lib_save_LIBS
13672 fi
13673 echo "$as_me:13673: result: $ac_cv_lib_dir_opendir" >&5
13674 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13675 if test $ac_cv_lib_dir_opendir = yes; then
13676   LIBS="$LIBS -ldir"
13677 fi
13678
13679 else
13680   echo "$as_me:13680: checking for opendir in -lx" >&5
13681 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13682 if test "${ac_cv_lib_x_opendir+set}" = set; then
13683   echo $ECHO_N "(cached) $ECHO_C" >&6
13684 else
13685   ac_check_lib_save_LIBS=$LIBS
13686 LIBS="-lx  $LIBS"
13687 cat >conftest.$ac_ext <<_ACEOF
13688 #line 13688 "configure"
13689 #include "confdefs.h"
13690
13691 /* Override any gcc2 internal prototype to avoid an error.  */
13692 #ifdef __cplusplus
13693 extern "C"
13694 #endif
13695 /* We use char because int might match the return type of a gcc2
13696    builtin and then its argument prototype would still apply.  */
13697 char opendir ();
13698 int
13699 main ()
13700 {
13701 opendir ();
13702   ;
13703   return 0;
13704 }
13705 _ACEOF
13706 rm -f conftest.$ac_objext conftest$ac_exeext
13707 if { (eval echo "$as_me:13707: \"$ac_link\"") >&5
13708   (eval $ac_link) 2>&5
13709   ac_status=$?
13710   echo "$as_me:13710: \$? = $ac_status" >&5
13711   (exit $ac_status); } &&
13712          { ac_try='test -s conftest$ac_exeext'
13713   { (eval echo "$as_me:13713: \"$ac_try\"") >&5
13714   (eval $ac_try) 2>&5
13715   ac_status=$?
13716   echo "$as_me:13716: \$? = $ac_status" >&5
13717   (exit $ac_status); }; }; then
13718   ac_cv_lib_x_opendir=yes
13719 else
13720   echo "$as_me: failed program was:" >&5
13721 cat conftest.$ac_ext >&5
13722 ac_cv_lib_x_opendir=no
13723 fi
13724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13725 LIBS=$ac_check_lib_save_LIBS
13726 fi
13727 echo "$as_me:13727: result: $ac_cv_lib_x_opendir" >&5
13728 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13729 if test $ac_cv_lib_x_opendir = yes; then
13730   LIBS="$LIBS -lx"
13731 fi
13732
13733 fi
13734
13735 echo "$as_me:13735: checking whether time.h and sys/time.h may both be included" >&5
13736 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13737 if test "${ac_cv_header_time+set}" = set; then
13738   echo $ECHO_N "(cached) $ECHO_C" >&6
13739 else
13740   cat >conftest.$ac_ext <<_ACEOF
13741 #line 13741 "configure"
13742 #include "confdefs.h"
13743 #include <sys/types.h>
13744 #include <sys/time.h>
13745 #include <time.h>
13746
13747 int
13748 main ()
13749 {
13750 if ((struct tm *) 0)
13751 return 0;
13752   ;
13753   return 0;
13754 }
13755 _ACEOF
13756 rm -f conftest.$ac_objext
13757 if { (eval echo "$as_me:13757: \"$ac_compile\"") >&5
13758   (eval $ac_compile) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); } &&
13762          { ac_try='test -s conftest.$ac_objext'
13763   { (eval echo "$as_me:13763: \"$ac_try\"") >&5
13764   (eval $ac_try) 2>&5
13765   ac_status=$?
13766   echo "$as_me:13766: \$? = $ac_status" >&5
13767   (exit $ac_status); }; }; then
13768   ac_cv_header_time=yes
13769 else
13770   echo "$as_me: failed program was:" >&5
13771 cat conftest.$ac_ext >&5
13772 ac_cv_header_time=no
13773 fi
13774 rm -f conftest.$ac_objext conftest.$ac_ext
13775 fi
13776 echo "$as_me:13776: result: $ac_cv_header_time" >&5
13777 echo "${ECHO_T}$ac_cv_header_time" >&6
13778 if test $ac_cv_header_time = yes; then
13779
13780 cat >>confdefs.h <<\EOF
13781 #define TIME_WITH_SYS_TIME 1
13782 EOF
13783
13784 fi
13785
13786 cf_regex_func=no
13787
13788 cf_regex_libs="regex re"
13789 case $host_os in #(vi
13790 mingw*)
13791         cf_regex_libs="gnurx $cf_regex_libs"
13792         ;;
13793 esac
13794
13795 echo "$as_me:13795: checking for regcomp" >&5
13796 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13797 if test "${ac_cv_func_regcomp+set}" = set; then
13798   echo $ECHO_N "(cached) $ECHO_C" >&6
13799 else
13800   cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803 /* System header to define __stub macros and hopefully few prototypes,
13804     which can conflict with char regcomp (); below.  */
13805 #include <assert.h>
13806 /* Override any gcc2 internal prototype to avoid an error.  */
13807 #ifdef __cplusplus
13808 extern "C"
13809 #endif
13810 /* We use char because int might match the return type of a gcc2
13811    builtin and then its argument prototype would still apply.  */
13812 char regcomp ();
13813 char (*f) ();
13814
13815 int
13816 main ()
13817 {
13818 /* The GNU C library defines this for functions which it implements
13819     to always fail with ENOSYS.  Some functions are actually named
13820     something starting with __ and the normal name is an alias.  */
13821 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13822 choke me
13823 #else
13824 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13825 #endif
13826
13827   ;
13828   return 0;
13829 }
13830 _ACEOF
13831 rm -f conftest.$ac_objext conftest$ac_exeext
13832 if { (eval echo "$as_me:13832: \"$ac_link\"") >&5
13833   (eval $ac_link) 2>&5
13834   ac_status=$?
13835   echo "$as_me:13835: \$? = $ac_status" >&5
13836   (exit $ac_status); } &&
13837          { ac_try='test -s conftest$ac_exeext'
13838   { (eval echo "$as_me:13838: \"$ac_try\"") >&5
13839   (eval $ac_try) 2>&5
13840   ac_status=$?
13841   echo "$as_me:13841: \$? = $ac_status" >&5
13842   (exit $ac_status); }; }; then
13843   ac_cv_func_regcomp=yes
13844 else
13845   echo "$as_me: failed program was:" >&5
13846 cat conftest.$ac_ext >&5
13847 ac_cv_func_regcomp=no
13848 fi
13849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13850 fi
13851 echo "$as_me:13851: result: $ac_cv_func_regcomp" >&5
13852 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13853 if test $ac_cv_func_regcomp = yes; then
13854   cf_regex_func=regcomp
13855 else
13856
13857         for cf_regex_lib in $cf_regex_libs
13858         do
13859                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13860 echo "$as_me:13860: checking for regcomp in -l$cf_regex_lib" >&5
13861 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13862 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13863   echo $ECHO_N "(cached) $ECHO_C" >&6
13864 else
13865   ac_check_lib_save_LIBS=$LIBS
13866 LIBS="-l$cf_regex_lib  $LIBS"
13867 cat >conftest.$ac_ext <<_ACEOF
13868 #line 13868 "configure"
13869 #include "confdefs.h"
13870
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 int
13879 main ()
13880 {
13881 regcomp ();
13882   ;
13883   return 0;
13884 }
13885 _ACEOF
13886 rm -f conftest.$ac_objext conftest$ac_exeext
13887 if { (eval echo "$as_me:13887: \"$ac_link\"") >&5
13888   (eval $ac_link) 2>&5
13889   ac_status=$?
13890   echo "$as_me:13890: \$? = $ac_status" >&5
13891   (exit $ac_status); } &&
13892          { ac_try='test -s conftest$ac_exeext'
13893   { (eval echo "$as_me:13893: \"$ac_try\"") >&5
13894   (eval $ac_try) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit $ac_status); }; }; then
13898   eval "$as_ac_Lib=yes"
13899 else
13900   echo "$as_me: failed program was:" >&5
13901 cat conftest.$ac_ext >&5
13902 eval "$as_ac_Lib=no"
13903 fi
13904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13905 LIBS=$ac_check_lib_save_LIBS
13906 fi
13907 echo "$as_me:13907: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13908 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13909 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13910
13911                                 LIBS="-l$cf_regex_lib $LIBS"
13912                                 cf_regex_func=regcomp
13913                                 break
13914 fi
13915
13916         done
13917
13918 fi
13919
13920 if test "$cf_regex_func" = no ; then
13921         echo "$as_me:13921: checking for compile" >&5
13922 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13923 if test "${ac_cv_func_compile+set}" = set; then
13924   echo $ECHO_N "(cached) $ECHO_C" >&6
13925 else
13926   cat >conftest.$ac_ext <<_ACEOF
13927 #line 13927 "configure"
13928 #include "confdefs.h"
13929 /* System header to define __stub macros and hopefully few prototypes,
13930     which can conflict with char compile (); below.  */
13931 #include <assert.h>
13932 /* Override any gcc2 internal prototype to avoid an error.  */
13933 #ifdef __cplusplus
13934 extern "C"
13935 #endif
13936 /* We use char because int might match the return type of a gcc2
13937    builtin and then its argument prototype would still apply.  */
13938 char compile ();
13939 char (*f) ();
13940
13941 int
13942 main ()
13943 {
13944 /* The GNU C library defines this for functions which it implements
13945     to always fail with ENOSYS.  Some functions are actually named
13946     something starting with __ and the normal name is an alias.  */
13947 #if defined (__stub_compile) || defined (__stub___compile)
13948 choke me
13949 #else
13950 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13951 #endif
13952
13953   ;
13954   return 0;
13955 }
13956 _ACEOF
13957 rm -f conftest.$ac_objext conftest$ac_exeext
13958 if { (eval echo "$as_me:13958: \"$ac_link\"") >&5
13959   (eval $ac_link) 2>&5
13960   ac_status=$?
13961   echo "$as_me:13961: \$? = $ac_status" >&5
13962   (exit $ac_status); } &&
13963          { ac_try='test -s conftest$ac_exeext'
13964   { (eval echo "$as_me:13964: \"$ac_try\"") >&5
13965   (eval $ac_try) 2>&5
13966   ac_status=$?
13967   echo "$as_me:13967: \$? = $ac_status" >&5
13968   (exit $ac_status); }; }; then
13969   ac_cv_func_compile=yes
13970 else
13971   echo "$as_me: failed program was:" >&5
13972 cat conftest.$ac_ext >&5
13973 ac_cv_func_compile=no
13974 fi
13975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13976 fi
13977 echo "$as_me:13977: result: $ac_cv_func_compile" >&5
13978 echo "${ECHO_T}$ac_cv_func_compile" >&6
13979 if test $ac_cv_func_compile = yes; then
13980   cf_regex_func=compile
13981 else
13982
13983                 echo "$as_me:13983: checking for compile in -lgen" >&5
13984 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13985 if test "${ac_cv_lib_gen_compile+set}" = set; then
13986   echo $ECHO_N "(cached) $ECHO_C" >&6
13987 else
13988   ac_check_lib_save_LIBS=$LIBS
13989 LIBS="-lgen  $LIBS"
13990 cat >conftest.$ac_ext <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993
13994 /* Override any gcc2 internal prototype to avoid an error.  */
13995 #ifdef __cplusplus
13996 extern "C"
13997 #endif
13998 /* We use char because int might match the return type of a gcc2
13999    builtin and then its argument prototype would still apply.  */
14000 char compile ();
14001 int
14002 main ()
14003 {
14004 compile ();
14005   ;
14006   return 0;
14007 }
14008 _ACEOF
14009 rm -f conftest.$ac_objext conftest$ac_exeext
14010 if { (eval echo "$as_me:14010: \"$ac_link\"") >&5
14011   (eval $ac_link) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit $ac_status); } &&
14015          { ac_try='test -s conftest$ac_exeext'
14016   { (eval echo "$as_me:14016: \"$ac_try\"") >&5
14017   (eval $ac_try) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit $ac_status); }; }; then
14021   ac_cv_lib_gen_compile=yes
14022 else
14023   echo "$as_me: failed program was:" >&5
14024 cat conftest.$ac_ext >&5
14025 ac_cv_lib_gen_compile=no
14026 fi
14027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14028 LIBS=$ac_check_lib_save_LIBS
14029 fi
14030 echo "$as_me:14030: result: $ac_cv_lib_gen_compile" >&5
14031 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14032 if test $ac_cv_lib_gen_compile = yes; then
14033
14034                                 LIBS="-lgen $LIBS"
14035                                 cf_regex_func=compile
14036 fi
14037
14038 fi
14039
14040 fi
14041
14042 if test "$cf_regex_func" = no ; then
14043         { echo "$as_me:14043: WARNING: cannot find regular expression library" >&5
14044 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14045 fi
14046
14047 echo "$as_me:14047: checking for regular-expression headers" >&5
14048 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14049 if test "${cf_cv_regex_hdrs+set}" = set; then
14050   echo $ECHO_N "(cached) $ECHO_C" >&6
14051 else
14052
14053 cf_cv_regex_hdrs=no
14054 case $cf_regex_func in #(vi
14055 compile) #(vi
14056         for cf_regex_hdr in regexp.h regexpr.h
14057         do
14058                 cat >conftest.$ac_ext <<_ACEOF
14059 #line 14059 "configure"
14060 #include "confdefs.h"
14061 #include <$cf_regex_hdr>
14062 int
14063 main ()
14064 {
14065
14066                         char *p = compile("", "", "", 0);
14067                         int x = step("", "");
14068
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 rm -f conftest.$ac_objext conftest$ac_exeext
14074 if { (eval echo "$as_me:14074: \"$ac_link\"") >&5
14075   (eval $ac_link) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit $ac_status); } &&
14079          { ac_try='test -s conftest$ac_exeext'
14080   { (eval echo "$as_me:14080: \"$ac_try\"") >&5
14081   (eval $ac_try) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); }; }; then
14085
14086                         cf_cv_regex_hdrs=$cf_regex_hdr
14087                         break
14088
14089 else
14090   echo "$as_me: failed program was:" >&5
14091 cat conftest.$ac_ext >&5
14092 fi
14093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14094         done
14095         ;;
14096 *)
14097         for cf_regex_hdr in regex.h
14098         do
14099                 cat >conftest.$ac_ext <<_ACEOF
14100 #line 14100 "configure"
14101 #include "confdefs.h"
14102 #include <sys/types.h>
14103 #include <$cf_regex_hdr>
14104 int
14105 main ()
14106 {
14107
14108                         regex_t *p;
14109                         int x = regcomp(p, "", 0);
14110                         int y = regexec(p, "", 0, 0, 0);
14111                         regfree(p);
14112
14113   ;
14114   return 0;
14115 }
14116 _ACEOF
14117 rm -f conftest.$ac_objext conftest$ac_exeext
14118 if { (eval echo "$as_me:14118: \"$ac_link\"") >&5
14119   (eval $ac_link) 2>&5
14120   ac_status=$?
14121   echo "$as_me:14121: \$? = $ac_status" >&5
14122   (exit $ac_status); } &&
14123          { ac_try='test -s conftest$ac_exeext'
14124   { (eval echo "$as_me:14124: \"$ac_try\"") >&5
14125   (eval $ac_try) 2>&5
14126   ac_status=$?
14127   echo "$as_me:14127: \$? = $ac_status" >&5
14128   (exit $ac_status); }; }; then
14129
14130                         cf_cv_regex_hdrs=$cf_regex_hdr
14131                         break
14132
14133 else
14134   echo "$as_me: failed program was:" >&5
14135 cat conftest.$ac_ext >&5
14136 fi
14137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14138         done
14139         ;;
14140 esac
14141
14142 fi
14143 echo "$as_me:14143: result: $cf_cv_regex_hdrs" >&5
14144 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14145
14146 case $cf_cv_regex_hdrs in #(vi
14147     no)        { echo "$as_me:14147: WARNING: no regular expression header found" >&5
14148 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14149     regex.h)
14150 cat >>confdefs.h <<\EOF
14151 #define HAVE_REGEX_H_FUNCS 1
14152 EOF
14153  ;; #(vi
14154     regexp.h)
14155 cat >>confdefs.h <<\EOF
14156 #define HAVE_REGEXP_H_FUNCS 1
14157 EOF
14158  ;; #(vi
14159     regexpr.h)
14160 cat >>confdefs.h <<\EOF
14161 #define HAVE_REGEXPR_H_FUNCS 1
14162 EOF
14163  ;;
14164 esac
14165
14166 for ac_header in \
14167 fcntl.h \
14168 getopt.h \
14169 limits.h \
14170 locale.h \
14171 math.h \
14172 poll.h \
14173 sys/bsdtypes.h \
14174 sys/ioctl.h \
14175 sys/param.h \
14176 sys/poll.h \
14177 sys/select.h \
14178 sys/time.h \
14179 sys/times.h \
14180 ttyent.h \
14181 unistd.h \
14182 wctype.h \
14183
14184 do
14185 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14186 echo "$as_me:14186: checking for $ac_header" >&5
14187 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14189   echo $ECHO_N "(cached) $ECHO_C" >&6
14190 else
14191   cat >conftest.$ac_ext <<_ACEOF
14192 #line 14192 "configure"
14193 #include "confdefs.h"
14194 #include <$ac_header>
14195 _ACEOF
14196 if { (eval echo "$as_me:14196: \"$ac_cpp conftest.$ac_ext\"") >&5
14197   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14198   ac_status=$?
14199   egrep -v '^ *\+' conftest.er1 >conftest.err
14200   rm -f conftest.er1
14201   cat conftest.err >&5
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit $ac_status); } >/dev/null; then
14204   if test -s conftest.err; then
14205     ac_cpp_err=$ac_c_preproc_warn_flag
14206   else
14207     ac_cpp_err=
14208   fi
14209 else
14210   ac_cpp_err=yes
14211 fi
14212 if test -z "$ac_cpp_err"; then
14213   eval "$as_ac_Header=yes"
14214 else
14215   echo "$as_me: failed program was:" >&5
14216   cat conftest.$ac_ext >&5
14217   eval "$as_ac_Header=no"
14218 fi
14219 rm -f conftest.err conftest.$ac_ext
14220 fi
14221 echo "$as_me:14221: result: `eval echo '${'$as_ac_Header'}'`" >&5
14222 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14223 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14224   cat >>confdefs.h <<EOF
14225 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14226 EOF
14227
14228 fi
14229 done
14230
14231 for ac_header in unistd.h getopt.h
14232 do
14233 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14234 echo "$as_me:14234: checking for $ac_header" >&5
14235 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14236 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14237   echo $ECHO_N "(cached) $ECHO_C" >&6
14238 else
14239   cat >conftest.$ac_ext <<_ACEOF
14240 #line 14240 "configure"
14241 #include "confdefs.h"
14242 #include <$ac_header>
14243 _ACEOF
14244 if { (eval echo "$as_me:14244: \"$ac_cpp conftest.$ac_ext\"") >&5
14245   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14246   ac_status=$?
14247   egrep -v '^ *\+' conftest.er1 >conftest.err
14248   rm -f conftest.er1
14249   cat conftest.err >&5
14250   echo "$as_me:14250: \$? = $ac_status" >&5
14251   (exit $ac_status); } >/dev/null; then
14252   if test -s conftest.err; then
14253     ac_cpp_err=$ac_c_preproc_warn_flag
14254   else
14255     ac_cpp_err=
14256   fi
14257 else
14258   ac_cpp_err=yes
14259 fi
14260 if test -z "$ac_cpp_err"; then
14261   eval "$as_ac_Header=yes"
14262 else
14263   echo "$as_me: failed program was:" >&5
14264   cat conftest.$ac_ext >&5
14265   eval "$as_ac_Header=no"
14266 fi
14267 rm -f conftest.err conftest.$ac_ext
14268 fi
14269 echo "$as_me:14269: result: `eval echo '${'$as_ac_Header'}'`" >&5
14270 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14271 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14272   cat >>confdefs.h <<EOF
14273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14274 EOF
14275
14276 fi
14277 done
14278
14279 echo "$as_me:14279: checking for header declaring getopt variables" >&5
14280 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14281 if test "${cf_cv_getopt_header+set}" = set; then
14282   echo $ECHO_N "(cached) $ECHO_C" >&6
14283 else
14284
14285 cf_cv_getopt_header=none
14286 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14287 do
14288 cat >conftest.$ac_ext <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14291
14292 #include <$cf_header>
14293 int
14294 main ()
14295 {
14296 int x = optind; char *y = optarg
14297   ;
14298   return 0;
14299 }
14300 _ACEOF
14301 rm -f conftest.$ac_objext
14302 if { (eval echo "$as_me:14302: \"$ac_compile\"") >&5
14303   (eval $ac_compile) 2>&5
14304   ac_status=$?
14305   echo "$as_me:14305: \$? = $ac_status" >&5
14306   (exit $ac_status); } &&
14307          { ac_try='test -s conftest.$ac_objext'
14308   { (eval echo "$as_me:14308: \"$ac_try\"") >&5
14309   (eval $ac_try) 2>&5
14310   ac_status=$?
14311   echo "$as_me:14311: \$? = $ac_status" >&5
14312   (exit $ac_status); }; }; then
14313   cf_cv_getopt_header=$cf_header
14314  break
14315 else
14316   echo "$as_me: failed program was:" >&5
14317 cat conftest.$ac_ext >&5
14318 fi
14319 rm -f conftest.$ac_objext conftest.$ac_ext
14320 done
14321
14322 fi
14323 echo "$as_me:14323: result: $cf_cv_getopt_header" >&5
14324 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14325 if test $cf_cv_getopt_header != none ; then
14326
14327 cat >>confdefs.h <<\EOF
14328 #define HAVE_GETOPT_HEADER 1
14329 EOF
14330
14331 fi
14332
14333 # check for ISC (this may also define _POSIX_SOURCE)
14334 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14335 if test "x$ISC" = xyes ; then
14336
14337 echo "$as_me:14337: checking for main in -lcposix" >&5
14338 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14339 if test "${ac_cv_lib_cposix_main+set}" = set; then
14340   echo $ECHO_N "(cached) $ECHO_C" >&6
14341 else
14342   ac_check_lib_save_LIBS=$LIBS
14343 LIBS="-lcposix  $LIBS"
14344 cat >conftest.$ac_ext <<_ACEOF
14345 #line 14345 "configure"
14346 #include "confdefs.h"
14347
14348 int
14349 main ()
14350 {
14351 main ();
14352   ;
14353   return 0;
14354 }
14355 _ACEOF
14356 rm -f conftest.$ac_objext conftest$ac_exeext
14357 if { (eval echo "$as_me:14357: \"$ac_link\"") >&5
14358   (eval $ac_link) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); } &&
14362          { ac_try='test -s conftest$ac_exeext'
14363   { (eval echo "$as_me:14363: \"$ac_try\"") >&5
14364   (eval $ac_try) 2>&5
14365   ac_status=$?
14366   echo "$as_me:14366: \$? = $ac_status" >&5
14367   (exit $ac_status); }; }; then
14368   ac_cv_lib_cposix_main=yes
14369 else
14370   echo "$as_me: failed program was:" >&5
14371 cat conftest.$ac_ext >&5
14372 ac_cv_lib_cposix_main=no
14373 fi
14374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14375 LIBS=$ac_check_lib_save_LIBS
14376 fi
14377 echo "$as_me:14377: result: $ac_cv_lib_cposix_main" >&5
14378 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14379 if test $ac_cv_lib_cposix_main = yes; then
14380   cat >>confdefs.h <<EOF
14381 #define HAVE_LIBCPOSIX 1
14382 EOF
14383
14384   LIBS="-lcposix $LIBS"
14385
14386 fi
14387
14388         echo "$as_me:14388: checking for bzero in -linet" >&5
14389 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14390 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14391   echo $ECHO_N "(cached) $ECHO_C" >&6
14392 else
14393   ac_check_lib_save_LIBS=$LIBS
14394 LIBS="-linet  $LIBS"
14395 cat >conftest.$ac_ext <<_ACEOF
14396 #line 14396 "configure"
14397 #include "confdefs.h"
14398
14399 /* Override any gcc2 internal prototype to avoid an error.  */
14400 #ifdef __cplusplus
14401 extern "C"
14402 #endif
14403 /* We use char because int might match the return type of a gcc2
14404    builtin and then its argument prototype would still apply.  */
14405 char bzero ();
14406 int
14407 main ()
14408 {
14409 bzero ();
14410   ;
14411   return 0;
14412 }
14413 _ACEOF
14414 rm -f conftest.$ac_objext conftest$ac_exeext
14415 if { (eval echo "$as_me:14415: \"$ac_link\"") >&5
14416   (eval $ac_link) 2>&5
14417   ac_status=$?
14418   echo "$as_me:14418: \$? = $ac_status" >&5
14419   (exit $ac_status); } &&
14420          { ac_try='test -s conftest$ac_exeext'
14421   { (eval echo "$as_me:14421: \"$ac_try\"") >&5
14422   (eval $ac_try) 2>&5
14423   ac_status=$?
14424   echo "$as_me:14424: \$? = $ac_status" >&5
14425   (exit $ac_status); }; }; then
14426   ac_cv_lib_inet_bzero=yes
14427 else
14428   echo "$as_me: failed program was:" >&5
14429 cat conftest.$ac_ext >&5
14430 ac_cv_lib_inet_bzero=no
14431 fi
14432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14433 LIBS=$ac_check_lib_save_LIBS
14434 fi
14435 echo "$as_me:14435: result: $ac_cv_lib_inet_bzero" >&5
14436 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14437 if test $ac_cv_lib_inet_bzero = yes; then
14438   LIBS="-linet $LIBS"
14439 fi
14440 fi
14441
14442 echo "$as_me:14442: checking if sys/time.h works with sys/select.h" >&5
14443 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14444 if test "${cf_cv_sys_time_select+set}" = set; then
14445   echo $ECHO_N "(cached) $ECHO_C" >&6
14446 else
14447
14448 cat >conftest.$ac_ext <<_ACEOF
14449 #line 14449 "configure"
14450 #include "confdefs.h"
14451
14452 #include <sys/types.h>
14453 #ifdef HAVE_SYS_TIME_H
14454 #include <sys/time.h>
14455 #endif
14456 #ifdef HAVE_SYS_SELECT_H
14457 #include <sys/select.h>
14458 #endif
14459
14460 int
14461 main ()
14462 {
14463
14464   ;
14465   return 0;
14466 }
14467 _ACEOF
14468 rm -f conftest.$ac_objext
14469 if { (eval echo "$as_me:14469: \"$ac_compile\"") >&5
14470   (eval $ac_compile) 2>&5
14471   ac_status=$?
14472   echo "$as_me:14472: \$? = $ac_status" >&5
14473   (exit $ac_status); } &&
14474          { ac_try='test -s conftest.$ac_objext'
14475   { (eval echo "$as_me:14475: \"$ac_try\"") >&5
14476   (eval $ac_try) 2>&5
14477   ac_status=$?
14478   echo "$as_me:14478: \$? = $ac_status" >&5
14479   (exit $ac_status); }; }; then
14480   cf_cv_sys_time_select=yes
14481 else
14482   echo "$as_me: failed program was:" >&5
14483 cat conftest.$ac_ext >&5
14484 cf_cv_sys_time_select=no
14485 fi
14486 rm -f conftest.$ac_objext conftest.$ac_ext
14487
14488 fi
14489
14490 echo "$as_me:14490: result: $cf_cv_sys_time_select" >&5
14491 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14492 test "$cf_cv_sys_time_select" = yes &&
14493 cat >>confdefs.h <<\EOF
14494 #define HAVE_SYS_TIME_SELECT 1
14495 EOF
14496
14497 ###     checks for compiler characteristics
14498 ac_ext=c
14499 ac_cpp='$CPP $CPPFLAGS'
14500 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14501 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14502 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14503 ac_main_return=return
14504
14505 echo "$as_me:14505: checking for an ANSI C-conforming const" >&5
14506 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14507 if test "${ac_cv_c_const+set}" = set; then
14508   echo $ECHO_N "(cached) $ECHO_C" >&6
14509 else
14510   cat >conftest.$ac_ext <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14513
14514 int
14515 main ()
14516 {
14517 /* FIXME: Include the comments suggested by Paul. */
14518 #ifndef __cplusplus
14519   /* Ultrix mips cc rejects this.  */
14520   typedef int charset[2];
14521   const charset x;
14522   /* SunOS 4.1.1 cc rejects this.  */
14523   char const *const *ccp;
14524   char **p;
14525   /* NEC SVR4.0.2 mips cc rejects this.  */
14526   struct point {int x, y;};
14527   static struct point const zero = {0,0};
14528   /* AIX XL C 1.02.0.0 rejects this.
14529      It does not let you subtract one const X* pointer from another in
14530      an arm of an if-expression whose if-part is not a constant
14531      expression */
14532   const char *g = "string";
14533   ccp = &g + (g ? g-g : 0);
14534   /* HPUX 7.0 cc rejects these. */
14535   ++ccp;
14536   p = (char**) ccp;
14537   ccp = (char const *const *) p;
14538   { /* SCO 3.2v4 cc rejects this.  */
14539     char *t;
14540     char const *s = 0 ? (char *) 0 : (char const *) 0;
14541
14542     *t++ = 0;
14543   }
14544   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14545     int x[] = {25, 17};
14546     const int *foo = &x[0];
14547     ++foo;
14548   }
14549   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14550     typedef const int *iptr;
14551     iptr p = 0;
14552     ++p;
14553   }
14554   { /* AIX XL C 1.02.0.0 rejects this saying
14555        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14556     struct s { int j; const int *ap[3]; };
14557     struct s *b; b->j = 5;
14558   }
14559   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14560     const int foo = 10;
14561   }
14562 #endif
14563
14564   ;
14565   return 0;
14566 }
14567 _ACEOF
14568 rm -f conftest.$ac_objext
14569 if { (eval echo "$as_me:14569: \"$ac_compile\"") >&5
14570   (eval $ac_compile) 2>&5
14571   ac_status=$?
14572   echo "$as_me:14572: \$? = $ac_status" >&5
14573   (exit $ac_status); } &&
14574          { ac_try='test -s conftest.$ac_objext'
14575   { (eval echo "$as_me:14575: \"$ac_try\"") >&5
14576   (eval $ac_try) 2>&5
14577   ac_status=$?
14578   echo "$as_me:14578: \$? = $ac_status" >&5
14579   (exit $ac_status); }; }; then
14580   ac_cv_c_const=yes
14581 else
14582   echo "$as_me: failed program was:" >&5
14583 cat conftest.$ac_ext >&5
14584 ac_cv_c_const=no
14585 fi
14586 rm -f conftest.$ac_objext conftest.$ac_ext
14587 fi
14588 echo "$as_me:14588: result: $ac_cv_c_const" >&5
14589 echo "${ECHO_T}$ac_cv_c_const" >&6
14590 if test $ac_cv_c_const = no; then
14591
14592 cat >>confdefs.h <<\EOF
14593 #define const
14594 EOF
14595
14596 fi
14597
14598 echo "$as_me:14598: checking for inline" >&5
14599 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14600 if test "${ac_cv_c_inline+set}" = set; then
14601   echo $ECHO_N "(cached) $ECHO_C" >&6
14602 else
14603   ac_cv_c_inline=no
14604 for ac_kw in inline __inline__ __inline; do
14605   cat >conftest.$ac_ext <<_ACEOF
14606 #line 14606 "configure"
14607 #include "confdefs.h"
14608 #ifndef __cplusplus
14609 static $ac_kw int static_foo () {return 0; }
14610 $ac_kw int foo () {return 0; }
14611 #endif
14612
14613 _ACEOF
14614 rm -f conftest.$ac_objext
14615 if { (eval echo "$as_me:14615: \"$ac_compile\"") >&5
14616   (eval $ac_compile) 2>&5
14617   ac_status=$?
14618   echo "$as_me:14618: \$? = $ac_status" >&5
14619   (exit $ac_status); } &&
14620          { ac_try='test -s conftest.$ac_objext'
14621   { (eval echo "$as_me:14621: \"$ac_try\"") >&5
14622   (eval $ac_try) 2>&5
14623   ac_status=$?
14624   echo "$as_me:14624: \$? = $ac_status" >&5
14625   (exit $ac_status); }; }; then
14626   ac_cv_c_inline=$ac_kw; break
14627 else
14628   echo "$as_me: failed program was:" >&5
14629 cat conftest.$ac_ext >&5
14630 fi
14631 rm -f conftest.$ac_objext conftest.$ac_ext
14632 done
14633
14634 fi
14635 echo "$as_me:14635: result: $ac_cv_c_inline" >&5
14636 echo "${ECHO_T}$ac_cv_c_inline" >&6
14637 case $ac_cv_c_inline in
14638   inline | yes) ;;
14639   no)
14640 cat >>confdefs.h <<\EOF
14641 #define inline
14642 EOF
14643  ;;
14644   *)  cat >>confdefs.h <<EOF
14645 #define inline $ac_cv_c_inline
14646 EOF
14647  ;;
14648 esac
14649
14650 NCURSES_INLINE=
14651 if test "$ac_cv_c_inline" != no ; then
14652   NCURSES_INLINE=inline
14653   if test "$INTEL_COMPILER" = yes
14654   then
14655     :
14656   elif test "$CLANG_COMPILER" = yes
14657   then
14658     :
14659   elif test "$GCC" = yes
14660   then
14661     echo "$as_me:14661: checking if $CC supports options to tune inlining" >&5
14662 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14663 if test "${cf_cv_gcc_inline+set}" = set; then
14664   echo $ECHO_N "(cached) $ECHO_C" >&6
14665 else
14666
14667       cf_save_CFLAGS=$CFLAGS
14668       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14669       cat >conftest.$ac_ext <<_ACEOF
14670 #line 14670 "configure"
14671 #include "confdefs.h"
14672 inline int foo(void) { return 1; }
14673 int
14674 main ()
14675 {
14676 ${cf_cv_main_return:-return} foo()
14677   ;
14678   return 0;
14679 }
14680 _ACEOF
14681 rm -f conftest.$ac_objext
14682 if { (eval echo "$as_me:14682: \"$ac_compile\"") >&5
14683   (eval $ac_compile) 2>&5
14684   ac_status=$?
14685   echo "$as_me:14685: \$? = $ac_status" >&5
14686   (exit $ac_status); } &&
14687          { ac_try='test -s conftest.$ac_objext'
14688   { (eval echo "$as_me:14688: \"$ac_try\"") >&5
14689   (eval $ac_try) 2>&5
14690   ac_status=$?
14691   echo "$as_me:14691: \$? = $ac_status" >&5
14692   (exit $ac_status); }; }; then
14693   cf_cv_gcc_inline=yes
14694 else
14695   echo "$as_me: failed program was:" >&5
14696 cat conftest.$ac_ext >&5
14697 cf_cv_gcc_inline=no
14698 fi
14699 rm -f conftest.$ac_objext conftest.$ac_ext
14700       CFLAGS=$cf_save_CFLAGS
14701
14702 fi
14703 echo "$as_me:14703: result: $cf_cv_gcc_inline" >&5
14704 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14705     if test "$cf_cv_gcc_inline" = yes ; then
14706
14707 cf_fix_cppflags=no
14708 cf_new_cflags=
14709 cf_new_cppflags=
14710 cf_new_extra_cppflags=
14711
14712 for cf_add_cflags in --param max-inline-insns-single=1200
14713 do
14714 case $cf_fix_cppflags in
14715 no)
14716         case $cf_add_cflags in #(vi
14717         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14718                 case $cf_add_cflags in
14719                 -D*)
14720                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14721
14722                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14723                                 && test -z "${cf_tst_cflags}" \
14724                                 && cf_fix_cppflags=yes
14725
14726                         if test $cf_fix_cppflags = yes ; then
14727                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14728                                 continue
14729                         elif test "${cf_tst_cflags}" = "\"'" ; then
14730                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14731                                 continue
14732                         fi
14733                         ;;
14734                 esac
14735                 case "$CPPFLAGS" in
14736                 *$cf_add_cflags) #(vi
14737                         ;;
14738                 *) #(vi
14739                         case $cf_add_cflags in #(vi
14740                         -D*)
14741                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14742
14743 CPPFLAGS=`echo "$CPPFLAGS" | \
14744         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14745                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14746
14747                                 ;;
14748                         esac
14749                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14750                         ;;
14751                 esac
14752                 ;;
14753         *)
14754                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14755                 ;;
14756         esac
14757         ;;
14758 yes)
14759         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14760
14761         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14762
14763         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14764                 && test -z "${cf_tst_cflags}" \
14765                 && cf_fix_cppflags=no
14766         ;;
14767 esac
14768 done
14769
14770 if test -n "$cf_new_cflags" ; then
14771
14772         CFLAGS="$CFLAGS $cf_new_cflags"
14773 fi
14774
14775 if test -n "$cf_new_cppflags" ; then
14776
14777         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14778 fi
14779
14780 if test -n "$cf_new_extra_cppflags" ; then
14781
14782         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14783 fi
14784
14785     fi
14786   fi
14787 fi
14788
14789 echo "$as_me:14789: checking for signal global datatype" >&5
14790 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14791 if test "${cf_cv_sig_atomic_t+set}" = set; then
14792   echo $ECHO_N "(cached) $ECHO_C" >&6
14793 else
14794
14795         for cf_type in \
14796                 "volatile sig_atomic_t" \
14797                 "sig_atomic_t" \
14798                 "int"
14799         do
14800         cat >conftest.$ac_ext <<_ACEOF
14801 #line 14801 "configure"
14802 #include "confdefs.h"
14803
14804 #include <sys/types.h>
14805 #include <signal.h>
14806 #include <stdio.h>
14807
14808 extern $cf_type x;
14809 $cf_type x;
14810 static void handler(int sig)
14811 {
14812         x = 5;
14813 }
14814 int
14815 main ()
14816 {
14817 signal(SIGINT, handler);
14818                  x = 1
14819   ;
14820   return 0;
14821 }
14822 _ACEOF
14823 rm -f conftest.$ac_objext
14824 if { (eval echo "$as_me:14824: \"$ac_compile\"") >&5
14825   (eval $ac_compile) 2>&5
14826   ac_status=$?
14827   echo "$as_me:14827: \$? = $ac_status" >&5
14828   (exit $ac_status); } &&
14829          { ac_try='test -s conftest.$ac_objext'
14830   { (eval echo "$as_me:14830: \"$ac_try\"") >&5
14831   (eval $ac_try) 2>&5
14832   ac_status=$?
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit $ac_status); }; }; then
14835   cf_cv_sig_atomic_t=$cf_type
14836 else
14837   echo "$as_me: failed program was:" >&5
14838 cat conftest.$ac_ext >&5
14839 cf_cv_sig_atomic_t=no
14840 fi
14841 rm -f conftest.$ac_objext conftest.$ac_ext
14842                 test "$cf_cv_sig_atomic_t" != no && break
14843         done
14844
14845 fi
14846
14847 echo "$as_me:14847: result: $cf_cv_sig_atomic_t" >&5
14848 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14849 test "$cf_cv_sig_atomic_t" != no &&
14850 cat >>confdefs.h <<EOF
14851 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14852 EOF
14853
14854 if test $NCURSES_CHTYPE = auto ; then
14855
14856 echo "$as_me:14856: checking for type of chtype" >&5
14857 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14858 if test "${cf_cv_typeof_chtype+set}" = set; then
14859   echo $ECHO_N "(cached) $ECHO_C" >&6
14860 else
14861
14862                 if test "$cross_compiling" = yes; then
14863   cf_cv_typeof_chtype=long
14864 else
14865   cat >conftest.$ac_ext <<_ACEOF
14866 #line 14866 "configure"
14867 #include "confdefs.h"
14868
14869 #define WANT_BITS 31
14870 #include <stdio.h>
14871 int main()
14872 {
14873         FILE *fp = fopen("cf_test.out", "w");
14874         if (fp != 0) {
14875                 char *result = "long";
14876                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14877                         int n;
14878                         unsigned int x, y;
14879                         for (n = 0; n < WANT_BITS; n++) {
14880                                 x = (1 << n);
14881                                 y = (x >> n);
14882                                 if (y != 1 || x == 0) {
14883                                         x = 0;
14884                                         break;
14885                                 }
14886                         }
14887                         /*
14888                          * If x is nonzero, an int is big enough for the bits
14889                          * that we want.
14890                          */
14891                         result = (x != 0) ? "int" : "long";
14892                 }
14893                 fputs(result, fp);
14894                 fclose(fp);
14895         }
14896         ${cf_cv_main_return:-return}(0);
14897 }
14898
14899 _ACEOF
14900 rm -f conftest$ac_exeext
14901 if { (eval echo "$as_me:14901: \"$ac_link\"") >&5
14902   (eval $ac_link) 2>&5
14903   ac_status=$?
14904   echo "$as_me:14904: \$? = $ac_status" >&5
14905   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14906   { (eval echo "$as_me:14906: \"$ac_try\"") >&5
14907   (eval $ac_try) 2>&5
14908   ac_status=$?
14909   echo "$as_me:14909: \$? = $ac_status" >&5
14910   (exit $ac_status); }; }; then
14911   cf_cv_typeof_chtype=`cat cf_test.out`
14912 else
14913   echo "$as_me: program exited with status $ac_status" >&5
14914 echo "$as_me: failed program was:" >&5
14915 cat conftest.$ac_ext >&5
14916 cf_cv_typeof_chtype=long
14917 fi
14918 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14919 fi
14920                 rm -f cf_test.out
14921
14922 fi
14923
14924 echo "$as_me:14924: result: $cf_cv_typeof_chtype" >&5
14925 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14926
14927 cat >>confdefs.h <<EOF
14928 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14929 EOF
14930
14931 else
14932         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14933 fi
14934 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14935
14936 echo "$as_me:14936: checking if unsigned literals are legal" >&5
14937 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14938 if test "${cf_cv_unsigned_literals+set}" = set; then
14939   echo $ECHO_N "(cached) $ECHO_C" >&6
14940 else
14941
14942         cat >conftest.$ac_ext <<_ACEOF
14943 #line 14943 "configure"
14944 #include "confdefs.h"
14945
14946 int
14947 main ()
14948 {
14949 long x = 1L + 1UL + 1U + 1
14950   ;
14951   return 0;
14952 }
14953 _ACEOF
14954 rm -f conftest.$ac_objext
14955 if { (eval echo "$as_me:14955: \"$ac_compile\"") >&5
14956   (eval $ac_compile) 2>&5
14957   ac_status=$?
14958   echo "$as_me:14958: \$? = $ac_status" >&5
14959   (exit $ac_status); } &&
14960          { ac_try='test -s conftest.$ac_objext'
14961   { (eval echo "$as_me:14961: \"$ac_try\"") >&5
14962   (eval $ac_try) 2>&5
14963   ac_status=$?
14964   echo "$as_me:14964: \$? = $ac_status" >&5
14965   (exit $ac_status); }; }; then
14966   cf_cv_unsigned_literals=yes
14967 else
14968   echo "$as_me: failed program was:" >&5
14969 cat conftest.$ac_ext >&5
14970 cf_cv_unsigned_literals=no
14971 fi
14972 rm -f conftest.$ac_objext conftest.$ac_ext
14973
14974 fi
14975
14976 echo "$as_me:14976: result: $cf_cv_unsigned_literals" >&5
14977 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14978
14979 cf_cv_1UL="1"
14980 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14981 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14982
14983 if test $NCURSES_MMASK_T = auto ; then
14984         cf_cv_typeof_mmask_t=long
14985 else
14986         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14987 fi
14988 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14989
14990 ###     Checks for external-data
14991
14992 echo "$as_me:14992: checking if external errno is declared" >&5
14993 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14994 if test "${cf_cv_dcl_errno+set}" = set; then
14995   echo $ECHO_N "(cached) $ECHO_C" >&6
14996 else
14997
14998     cat >conftest.$ac_ext <<_ACEOF
14999 #line 14999 "configure"
15000 #include "confdefs.h"
15001
15002 #ifdef HAVE_STDLIB_H
15003 #include <stdlib.h>
15004 #endif
15005 #include <stdio.h>
15006 #include <sys/types.h>
15007 #include <errno.h>
15008 int
15009 main ()
15010 {
15011 int x = (int) errno
15012   ;
15013   return 0;
15014 }
15015 _ACEOF
15016 rm -f conftest.$ac_objext
15017 if { (eval echo "$as_me:15017: \"$ac_compile\"") >&5
15018   (eval $ac_compile) 2>&5
15019   ac_status=$?
15020   echo "$as_me:15020: \$? = $ac_status" >&5
15021   (exit $ac_status); } &&
15022          { ac_try='test -s conftest.$ac_objext'
15023   { (eval echo "$as_me:15023: \"$ac_try\"") >&5
15024   (eval $ac_try) 2>&5
15025   ac_status=$?
15026   echo "$as_me:15026: \$? = $ac_status" >&5
15027   (exit $ac_status); }; }; then
15028   cf_cv_dcl_errno=yes
15029 else
15030   echo "$as_me: failed program was:" >&5
15031 cat conftest.$ac_ext >&5
15032 cf_cv_dcl_errno=no
15033 fi
15034 rm -f conftest.$ac_objext conftest.$ac_ext
15035
15036 fi
15037 echo "$as_me:15037: result: $cf_cv_dcl_errno" >&5
15038 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15039
15040 if test "$cf_cv_dcl_errno" = no ; then
15041
15042 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15043
15044     cat >>confdefs.h <<EOF
15045 #define $cf_result 1
15046 EOF
15047
15048 fi
15049
15050 # It's possible (for near-UNIX clones) that the data doesn't exist
15051
15052 echo "$as_me:15052: checking if external errno exists" >&5
15053 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15054 if test "${cf_cv_have_errno+set}" = set; then
15055   echo $ECHO_N "(cached) $ECHO_C" >&6
15056 else
15057
15058     cat >conftest.$ac_ext <<_ACEOF
15059 #line 15059 "configure"
15060 #include "confdefs.h"
15061
15062 #undef errno
15063 extern int errno;
15064
15065 int
15066 main ()
15067 {
15068 errno = 2
15069   ;
15070   return 0;
15071 }
15072 _ACEOF
15073 rm -f conftest.$ac_objext conftest$ac_exeext
15074 if { (eval echo "$as_me:15074: \"$ac_link\"") >&5
15075   (eval $ac_link) 2>&5
15076   ac_status=$?
15077   echo "$as_me:15077: \$? = $ac_status" >&5
15078   (exit $ac_status); } &&
15079          { ac_try='test -s conftest$ac_exeext'
15080   { (eval echo "$as_me:15080: \"$ac_try\"") >&5
15081   (eval $ac_try) 2>&5
15082   ac_status=$?
15083   echo "$as_me:15083: \$? = $ac_status" >&5
15084   (exit $ac_status); }; }; then
15085   cf_cv_have_errno=yes
15086 else
15087   echo "$as_me: failed program was:" >&5
15088 cat conftest.$ac_ext >&5
15089 cf_cv_have_errno=no
15090 fi
15091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15092
15093 fi
15094 echo "$as_me:15094: result: $cf_cv_have_errno" >&5
15095 echo "${ECHO_T}$cf_cv_have_errno" >&6
15096
15097 if test "$cf_cv_have_errno" = yes ; then
15098
15099 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15100
15101     cat >>confdefs.h <<EOF
15102 #define $cf_result 1
15103 EOF
15104
15105 fi
15106
15107 echo "$as_me:15107: checking if data-only library module links" >&5
15108 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15109 if test "${cf_cv_link_dataonly+set}" = set; then
15110   echo $ECHO_N "(cached) $ECHO_C" >&6
15111 else
15112
15113         rm -f conftest.a
15114         cat >conftest.$ac_ext <<EOF
15115 #line 15115 "configure"
15116 int     testdata[3] = { 123, 456, 789 };
15117 EOF
15118         if { (eval echo "$as_me:15118: \"$ac_compile\"") >&5
15119   (eval $ac_compile) 2>&5
15120   ac_status=$?
15121   echo "$as_me:15121: \$? = $ac_status" >&5
15122   (exit $ac_status); } ; then
15123                 mv conftest.o data.o && \
15124                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15125         fi
15126         rm -f conftest.$ac_ext data.o
15127         cat >conftest.$ac_ext <<EOF
15128 #line 15128 "configure"
15129 int     testfunc()
15130 {
15131 #if defined(NeXT)
15132         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15133 #else
15134         extern int testdata[3];
15135         return testdata[0] == 123
15136            &&  testdata[1] == 456
15137            &&  testdata[2] == 789;
15138 #endif
15139 }
15140 EOF
15141         if { (eval echo "$as_me:15141: \"$ac_compile\"") >&5
15142   (eval $ac_compile) 2>&5
15143   ac_status=$?
15144   echo "$as_me:15144: \$? = $ac_status" >&5
15145   (exit $ac_status); }; then
15146                 mv conftest.o func.o && \
15147                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15148         fi
15149         rm -f conftest.$ac_ext func.o
15150         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15151         cf_saveLIBS="$LIBS"
15152         LIBS="conftest.a $LIBS"
15153         if test "$cross_compiling" = yes; then
15154   cf_cv_link_dataonly=unknown
15155 else
15156   cat >conftest.$ac_ext <<_ACEOF
15157 #line 15157 "configure"
15158 #include "confdefs.h"
15159
15160         int main()
15161         {
15162                 extern int testfunc();
15163                 ${cf_cv_main_return:-return} (!testfunc());
15164         }
15165
15166 _ACEOF
15167 rm -f conftest$ac_exeext
15168 if { (eval echo "$as_me:15168: \"$ac_link\"") >&5
15169   (eval $ac_link) 2>&5
15170   ac_status=$?
15171   echo "$as_me:15171: \$? = $ac_status" >&5
15172   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15173   { (eval echo "$as_me:15173: \"$ac_try\"") >&5
15174   (eval $ac_try) 2>&5
15175   ac_status=$?
15176   echo "$as_me:15176: \$? = $ac_status" >&5
15177   (exit $ac_status); }; }; then
15178   cf_cv_link_dataonly=yes
15179 else
15180   echo "$as_me: program exited with status $ac_status" >&5
15181 echo "$as_me: failed program was:" >&5
15182 cat conftest.$ac_ext >&5
15183 cf_cv_link_dataonly=no
15184 fi
15185 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15186 fi
15187         LIBS="$cf_saveLIBS"
15188
15189 fi
15190
15191 echo "$as_me:15191: result: $cf_cv_link_dataonly" >&5
15192 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15193
15194 if test "$cf_cv_link_dataonly" = no ; then
15195
15196 cat >>confdefs.h <<\EOF
15197 #define BROKEN_LINKER 1
15198 EOF
15199
15200         BROKEN_LINKER=1
15201 fi
15202
15203 ###     Checks for library functions.
15204
15205 for ac_func in \
15206 getcwd \
15207 getegid \
15208 geteuid \
15209 getttynam \
15210 issetugid \
15211 poll \
15212 putenv \
15213 remove \
15214 select \
15215 setbuf \
15216 setbuffer \
15217 setenv \
15218 setvbuf \
15219 sigaction \
15220 sigvec \
15221 strdup \
15222 strstr \
15223 tcgetpgrp \
15224 times \
15225 vsnprintf \
15226
15227 do
15228 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15229 echo "$as_me:15229: checking for $ac_func" >&5
15230 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15231 if eval "test \"\${$as_ac_var+set}\" = set"; then
15232   echo $ECHO_N "(cached) $ECHO_C" >&6
15233 else
15234   cat >conftest.$ac_ext <<_ACEOF
15235 #line 15235 "configure"
15236 #include "confdefs.h"
15237 /* System header to define __stub macros and hopefully few prototypes,
15238     which can conflict with char $ac_func (); below.  */
15239 #include <assert.h>
15240 /* Override any gcc2 internal prototype to avoid an error.  */
15241 #ifdef __cplusplus
15242 extern "C"
15243 #endif
15244 /* We use char because int might match the return type of a gcc2
15245    builtin and then its argument prototype would still apply.  */
15246 char $ac_func ();
15247 char (*f) ();
15248
15249 int
15250 main ()
15251 {
15252 /* The GNU C library defines this for functions which it implements
15253     to always fail with ENOSYS.  Some functions are actually named
15254     something starting with __ and the normal name is an alias.  */
15255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15256 choke me
15257 #else
15258 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15259 #endif
15260
15261   ;
15262   return 0;
15263 }
15264 _ACEOF
15265 rm -f conftest.$ac_objext conftest$ac_exeext
15266 if { (eval echo "$as_me:15266: \"$ac_link\"") >&5
15267   (eval $ac_link) 2>&5
15268   ac_status=$?
15269   echo "$as_me:15269: \$? = $ac_status" >&5
15270   (exit $ac_status); } &&
15271          { ac_try='test -s conftest$ac_exeext'
15272   { (eval echo "$as_me:15272: \"$ac_try\"") >&5
15273   (eval $ac_try) 2>&5
15274   ac_status=$?
15275   echo "$as_me:15275: \$? = $ac_status" >&5
15276   (exit $ac_status); }; }; then
15277   eval "$as_ac_var=yes"
15278 else
15279   echo "$as_me: failed program was:" >&5
15280 cat conftest.$ac_ext >&5
15281 eval "$as_ac_var=no"
15282 fi
15283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15284 fi
15285 echo "$as_me:15285: result: `eval echo '${'$as_ac_var'}'`" >&5
15286 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15287 if test `eval echo '${'$as_ac_var'}'` = yes; then
15288   cat >>confdefs.h <<EOF
15289 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15290 EOF
15291
15292 fi
15293 done
15294
15295 if test "x$with_getcap" = "xyes" ; then
15296
15297 echo "$as_me:15297: checking for terminal-capability database functions" >&5
15298 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15299 if test "${cf_cv_cgetent+set}" = set; then
15300   echo $ECHO_N "(cached) $ECHO_C" >&6
15301 else
15302
15303 cat >conftest.$ac_ext <<_ACEOF
15304 #line 15304 "configure"
15305 #include "confdefs.h"
15306
15307 #include <stdlib.h>
15308 int
15309 main ()
15310 {
15311
15312         char temp[128];
15313         char *buf = temp;
15314         char *db_array = temp;
15315         cgetent(&buf, &db_array, "vt100");
15316         cgetcap(buf, "tc", '=');
15317         cgetmatch(buf, "tc");
15318
15319   ;
15320   return 0;
15321 }
15322 _ACEOF
15323 rm -f conftest.$ac_objext conftest$ac_exeext
15324 if { (eval echo "$as_me:15324: \"$ac_link\"") >&5
15325   (eval $ac_link) 2>&5
15326   ac_status=$?
15327   echo "$as_me:15327: \$? = $ac_status" >&5
15328   (exit $ac_status); } &&
15329          { ac_try='test -s conftest$ac_exeext'
15330   { (eval echo "$as_me:15330: \"$ac_try\"") >&5
15331   (eval $ac_try) 2>&5
15332   ac_status=$?
15333   echo "$as_me:15333: \$? = $ac_status" >&5
15334   (exit $ac_status); }; }; then
15335   cf_cv_cgetent=yes
15336 else
15337   echo "$as_me: failed program was:" >&5
15338 cat conftest.$ac_ext >&5
15339 cf_cv_cgetent=no
15340 fi
15341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15342
15343 fi
15344 echo "$as_me:15344: result: $cf_cv_cgetent" >&5
15345 echo "${ECHO_T}$cf_cv_cgetent" >&6
15346
15347 if test "$cf_cv_cgetent" = yes
15348 then
15349
15350 cat >>confdefs.h <<\EOF
15351 #define HAVE_BSD_CGETENT 1
15352 EOF
15353
15354 echo "$as_me:15354: checking if cgetent uses const parameter" >&5
15355 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15356 if test "${cf_cv_cgetent_const+set}" = set; then
15357   echo $ECHO_N "(cached) $ECHO_C" >&6
15358 else
15359
15360 cat >conftest.$ac_ext <<_ACEOF
15361 #line 15361 "configure"
15362 #include "confdefs.h"
15363
15364 #include <stdlib.h>
15365 int
15366 main ()
15367 {
15368
15369         char temp[128];
15370         char *buf = temp;
15371 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15372         const char *db_array = temp;
15373         cgetent(&buf, &db_array, "vt100");
15374 #endif
15375         cgetcap(buf, "tc", '=');
15376         cgetmatch(buf, "tc");
15377
15378   ;
15379   return 0;
15380 }
15381 _ACEOF
15382 rm -f conftest.$ac_objext conftest$ac_exeext
15383 if { (eval echo "$as_me:15383: \"$ac_link\"") >&5
15384   (eval $ac_link) 2>&5
15385   ac_status=$?
15386   echo "$as_me:15386: \$? = $ac_status" >&5
15387   (exit $ac_status); } &&
15388          { ac_try='test -s conftest$ac_exeext'
15389   { (eval echo "$as_me:15389: \"$ac_try\"") >&5
15390   (eval $ac_try) 2>&5
15391   ac_status=$?
15392   echo "$as_me:15392: \$? = $ac_status" >&5
15393   (exit $ac_status); }; }; then
15394   cf_cv_cgetent_const=yes
15395 else
15396   echo "$as_me: failed program was:" >&5
15397 cat conftest.$ac_ext >&5
15398 cf_cv_cgetent_const=no
15399 fi
15400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15401
15402 fi
15403 echo "$as_me:15403: result: $cf_cv_cgetent_const" >&5
15404 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15405         if test "$cf_cv_cgetent_const" = yes
15406         then
15407
15408 cat >>confdefs.h <<EOF
15409 #define CGETENT_CONST const
15410 EOF
15411
15412         fi
15413 fi
15414
15415 fi
15416
15417 echo "$as_me:15417: checking for isascii" >&5
15418 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15419 if test "${cf_cv_have_isascii+set}" = set; then
15420   echo $ECHO_N "(cached) $ECHO_C" >&6
15421 else
15422
15423         cat >conftest.$ac_ext <<_ACEOF
15424 #line 15424 "configure"
15425 #include "confdefs.h"
15426 #include <ctype.h>
15427 int
15428 main ()
15429 {
15430 int x = isascii(' ')
15431   ;
15432   return 0;
15433 }
15434 _ACEOF
15435 rm -f conftest.$ac_objext conftest$ac_exeext
15436 if { (eval echo "$as_me:15436: \"$ac_link\"") >&5
15437   (eval $ac_link) 2>&5
15438   ac_status=$?
15439   echo "$as_me:15439: \$? = $ac_status" >&5
15440   (exit $ac_status); } &&
15441          { ac_try='test -s conftest$ac_exeext'
15442   { (eval echo "$as_me:15442: \"$ac_try\"") >&5
15443   (eval $ac_try) 2>&5
15444   ac_status=$?
15445   echo "$as_me:15445: \$? = $ac_status" >&5
15446   (exit $ac_status); }; }; then
15447   cf_cv_have_isascii=yes
15448 else
15449   echo "$as_me: failed program was:" >&5
15450 cat conftest.$ac_ext >&5
15451 cf_cv_have_isascii=no
15452 fi
15453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15454
15455 fi
15456 echo "$as_me:15456: result: $cf_cv_have_isascii" >&5
15457 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15458 test "$cf_cv_have_isascii" = yes &&
15459 cat >>confdefs.h <<\EOF
15460 #define HAVE_ISASCII 1
15461 EOF
15462
15463 if test "$ac_cv_func_sigaction" = yes; then
15464 echo "$as_me:15464: checking whether sigaction needs _POSIX_SOURCE" >&5
15465 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15466 cat >conftest.$ac_ext <<_ACEOF
15467 #line 15467 "configure"
15468 #include "confdefs.h"
15469
15470 #include <sys/types.h>
15471 #include <signal.h>
15472 int
15473 main ()
15474 {
15475 struct sigaction act
15476   ;
15477   return 0;
15478 }
15479 _ACEOF
15480 rm -f conftest.$ac_objext
15481 if { (eval echo "$as_me:15481: \"$ac_compile\"") >&5
15482   (eval $ac_compile) 2>&5
15483   ac_status=$?
15484   echo "$as_me:15484: \$? = $ac_status" >&5
15485   (exit $ac_status); } &&
15486          { ac_try='test -s conftest.$ac_objext'
15487   { (eval echo "$as_me:15487: \"$ac_try\"") >&5
15488   (eval $ac_try) 2>&5
15489   ac_status=$?
15490   echo "$as_me:15490: \$? = $ac_status" >&5
15491   (exit $ac_status); }; }; then
15492   sigact_bad=no
15493 else
15494   echo "$as_me: failed program was:" >&5
15495 cat conftest.$ac_ext >&5
15496
15497 cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500
15501 #define _POSIX_SOURCE
15502 #include <sys/types.h>
15503 #include <signal.h>
15504 int
15505 main ()
15506 {
15507 struct sigaction act
15508   ;
15509   return 0;
15510 }
15511 _ACEOF
15512 rm -f conftest.$ac_objext
15513 if { (eval echo "$as_me:15513: \"$ac_compile\"") >&5
15514   (eval $ac_compile) 2>&5
15515   ac_status=$?
15516   echo "$as_me:15516: \$? = $ac_status" >&5
15517   (exit $ac_status); } &&
15518          { ac_try='test -s conftest.$ac_objext'
15519   { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520   (eval $ac_try) 2>&5
15521   ac_status=$?
15522   echo "$as_me:15522: \$? = $ac_status" >&5
15523   (exit $ac_status); }; }; then
15524   sigact_bad=yes
15525
15526 cat >>confdefs.h <<\EOF
15527 #define _POSIX_SOURCE 1
15528 EOF
15529
15530 else
15531   echo "$as_me: failed program was:" >&5
15532 cat conftest.$ac_ext >&5
15533 sigact_bad=unknown
15534 fi
15535 rm -f conftest.$ac_objext conftest.$ac_ext
15536 fi
15537 rm -f conftest.$ac_objext conftest.$ac_ext
15538 echo "$as_me:15538: result: $sigact_bad" >&5
15539 echo "${ECHO_T}$sigact_bad" >&6
15540 fi
15541
15542 echo "$as_me:15542: checking if nanosleep really works" >&5
15543 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15544 if test "${cf_cv_func_nanosleep+set}" = set; then
15545   echo $ECHO_N "(cached) $ECHO_C" >&6
15546 else
15547
15548 if test "$cross_compiling" = yes; then
15549   cf_cv_func_nanosleep=unknown
15550 else
15551   cat >conftest.$ac_ext <<_ACEOF
15552 #line 15552 "configure"
15553 #include "confdefs.h"
15554
15555 #include <stdio.h>
15556 #include <errno.h>
15557 #include <time.h>
15558
15559 #ifdef HAVE_SYS_TIME_H
15560 #include <sys/time.h>
15561 #endif
15562
15563 int main() {
15564         struct timespec ts1, ts2;
15565         int code;
15566         ts1.tv_sec  = 0;
15567         ts1.tv_nsec = 750000000;
15568         ts2.tv_sec  = 0;
15569         ts2.tv_nsec = 0;
15570         errno = 0;
15571         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15572         ${cf_cv_main_return:-return}(code != 0);
15573 }
15574
15575 _ACEOF
15576 rm -f conftest$ac_exeext
15577 if { (eval echo "$as_me:15577: \"$ac_link\"") >&5
15578   (eval $ac_link) 2>&5
15579   ac_status=$?
15580   echo "$as_me:15580: \$? = $ac_status" >&5
15581   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15582   { (eval echo "$as_me:15582: \"$ac_try\"") >&5
15583   (eval $ac_try) 2>&5
15584   ac_status=$?
15585   echo "$as_me:15585: \$? = $ac_status" >&5
15586   (exit $ac_status); }; }; then
15587   cf_cv_func_nanosleep=yes
15588 else
15589   echo "$as_me: program exited with status $ac_status" >&5
15590 echo "$as_me: failed program was:" >&5
15591 cat conftest.$ac_ext >&5
15592 cf_cv_func_nanosleep=no
15593 fi
15594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15595 fi
15596 fi
15597 echo "$as_me:15597: result: $cf_cv_func_nanosleep" >&5
15598 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15599
15600 test "$cf_cv_func_nanosleep" = "yes" &&
15601 cat >>confdefs.h <<\EOF
15602 #define HAVE_NANOSLEEP 1
15603 EOF
15604
15605 for ac_header in \
15606 termio.h \
15607 termios.h \
15608 unistd.h \
15609
15610 do
15611 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15612 echo "$as_me:15612: checking for $ac_header" >&5
15613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15615   echo $ECHO_N "(cached) $ECHO_C" >&6
15616 else
15617   cat >conftest.$ac_ext <<_ACEOF
15618 #line 15618 "configure"
15619 #include "confdefs.h"
15620 #include <$ac_header>
15621 _ACEOF
15622 if { (eval echo "$as_me:15622: \"$ac_cpp conftest.$ac_ext\"") >&5
15623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15624   ac_status=$?
15625   egrep -v '^ *\+' conftest.er1 >conftest.err
15626   rm -f conftest.er1
15627   cat conftest.err >&5
15628   echo "$as_me:15628: \$? = $ac_status" >&5
15629   (exit $ac_status); } >/dev/null; then
15630   if test -s conftest.err; then
15631     ac_cpp_err=$ac_c_preproc_warn_flag
15632   else
15633     ac_cpp_err=
15634   fi
15635 else
15636   ac_cpp_err=yes
15637 fi
15638 if test -z "$ac_cpp_err"; then
15639   eval "$as_ac_Header=yes"
15640 else
15641   echo "$as_me: failed program was:" >&5
15642   cat conftest.$ac_ext >&5
15643   eval "$as_ac_Header=no"
15644 fi
15645 rm -f conftest.err conftest.$ac_ext
15646 fi
15647 echo "$as_me:15647: result: `eval echo '${'$as_ac_Header'}'`" >&5
15648 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15649 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15650   cat >>confdefs.h <<EOF
15651 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15652 EOF
15653
15654 fi
15655 done
15656
15657 if test "$ISC" = yes ; then
15658
15659 for ac_header in sys/termio.h
15660 do
15661 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15662 echo "$as_me:15662: checking for $ac_header" >&5
15663 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15664 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15665   echo $ECHO_N "(cached) $ECHO_C" >&6
15666 else
15667   cat >conftest.$ac_ext <<_ACEOF
15668 #line 15668 "configure"
15669 #include "confdefs.h"
15670 #include <$ac_header>
15671 _ACEOF
15672 if { (eval echo "$as_me:15672: \"$ac_cpp conftest.$ac_ext\"") >&5
15673   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15674   ac_status=$?
15675   egrep -v '^ *\+' conftest.er1 >conftest.err
15676   rm -f conftest.er1
15677   cat conftest.err >&5
15678   echo "$as_me:15678: \$? = $ac_status" >&5
15679   (exit $ac_status); } >/dev/null; then
15680   if test -s conftest.err; then
15681     ac_cpp_err=$ac_c_preproc_warn_flag
15682   else
15683     ac_cpp_err=
15684   fi
15685 else
15686   ac_cpp_err=yes
15687 fi
15688 if test -z "$ac_cpp_err"; then
15689   eval "$as_ac_Header=yes"
15690 else
15691   echo "$as_me: failed program was:" >&5
15692   cat conftest.$ac_ext >&5
15693   eval "$as_ac_Header=no"
15694 fi
15695 rm -f conftest.err conftest.$ac_ext
15696 fi
15697 echo "$as_me:15697: result: `eval echo '${'$as_ac_Header'}'`" >&5
15698 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15699 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15700   cat >>confdefs.h <<EOF
15701 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15702 EOF
15703
15704 fi
15705 done
15706
15707 fi
15708 if test "$ac_cv_header_termios_h" = yes ; then
15709         case "$CFLAGS $CPPFLAGS" in
15710         *-D_POSIX_SOURCE*)
15711                 termios_bad=dunno ;;
15712         *)      termios_bad=maybe ;;
15713         esac
15714         if test "$termios_bad" = maybe ; then
15715         echo "$as_me:15715: checking whether termios.h needs _POSIX_SOURCE" >&5
15716 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15717         cat >conftest.$ac_ext <<_ACEOF
15718 #line 15718 "configure"
15719 #include "confdefs.h"
15720 #include <termios.h>
15721 int
15722 main ()
15723 {
15724 struct termios foo; int x = foo.c_iflag
15725   ;
15726   return 0;
15727 }
15728 _ACEOF
15729 rm -f conftest.$ac_objext
15730 if { (eval echo "$as_me:15730: \"$ac_compile\"") >&5
15731   (eval $ac_compile) 2>&5
15732   ac_status=$?
15733   echo "$as_me:15733: \$? = $ac_status" >&5
15734   (exit $ac_status); } &&
15735          { ac_try='test -s conftest.$ac_objext'
15736   { (eval echo "$as_me:15736: \"$ac_try\"") >&5
15737   (eval $ac_try) 2>&5
15738   ac_status=$?
15739   echo "$as_me:15739: \$? = $ac_status" >&5
15740   (exit $ac_status); }; }; then
15741   termios_bad=no
15742 else
15743   echo "$as_me: failed program was:" >&5
15744 cat conftest.$ac_ext >&5
15745
15746                 cat >conftest.$ac_ext <<_ACEOF
15747 #line 15747 "configure"
15748 #include "confdefs.h"
15749
15750 #define _POSIX_SOURCE
15751 #include <termios.h>
15752 int
15753 main ()
15754 {
15755 struct termios foo; int x = foo.c_iflag
15756   ;
15757   return 0;
15758 }
15759 _ACEOF
15760 rm -f conftest.$ac_objext
15761 if { (eval echo "$as_me:15761: \"$ac_compile\"") >&5
15762   (eval $ac_compile) 2>&5
15763   ac_status=$?
15764   echo "$as_me:15764: \$? = $ac_status" >&5
15765   (exit $ac_status); } &&
15766          { ac_try='test -s conftest.$ac_objext'
15767   { (eval echo "$as_me:15767: \"$ac_try\"") >&5
15768   (eval $ac_try) 2>&5
15769   ac_status=$?
15770   echo "$as_me:15770: \$? = $ac_status" >&5
15771   (exit $ac_status); }; }; then
15772   termios_bad=unknown
15773 else
15774   echo "$as_me: failed program was:" >&5
15775 cat conftest.$ac_ext >&5
15776 termios_bad=yes
15777 cat >>confdefs.h <<\EOF
15778 #define _POSIX_SOURCE 1
15779 EOF
15780
15781 fi
15782 rm -f conftest.$ac_objext conftest.$ac_ext
15783
15784 fi
15785 rm -f conftest.$ac_objext conftest.$ac_ext
15786         echo "$as_me:15786: result: $termios_bad" >&5
15787 echo "${ECHO_T}$termios_bad" >&6
15788         fi
15789 fi
15790
15791 echo "$as_me:15791: checking for tcgetattr" >&5
15792 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15793 if test "${cf_cv_have_tcgetattr+set}" = set; then
15794   echo $ECHO_N "(cached) $ECHO_C" >&6
15795 else
15796
15797 cat >conftest.$ac_ext <<_ACEOF
15798 #line 15798 "configure"
15799 #include "confdefs.h"
15800
15801 #include <sys/types.h>
15802 #ifdef HAVE_UNISTD_H
15803 #include <unistd.h>
15804 #endif
15805 #ifdef HAVE_TERMIOS_H
15806 #include <termios.h>
15807 #define TTY struct termios
15808 #else
15809 #ifdef HAVE_TERMIO_H
15810 #include <termio.h>
15811 #define TTY struct termio
15812 #endif
15813 #endif
15814
15815 int
15816 main ()
15817 {
15818
15819 TTY foo;
15820 tcgetattr(1, &foo);
15821   ;
15822   return 0;
15823 }
15824 _ACEOF
15825 rm -f conftest.$ac_objext conftest$ac_exeext
15826 if { (eval echo "$as_me:15826: \"$ac_link\"") >&5
15827   (eval $ac_link) 2>&5
15828   ac_status=$?
15829   echo "$as_me:15829: \$? = $ac_status" >&5
15830   (exit $ac_status); } &&
15831          { ac_try='test -s conftest$ac_exeext'
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   cf_cv_have_tcgetattr=yes
15838 else
15839   echo "$as_me: failed program was:" >&5
15840 cat conftest.$ac_ext >&5
15841 cf_cv_have_tcgetattr=no
15842 fi
15843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15844 fi
15845 echo "$as_me:15845: result: $cf_cv_have_tcgetattr" >&5
15846 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15847 test "$cf_cv_have_tcgetattr" = yes &&
15848 cat >>confdefs.h <<\EOF
15849 #define HAVE_TCGETATTR 1
15850 EOF
15851
15852 echo "$as_me:15852: checking for vsscanf function or workaround" >&5
15853 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15854 if test "${cf_cv_func_vsscanf+set}" = set; then
15855   echo $ECHO_N "(cached) $ECHO_C" >&6
15856 else
15857
15858 cat >conftest.$ac_ext <<_ACEOF
15859 #line 15859 "configure"
15860 #include "confdefs.h"
15861
15862 #include <stdarg.h>
15863 #include <stdio.h>
15864 int
15865 main ()
15866 {
15867
15868         va_list ap;
15869         vsscanf("from", "%d", ap)
15870   ;
15871   return 0;
15872 }
15873 _ACEOF
15874 rm -f conftest.$ac_objext conftest$ac_exeext
15875 if { (eval echo "$as_me:15875: \"$ac_link\"") >&5
15876   (eval $ac_link) 2>&5
15877   ac_status=$?
15878   echo "$as_me:15878: \$? = $ac_status" >&5
15879   (exit $ac_status); } &&
15880          { ac_try='test -s conftest$ac_exeext'
15881   { (eval echo "$as_me:15881: \"$ac_try\"") >&5
15882   (eval $ac_try) 2>&5
15883   ac_status=$?
15884   echo "$as_me:15884: \$? = $ac_status" >&5
15885   (exit $ac_status); }; }; then
15886   cf_cv_func_vsscanf=vsscanf
15887 else
15888   echo "$as_me: failed program was:" >&5
15889 cat conftest.$ac_ext >&5
15890
15891 cat >conftest.$ac_ext <<_ACEOF
15892 #line 15892 "configure"
15893 #include "confdefs.h"
15894
15895 #include <stdarg.h>
15896 #include <stdio.h>
15897 int
15898 main ()
15899 {
15900
15901     FILE strbuf;
15902     char *str = "from";
15903
15904     strbuf._flag = _IOREAD;
15905     strbuf._ptr = strbuf._base = (unsigned char *) str;
15906     strbuf._cnt = strlen(str);
15907     strbuf._file = _NFILE;
15908     return (vfscanf(&strbuf, "%d", ap))
15909   ;
15910   return 0;
15911 }
15912 _ACEOF
15913 rm -f conftest.$ac_objext conftest$ac_exeext
15914 if { (eval echo "$as_me:15914: \"$ac_link\"") >&5
15915   (eval $ac_link) 2>&5
15916   ac_status=$?
15917   echo "$as_me:15917: \$? = $ac_status" >&5
15918   (exit $ac_status); } &&
15919          { ac_try='test -s conftest$ac_exeext'
15920   { (eval echo "$as_me:15920: \"$ac_try\"") >&5
15921   (eval $ac_try) 2>&5
15922   ac_status=$?
15923   echo "$as_me:15923: \$? = $ac_status" >&5
15924   (exit $ac_status); }; }; then
15925   cf_cv_func_vsscanf=vfscanf
15926 else
15927   echo "$as_me: failed program was:" >&5
15928 cat conftest.$ac_ext >&5
15929
15930 cat >conftest.$ac_ext <<_ACEOF
15931 #line 15931 "configure"
15932 #include "confdefs.h"
15933
15934 #include <stdarg.h>
15935 #include <stdio.h>
15936 int
15937 main ()
15938 {
15939
15940     FILE strbuf;
15941     char *str = "from";
15942
15943     strbuf._flag = _IOREAD;
15944     strbuf._ptr = strbuf._base = (unsigned char *) str;
15945     strbuf._cnt = strlen(str);
15946     strbuf._file = _NFILE;
15947     return (_doscan(&strbuf, "%d", ap))
15948   ;
15949   return 0;
15950 }
15951 _ACEOF
15952 rm -f conftest.$ac_objext conftest$ac_exeext
15953 if { (eval echo "$as_me:15953: \"$ac_link\"") >&5
15954   (eval $ac_link) 2>&5
15955   ac_status=$?
15956   echo "$as_me:15956: \$? = $ac_status" >&5
15957   (exit $ac_status); } &&
15958          { ac_try='test -s conftest$ac_exeext'
15959   { (eval echo "$as_me:15959: \"$ac_try\"") >&5
15960   (eval $ac_try) 2>&5
15961   ac_status=$?
15962   echo "$as_me:15962: \$? = $ac_status" >&5
15963   (exit $ac_status); }; }; then
15964   cf_cv_func_vsscanf=_doscan
15965 else
15966   echo "$as_me: failed program was:" >&5
15967 cat conftest.$ac_ext >&5
15968
15969 cf_cv_func_vsscanf=no
15970 fi
15971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15972 fi
15973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15974 fi
15975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15976 fi
15977 echo "$as_me:15977: result: $cf_cv_func_vsscanf" >&5
15978 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15979
15980 case $cf_cv_func_vsscanf in #(vi
15981 vsscanf)
15982 cat >>confdefs.h <<\EOF
15983 #define HAVE_VSSCANF 1
15984 EOF
15985 ;; #(vi
15986 vfscanf)
15987 cat >>confdefs.h <<\EOF
15988 #define HAVE_VFSCANF 1
15989 EOF
15990 ;; #(vi
15991 _doscan)
15992 cat >>confdefs.h <<\EOF
15993 #define HAVE__DOSCAN 1
15994 EOF
15995 ;;
15996 esac
15997
15998 echo "$as_me:15998: checking for working mkstemp" >&5
15999 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16000 if test "${cf_cv_func_mkstemp+set}" = set; then
16001   echo $ECHO_N "(cached) $ECHO_C" >&6
16002 else
16003
16004 rm -rf conftest*
16005 if test "$cross_compiling" = yes; then
16006   cf_cv_func_mkstemp=maybe
16007 else
16008   cat >conftest.$ac_ext <<_ACEOF
16009 #line 16009 "configure"
16010 #include "confdefs.h"
16011
16012 #include <sys/types.h>
16013 #include <stdlib.h>
16014 #include <stdio.h>
16015 #include <string.h>
16016 #include <sys/stat.h>
16017 int main()
16018 {
16019         char *tmpl = "conftestXXXXXX";
16020         char name[2][80];
16021         int n;
16022         int result = 0;
16023         int fd;
16024         struct stat sb;
16025
16026         umask(077);
16027         for (n = 0; n < 2; ++n) {
16028                 strcpy(name[n], tmpl);
16029                 if ((fd = mkstemp(name[n])) >= 0) {
16030                         if (!strcmp(name[n], tmpl)
16031                          || stat(name[n], &sb) != 0
16032                          || (sb.st_mode & S_IFMT) != S_IFREG
16033                          || (sb.st_mode & 077) != 0) {
16034                                 result = 1;
16035                         }
16036                         close(fd);
16037                 }
16038         }
16039         if (result == 0
16040          && !strcmp(name[0], name[1]))
16041                 result = 1;
16042         ${cf_cv_main_return:-return}(result);
16043 }
16044
16045 _ACEOF
16046 rm -f conftest$ac_exeext
16047 if { (eval echo "$as_me:16047: \"$ac_link\"") >&5
16048   (eval $ac_link) 2>&5
16049   ac_status=$?
16050   echo "$as_me:16050: \$? = $ac_status" >&5
16051   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16052   { (eval echo "$as_me:16052: \"$ac_try\"") >&5
16053   (eval $ac_try) 2>&5
16054   ac_status=$?
16055   echo "$as_me:16055: \$? = $ac_status" >&5
16056   (exit $ac_status); }; }; then
16057   cf_cv_func_mkstemp=yes
16058
16059 else
16060   echo "$as_me: program exited with status $ac_status" >&5
16061 echo "$as_me: failed program was:" >&5
16062 cat conftest.$ac_ext >&5
16063 cf_cv_func_mkstemp=no
16064
16065 fi
16066 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16067 fi
16068
16069 fi
16070 echo "$as_me:16070: result: $cf_cv_func_mkstemp" >&5
16071 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16072 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16073         echo "$as_me:16073: checking for mkstemp" >&5
16074 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16075 if test "${ac_cv_func_mkstemp+set}" = set; then
16076   echo $ECHO_N "(cached) $ECHO_C" >&6
16077 else
16078   cat >conftest.$ac_ext <<_ACEOF
16079 #line 16079 "configure"
16080 #include "confdefs.h"
16081 /* System header to define __stub macros and hopefully few prototypes,
16082     which can conflict with char mkstemp (); below.  */
16083 #include <assert.h>
16084 /* Override any gcc2 internal prototype to avoid an error.  */
16085 #ifdef __cplusplus
16086 extern "C"
16087 #endif
16088 /* We use char because int might match the return type of a gcc2
16089    builtin and then its argument prototype would still apply.  */
16090 char mkstemp ();
16091 char (*f) ();
16092
16093 int
16094 main ()
16095 {
16096 /* The GNU C library defines this for functions which it implements
16097     to always fail with ENOSYS.  Some functions are actually named
16098     something starting with __ and the normal name is an alias.  */
16099 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16100 choke me
16101 #else
16102 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16103 #endif
16104
16105   ;
16106   return 0;
16107 }
16108 _ACEOF
16109 rm -f conftest.$ac_objext conftest$ac_exeext
16110 if { (eval echo "$as_me:16110: \"$ac_link\"") >&5
16111   (eval $ac_link) 2>&5
16112   ac_status=$?
16113   echo "$as_me:16113: \$? = $ac_status" >&5
16114   (exit $ac_status); } &&
16115          { ac_try='test -s conftest$ac_exeext'
16116   { (eval echo "$as_me:16116: \"$ac_try\"") >&5
16117   (eval $ac_try) 2>&5
16118   ac_status=$?
16119   echo "$as_me:16119: \$? = $ac_status" >&5
16120   (exit $ac_status); }; }; then
16121   ac_cv_func_mkstemp=yes
16122 else
16123   echo "$as_me: failed program was:" >&5
16124 cat conftest.$ac_ext >&5
16125 ac_cv_func_mkstemp=no
16126 fi
16127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16128 fi
16129 echo "$as_me:16129: result: $ac_cv_func_mkstemp" >&5
16130 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16131
16132 fi
16133 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16134
16135 cat >>confdefs.h <<\EOF
16136 #define HAVE_MKSTEMP 1
16137 EOF
16138
16139 fi
16140
16141 # setup for prototype of fallback for vsscanf()
16142
16143 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16144         HAVE_VSSCANF=1
16145 else
16146         HAVE_VSSCANF=0
16147 fi
16148
16149 if test "x$cross_compiling" = xyes ; then
16150         { echo "$as_me:16150: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16151 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16152 else
16153         echo "$as_me:16153: checking whether setvbuf arguments are reversed" >&5
16154 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16155 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16156   echo $ECHO_N "(cached) $ECHO_C" >&6
16157 else
16158   if test "$cross_compiling" = yes; then
16159   { { echo "$as_me:16159: error: cannot run test program while cross compiling" >&5
16160 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16161    { (exit 1); exit 1; }; }
16162 else
16163   cat >conftest.$ac_ext <<_ACEOF
16164 #line 16164 "configure"
16165 #include "confdefs.h"
16166 #include <stdio.h>
16167 /* If setvbuf has the reversed format, exit 0. */
16168 int
16169 main ()
16170 {
16171   /* This call has the arguments reversed.
16172      A reversed system may check and see that the address of main
16173      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16174   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16175     $ac_main_return(1);
16176   putc('\r', stdout);
16177   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16178 }
16179 _ACEOF
16180 rm -f conftest$ac_exeext
16181 if { (eval echo "$as_me:16181: \"$ac_link\"") >&5
16182   (eval $ac_link) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16186   { (eval echo "$as_me:16186: \"$ac_try\"") >&5
16187   (eval $ac_try) 2>&5
16188   ac_status=$?
16189   echo "$as_me:16189: \$? = $ac_status" >&5
16190   (exit $ac_status); }; }; then
16191   ac_cv_func_setvbuf_reversed=yes
16192 else
16193   echo "$as_me: program exited with status $ac_status" >&5
16194 echo "$as_me: failed program was:" >&5
16195 cat conftest.$ac_ext >&5
16196 ac_cv_func_setvbuf_reversed=no
16197 fi
16198 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16199 fi
16200 rm -f core core.* *.core
16201 fi
16202 echo "$as_me:16202: result: $ac_cv_func_setvbuf_reversed" >&5
16203 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16204 if test $ac_cv_func_setvbuf_reversed = yes; then
16205
16206 cat >>confdefs.h <<\EOF
16207 #define SETVBUF_REVERSED 1
16208 EOF
16209
16210 fi
16211
16212 fi
16213 echo "$as_me:16213: checking return type of signal handlers" >&5
16214 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16215 if test "${ac_cv_type_signal+set}" = set; then
16216   echo $ECHO_N "(cached) $ECHO_C" >&6
16217 else
16218   cat >conftest.$ac_ext <<_ACEOF
16219 #line 16219 "configure"
16220 #include "confdefs.h"
16221 #include <sys/types.h>
16222 #include <signal.h>
16223 #ifdef signal
16224 # undef signal
16225 #endif
16226 #ifdef __cplusplus
16227 extern "C" void (*signal (int, void (*)(int)))(int);
16228 #else
16229 void (*signal ()) ();
16230 #endif
16231
16232 int
16233 main ()
16234 {
16235 int i;
16236   ;
16237   return 0;
16238 }
16239 _ACEOF
16240 rm -f conftest.$ac_objext
16241 if { (eval echo "$as_me:16241: \"$ac_compile\"") >&5
16242   (eval $ac_compile) 2>&5
16243   ac_status=$?
16244   echo "$as_me:16244: \$? = $ac_status" >&5
16245   (exit $ac_status); } &&
16246          { ac_try='test -s conftest.$ac_objext'
16247   { (eval echo "$as_me:16247: \"$ac_try\"") >&5
16248   (eval $ac_try) 2>&5
16249   ac_status=$?
16250   echo "$as_me:16250: \$? = $ac_status" >&5
16251   (exit $ac_status); }; }; then
16252   ac_cv_type_signal=void
16253 else
16254   echo "$as_me: failed program was:" >&5
16255 cat conftest.$ac_ext >&5
16256 ac_cv_type_signal=int
16257 fi
16258 rm -f conftest.$ac_objext conftest.$ac_ext
16259 fi
16260 echo "$as_me:16260: result: $ac_cv_type_signal" >&5
16261 echo "${ECHO_T}$ac_cv_type_signal" >&6
16262
16263 cat >>confdefs.h <<EOF
16264 #define RETSIGTYPE $ac_cv_type_signal
16265 EOF
16266
16267 echo "$as_me:16267: checking for intptr_t" >&5
16268 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16269 if test "${ac_cv_type_intptr_t+set}" = set; then
16270   echo $ECHO_N "(cached) $ECHO_C" >&6
16271 else
16272   cat >conftest.$ac_ext <<_ACEOF
16273 #line 16273 "configure"
16274 #include "confdefs.h"
16275 $ac_includes_default
16276 int
16277 main ()
16278 {
16279 if ((intptr_t *) 0)
16280   return 0;
16281 if (sizeof (intptr_t))
16282   return 0;
16283   ;
16284   return 0;
16285 }
16286 _ACEOF
16287 rm -f conftest.$ac_objext
16288 if { (eval echo "$as_me:16288: \"$ac_compile\"") >&5
16289   (eval $ac_compile) 2>&5
16290   ac_status=$?
16291   echo "$as_me:16291: \$? = $ac_status" >&5
16292   (exit $ac_status); } &&
16293          { ac_try='test -s conftest.$ac_objext'
16294   { (eval echo "$as_me:16294: \"$ac_try\"") >&5
16295   (eval $ac_try) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit $ac_status); }; }; then
16299   ac_cv_type_intptr_t=yes
16300 else
16301   echo "$as_me: failed program was:" >&5
16302 cat conftest.$ac_ext >&5
16303 ac_cv_type_intptr_t=no
16304 fi
16305 rm -f conftest.$ac_objext conftest.$ac_ext
16306 fi
16307 echo "$as_me:16307: result: $ac_cv_type_intptr_t" >&5
16308 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16309 if test $ac_cv_type_intptr_t = yes; then
16310   :
16311 else
16312
16313 cat >>confdefs.h <<EOF
16314 #define intptr_t long
16315 EOF
16316
16317 fi
16318
16319 echo "$as_me:16319: checking for type sigaction_t" >&5
16320 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16321 if test "${cf_cv_type_sigaction+set}" = set; then
16322   echo $ECHO_N "(cached) $ECHO_C" >&6
16323 else
16324
16325         cat >conftest.$ac_ext <<_ACEOF
16326 #line 16326 "configure"
16327 #include "confdefs.h"
16328
16329 #include <signal.h>
16330 int
16331 main ()
16332 {
16333 sigaction_t x
16334   ;
16335   return 0;
16336 }
16337 _ACEOF
16338 rm -f conftest.$ac_objext
16339 if { (eval echo "$as_me:16339: \"$ac_compile\"") >&5
16340   (eval $ac_compile) 2>&5
16341   ac_status=$?
16342   echo "$as_me:16342: \$? = $ac_status" >&5
16343   (exit $ac_status); } &&
16344          { ac_try='test -s conftest.$ac_objext'
16345   { (eval echo "$as_me:16345: \"$ac_try\"") >&5
16346   (eval $ac_try) 2>&5
16347   ac_status=$?
16348   echo "$as_me:16348: \$? = $ac_status" >&5
16349   (exit $ac_status); }; }; then
16350   cf_cv_type_sigaction=yes
16351 else
16352   echo "$as_me: failed program was:" >&5
16353 cat conftest.$ac_ext >&5
16354 cf_cv_type_sigaction=no
16355 fi
16356 rm -f conftest.$ac_objext conftest.$ac_ext
16357 fi
16358
16359 echo "$as_me:16359: result: $cf_cv_type_sigaction" >&5
16360 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16361 test "$cf_cv_type_sigaction" = yes &&
16362 cat >>confdefs.h <<\EOF
16363 #define HAVE_TYPE_SIGACTION 1
16364 EOF
16365
16366 echo "$as_me:16366: checking declaration of size-change" >&5
16367 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16368 if test "${cf_cv_sizechange+set}" = set; then
16369   echo $ECHO_N "(cached) $ECHO_C" >&6
16370 else
16371
16372     cf_cv_sizechange=unknown
16373     cf_save_CPPFLAGS="$CPPFLAGS"
16374
16375 for cf_opts in "" "NEED_PTEM_H"
16376 do
16377
16378     CPPFLAGS="$cf_save_CPPFLAGS"
16379     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16380     cat >conftest.$ac_ext <<_ACEOF
16381 #line 16381 "configure"
16382 #include "confdefs.h"
16383 #include <sys/types.h>
16384 #ifdef HAVE_TERMIOS_H
16385 #include <termios.h>
16386 #else
16387 #ifdef HAVE_TERMIO_H
16388 #include <termio.h>
16389 #endif
16390 #endif
16391 #ifdef NEED_PTEM_H
16392 /* This is a workaround for SCO:  they neglected to define struct winsize in
16393  * termios.h -- it's only in termio.h and ptem.h
16394  */
16395 #include        <sys/stream.h>
16396 #include        <sys/ptem.h>
16397 #endif
16398 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16399 #include <sys/ioctl.h>
16400 #endif
16401
16402 int
16403 main ()
16404 {
16405
16406 #ifdef TIOCGSIZE
16407         struct ttysize win;     /* FIXME: what system is this? */
16408         int y = win.ts_lines;
16409         int x = win.ts_cols;
16410 #else
16411 #ifdef TIOCGWINSZ
16412         struct winsize win;
16413         int y = win.ws_row;
16414         int x = win.ws_col;
16415 #else
16416         no TIOCGSIZE or TIOCGWINSZ
16417 #endif /* TIOCGWINSZ */
16418 #endif /* TIOCGSIZE */
16419
16420   ;
16421   return 0;
16422 }
16423 _ACEOF
16424 rm -f conftest.$ac_objext
16425 if { (eval echo "$as_me:16425: \"$ac_compile\"") >&5
16426   (eval $ac_compile) 2>&5
16427   ac_status=$?
16428   echo "$as_me:16428: \$? = $ac_status" >&5
16429   (exit $ac_status); } &&
16430          { ac_try='test -s conftest.$ac_objext'
16431   { (eval echo "$as_me:16431: \"$ac_try\"") >&5
16432   (eval $ac_try) 2>&5
16433   ac_status=$?
16434   echo "$as_me:16434: \$? = $ac_status" >&5
16435   (exit $ac_status); }; }; then
16436   cf_cv_sizechange=yes
16437 else
16438   echo "$as_me: failed program was:" >&5
16439 cat conftest.$ac_ext >&5
16440 cf_cv_sizechange=no
16441 fi
16442 rm -f conftest.$ac_objext conftest.$ac_ext
16443
16444         CPPFLAGS="$cf_save_CPPFLAGS"
16445         if test "$cf_cv_sizechange" = yes ; then
16446                 echo "size-change succeeded ($cf_opts)" >&5
16447                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16448                 break
16449         fi
16450 done
16451
16452 fi
16453 echo "$as_me:16453: result: $cf_cv_sizechange" >&5
16454 echo "${ECHO_T}$cf_cv_sizechange" >&6
16455 if test "$cf_cv_sizechange" != no ; then
16456
16457 cat >>confdefs.h <<\EOF
16458 #define HAVE_SIZECHANGE 1
16459 EOF
16460
16461         case $cf_cv_sizechange in #(vi
16462         NEED*)
16463                 cat >>confdefs.h <<EOF
16464 #define $cf_cv_sizechange  1
16465 EOF
16466
16467                 ;;
16468         esac
16469 fi
16470
16471 echo "$as_me:16471: checking for memmove" >&5
16472 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16473 if test "${ac_cv_func_memmove+set}" = set; then
16474   echo $ECHO_N "(cached) $ECHO_C" >&6
16475 else
16476   cat >conftest.$ac_ext <<_ACEOF
16477 #line 16477 "configure"
16478 #include "confdefs.h"
16479 /* System header to define __stub macros and hopefully few prototypes,
16480     which can conflict with char memmove (); below.  */
16481 #include <assert.h>
16482 /* Override any gcc2 internal prototype to avoid an error.  */
16483 #ifdef __cplusplus
16484 extern "C"
16485 #endif
16486 /* We use char because int might match the return type of a gcc2
16487    builtin and then its argument prototype would still apply.  */
16488 char memmove ();
16489 char (*f) ();
16490
16491 int
16492 main ()
16493 {
16494 /* The GNU C library defines this for functions which it implements
16495     to always fail with ENOSYS.  Some functions are actually named
16496     something starting with __ and the normal name is an alias.  */
16497 #if defined (__stub_memmove) || defined (__stub___memmove)
16498 choke me
16499 #else
16500 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16501 #endif
16502
16503   ;
16504   return 0;
16505 }
16506 _ACEOF
16507 rm -f conftest.$ac_objext conftest$ac_exeext
16508 if { (eval echo "$as_me:16508: \"$ac_link\"") >&5
16509   (eval $ac_link) 2>&5
16510   ac_status=$?
16511   echo "$as_me:16511: \$? = $ac_status" >&5
16512   (exit $ac_status); } &&
16513          { ac_try='test -s conftest$ac_exeext'
16514   { (eval echo "$as_me:16514: \"$ac_try\"") >&5
16515   (eval $ac_try) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); }; }; then
16519   ac_cv_func_memmove=yes
16520 else
16521   echo "$as_me: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16523 ac_cv_func_memmove=no
16524 fi
16525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16526 fi
16527 echo "$as_me:16527: result: $ac_cv_func_memmove" >&5
16528 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16529 if test $ac_cv_func_memmove = yes; then
16530   :
16531 else
16532
16533 echo "$as_me:16533: checking for bcopy" >&5
16534 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16535 if test "${ac_cv_func_bcopy+set}" = set; then
16536   echo $ECHO_N "(cached) $ECHO_C" >&6
16537 else
16538   cat >conftest.$ac_ext <<_ACEOF
16539 #line 16539 "configure"
16540 #include "confdefs.h"
16541 /* System header to define __stub macros and hopefully few prototypes,
16542     which can conflict with char bcopy (); below.  */
16543 #include <assert.h>
16544 /* Override any gcc2 internal prototype to avoid an error.  */
16545 #ifdef __cplusplus
16546 extern "C"
16547 #endif
16548 /* We use char because int might match the return type of a gcc2
16549    builtin and then its argument prototype would still apply.  */
16550 char bcopy ();
16551 char (*f) ();
16552
16553 int
16554 main ()
16555 {
16556 /* The GNU C library defines this for functions which it implements
16557     to always fail with ENOSYS.  Some functions are actually named
16558     something starting with __ and the normal name is an alias.  */
16559 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16560 choke me
16561 #else
16562 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16563 #endif
16564
16565   ;
16566   return 0;
16567 }
16568 _ACEOF
16569 rm -f conftest.$ac_objext conftest$ac_exeext
16570 if { (eval echo "$as_me:16570: \"$ac_link\"") >&5
16571   (eval $ac_link) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit $ac_status); } &&
16575          { ac_try='test -s conftest$ac_exeext'
16576   { (eval echo "$as_me:16576: \"$ac_try\"") >&5
16577   (eval $ac_try) 2>&5
16578   ac_status=$?
16579   echo "$as_me:16579: \$? = $ac_status" >&5
16580   (exit $ac_status); }; }; then
16581   ac_cv_func_bcopy=yes
16582 else
16583   echo "$as_me: failed program was:" >&5
16584 cat conftest.$ac_ext >&5
16585 ac_cv_func_bcopy=no
16586 fi
16587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16588 fi
16589 echo "$as_me:16589: result: $ac_cv_func_bcopy" >&5
16590 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16591 if test $ac_cv_func_bcopy = yes; then
16592
16593         echo "$as_me:16593: checking if bcopy does overlapping moves" >&5
16594 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16595 if test "${cf_cv_good_bcopy+set}" = set; then
16596   echo $ECHO_N "(cached) $ECHO_C" >&6
16597 else
16598
16599                 if test "$cross_compiling" = yes; then
16600   cf_cv_good_bcopy=unknown
16601 else
16602   cat >conftest.$ac_ext <<_ACEOF
16603 #line 16603 "configure"
16604 #include "confdefs.h"
16605
16606 int main() {
16607         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16608         char temp[40];
16609         bcopy(data, temp, sizeof(data));
16610         bcopy(temp+10, temp, 15);
16611         bcopy(temp+5, temp+15, 10);
16612         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16613 }
16614
16615 _ACEOF
16616 rm -f conftest$ac_exeext
16617 if { (eval echo "$as_me:16617: \"$ac_link\"") >&5
16618   (eval $ac_link) 2>&5
16619   ac_status=$?
16620   echo "$as_me:16620: \$? = $ac_status" >&5
16621   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16622   { (eval echo "$as_me:16622: \"$ac_try\"") >&5
16623   (eval $ac_try) 2>&5
16624   ac_status=$?
16625   echo "$as_me:16625: \$? = $ac_status" >&5
16626   (exit $ac_status); }; }; then
16627   cf_cv_good_bcopy=yes
16628 else
16629   echo "$as_me: program exited with status $ac_status" >&5
16630 echo "$as_me: failed program was:" >&5
16631 cat conftest.$ac_ext >&5
16632 cf_cv_good_bcopy=no
16633 fi
16634 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16635 fi
16636
16637 fi
16638 echo "$as_me:16638: result: $cf_cv_good_bcopy" >&5
16639 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16640
16641 else
16642   cf_cv_good_bcopy=no
16643 fi
16644
16645         if test "$cf_cv_good_bcopy" = yes ; then
16646
16647 cat >>confdefs.h <<\EOF
16648 #define USE_OK_BCOPY 1
16649 EOF
16650
16651         else
16652
16653 cat >>confdefs.h <<\EOF
16654 #define USE_MY_MEMMOVE 1
16655 EOF
16656
16657         fi
16658
16659 fi
16660
16661 echo "$as_me:16661: checking if poll really works" >&5
16662 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16663 if test "${cf_cv_working_poll+set}" = set; then
16664   echo $ECHO_N "(cached) $ECHO_C" >&6
16665 else
16666
16667 if test "$cross_compiling" = yes; then
16668   cf_cv_working_poll=unknown
16669 else
16670   cat >conftest.$ac_ext <<_ACEOF
16671 #line 16671 "configure"
16672 #include "confdefs.h"
16673
16674 #include <stdlib.h>
16675 #include <stdio.h>
16676 #include <unistd.h>
16677 #include <fcntl.h>
16678 #ifdef HAVE_POLL_H
16679 #include <poll.h>
16680 #else
16681 #include <sys/poll.h>
16682 #endif
16683 int main() {
16684         struct pollfd myfds;
16685         int ret;
16686
16687         /* check for Darwin bug with respect to "devices" */
16688         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16689         if (myfds.fd < 0)
16690                 myfds.fd = 0;
16691         myfds.events = POLLIN;
16692         myfds.revents = 0;
16693
16694         ret = poll(&myfds, 1, 100);
16695
16696         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16697                 ret = -1;
16698         } else {
16699                 int fd = 0;
16700                 if (!isatty(fd)) {
16701                         fd = open("/dev/tty", 2);       /* O_RDWR */
16702                 }
16703
16704                 if (fd >= 0) {
16705                         /* also check with standard input */
16706                         myfds.fd = fd;
16707                         myfds.events = POLLIN;
16708                         myfds.revents = 0;
16709                         ret = poll(&myfds, 1, 100);
16710                 } else {
16711                         ret = -1;
16712                 }
16713         }
16714         ${cf_cv_main_return:-return}(ret < 0);
16715 }
16716 _ACEOF
16717 rm -f conftest$ac_exeext
16718 if { (eval echo "$as_me:16718: \"$ac_link\"") >&5
16719   (eval $ac_link) 2>&5
16720   ac_status=$?
16721   echo "$as_me:16721: \$? = $ac_status" >&5
16722   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16723   { (eval echo "$as_me:16723: \"$ac_try\"") >&5
16724   (eval $ac_try) 2>&5
16725   ac_status=$?
16726   echo "$as_me:16726: \$? = $ac_status" >&5
16727   (exit $ac_status); }; }; then
16728   cf_cv_working_poll=yes
16729 else
16730   echo "$as_me: program exited with status $ac_status" >&5
16731 echo "$as_me: failed program was:" >&5
16732 cat conftest.$ac_ext >&5
16733 cf_cv_working_poll=no
16734 fi
16735 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16736 fi
16737 fi
16738 echo "$as_me:16738: result: $cf_cv_working_poll" >&5
16739 echo "${ECHO_T}$cf_cv_working_poll" >&6
16740 test "$cf_cv_working_poll" = "yes" &&
16741 cat >>confdefs.h <<\EOF
16742 #define HAVE_WORKING_POLL 1
16743 EOF
16744
16745 echo "$as_me:16745: checking for va_copy" >&5
16746 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16747 if test "${cf_cv_have_va_copy+set}" = set; then
16748   echo $ECHO_N "(cached) $ECHO_C" >&6
16749 else
16750
16751 cat >conftest.$ac_ext <<_ACEOF
16752 #line 16752 "configure"
16753 #include "confdefs.h"
16754
16755 #include <stdarg.h>
16756
16757 int
16758 main ()
16759 {
16760
16761         static va_list dst;
16762         static va_list src;
16763         va_copy(dst, src)
16764   ;
16765   return 0;
16766 }
16767 _ACEOF
16768 rm -f conftest.$ac_objext conftest$ac_exeext
16769 if { (eval echo "$as_me:16769: \"$ac_link\"") >&5
16770   (eval $ac_link) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); } &&
16774          { ac_try='test -s conftest$ac_exeext'
16775   { (eval echo "$as_me:16775: \"$ac_try\"") >&5
16776   (eval $ac_try) 2>&5
16777   ac_status=$?
16778   echo "$as_me:16778: \$? = $ac_status" >&5
16779   (exit $ac_status); }; }; then
16780   cf_cv_have_va_copy=yes
16781 else
16782   echo "$as_me: failed program was:" >&5
16783 cat conftest.$ac_ext >&5
16784 cf_cv_have_va_copy=no
16785 fi
16786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16787 fi
16788 echo "$as_me:16788: result: $cf_cv_have_va_copy" >&5
16789 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16790
16791 test "$cf_cv_have_va_copy" = yes &&
16792 cat >>confdefs.h <<\EOF
16793 #define HAVE_VA_COPY 1
16794 EOF
16795
16796 echo "$as_me:16796: checking for __va_copy" >&5
16797 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16798 if test "${cf_cv_have___va_copy+set}" = set; then
16799   echo $ECHO_N "(cached) $ECHO_C" >&6
16800 else
16801
16802 cat >conftest.$ac_ext <<_ACEOF
16803 #line 16803 "configure"
16804 #include "confdefs.h"
16805
16806 #include <stdarg.h>
16807
16808 int
16809 main ()
16810 {
16811
16812         static va_list dst;
16813         static va_list src;
16814         __va_copy(dst, src)
16815   ;
16816   return 0;
16817 }
16818 _ACEOF
16819 rm -f conftest.$ac_objext conftest$ac_exeext
16820 if { (eval echo "$as_me:16820: \"$ac_link\"") >&5
16821   (eval $ac_link) 2>&5
16822   ac_status=$?
16823   echo "$as_me:16823: \$? = $ac_status" >&5
16824   (exit $ac_status); } &&
16825          { ac_try='test -s conftest$ac_exeext'
16826   { (eval echo "$as_me:16826: \"$ac_try\"") >&5
16827   (eval $ac_try) 2>&5
16828   ac_status=$?
16829   echo "$as_me:16829: \$? = $ac_status" >&5
16830   (exit $ac_status); }; }; then
16831   cf_cv_have___va_copy=yes
16832 else
16833   echo "$as_me: failed program was:" >&5
16834 cat conftest.$ac_ext >&5
16835 cf_cv_have___va_copy=no
16836 fi
16837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16838 fi
16839 echo "$as_me:16839: result: $cf_cv_have___va_copy" >&5
16840 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16841
16842 test "$cf_cv_have___va_copy" = yes &&
16843 cat >>confdefs.h <<\EOF
16844 #define HAVE___VA_COPY 1
16845 EOF
16846
16847 echo "$as_me:16847: checking for pid_t" >&5
16848 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16849 if test "${ac_cv_type_pid_t+set}" = set; then
16850   echo $ECHO_N "(cached) $ECHO_C" >&6
16851 else
16852   cat >conftest.$ac_ext <<_ACEOF
16853 #line 16853 "configure"
16854 #include "confdefs.h"
16855 $ac_includes_default
16856 int
16857 main ()
16858 {
16859 if ((pid_t *) 0)
16860   return 0;
16861 if (sizeof (pid_t))
16862   return 0;
16863   ;
16864   return 0;
16865 }
16866 _ACEOF
16867 rm -f conftest.$ac_objext
16868 if { (eval echo "$as_me:16868: \"$ac_compile\"") >&5
16869   (eval $ac_compile) 2>&5
16870   ac_status=$?
16871   echo "$as_me:16871: \$? = $ac_status" >&5
16872   (exit $ac_status); } &&
16873          { ac_try='test -s conftest.$ac_objext'
16874   { (eval echo "$as_me:16874: \"$ac_try\"") >&5
16875   (eval $ac_try) 2>&5
16876   ac_status=$?
16877   echo "$as_me:16877: \$? = $ac_status" >&5
16878   (exit $ac_status); }; }; then
16879   ac_cv_type_pid_t=yes
16880 else
16881   echo "$as_me: failed program was:" >&5
16882 cat conftest.$ac_ext >&5
16883 ac_cv_type_pid_t=no
16884 fi
16885 rm -f conftest.$ac_objext conftest.$ac_ext
16886 fi
16887 echo "$as_me:16887: result: $ac_cv_type_pid_t" >&5
16888 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16889 if test $ac_cv_type_pid_t = yes; then
16890   :
16891 else
16892
16893 cat >>confdefs.h <<EOF
16894 #define pid_t int
16895 EOF
16896
16897 fi
16898
16899 for ac_header in unistd.h vfork.h
16900 do
16901 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16902 echo "$as_me:16902: checking for $ac_header" >&5
16903 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16904 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16905   echo $ECHO_N "(cached) $ECHO_C" >&6
16906 else
16907   cat >conftest.$ac_ext <<_ACEOF
16908 #line 16908 "configure"
16909 #include "confdefs.h"
16910 #include <$ac_header>
16911 _ACEOF
16912 if { (eval echo "$as_me:16912: \"$ac_cpp conftest.$ac_ext\"") >&5
16913   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16914   ac_status=$?
16915   egrep -v '^ *\+' conftest.er1 >conftest.err
16916   rm -f conftest.er1
16917   cat conftest.err >&5
16918   echo "$as_me:16918: \$? = $ac_status" >&5
16919   (exit $ac_status); } >/dev/null; then
16920   if test -s conftest.err; then
16921     ac_cpp_err=$ac_c_preproc_warn_flag
16922   else
16923     ac_cpp_err=
16924   fi
16925 else
16926   ac_cpp_err=yes
16927 fi
16928 if test -z "$ac_cpp_err"; then
16929   eval "$as_ac_Header=yes"
16930 else
16931   echo "$as_me: failed program was:" >&5
16932   cat conftest.$ac_ext >&5
16933   eval "$as_ac_Header=no"
16934 fi
16935 rm -f conftest.err conftest.$ac_ext
16936 fi
16937 echo "$as_me:16937: result: `eval echo '${'$as_ac_Header'}'`" >&5
16938 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16939 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16940   cat >>confdefs.h <<EOF
16941 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16942 EOF
16943
16944 fi
16945 done
16946
16947 for ac_func in fork vfork
16948 do
16949 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16950 echo "$as_me:16950: checking for $ac_func" >&5
16951 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16952 if eval "test \"\${$as_ac_var+set}\" = set"; then
16953   echo $ECHO_N "(cached) $ECHO_C" >&6
16954 else
16955   cat >conftest.$ac_ext <<_ACEOF
16956 #line 16956 "configure"
16957 #include "confdefs.h"
16958 /* System header to define __stub macros and hopefully few prototypes,
16959     which can conflict with char $ac_func (); below.  */
16960 #include <assert.h>
16961 /* Override any gcc2 internal prototype to avoid an error.  */
16962 #ifdef __cplusplus
16963 extern "C"
16964 #endif
16965 /* We use char because int might match the return type of a gcc2
16966    builtin and then its argument prototype would still apply.  */
16967 char $ac_func ();
16968 char (*f) ();
16969
16970 int
16971 main ()
16972 {
16973 /* The GNU C library defines this for functions which it implements
16974     to always fail with ENOSYS.  Some functions are actually named
16975     something starting with __ and the normal name is an alias.  */
16976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16977 choke me
16978 #else
16979 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16980 #endif
16981
16982   ;
16983   return 0;
16984 }
16985 _ACEOF
16986 rm -f conftest.$ac_objext conftest$ac_exeext
16987 if { (eval echo "$as_me:16987: \"$ac_link\"") >&5
16988   (eval $ac_link) 2>&5
16989   ac_status=$?
16990   echo "$as_me:16990: \$? = $ac_status" >&5
16991   (exit $ac_status); } &&
16992          { ac_try='test -s conftest$ac_exeext'
16993   { (eval echo "$as_me:16993: \"$ac_try\"") >&5
16994   (eval $ac_try) 2>&5
16995   ac_status=$?
16996   echo "$as_me:16996: \$? = $ac_status" >&5
16997   (exit $ac_status); }; }; then
16998   eval "$as_ac_var=yes"
16999 else
17000   echo "$as_me: failed program was:" >&5
17001 cat conftest.$ac_ext >&5
17002 eval "$as_ac_var=no"
17003 fi
17004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17005 fi
17006 echo "$as_me:17006: result: `eval echo '${'$as_ac_var'}'`" >&5
17007 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17008 if test `eval echo '${'$as_ac_var'}'` = yes; then
17009   cat >>confdefs.h <<EOF
17010 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17011 EOF
17012
17013 fi
17014 done
17015
17016 ac_cv_func_fork_works=$ac_cv_func_fork
17017 if test "x$ac_cv_func_fork" = xyes; then
17018   echo "$as_me:17018: checking for working fork" >&5
17019 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17020 if test "${ac_cv_func_fork_works+set}" = set; then
17021   echo $ECHO_N "(cached) $ECHO_C" >&6
17022 else
17023   if test "$cross_compiling" = yes; then
17024   ac_cv_func_fork_works=cross
17025 else
17026   cat >conftest.$ac_ext <<_ACEOF
17027 /* By Rüdiger Kuhlmann. */
17028       #include <sys/types.h>
17029       #if HAVE_UNISTD_H
17030       # include <unistd.h>
17031       #endif
17032       /* Some systems only have a dummy stub for fork() */
17033       int main ()
17034       {
17035         if (fork() < 0)
17036           $ac_main_return (1);
17037         $ac_main_return (0);
17038       }
17039 _ACEOF
17040 rm -f conftest$ac_exeext
17041 if { (eval echo "$as_me:17041: \"$ac_link\"") >&5
17042   (eval $ac_link) 2>&5
17043   ac_status=$?
17044   echo "$as_me:17044: \$? = $ac_status" >&5
17045   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17046   { (eval echo "$as_me:17046: \"$ac_try\"") >&5
17047   (eval $ac_try) 2>&5
17048   ac_status=$?
17049   echo "$as_me:17049: \$? = $ac_status" >&5
17050   (exit $ac_status); }; }; then
17051   ac_cv_func_fork_works=yes
17052 else
17053   echo "$as_me: program exited with status $ac_status" >&5
17054 echo "$as_me: failed program was:" >&5
17055 cat conftest.$ac_ext >&5
17056 ac_cv_func_fork_works=no
17057 fi
17058 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17059 fi
17060 fi
17061 echo "$as_me:17061: result: $ac_cv_func_fork_works" >&5
17062 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17063
17064 fi
17065 if test "x$ac_cv_func_fork_works" = xcross; then
17066   case $host in
17067     *-*-amigaos* | *-*-msdosdjgpp*)
17068       # Override, as these systems have only a dummy fork() stub
17069       ac_cv_func_fork_works=no
17070       ;;
17071     *)
17072       ac_cv_func_fork_works=yes
17073       ;;
17074   esac
17075   { echo "$as_me:17075: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17076 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17077 fi
17078 ac_cv_func_vfork_works=$ac_cv_func_vfork
17079 if test "x$ac_cv_func_vfork" = xyes; then
17080   echo "$as_me:17080: checking for working vfork" >&5
17081 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17082 if test "${ac_cv_func_vfork_works+set}" = set; then
17083   echo $ECHO_N "(cached) $ECHO_C" >&6
17084 else
17085   if test "$cross_compiling" = yes; then
17086   ac_cv_func_vfork_works=cross
17087 else
17088   cat >conftest.$ac_ext <<_ACEOF
17089 #line 17089 "configure"
17090 #include "confdefs.h"
17091 /* Thanks to Paul Eggert for this test.  */
17092 #include <stdio.h>
17093 #include <sys/types.h>
17094 #include <sys/stat.h>
17095 #if HAVE_UNISTD_H
17096 # include <unistd.h>
17097 #endif
17098 #if HAVE_VFORK_H
17099 # include <vfork.h>
17100 #endif
17101 /* On some sparc systems, changes by the child to local and incoming
17102    argument registers are propagated back to the parent.  The compiler
17103    is told about this with #include <vfork.h>, but some compilers
17104    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17105    static variable whose address is put into a register that is
17106    clobbered by the vfork.  */
17107 static
17108 #ifdef __cplusplus
17109 sparc_address_test (int arg)
17110 # else
17111 sparc_address_test (arg) int arg;
17112 #endif
17113 {
17114   static pid_t child;
17115   if (!child) {
17116     child = vfork ();
17117     if (child < 0) {
17118       perror ("vfork");
17119       _exit(2);
17120     }
17121     if (!child) {
17122       arg = getpid();
17123       write(-1, "", 0);
17124       _exit (arg);
17125     }
17126   }
17127 }
17128
17129 int
17130 main ()
17131 {
17132   pid_t parent = getpid ();
17133   pid_t child;
17134
17135   sparc_address_test ();
17136
17137   child = vfork ();
17138
17139   if (child == 0) {
17140     /* Here is another test for sparc vfork register problems.  This
17141        test uses lots of local variables, at least as many local
17142        variables as main has allocated so far including compiler
17143        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17144        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17145        reuse the register of parent for one of the local variables,
17146        since it will think that parent can't possibly be used any more
17147        in this routine.  Assigning to the local variable will thus
17148        munge parent in the parent process.  */
17149     pid_t
17150       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17151       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17152     /* Convince the compiler that p..p7 are live; otherwise, it might
17153        use the same hardware register for all 8 local variables.  */
17154     if (p != p1 || p != p2 || p != p3 || p != p4
17155         || p != p5 || p != p6 || p != p7)
17156       _exit(1);
17157
17158     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17159        from child file descriptors.  If the child closes a descriptor
17160        before it execs or exits, this munges the parent's descriptor
17161        as well.  Test for this by closing stdout in the child.  */
17162     _exit(close(fileno(stdout)) != 0);
17163   } else {
17164     int status;
17165     struct stat st;
17166
17167     while (wait(&status) != child)
17168       ;
17169     $ac_main_return(
17170          /* Was there some problem with vforking?  */
17171          child < 0
17172
17173          /* Did the child fail?  (This shouldn't happen.)  */
17174          || status
17175
17176          /* Did the vfork/compiler bug occur?  */
17177          || parent != getpid()
17178
17179          /* Did the file descriptor bug occur?  */
17180          || fstat(fileno(stdout), &st) != 0
17181          );
17182   }
17183 }
17184 _ACEOF
17185 rm -f conftest$ac_exeext
17186 if { (eval echo "$as_me:17186: \"$ac_link\"") >&5
17187   (eval $ac_link) 2>&5
17188   ac_status=$?
17189   echo "$as_me:17189: \$? = $ac_status" >&5
17190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17191   { (eval echo "$as_me:17191: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:17194: \$? = $ac_status" >&5
17195   (exit $ac_status); }; }; then
17196   ac_cv_func_vfork_works=yes
17197 else
17198   echo "$as_me: program exited with status $ac_status" >&5
17199 echo "$as_me: failed program was:" >&5
17200 cat conftest.$ac_ext >&5
17201 ac_cv_func_vfork_works=no
17202 fi
17203 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17204 fi
17205 fi
17206 echo "$as_me:17206: result: $ac_cv_func_vfork_works" >&5
17207 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17208
17209 fi;
17210 if test "x$ac_cv_func_fork_works" = xcross; then
17211   ac_cv_func_vfork_works=ac_cv_func_vfork
17212   { echo "$as_me:17212: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17213 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17214 fi
17215
17216 if test "x$ac_cv_func_vfork_works" = xyes; then
17217
17218 cat >>confdefs.h <<\EOF
17219 #define HAVE_WORKING_VFORK 1
17220 EOF
17221
17222 else
17223
17224 cat >>confdefs.h <<\EOF
17225 #define vfork fork
17226 EOF
17227
17228 fi
17229 if test "x$ac_cv_func_fork_works" = xyes; then
17230
17231 cat >>confdefs.h <<\EOF
17232 #define HAVE_WORKING_FORK 1
17233 EOF
17234
17235 fi
17236
17237 # special check for test/ditto.c
17238
17239 echo "$as_me:17239: checking for openpty in -lutil" >&5
17240 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17241 if test "${ac_cv_lib_util_openpty+set}" = set; then
17242   echo $ECHO_N "(cached) $ECHO_C" >&6
17243 else
17244   ac_check_lib_save_LIBS=$LIBS
17245 LIBS="-lutil  $LIBS"
17246 cat >conftest.$ac_ext <<_ACEOF
17247 #line 17247 "configure"
17248 #include "confdefs.h"
17249
17250 /* Override any gcc2 internal prototype to avoid an error.  */
17251 #ifdef __cplusplus
17252 extern "C"
17253 #endif
17254 /* We use char because int might match the return type of a gcc2
17255    builtin and then its argument prototype would still apply.  */
17256 char openpty ();
17257 int
17258 main ()
17259 {
17260 openpty ();
17261   ;
17262   return 0;
17263 }
17264 _ACEOF
17265 rm -f conftest.$ac_objext conftest$ac_exeext
17266 if { (eval echo "$as_me:17266: \"$ac_link\"") >&5
17267   (eval $ac_link) 2>&5
17268   ac_status=$?
17269   echo "$as_me:17269: \$? = $ac_status" >&5
17270   (exit $ac_status); } &&
17271          { ac_try='test -s conftest$ac_exeext'
17272   { (eval echo "$as_me:17272: \"$ac_try\"") >&5
17273   (eval $ac_try) 2>&5
17274   ac_status=$?
17275   echo "$as_me:17275: \$? = $ac_status" >&5
17276   (exit $ac_status); }; }; then
17277   ac_cv_lib_util_openpty=yes
17278 else
17279   echo "$as_me: failed program was:" >&5
17280 cat conftest.$ac_ext >&5
17281 ac_cv_lib_util_openpty=no
17282 fi
17283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17284 LIBS=$ac_check_lib_save_LIBS
17285 fi
17286 echo "$as_me:17286: result: $ac_cv_lib_util_openpty" >&5
17287 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17288 if test $ac_cv_lib_util_openpty = yes; then
17289   cf_cv_lib_util=yes
17290 else
17291   cf_cv_lib_util=no
17292 fi
17293
17294 echo "$as_me:17294: checking for openpty header" >&5
17295 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17296 if test "${cf_cv_func_openpty+set}" = set; then
17297   echo $ECHO_N "(cached) $ECHO_C" >&6
17298 else
17299
17300     cf_save_LIBS="$LIBS"
17301     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17302     for cf_header in pty.h libutil.h util.h
17303     do
17304     cat >conftest.$ac_ext <<_ACEOF
17305 #line 17305 "configure"
17306 #include "confdefs.h"
17307
17308 #include <$cf_header>
17309
17310 int
17311 main ()
17312 {
17313
17314     int x = openpty((int *)0, (int *)0, (char *)0,
17315                    (struct termios *)0, (struct winsize *)0);
17316
17317   ;
17318   return 0;
17319 }
17320 _ACEOF
17321 rm -f conftest.$ac_objext conftest$ac_exeext
17322 if { (eval echo "$as_me:17322: \"$ac_link\"") >&5
17323   (eval $ac_link) 2>&5
17324   ac_status=$?
17325   echo "$as_me:17325: \$? = $ac_status" >&5
17326   (exit $ac_status); } &&
17327          { ac_try='test -s conftest$ac_exeext'
17328   { (eval echo "$as_me:17328: \"$ac_try\"") >&5
17329   (eval $ac_try) 2>&5
17330   ac_status=$?
17331   echo "$as_me:17331: \$? = $ac_status" >&5
17332   (exit $ac_status); }; }; then
17333
17334         cf_cv_func_openpty=$cf_header
17335         break
17336
17337 else
17338   echo "$as_me: failed program was:" >&5
17339 cat conftest.$ac_ext >&5
17340
17341         cf_cv_func_openpty=no
17342
17343 fi
17344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17345     done
17346     LIBS="$cf_save_LIBS"
17347
17348 fi
17349 echo "$as_me:17349: result: $cf_cv_func_openpty" >&5
17350 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17351
17352 if test "$cf_cv_func_openpty" != no ; then
17353
17354 cat >>confdefs.h <<EOF
17355 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17356 EOF
17357
17358 cat >>confdefs.h <<\EOF
17359 #define USE_XTERM_PTY 1
17360 EOF
17361
17362     if test "x$cf_cv_lib_util" = xyes ; then
17363         TEST_LIBS="-lutil $TEST_LIBS"
17364     fi
17365 fi
17366
17367 if test "$with_hashed_db" != no ; then
17368
17369 cat >>confdefs.h <<\EOF
17370 #define USE_HASHED_DB 1
17371 EOF
17372
17373 case $with_hashed_db in #(vi
17374 yes|*able*) #(vi
17375     ;;
17376 *)
17377     if test -d "$with_hashed_db" ; then
17378
17379 if test -n "$with_hashed_db/include" ; then
17380   for cf_add_incdir in $with_hashed_db/include
17381   do
17382         while test $cf_add_incdir != /usr/include
17383         do
17384           if test -d $cf_add_incdir
17385           then
17386                 cf_have_incdir=no
17387                 if test -n "$CFLAGS$CPPFLAGS" ; then
17388                   # a loop is needed to ensure we can add subdirs of existing dirs
17389                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17390                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17391                           cf_have_incdir=yes; break
17392                         fi
17393                   done
17394                 fi
17395
17396                 if test "$cf_have_incdir" = no ; then
17397                   if test "$cf_add_incdir" = /usr/local/include ; then
17398                         if test "$GCC" = yes
17399                         then
17400                           cf_save_CPPFLAGS=$CPPFLAGS
17401                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17402                           cat >conftest.$ac_ext <<_ACEOF
17403 #line 17403 "configure"
17404 #include "confdefs.h"
17405 #include <stdio.h>
17406 int
17407 main ()
17408 {
17409 printf("Hello")
17410   ;
17411   return 0;
17412 }
17413 _ACEOF
17414 rm -f conftest.$ac_objext
17415 if { (eval echo "$as_me:17415: \"$ac_compile\"") >&5
17416   (eval $ac_compile) 2>&5
17417   ac_status=$?
17418   echo "$as_me:17418: \$? = $ac_status" >&5
17419   (exit $ac_status); } &&
17420          { ac_try='test -s conftest.$ac_objext'
17421   { (eval echo "$as_me:17421: \"$ac_try\"") >&5
17422   (eval $ac_try) 2>&5
17423   ac_status=$?
17424   echo "$as_me:17424: \$? = $ac_status" >&5
17425   (exit $ac_status); }; }; then
17426   :
17427 else
17428   echo "$as_me: failed program was:" >&5
17429 cat conftest.$ac_ext >&5
17430 cf_have_incdir=yes
17431 fi
17432 rm -f conftest.$ac_objext conftest.$ac_ext
17433                           CPPFLAGS=$cf_save_CPPFLAGS
17434                         fi
17435                   fi
17436                 fi
17437
17438                 if test "$cf_have_incdir" = no ; then
17439                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17440
17441 echo "${as_me:-configure}:17441: testing adding $cf_add_incdir to include-path ..." 1>&5
17442
17443                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17444
17445                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17446                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17447                   cf_add_incdir="$cf_top_incdir"
17448                 else
17449                   break
17450                 fi
17451           fi
17452         done
17453   done
17454 fi
17455
17456 if test -n "$with_hashed_db/lib" ; then
17457   for cf_add_libdir in $with_hashed_db/lib
17458   do
17459     if test $cf_add_libdir = /usr/lib ; then
17460       :
17461     elif test -d $cf_add_libdir
17462     then
17463       cf_have_libdir=no
17464       if test -n "$LDFLAGS$LIBS" ; then
17465         # a loop is needed to ensure we can add subdirs of existing dirs
17466         for cf_test_libdir in $LDFLAGS $LIBS ; do
17467           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17468             cf_have_libdir=yes; break
17469           fi
17470         done
17471       fi
17472       if test "$cf_have_libdir" = no ; then
17473         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17474
17475 echo "${as_me:-configure}:17475: testing adding $cf_add_libdir to library-path ..." 1>&5
17476
17477         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17478       fi
17479     fi
17480   done
17481 fi
17482
17483     fi
17484 esac
17485
17486 echo "$as_me:17486: checking for db.h" >&5
17487 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17488 if test "${ac_cv_header_db_h+set}" = set; then
17489   echo $ECHO_N "(cached) $ECHO_C" >&6
17490 else
17491   cat >conftest.$ac_ext <<_ACEOF
17492 #line 17492 "configure"
17493 #include "confdefs.h"
17494 #include <db.h>
17495 _ACEOF
17496 if { (eval echo "$as_me:17496: \"$ac_cpp conftest.$ac_ext\"") >&5
17497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17498   ac_status=$?
17499   egrep -v '^ *\+' conftest.er1 >conftest.err
17500   rm -f conftest.er1
17501   cat conftest.err >&5
17502   echo "$as_me:17502: \$? = $ac_status" >&5
17503   (exit $ac_status); } >/dev/null; then
17504   if test -s conftest.err; then
17505     ac_cpp_err=$ac_c_preproc_warn_flag
17506   else
17507     ac_cpp_err=
17508   fi
17509 else
17510   ac_cpp_err=yes
17511 fi
17512 if test -z "$ac_cpp_err"; then
17513   ac_cv_header_db_h=yes
17514 else
17515   echo "$as_me: failed program was:" >&5
17516   cat conftest.$ac_ext >&5
17517   ac_cv_header_db_h=no
17518 fi
17519 rm -f conftest.err conftest.$ac_ext
17520 fi
17521 echo "$as_me:17521: result: $ac_cv_header_db_h" >&5
17522 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17523 if test $ac_cv_header_db_h = yes; then
17524
17525 echo "$as_me:17525: checking for version of db" >&5
17526 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17527 if test "${cf_cv_hashed_db_version+set}" = set; then
17528   echo $ECHO_N "(cached) $ECHO_C" >&6
17529 else
17530
17531 cf_cv_hashed_db_version=unknown
17532
17533 for cf_db_version in 1 2 3 4 5
17534 do
17535
17536 echo "${as_me:-configure}:17536: testing checking for db version $cf_db_version ..." 1>&5
17537
17538         cat >conftest.$ac_ext <<_ACEOF
17539 #line 17539 "configure"
17540 #include "confdefs.h"
17541
17542 $ac_includes_default
17543 #include <db.h>
17544
17545 #ifdef DB_VERSION_MAJOR
17546         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17547 #if $cf_db_version == DB_VERSION_MAJOR
17548         /* ok */
17549 #else
17550         make an error
17551 #endif
17552 #else
17553 #if $cf_db_version == 1
17554         /* ok: assuming this is DB 1.8.5 */
17555 #else
17556         make an error
17557 #endif
17558 #endif
17559
17560 int
17561 main ()
17562 {
17563 DBT *foo = 0
17564   ;
17565   return 0;
17566 }
17567 _ACEOF
17568 rm -f conftest.$ac_objext
17569 if { (eval echo "$as_me:17569: \"$ac_compile\"") >&5
17570   (eval $ac_compile) 2>&5
17571   ac_status=$?
17572   echo "$as_me:17572: \$? = $ac_status" >&5
17573   (exit $ac_status); } &&
17574          { ac_try='test -s conftest.$ac_objext'
17575   { (eval echo "$as_me:17575: \"$ac_try\"") >&5
17576   (eval $ac_try) 2>&5
17577   ac_status=$?
17578   echo "$as_me:17578: \$? = $ac_status" >&5
17579   (exit $ac_status); }; }; then
17580
17581         cf_cv_hashed_db_version=$cf_db_version
17582         break
17583
17584 else
17585   echo "$as_me: failed program was:" >&5
17586 cat conftest.$ac_ext >&5
17587 fi
17588 rm -f conftest.$ac_objext conftest.$ac_ext
17589 done
17590
17591 fi
17592 echo "$as_me:17592: result: $cf_cv_hashed_db_version" >&5
17593 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17594
17595 if test "$cf_cv_hashed_db_version" = unknown ; then
17596         { { echo "$as_me:17596: error: Cannot determine version of db" >&5
17597 echo "$as_me: error: Cannot determine version of db" >&2;}
17598    { (exit 1); exit 1; }; }
17599 else
17600
17601 echo "$as_me:17601: checking for db libraries" >&5
17602 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17603 if test "${cf_cv_hashed_db_libs+set}" = set; then
17604   echo $ECHO_N "(cached) $ECHO_C" >&6
17605 else
17606
17607 cf_cv_hashed_db_libs=unknown
17608 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17609 do
17610         cf_save_libs="$LIBS"
17611         if test -n "$cf_db_libs"; then
17612                 LIBS="-l$cf_db_libs $LIBS"
17613         fi
17614
17615 echo "${as_me:-configure}:17615: testing checking for library "$cf_db_libs" ..." 1>&5
17616
17617         cat >conftest.$ac_ext <<_ACEOF
17618 #line 17618 "configure"
17619 #include "confdefs.h"
17620
17621 $ac_includes_default
17622 #include <db.h>
17623
17624 int
17625 main ()
17626 {
17627
17628         char *path = "/tmp/foo";
17629 #ifdef DB_VERSION_MAJOR
17630 #if DB_VERSION_MAJOR >= 4
17631         DB *result = 0;
17632         db_create(&result, NULL, 0);
17633         result->open(result,
17634                 NULL,
17635                 path,
17636                 path,
17637                 DB_HASH,
17638                 DB_CREATE,
17639                 0644);
17640 #elif DB_VERSION_MAJOR >= 3
17641         DB *result = 0;
17642         db_create(&result, NULL, 0);
17643         result->open(result,
17644                 path,
17645                 path,
17646                 DB_HASH,
17647                 DB_CREATE,
17648                 0644);
17649 #elif DB_VERSION_MAJOR >= 2
17650         DB *result = 0;
17651         db_open(path,
17652                 DB_HASH,
17653                 DB_CREATE,
17654                 0644,
17655                 (DB_ENV *) 0,
17656                 (DB_INFO *) 0,
17657                 &result);
17658 #endif /* DB_VERSION_MAJOR */
17659 #else
17660         DB *result = dbopen(path,
17661                      2,
17662                      0644,
17663                      DB_HASH,
17664                      0);
17665 #endif
17666         ${cf_cv_main_return:-return}(result != 0)
17667
17668   ;
17669   return 0;
17670 }
17671 _ACEOF
17672 rm -f conftest.$ac_objext conftest$ac_exeext
17673 if { (eval echo "$as_me:17673: \"$ac_link\"") >&5
17674   (eval $ac_link) 2>&5
17675   ac_status=$?
17676   echo "$as_me:17676: \$? = $ac_status" >&5
17677   (exit $ac_status); } &&
17678          { ac_try='test -s conftest$ac_exeext'
17679   { (eval echo "$as_me:17679: \"$ac_try\"") >&5
17680   (eval $ac_try) 2>&5
17681   ac_status=$?
17682   echo "$as_me:17682: \$? = $ac_status" >&5
17683   (exit $ac_status); }; }; then
17684
17685         if test -n "$cf_db_libs" ; then
17686                 cf_cv_hashed_db_libs=$cf_db_libs
17687         else
17688                 cf_cv_hashed_db_libs=default
17689         fi
17690         LIBS="$cf_save_libs"
17691         break
17692
17693 else
17694   echo "$as_me: failed program was:" >&5
17695 cat conftest.$ac_ext >&5
17696 fi
17697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17698         LIBS="$cf_save_libs"
17699 done
17700
17701 fi
17702 echo "$as_me:17702: result: $cf_cv_hashed_db_libs" >&5
17703 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17704
17705         if test "$cf_cv_hashed_db_libs" = unknown ; then
17706                 { { echo "$as_me:17706: error: Cannot determine library for db" >&5
17707 echo "$as_me: error: Cannot determine library for db" >&2;}
17708    { (exit 1); exit 1; }; }
17709         elif test "$cf_cv_hashed_db_libs" != default ; then
17710                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17711         fi
17712 fi
17713
17714 else
17715
17716         { { echo "$as_me:17716: error: Cannot find db.h" >&5
17717 echo "$as_me: error: Cannot find db.h" >&2;}
17718    { (exit 1); exit 1; }; }
17719
17720 fi
17721
17722 fi
17723
17724 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17725         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17726         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17727 fi
17728
17729 # Just in case, check if the C compiler has a bool type.
17730
17731 echo "$as_me:17731: checking if we should include stdbool.h" >&5
17732 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17733
17734 if test "${cf_cv_header_stdbool_h+set}" = set; then
17735   echo $ECHO_N "(cached) $ECHO_C" >&6
17736 else
17737
17738         cat >conftest.$ac_ext <<_ACEOF
17739 #line 17739 "configure"
17740 #include "confdefs.h"
17741
17742 int
17743 main ()
17744 {
17745 bool foo = false
17746   ;
17747   return 0;
17748 }
17749 _ACEOF
17750 rm -f conftest.$ac_objext
17751 if { (eval echo "$as_me:17751: \"$ac_compile\"") >&5
17752   (eval $ac_compile) 2>&5
17753   ac_status=$?
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); } &&
17756          { ac_try='test -s conftest.$ac_objext'
17757   { (eval echo "$as_me:17757: \"$ac_try\"") >&5
17758   (eval $ac_try) 2>&5
17759   ac_status=$?
17760   echo "$as_me:17760: \$? = $ac_status" >&5
17761   (exit $ac_status); }; }; then
17762   cf_cv_header_stdbool_h=0
17763 else
17764   echo "$as_me: failed program was:" >&5
17765 cat conftest.$ac_ext >&5
17766 cat >conftest.$ac_ext <<_ACEOF
17767 #line 17767 "configure"
17768 #include "confdefs.h"
17769
17770 #ifndef __BEOS__
17771 #include <stdbool.h>
17772 #endif
17773
17774 int
17775 main ()
17776 {
17777 bool foo = false
17778   ;
17779   return 0;
17780 }
17781 _ACEOF
17782 rm -f conftest.$ac_objext
17783 if { (eval echo "$as_me:17783: \"$ac_compile\"") >&5
17784   (eval $ac_compile) 2>&5
17785   ac_status=$?
17786   echo "$as_me:17786: \$? = $ac_status" >&5
17787   (exit $ac_status); } &&
17788          { ac_try='test -s conftest.$ac_objext'
17789   { (eval echo "$as_me:17789: \"$ac_try\"") >&5
17790   (eval $ac_try) 2>&5
17791   ac_status=$?
17792   echo "$as_me:17792: \$? = $ac_status" >&5
17793   (exit $ac_status); }; }; then
17794   cf_cv_header_stdbool_h=1
17795 else
17796   echo "$as_me: failed program was:" >&5
17797 cat conftest.$ac_ext >&5
17798 cf_cv_header_stdbool_h=0
17799 fi
17800 rm -f conftest.$ac_objext conftest.$ac_ext
17801 fi
17802 rm -f conftest.$ac_objext conftest.$ac_ext
17803 fi
17804
17805 if test "$cf_cv_header_stdbool_h" = 1
17806 then    echo "$as_me:17806: result: yes" >&5
17807 echo "${ECHO_T}yes" >&6
17808 else    echo "$as_me:17808: result: no" >&5
17809 echo "${ECHO_T}no" >&6
17810 fi
17811
17812 echo "$as_me:17812: checking for builtin bool type" >&5
17813 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17814
17815 if test "${cf_cv_cc_bool_type+set}" = set; then
17816   echo $ECHO_N "(cached) $ECHO_C" >&6
17817 else
17818
17819         cat >conftest.$ac_ext <<_ACEOF
17820 #line 17820 "configure"
17821 #include "confdefs.h"
17822
17823 #include <stdio.h>
17824 #include <sys/types.h>
17825
17826 int
17827 main ()
17828 {
17829 bool x = false
17830   ;
17831   return 0;
17832 }
17833 _ACEOF
17834 rm -f conftest.$ac_objext
17835 if { (eval echo "$as_me:17835: \"$ac_compile\"") >&5
17836   (eval $ac_compile) 2>&5
17837   ac_status=$?
17838   echo "$as_me:17838: \$? = $ac_status" >&5
17839   (exit $ac_status); } &&
17840          { ac_try='test -s conftest.$ac_objext'
17841   { (eval echo "$as_me:17841: \"$ac_try\"") >&5
17842   (eval $ac_try) 2>&5
17843   ac_status=$?
17844   echo "$as_me:17844: \$? = $ac_status" >&5
17845   (exit $ac_status); }; }; then
17846   cf_cv_cc_bool_type=1
17847 else
17848   echo "$as_me: failed program was:" >&5
17849 cat conftest.$ac_ext >&5
17850 cf_cv_cc_bool_type=0
17851 fi
17852 rm -f conftest.$ac_objext conftest.$ac_ext
17853
17854 fi
17855
17856 if test "$cf_cv_cc_bool_type" = 1
17857 then    echo "$as_me:17857: result: yes" >&5
17858 echo "${ECHO_T}yes" >&6
17859 else    echo "$as_me:17859: result: no" >&5
17860 echo "${ECHO_T}no" >&6
17861 fi
17862
17863 # Check for C++ compiler characteristics (and ensure that it's there!)
17864 if test -n "$CXX" ; then
17865         ac_ext=cc
17866 ac_cpp='$CXXCPP $CPPFLAGS'
17867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17870 ac_main_return=return
17871
17872 if test -n "$GXX" ; then
17873 case $cf_cv_system_name in #(vi
17874 os2*) #(vi
17875         cf_stdcpp_libname=stdcpp
17876         ;;
17877 *)
17878         cf_stdcpp_libname=stdc++
17879         ;;
17880 esac
17881 echo "$as_me:17881: checking for library $cf_stdcpp_libname" >&5
17882 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17883 if test "${cf_cv_libstdcpp+set}" = set; then
17884   echo $ECHO_N "(cached) $ECHO_C" >&6
17885 else
17886
17887         cf_save="$LIBS"
17888         LIBS="-l$cf_stdcpp_libname $LIBS"
17889 cat >conftest.$ac_ext <<_ACEOF
17890 #line 17890 "configure"
17891 #include "confdefs.h"
17892
17893 #include <strstream.h>
17894 int
17895 main ()
17896 {
17897
17898 char buf[80];
17899 strstreambuf foo(buf, sizeof(buf))
17900
17901   ;
17902   return 0;
17903 }
17904 _ACEOF
17905 rm -f conftest.$ac_objext conftest$ac_exeext
17906 if { (eval echo "$as_me:17906: \"$ac_link\"") >&5
17907   (eval $ac_link) 2>&5
17908   ac_status=$?
17909   echo "$as_me:17909: \$? = $ac_status" >&5
17910   (exit $ac_status); } &&
17911          { ac_try='test -s conftest$ac_exeext'
17912   { (eval echo "$as_me:17912: \"$ac_try\"") >&5
17913   (eval $ac_try) 2>&5
17914   ac_status=$?
17915   echo "$as_me:17915: \$? = $ac_status" >&5
17916   (exit $ac_status); }; }; then
17917   cf_cv_libstdcpp=yes
17918 else
17919   echo "$as_me: failed program was:" >&5
17920 cat conftest.$ac_ext >&5
17921 cf_cv_libstdcpp=no
17922 fi
17923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17924         LIBS="$cf_save"
17925
17926 fi
17927 echo "$as_me:17927: result: $cf_cv_libstdcpp" >&5
17928 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17929 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17930 fi
17931
17932         echo "$as_me:17932: checking whether $CXX understands -c and -o together" >&5
17933 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17934 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17935   echo $ECHO_N "(cached) $ECHO_C" >&6
17936 else
17937
17938 cat > conftest.$ac_ext <<CF_EOF
17939 #include <stdio.h>
17940 int main()
17941 {
17942         ${cf_cv_main_return:-return}(0);
17943 }
17944 CF_EOF
17945 # We do the test twice because some compilers refuse to overwrite an
17946 # existing .o file with -o, though they will create one.
17947 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17948 if { (eval echo "$as_me:17948: \"$ac_try\"") >&5
17949   (eval $ac_try) 2>&5
17950   ac_status=$?
17951   echo "$as_me:17951: \$? = $ac_status" >&5
17952   (exit $ac_status); } &&
17953   test -f conftest2.$ac_objext && { (eval echo "$as_me:17953: \"$ac_try\"") >&5
17954   (eval $ac_try) 2>&5
17955   ac_status=$?
17956   echo "$as_me:17956: \$? = $ac_status" >&5
17957   (exit $ac_status); };
17958 then
17959   eval cf_cv_prog_CXX_c_o=yes
17960 else
17961   eval cf_cv_prog_CXX_c_o=no
17962 fi
17963 rm -rf conftest*
17964
17965 fi
17966 if test $cf_cv_prog_CXX_c_o = yes; then
17967   echo "$as_me:17967: result: yes" >&5
17968 echo "${ECHO_T}yes" >&6
17969 else
17970   echo "$as_me:17970: result: no" >&5
17971 echo "${ECHO_T}no" >&6
17972 fi
17973
17974         case $GXX_VERSION in
17975         1*|2.0-6*)
17976                 cf_cxx_library=yes
17977                 ;;
17978         *-2.7*|2.7*)
17979
17980 cf_cxx_library=unknown
17981 case $cf_cv_system_name in #(vi
17982 os2*) #(vi
17983         cf_gpp_libname=gpp
17984         ;;
17985 *)
17986         cf_gpp_libname=g++
17987         ;;
17988 esac
17989 if test "$GXX" = yes; then
17990         echo "$as_me:17990: checking for lib$cf_gpp_libname" >&5
17991 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17992         cf_save="$LIBS"
17993         LIBS="-l$cf_gpp_libname $LIBS"
17994         cat >conftest.$ac_ext <<_ACEOF
17995 #line 17995 "configure"
17996 #include "confdefs.h"
17997
17998 #include <$cf_gpp_libname/builtin.h>
17999
18000 int
18001 main ()
18002 {
18003 two_arg_error_handler_t foo2 = lib_error_handler
18004   ;
18005   return 0;
18006 }
18007 _ACEOF
18008 rm -f conftest.$ac_objext conftest$ac_exeext
18009 if { (eval echo "$as_me:18009: \"$ac_link\"") >&5
18010   (eval $ac_link) 2>&5
18011   ac_status=$?
18012   echo "$as_me:18012: \$? = $ac_status" >&5
18013   (exit $ac_status); } &&
18014          { ac_try='test -s conftest$ac_exeext'
18015   { (eval echo "$as_me:18015: \"$ac_try\"") >&5
18016   (eval $ac_try) 2>&5
18017   ac_status=$?
18018   echo "$as_me:18018: \$? = $ac_status" >&5
18019   (exit $ac_status); }; }; then
18020   cf_cxx_library=yes
18021          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18022          if test "$cf_gpp_libname" = cpp ; then
18023
18024 cat >>confdefs.h <<\EOF
18025 #define HAVE_GPP_BUILTIN_H 1
18026 EOF
18027
18028          else
18029
18030 cat >>confdefs.h <<\EOF
18031 #define HAVE_GXX_BUILTIN_H 1
18032 EOF
18033
18034          fi
18035 else
18036   echo "$as_me: failed program was:" >&5
18037 cat conftest.$ac_ext >&5
18038 cat >conftest.$ac_ext <<_ACEOF
18039 #line 18039 "configure"
18040 #include "confdefs.h"
18041
18042 #include <builtin.h>
18043
18044 int
18045 main ()
18046 {
18047 two_arg_error_handler_t foo2 = lib_error_handler
18048   ;
18049   return 0;
18050 }
18051 _ACEOF
18052 rm -f conftest.$ac_objext conftest$ac_exeext
18053 if { (eval echo "$as_me:18053: \"$ac_link\"") >&5
18054   (eval $ac_link) 2>&5
18055   ac_status=$?
18056   echo "$as_me:18056: \$? = $ac_status" >&5
18057   (exit $ac_status); } &&
18058          { ac_try='test -s conftest$ac_exeext'
18059   { (eval echo "$as_me:18059: \"$ac_try\"") >&5
18060   (eval $ac_try) 2>&5
18061   ac_status=$?
18062   echo "$as_me:18062: \$? = $ac_status" >&5
18063   (exit $ac_status); }; }; then
18064   cf_cxx_library=yes
18065          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18066
18067 cat >>confdefs.h <<\EOF
18068 #define HAVE_BUILTIN_H 1
18069 EOF
18070
18071 else
18072   echo "$as_me: failed program was:" >&5
18073 cat conftest.$ac_ext >&5
18074 cf_cxx_library=no
18075 fi
18076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18077 fi
18078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18079         LIBS="$cf_save"
18080         echo "$as_me:18080: result: $cf_cxx_library" >&5
18081 echo "${ECHO_T}$cf_cxx_library" >&6
18082 fi
18083
18084                 ;;
18085         *)
18086                 cf_cxx_library=no
18087                 ;;
18088         esac
18089
18090         ac_ext=cc
18091 ac_cpp='$CXXCPP $CPPFLAGS'
18092 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18093 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18094 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18095 ac_main_return=return
18096 echo "$as_me:18096: checking how to run the C++ preprocessor" >&5
18097 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18098 if test -z "$CXXCPP"; then
18099   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18100   echo $ECHO_N "(cached) $ECHO_C" >&6
18101 else
18102       # Double quotes because CXXCPP needs to be expanded
18103     for CXXCPP in "$CXX -E" "/lib/cpp"
18104     do
18105       ac_preproc_ok=false
18106 for ac_cxx_preproc_warn_flag in '' yes
18107 do
18108   # Use a header file that comes with gcc, so configuring glibc
18109   # with a fresh cross-compiler works.
18110   # On the NeXT, cc -E runs the code through the compiler's parser,
18111   # not just through cpp. "Syntax error" is here to catch this case.
18112   cat >conftest.$ac_ext <<_ACEOF
18113 #line 18113 "configure"
18114 #include "confdefs.h"
18115 #include <assert.h>
18116                      Syntax error
18117 _ACEOF
18118 if { (eval echo "$as_me:18118: \"$ac_cpp conftest.$ac_ext\"") >&5
18119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18120   ac_status=$?
18121   egrep -v '^ *\+' conftest.er1 >conftest.err
18122   rm -f conftest.er1
18123   cat conftest.err >&5
18124   echo "$as_me:18124: \$? = $ac_status" >&5
18125   (exit $ac_status); } >/dev/null; then
18126   if test -s conftest.err; then
18127     ac_cpp_err=$ac_cxx_preproc_warn_flag
18128   else
18129     ac_cpp_err=
18130   fi
18131 else
18132   ac_cpp_err=yes
18133 fi
18134 if test -z "$ac_cpp_err"; then
18135   :
18136 else
18137   echo "$as_me: failed program was:" >&5
18138   cat conftest.$ac_ext >&5
18139   # Broken: fails on valid input.
18140 continue
18141 fi
18142 rm -f conftest.err conftest.$ac_ext
18143
18144   # OK, works on sane cases.  Now check whether non-existent headers
18145   # can be detected and how.
18146   cat >conftest.$ac_ext <<_ACEOF
18147 #line 18147 "configure"
18148 #include "confdefs.h"
18149 #include <ac_nonexistent.h>
18150 _ACEOF
18151 if { (eval echo "$as_me:18151: \"$ac_cpp conftest.$ac_ext\"") >&5
18152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18153   ac_status=$?
18154   egrep -v '^ *\+' conftest.er1 >conftest.err
18155   rm -f conftest.er1
18156   cat conftest.err >&5
18157   echo "$as_me:18157: \$? = $ac_status" >&5
18158   (exit $ac_status); } >/dev/null; then
18159   if test -s conftest.err; then
18160     ac_cpp_err=$ac_cxx_preproc_warn_flag
18161   else
18162     ac_cpp_err=
18163   fi
18164 else
18165   ac_cpp_err=yes
18166 fi
18167 if test -z "$ac_cpp_err"; then
18168   # Broken: success on invalid input.
18169 continue
18170 else
18171   echo "$as_me: failed program was:" >&5
18172   cat conftest.$ac_ext >&5
18173   # Passes both tests.
18174 ac_preproc_ok=:
18175 break
18176 fi
18177 rm -f conftest.err conftest.$ac_ext
18178
18179 done
18180 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18181 rm -f conftest.err conftest.$ac_ext
18182 if $ac_preproc_ok; then
18183   break
18184 fi
18185
18186     done
18187     ac_cv_prog_CXXCPP=$CXXCPP
18188
18189 fi
18190   CXXCPP=$ac_cv_prog_CXXCPP
18191 else
18192   ac_cv_prog_CXXCPP=$CXXCPP
18193 fi
18194 echo "$as_me:18194: result: $CXXCPP" >&5
18195 echo "${ECHO_T}$CXXCPP" >&6
18196 ac_preproc_ok=false
18197 for ac_cxx_preproc_warn_flag in '' yes
18198 do
18199   # Use a header file that comes with gcc, so configuring glibc
18200   # with a fresh cross-compiler works.
18201   # On the NeXT, cc -E runs the code through the compiler's parser,
18202   # not just through cpp. "Syntax error" is here to catch this case.
18203   cat >conftest.$ac_ext <<_ACEOF
18204 #line 18204 "configure"
18205 #include "confdefs.h"
18206 #include <assert.h>
18207                      Syntax error
18208 _ACEOF
18209 if { (eval echo "$as_me:18209: \"$ac_cpp conftest.$ac_ext\"") >&5
18210   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18211   ac_status=$?
18212   egrep -v '^ *\+' conftest.er1 >conftest.err
18213   rm -f conftest.er1
18214   cat conftest.err >&5
18215   echo "$as_me:18215: \$? = $ac_status" >&5
18216   (exit $ac_status); } >/dev/null; then
18217   if test -s conftest.err; then
18218     ac_cpp_err=$ac_cxx_preproc_warn_flag
18219   else
18220     ac_cpp_err=
18221   fi
18222 else
18223   ac_cpp_err=yes
18224 fi
18225 if test -z "$ac_cpp_err"; then
18226   :
18227 else
18228   echo "$as_me: failed program was:" >&5
18229   cat conftest.$ac_ext >&5
18230   # Broken: fails on valid input.
18231 continue
18232 fi
18233 rm -f conftest.err conftest.$ac_ext
18234
18235   # OK, works on sane cases.  Now check whether non-existent headers
18236   # can be detected and how.
18237   cat >conftest.$ac_ext <<_ACEOF
18238 #line 18238 "configure"
18239 #include "confdefs.h"
18240 #include <ac_nonexistent.h>
18241 _ACEOF
18242 if { (eval echo "$as_me:18242: \"$ac_cpp conftest.$ac_ext\"") >&5
18243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18244   ac_status=$?
18245   egrep -v '^ *\+' conftest.er1 >conftest.err
18246   rm -f conftest.er1
18247   cat conftest.err >&5
18248   echo "$as_me:18248: \$? = $ac_status" >&5
18249   (exit $ac_status); } >/dev/null; then
18250   if test -s conftest.err; then
18251     ac_cpp_err=$ac_cxx_preproc_warn_flag
18252   else
18253     ac_cpp_err=
18254   fi
18255 else
18256   ac_cpp_err=yes
18257 fi
18258 if test -z "$ac_cpp_err"; then
18259   # Broken: success on invalid input.
18260 continue
18261 else
18262   echo "$as_me: failed program was:" >&5
18263   cat conftest.$ac_ext >&5
18264   # Passes both tests.
18265 ac_preproc_ok=:
18266 break
18267 fi
18268 rm -f conftest.err conftest.$ac_ext
18269
18270 done
18271 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18272 rm -f conftest.err conftest.$ac_ext
18273 if $ac_preproc_ok; then
18274   :
18275 else
18276   { { echo "$as_me:18276: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18277 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18278    { (exit 1); exit 1; }; }
18279 fi
18280
18281 ac_ext=cc
18282 ac_cpp='$CXXCPP $CPPFLAGS'
18283 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18284 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18285 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18286 ac_main_return=return
18287
18288 for ac_header in typeinfo
18289 do
18290 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18291 echo "$as_me:18291: checking for $ac_header" >&5
18292 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18293 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18294   echo $ECHO_N "(cached) $ECHO_C" >&6
18295 else
18296   cat >conftest.$ac_ext <<_ACEOF
18297 #line 18297 "configure"
18298 #include "confdefs.h"
18299 #include <$ac_header>
18300 _ACEOF
18301 if { (eval echo "$as_me:18301: \"$ac_cpp conftest.$ac_ext\"") >&5
18302   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18303   ac_status=$?
18304   egrep -v '^ *\+' conftest.er1 >conftest.err
18305   rm -f conftest.er1
18306   cat conftest.err >&5
18307   echo "$as_me:18307: \$? = $ac_status" >&5
18308   (exit $ac_status); } >/dev/null; then
18309   if test -s conftest.err; then
18310     ac_cpp_err=$ac_cxx_preproc_warn_flag
18311   else
18312     ac_cpp_err=
18313   fi
18314 else
18315   ac_cpp_err=yes
18316 fi
18317 if test -z "$ac_cpp_err"; then
18318   eval "$as_ac_Header=yes"
18319 else
18320   echo "$as_me: failed program was:" >&5
18321   cat conftest.$ac_ext >&5
18322   eval "$as_ac_Header=no"
18323 fi
18324 rm -f conftest.err conftest.$ac_ext
18325 fi
18326 echo "$as_me:18326: result: `eval echo '${'$as_ac_Header'}'`" >&5
18327 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18328 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18329   cat >>confdefs.h <<EOF
18330 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18331 EOF
18332
18333 fi
18334 done
18335
18336 for ac_header in iostream
18337 do
18338 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18339 echo "$as_me:18339: checking for $ac_header" >&5
18340 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18342   echo $ECHO_N "(cached) $ECHO_C" >&6
18343 else
18344   cat >conftest.$ac_ext <<_ACEOF
18345 #line 18345 "configure"
18346 #include "confdefs.h"
18347 #include <$ac_header>
18348 _ACEOF
18349 if { (eval echo "$as_me:18349: \"$ac_cpp conftest.$ac_ext\"") >&5
18350   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18351   ac_status=$?
18352   egrep -v '^ *\+' conftest.er1 >conftest.err
18353   rm -f conftest.er1
18354   cat conftest.err >&5
18355   echo "$as_me:18355: \$? = $ac_status" >&5
18356   (exit $ac_status); } >/dev/null; then
18357   if test -s conftest.err; then
18358     ac_cpp_err=$ac_cxx_preproc_warn_flag
18359   else
18360     ac_cpp_err=
18361   fi
18362 else
18363   ac_cpp_err=yes
18364 fi
18365 if test -z "$ac_cpp_err"; then
18366   eval "$as_ac_Header=yes"
18367 else
18368   echo "$as_me: failed program was:" >&5
18369   cat conftest.$ac_ext >&5
18370   eval "$as_ac_Header=no"
18371 fi
18372 rm -f conftest.err conftest.$ac_ext
18373 fi
18374 echo "$as_me:18374: result: `eval echo '${'$as_ac_Header'}'`" >&5
18375 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18376 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18377   cat >>confdefs.h <<EOF
18378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18379 EOF
18380
18381 fi
18382 done
18383
18384 if test x"$ac_cv_header_iostream" = xyes ; then
18385         echo "$as_me:18385: checking if iostream uses std-namespace" >&5
18386 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18387         cat >conftest.$ac_ext <<_ACEOF
18388 #line 18388 "configure"
18389 #include "confdefs.h"
18390
18391 #include <iostream>
18392 using std::endl;
18393 using std::cerr;
18394 int
18395 main ()
18396 {
18397
18398 cerr << "testing" << endl;
18399
18400   ;
18401   return 0;
18402 }
18403 _ACEOF
18404 rm -f conftest.$ac_objext
18405 if { (eval echo "$as_me:18405: \"$ac_compile\"") >&5
18406   (eval $ac_compile) 2>&5
18407   ac_status=$?
18408   echo "$as_me:18408: \$? = $ac_status" >&5
18409   (exit $ac_status); } &&
18410          { ac_try='test -s conftest.$ac_objext'
18411   { (eval echo "$as_me:18411: \"$ac_try\"") >&5
18412   (eval $ac_try) 2>&5
18413   ac_status=$?
18414   echo "$as_me:18414: \$? = $ac_status" >&5
18415   (exit $ac_status); }; }; then
18416   cf_iostream_namespace=yes
18417 else
18418   echo "$as_me: failed program was:" >&5
18419 cat conftest.$ac_ext >&5
18420 cf_iostream_namespace=no
18421 fi
18422 rm -f conftest.$ac_objext conftest.$ac_ext
18423         echo "$as_me:18423: result: $cf_iostream_namespace" >&5
18424 echo "${ECHO_T}$cf_iostream_namespace" >&6
18425         if test "$cf_iostream_namespace" = yes ; then
18426
18427 cat >>confdefs.h <<\EOF
18428 #define IOSTREAM_NAMESPACE 1
18429 EOF
18430
18431         fi
18432 fi
18433
18434 echo "$as_me:18434: checking if we should include stdbool.h" >&5
18435 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18436
18437 if test "${cf_cv_header_stdbool_h+set}" = set; then
18438   echo $ECHO_N "(cached) $ECHO_C" >&6
18439 else
18440
18441         cat >conftest.$ac_ext <<_ACEOF
18442 #line 18442 "configure"
18443 #include "confdefs.h"
18444
18445 int
18446 main ()
18447 {
18448 bool foo = false
18449   ;
18450   return 0;
18451 }
18452 _ACEOF
18453 rm -f conftest.$ac_objext
18454 if { (eval echo "$as_me:18454: \"$ac_compile\"") >&5
18455   (eval $ac_compile) 2>&5
18456   ac_status=$?
18457   echo "$as_me:18457: \$? = $ac_status" >&5
18458   (exit $ac_status); } &&
18459          { ac_try='test -s conftest.$ac_objext'
18460   { (eval echo "$as_me:18460: \"$ac_try\"") >&5
18461   (eval $ac_try) 2>&5
18462   ac_status=$?
18463   echo "$as_me:18463: \$? = $ac_status" >&5
18464   (exit $ac_status); }; }; then
18465   cf_cv_header_stdbool_h=0
18466 else
18467   echo "$as_me: failed program was:" >&5
18468 cat conftest.$ac_ext >&5
18469 cat >conftest.$ac_ext <<_ACEOF
18470 #line 18470 "configure"
18471 #include "confdefs.h"
18472
18473 #ifndef __BEOS__
18474 #include <stdbool.h>
18475 #endif
18476
18477 int
18478 main ()
18479 {
18480 bool foo = false
18481   ;
18482   return 0;
18483 }
18484 _ACEOF
18485 rm -f conftest.$ac_objext
18486 if { (eval echo "$as_me:18486: \"$ac_compile\"") >&5
18487   (eval $ac_compile) 2>&5
18488   ac_status=$?
18489   echo "$as_me:18489: \$? = $ac_status" >&5
18490   (exit $ac_status); } &&
18491          { ac_try='test -s conftest.$ac_objext'
18492   { (eval echo "$as_me:18492: \"$ac_try\"") >&5
18493   (eval $ac_try) 2>&5
18494   ac_status=$?
18495   echo "$as_me:18495: \$? = $ac_status" >&5
18496   (exit $ac_status); }; }; then
18497   cf_cv_header_stdbool_h=1
18498 else
18499   echo "$as_me: failed program was:" >&5
18500 cat conftest.$ac_ext >&5
18501 cf_cv_header_stdbool_h=0
18502 fi
18503 rm -f conftest.$ac_objext conftest.$ac_ext
18504 fi
18505 rm -f conftest.$ac_objext conftest.$ac_ext
18506 fi
18507
18508 if test "$cf_cv_header_stdbool_h" = 1
18509 then    echo "$as_me:18509: result: yes" >&5
18510 echo "${ECHO_T}yes" >&6
18511 else    echo "$as_me:18511: result: no" >&5
18512 echo "${ECHO_T}no" >&6
18513 fi
18514
18515 echo "$as_me:18515: checking for builtin bool type" >&5
18516 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18517
18518 if test "${cf_cv_builtin_bool+set}" = set; then
18519   echo $ECHO_N "(cached) $ECHO_C" >&6
18520 else
18521
18522         cat >conftest.$ac_ext <<_ACEOF
18523 #line 18523 "configure"
18524 #include "confdefs.h"
18525
18526 #include <stdio.h>
18527 #include <sys/types.h>
18528
18529 int
18530 main ()
18531 {
18532 bool x = false
18533   ;
18534   return 0;
18535 }
18536 _ACEOF
18537 rm -f conftest.$ac_objext
18538 if { (eval echo "$as_me:18538: \"$ac_compile\"") >&5
18539   (eval $ac_compile) 2>&5
18540   ac_status=$?
18541   echo "$as_me:18541: \$? = $ac_status" >&5
18542   (exit $ac_status); } &&
18543          { ac_try='test -s conftest.$ac_objext'
18544   { (eval echo "$as_me:18544: \"$ac_try\"") >&5
18545   (eval $ac_try) 2>&5
18546   ac_status=$?
18547   echo "$as_me:18547: \$? = $ac_status" >&5
18548   (exit $ac_status); }; }; then
18549   cf_cv_builtin_bool=1
18550 else
18551   echo "$as_me: failed program was:" >&5
18552 cat conftest.$ac_ext >&5
18553 cf_cv_builtin_bool=0
18554 fi
18555 rm -f conftest.$ac_objext conftest.$ac_ext
18556
18557 fi
18558
18559 if test "$cf_cv_builtin_bool" = 1
18560 then    echo "$as_me:18560: result: yes" >&5
18561 echo "${ECHO_T}yes" >&6
18562 else    echo "$as_me:18562: result: no" >&5
18563 echo "${ECHO_T}no" >&6
18564 fi
18565
18566 echo "$as_me:18566: checking for size of bool" >&5
18567 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18568 if test "${cf_cv_type_of_bool+set}" = set; then
18569   echo $ECHO_N "(cached) $ECHO_C" >&6
18570 else
18571
18572         rm -f cf_test.out
18573         if test "$cross_compiling" = yes; then
18574   cf_cv_type_of_bool=unknown
18575 else
18576   cat >conftest.$ac_ext <<_ACEOF
18577 #line 18577 "configure"
18578 #include "confdefs.h"
18579
18580 #include <stdlib.h>
18581 #include <stdio.h>
18582
18583 #if defined(__cplusplus)
18584
18585 #ifdef HAVE_GXX_BUILTIN_H
18586 #include <g++/builtin.h>
18587 #elif HAVE_GPP_BUILTIN_H
18588 #include <gpp/builtin.h>
18589 #elif HAVE_BUILTIN_H
18590 #include <builtin.h>
18591 #endif
18592
18593 #else
18594
18595 #if $cf_cv_header_stdbool_h
18596 #include <stdbool.h>
18597 #endif
18598
18599 #endif
18600
18601 main()
18602 {
18603         FILE *fp = fopen("cf_test.out", "w");
18604         if (fp != 0) {
18605                 bool x = true;
18606                 if ((bool)(-x) >= 0)
18607                         fputs("unsigned ", fp);
18608                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18609                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18610                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18611                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18612                 fclose(fp);
18613         }
18614         ${cf_cv_main_return:-return}(0);
18615 }
18616
18617 _ACEOF
18618 rm -f conftest$ac_exeext
18619 if { (eval echo "$as_me:18619: \"$ac_link\"") >&5
18620   (eval $ac_link) 2>&5
18621   ac_status=$?
18622   echo "$as_me:18622: \$? = $ac_status" >&5
18623   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18624   { (eval echo "$as_me:18624: \"$ac_try\"") >&5
18625   (eval $ac_try) 2>&5
18626   ac_status=$?
18627   echo "$as_me:18627: \$? = $ac_status" >&5
18628   (exit $ac_status); }; }; then
18629   cf_cv_type_of_bool=`cat cf_test.out`
18630                  if test -z "$cf_cv_type_of_bool"; then
18631                    cf_cv_type_of_bool=unknown
18632                  fi
18633 else
18634   echo "$as_me: program exited with status $ac_status" >&5
18635 echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 cf_cv_type_of_bool=unknown
18638 fi
18639 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18640 fi
18641
18642 fi
18643
18644         rm -f cf_test.out
18645 echo "$as_me:18645: result: $cf_cv_type_of_bool" >&5
18646 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18647 if test "$cf_cv_type_of_bool" = unknown ; then
18648         case .$NCURSES_BOOL in #(vi
18649         .auto|.) NCURSES_BOOL=unsigned;;
18650         esac
18651         { echo "$as_me:18651: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18652 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18653         cf_cv_type_of_bool=$NCURSES_BOOL
18654 fi
18655
18656 echo "$as_me:18656: checking for special defines needed for etip.h" >&5
18657 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18658 cf_save_CXXFLAGS="$CXXFLAGS"
18659 cf_result="none"
18660
18661 # etip.h includes ncurses.h which includes ncurses_dll.h
18662 # But ncurses_dll.h is generated - fix here.
18663 test -d include || mkdir include
18664 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
18665
18666 for cf_math in "" MATH_H
18667 do
18668 for cf_excp in "" MATH_EXCEPTION
18669 do
18670         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18671         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18672         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18673 cat >conftest.$ac_ext <<_ACEOF
18674 #line 18674 "configure"
18675 #include "confdefs.h"
18676
18677 #include <etip.h.in>
18678
18679 int
18680 main ()
18681 {
18682
18683   ;
18684   return 0;
18685 }
18686 _ACEOF
18687 rm -f conftest.$ac_objext
18688 if { (eval echo "$as_me:18688: \"$ac_compile\"") >&5
18689   (eval $ac_compile) 2>&5
18690   ac_status=$?
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit $ac_status); } &&
18693          { ac_try='test -s conftest.$ac_objext'
18694   { (eval echo "$as_me:18694: \"$ac_try\"") >&5
18695   (eval $ac_try) 2>&5
18696   ac_status=$?
18697   echo "$as_me:18697: \$? = $ac_status" >&5
18698   (exit $ac_status); }; }; then
18699
18700         test -n "$cf_math" && cat >>confdefs.h <<EOF
18701 #define ETIP_NEEDS_${cf_math} 1
18702 EOF
18703
18704         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18705 #define ETIP_NEEDS_${cf_excp} 1
18706 EOF
18707
18708         cf_result="$cf_math $cf_excp"
18709         break 2
18710
18711 else
18712   echo "$as_me: failed program was:" >&5
18713 cat conftest.$ac_ext >&5
18714 fi
18715 rm -f conftest.$ac_objext conftest.$ac_ext
18716 done
18717 done
18718 echo "$as_me:18718: result: $cf_result" >&5
18719 echo "${ECHO_T}$cf_result" >&6
18720 CXXFLAGS="$cf_save_CXXFLAGS"
18721
18722 if test -n "$CXX"; then
18723 echo "$as_me:18723: checking if $CXX accepts parameter initialization" >&5
18724 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18725 if test "${cf_cv_cpp_param_init+set}" = set; then
18726   echo $ECHO_N "(cached) $ECHO_C" >&6
18727 else
18728
18729         ac_ext=cc
18730 ac_cpp='$CXXCPP $CPPFLAGS'
18731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18734 ac_main_return=return
18735
18736         if test "$cross_compiling" = yes; then
18737   cf_cv_cpp_param_init=unknown
18738 else
18739   cat >conftest.$ac_ext <<_ACEOF
18740 #line 18740 "configure"
18741 #include "confdefs.h"
18742
18743 class TEST {
18744 private:
18745         int value;
18746 public:
18747         TEST(int x = 1);
18748         ~TEST();
18749 };
18750
18751 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18752 {
18753         value = x;
18754 }
18755 int main() { }
18756
18757 _ACEOF
18758 rm -f conftest$ac_exeext
18759 if { (eval echo "$as_me:18759: \"$ac_link\"") >&5
18760   (eval $ac_link) 2>&5
18761   ac_status=$?
18762   echo "$as_me:18762: \$? = $ac_status" >&5
18763   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18764   { (eval echo "$as_me:18764: \"$ac_try\"") >&5
18765   (eval $ac_try) 2>&5
18766   ac_status=$?
18767   echo "$as_me:18767: \$? = $ac_status" >&5
18768   (exit $ac_status); }; }; then
18769   cf_cv_cpp_param_init=yes
18770 else
18771   echo "$as_me: program exited with status $ac_status" >&5
18772 echo "$as_me: failed program was:" >&5
18773 cat conftest.$ac_ext >&5
18774 cf_cv_cpp_param_init=no
18775 fi
18776 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18777 fi
18778         ac_ext=cc
18779 ac_cpp='$CXXCPP $CPPFLAGS'
18780 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18781 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18782 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18783 ac_main_return=return
18784
18785 fi
18786 echo "$as_me:18786: result: $cf_cv_cpp_param_init" >&5
18787 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18788 fi
18789 test "$cf_cv_cpp_param_init" = yes &&
18790 cat >>confdefs.h <<\EOF
18791 #define CPP_HAS_PARAM_INIT 1
18792 EOF
18793
18794 if test -n "$CXX"; then
18795
18796 echo "$as_me:18796: checking if $CXX accepts static_cast" >&5
18797 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18798 if test "${cf_cv_cpp_static_cast+set}" = set; then
18799   echo $ECHO_N "(cached) $ECHO_C" >&6
18800 else
18801
18802         ac_ext=cc
18803 ac_cpp='$CXXCPP $CPPFLAGS'
18804 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18805 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18806 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18807 ac_main_return=return
18808
18809         cat >conftest.$ac_ext <<_ACEOF
18810 #line 18810 "configure"
18811 #include "confdefs.h"
18812
18813 class NCursesPanel
18814 {
18815 public:
18816   NCursesPanel(int nlines,
18817                int ncols,
18818                int begin_y = 0,
18819                int begin_x = 0)
18820   {
18821   }
18822
18823   ~NCursesPanel();
18824 };
18825
18826 template<class T> class NCursesUserPanel : public NCursesPanel
18827 {
18828 public:
18829   NCursesUserPanel (int nlines,
18830                     int ncols,
18831                     int begin_y = 0,
18832                     int begin_x = 0,
18833                     const T* p_UserData = static_cast<T*>(0))
18834     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18835   {
18836   };
18837   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18838   {
18839   };
18840
18841   virtual ~NCursesUserPanel() {};
18842 };
18843
18844 int
18845 main ()
18846 {
18847
18848         const char* p_UserData = static_cast<char*>(0)
18849   ;
18850   return 0;
18851 }
18852 _ACEOF
18853 rm -f conftest.$ac_objext
18854 if { (eval echo "$as_me:18854: \"$ac_compile\"") >&5
18855   (eval $ac_compile) 2>&5
18856   ac_status=$?
18857   echo "$as_me:18857: \$? = $ac_status" >&5
18858   (exit $ac_status); } &&
18859          { ac_try='test -s conftest.$ac_objext'
18860   { (eval echo "$as_me:18860: \"$ac_try\"") >&5
18861   (eval $ac_try) 2>&5
18862   ac_status=$?
18863   echo "$as_me:18863: \$? = $ac_status" >&5
18864   (exit $ac_status); }; }; then
18865   cf_cv_cpp_static_cast=yes
18866 else
18867   echo "$as_me: failed program was:" >&5
18868 cat conftest.$ac_ext >&5
18869 cf_cv_cpp_static_cast=no
18870 fi
18871 rm -f conftest.$ac_objext conftest.$ac_ext
18872
18873         ac_ext=cc
18874 ac_cpp='$CXXCPP $CPPFLAGS'
18875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18878 ac_main_return=return
18879
18880 fi
18881 echo "$as_me:18881: result: $cf_cv_cpp_static_cast" >&5
18882 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18883
18884 fi
18885
18886 test "$cf_cv_cpp_static_cast" = yes &&
18887 cat >>confdefs.h <<\EOF
18888 #define CPP_HAS_STATIC_CAST 1
18889 EOF
18890
18891         CXX_AR='$(AR)'
18892         CXX_ARFLAGS='$(ARFLAGS)'
18893         case $cf_cv_system_name in #(vi
18894         irix*) #(vi
18895             if test "$GXX" != yes ; then
18896                 CXX_AR='$(CXX)'
18897                 CXX_ARFLAGS='-ar -o'
18898             fi
18899             ;;
18900         sco3.2v5*) #(vi
18901             CXXLDFLAGS="-u main"
18902             ;;
18903         solaris2*)
18904             if test "$GXX" != yes ; then
18905                 CXX_AR='$(CXX)'
18906                 CXX_ARFLAGS='-xar -o'
18907             fi
18908             ;;
18909         esac
18910
18911 else
18912         cf_cxx_library=no
18913         cf_cv_builtin_bool=1
18914
18915         # Just because we are not configuring against C++ right now does not
18916         # mean that a user will not want to use C++.  Some distributors disable
18917         # the C++ portion of this configuration as a shortcut (or just to avoid
18918         # compiling the demo in the c++ directory).  So we need a reasonable
18919         # default for the 'bool' type.
18920         #
18921         # Caveat: since the storage of the bool type is not standardized, it
18922         # may change.
18923
18924         if test "$NCURSES_BOOL" != auto ; then
18925                 cf_cv_type_of_bool=$NCURSES_BOOL
18926                 cf_cv_header_stdbool_h=0
18927         else
18928                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18929
18930 echo "$as_me:18930: checking for size of bool" >&5
18931 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18932 if test "${cf_cv_type_of_bool+set}" = set; then
18933   echo $ECHO_N "(cached) $ECHO_C" >&6
18934 else
18935
18936         rm -f cf_test.out
18937         if test "$cross_compiling" = yes; then
18938   cf_cv_type_of_bool=unknown
18939 else
18940   cat >conftest.$ac_ext <<_ACEOF
18941 #line 18941 "configure"
18942 #include "confdefs.h"
18943
18944 #include <stdlib.h>
18945 #include <stdio.h>
18946
18947 #if defined(__cplusplus)
18948
18949 #ifdef HAVE_GXX_BUILTIN_H
18950 #include <g++/builtin.h>
18951 #elif HAVE_GPP_BUILTIN_H
18952 #include <gpp/builtin.h>
18953 #elif HAVE_BUILTIN_H
18954 #include <builtin.h>
18955 #endif
18956
18957 #else
18958
18959 #if $cf_cv_header_stdbool_h
18960 #include <stdbool.h>
18961 #endif
18962
18963 #endif
18964
18965 main()
18966 {
18967         FILE *fp = fopen("cf_test.out", "w");
18968         if (fp != 0) {
18969                 bool x = true;
18970                 if ((bool)(-x) >= 0)
18971                         fputs("unsigned ", fp);
18972                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18973                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18974                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18975                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18976                 fclose(fp);
18977         }
18978         ${cf_cv_main_return:-return}(0);
18979 }
18980
18981 _ACEOF
18982 rm -f conftest$ac_exeext
18983 if { (eval echo "$as_me:18983: \"$ac_link\"") >&5
18984   (eval $ac_link) 2>&5
18985   ac_status=$?
18986   echo "$as_me:18986: \$? = $ac_status" >&5
18987   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18988   { (eval echo "$as_me:18988: \"$ac_try\"") >&5
18989   (eval $ac_try) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); }; }; then
18993   cf_cv_type_of_bool=`cat cf_test.out`
18994                  if test -z "$cf_cv_type_of_bool"; then
18995                    cf_cv_type_of_bool=unknown
18996                  fi
18997 else
18998   echo "$as_me: program exited with status $ac_status" >&5
18999 echo "$as_me: failed program was:" >&5
19000 cat conftest.$ac_ext >&5
19001 cf_cv_type_of_bool=unknown
19002 fi
19003 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19004 fi
19005
19006 fi
19007
19008         rm -f cf_test.out
19009 echo "$as_me:19009: result: $cf_cv_type_of_bool" >&5
19010 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19011 if test "$cf_cv_type_of_bool" = unknown ; then
19012         case .$NCURSES_BOOL in #(vi
19013         .auto|.) NCURSES_BOOL=unsigned;;
19014         esac
19015         { echo "$as_me:19015: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19016 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19017         cf_cv_type_of_bool=$NCURSES_BOOL
19018 fi
19019
19020                 else
19021                         echo "$as_me:19021: checking for fallback type of bool" >&5
19022 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19023                         case "$host_cpu" in #(vi
19024                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19025                         *)      cf_cv_type_of_bool=int  ;;
19026                         esac
19027                         echo "$as_me:19027: result: $cf_cv_type_of_bool" >&5
19028 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19029                 fi
19030         fi
19031 fi
19032
19033 # If the C compiler did not declare bool, and we did not determine that the C++
19034 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19035 # ncurses library use the same type as C++ bool.  Note that this allows one to
19036 # specify the type of bool in a configure-script option and postpone
19037 # integration with the C++ compiler provided that the types are compatible.
19038 USE_CXX_BOOL=1
19039 if test $cf_cv_cc_bool_type = 1
19040 then
19041         # oops: C has a bool.  Unlikely, but C++ could differ.
19042         USE_CXX_BOOL=0
19043 elif test $cf_cv_builtin_bool = 0
19044 then
19045         # C++ has no bool
19046         USE_CXX_BOOL=0
19047 else
19048         # this is the normal case
19049         USE_CXX_BOOL='defined(__cplusplus)'
19050 fi
19051
19052 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19053
19054         if test "$cf_with_ada" != "no" ; then
19055                 if test "$with_libtool" != "no"; then
19056                         { echo "$as_me:19056: WARNING: libtool does not support Ada - disabling feature" >&5
19057 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19058                         cf_with_ada=no
19059                 fi
19060         fi
19061
19062         if test "$cf_with_ada" != "no" ; then
19063
19064 cf_ada_make=gnatmake
19065 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19066 set dummy $cf_ada_make; ac_word=$2
19067 echo "$as_me:19067: checking for $ac_word" >&5
19068 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19069 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19070   echo $ECHO_N "(cached) $ECHO_C" >&6
19071 else
19072   if test -n "$gnat_exists"; then
19073   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19074 else
19075   ac_save_IFS=$IFS; IFS=$ac_path_separator
19076 ac_dummy="$PATH"
19077 for ac_dir in $ac_dummy; do
19078   IFS=$ac_save_IFS
19079   test -z "$ac_dir" && ac_dir=.
19080   $as_executable_p "$ac_dir/$ac_word" || continue
19081 ac_cv_prog_gnat_exists="yes"
19082 echo "$as_me:19082: found $ac_dir/$ac_word" >&5
19083 break
19084 done
19085
19086   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19087 fi
19088 fi
19089 gnat_exists=$ac_cv_prog_gnat_exists
19090 if test -n "$gnat_exists"; then
19091   echo "$as_me:19091: result: $gnat_exists" >&5
19092 echo "${ECHO_T}$gnat_exists" >&6
19093 else
19094   echo "$as_me:19094: result: no" >&5
19095 echo "${ECHO_T}no" >&6
19096 fi
19097
19098 if test "$ac_cv_prog_gnat_exists" = no; then
19099    cf_ada_make=
19100    cf_cv_prog_gnat_correct=no
19101 else
19102
19103 echo "$as_me:19103: checking for gnat version" >&5
19104 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19105 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19106         grep '[0-9].[0-9][0-9]*' |\
19107     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19108 echo "$as_me:19108: result: $cf_gnat_version" >&5
19109 echo "${ECHO_T}$cf_gnat_version" >&6
19110
19111 case $cf_gnat_version in #(vi
19112 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19113         cf_cv_prog_gnat_correct=yes
19114         ;;
19115 *)
19116         { echo "$as_me:19116: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19117 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19118         cf_cv_prog_gnat_correct=no
19119         ;;
19120 esac
19121
19122    # Extract the first word of "m4", so it can be a program name with args.
19123 set dummy m4; ac_word=$2
19124 echo "$as_me:19124: checking for $ac_word" >&5
19125 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19126 if test "${ac_cv_prog_M4_exists+set}" = set; then
19127   echo $ECHO_N "(cached) $ECHO_C" >&6
19128 else
19129   if test -n "$M4_exists"; then
19130   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19131 else
19132   ac_save_IFS=$IFS; IFS=$ac_path_separator
19133 ac_dummy="$PATH"
19134 for ac_dir in $ac_dummy; do
19135   IFS=$ac_save_IFS
19136   test -z "$ac_dir" && ac_dir=.
19137   $as_executable_p "$ac_dir/$ac_word" || continue
19138 ac_cv_prog_M4_exists="yes"
19139 echo "$as_me:19139: found $ac_dir/$ac_word" >&5
19140 break
19141 done
19142
19143   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19144 fi
19145 fi
19146 M4_exists=$ac_cv_prog_M4_exists
19147 if test -n "$M4_exists"; then
19148   echo "$as_me:19148: result: $M4_exists" >&5
19149 echo "${ECHO_T}$M4_exists" >&6
19150 else
19151   echo "$as_me:19151: result: no" >&5
19152 echo "${ECHO_T}no" >&6
19153 fi
19154
19155    if test "$ac_cv_prog_M4_exists" = no; then
19156       cf_cv_prog_gnat_correct=no
19157       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19158    fi
19159    if test "$cf_cv_prog_gnat_correct" = yes; then
19160       echo "$as_me:19160: checking if GNAT works" >&5
19161 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19162
19163 rm -rf conftest* *~conftest*
19164 cat >>conftest.ads <<CF_EOF
19165 procedure conftest;
19166 CF_EOF
19167 cat >>conftest.adb <<CF_EOF
19168 with Text_IO;
19169 with GNAT.OS_Lib;
19170 procedure conftest is
19171 begin
19172    Text_IO.Put ("Hello World");
19173    Text_IO.New_Line;
19174    GNAT.OS_Lib.OS_Exit (0);
19175 end conftest;
19176 CF_EOF
19177 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19178    if ( ./conftest 1>&5 2>&1 ) ; then
19179       cf_cv_prog_gnat_correct=yes
19180    else
19181       cf_cv_prog_gnat_correct=no
19182    fi
19183 else
19184    cf_cv_prog_gnat_correct=no
19185 fi
19186 rm -rf conftest* *~conftest*
19187
19188       echo "$as_me:19188: result: $cf_cv_prog_gnat_correct" >&5
19189 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19190    fi
19191 fi
19192
19193                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19194
19195         ADAFLAGS="$ADAFLAGS -gnatpn"
19196
19197         echo "$as_me:19197: checking optimization options for ADAFLAGS" >&5
19198 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19199         case "$CFLAGS" in
19200         *-g*)
19201
19202         ADAFLAGS="$ADAFLAGS -g"
19203
19204                 ;;
19205         esac
19206         case "$CFLAGS" in
19207         *-O*)
19208                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19209
19210         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19211
19212                 ;;
19213         esac
19214         echo "$as_me:19214: result: $ADAFLAGS" >&5
19215 echo "${ECHO_T}$ADAFLAGS" >&6
19216
19217 echo "$as_me:19217: checking if GNAT supports generics" >&5
19218 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19219 case $cf_gnat_version in #(vi
19220 3.[1-9]*|[4-9].*) #(vi
19221         cf_gnat_generics=yes
19222         ;;
19223 *)
19224         cf_gnat_generics=no
19225         ;;
19226 esac
19227 echo "$as_me:19227: result: $cf_gnat_generics" >&5
19228 echo "${ECHO_T}$cf_gnat_generics" >&6
19229
19230 if test "$cf_gnat_generics" = yes
19231 then
19232         cf_compile_generics=generics
19233         cf_generic_objects="\${GENOBJS}"
19234 else
19235         cf_compile_generics=
19236         cf_generic_objects=
19237 fi
19238
19239 echo "$as_me:19239: checking if GNAT supports SIGINT" >&5
19240 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19241 if test "${cf_cv_gnat_sigint+set}" = set; then
19242   echo $ECHO_N "(cached) $ECHO_C" >&6
19243 else
19244
19245 rm -rf conftest* *~conftest*
19246 cat >>conftest.ads <<CF_EOF
19247 with Ada.Interrupts.Names;
19248
19249 package ConfTest is
19250
19251    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19252    pragma Unreserve_All_Interrupts;
19253    pragma Warnings (On);
19254
19255    protected Process is
19256       procedure Stop;
19257       function Continue return Boolean;
19258       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19259    private
19260       Done : Boolean := False;
19261    end Process;
19262
19263 end ConfTest;
19264 CF_EOF
19265 cat >>conftest.adb <<CF_EOF
19266 package body ConfTest is
19267    protected body Process is
19268       procedure Stop is
19269       begin
19270          Done := True;
19271       end Stop;
19272       function Continue return Boolean is
19273       begin
19274          return not Done;
19275       end Continue;
19276    end Process;
19277 end ConfTest;
19278 CF_EOF
19279 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19280       cf_cv_gnat_sigint=yes
19281 else
19282    cf_cv_gnat_sigint=no
19283 fi
19284 rm -rf conftest* *~conftest*
19285
19286 fi
19287 echo "$as_me:19287: result: $cf_cv_gnat_sigint" >&5
19288 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19289
19290 if test $cf_cv_gnat_sigint = yes ; then
19291         USE_GNAT_SIGINT=""
19292 else
19293         USE_GNAT_SIGINT="#"
19294 fi
19295
19296 echo "$as_me:19296: checking if GNAT pragma Unreferenced works" >&5
19297 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19298 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19299   echo $ECHO_N "(cached) $ECHO_C" >&6
19300 else
19301
19302 rm -rf conftest* *~conftest*
19303 cat >>conftest.ads <<CF_EOF
19304 procedure conftest;
19305 CF_EOF
19306 cat >>conftest.adb <<CF_EOF
19307 with Text_IO;
19308 with GNAT.OS_Lib;
19309 procedure conftest is
19310    test : Integer;
19311    pragma Unreferenced (test);
19312 begin
19313    test := 1;
19314    Text_IO.Put ("Hello World");
19315    Text_IO.New_Line;
19316    GNAT.OS_Lib.OS_Exit (0);
19317 end conftest;
19318 CF_EOF
19319 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19320       cf_cv_pragma_unreferenced=yes
19321 else
19322    cf_cv_pragma_unreferenced=no
19323 fi
19324 rm -rf conftest* *~conftest*
19325
19326 fi
19327 echo "$as_me:19327: result: $cf_cv_pragma_unreferenced" >&5
19328 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19329
19330 # if the pragma is supported, use it (needed in the Trace code).
19331 if test $cf_cv_pragma_unreferenced = yes ; then
19332         PRAGMA_UNREF=TRUE
19333 else
19334         PRAGMA_UNREF=FALSE
19335 fi
19336
19337 cf_gnat_libraries=no
19338 cf_gnat_projects=no
19339
19340 echo "$as_me:19340: checking if GNAT supports project files" >&5
19341 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19342 case $cf_gnat_version in #(vi
19343 3.[0-9]*) #(vi
19344         ;;
19345 *)
19346         case $cf_cv_system_name in #(vi
19347         cygwin*) #(vi
19348                 ;;
19349         *)
19350                 mkdir conftest.src conftest.bin conftest.lib
19351                 cd conftest.src
19352                 rm -rf conftest* *~conftest*
19353                 cat >>library.gpr <<CF_EOF
19354 project Library is
19355   Kind := External ("LIB_KIND");
19356   for Library_Name use "ConfTest";
19357   for Object_Dir use ".";
19358   for Library_ALI_Dir use External("LIBRARY_DIR");
19359   for Library_Version use External ("SONAME");
19360   for Library_Kind use Kind;
19361   for Library_Dir use External("BUILD_DIR");
19362   Source_Dir := External ("SOURCE_DIR");
19363   for Source_Dirs use (Source_Dir);
19364   package Compiler is
19365      for Default_Switches ("Ada") use
19366        ("-g",
19367         "-O2",
19368         "-gnatafno",
19369         "-gnatVa",   -- All validity checks
19370         "-gnatwa");  -- Activate all optional errors
19371   end Compiler;
19372 end Library;
19373 CF_EOF
19374                 cat >>confpackage.ads <<CF_EOF
19375 package ConfPackage is
19376    procedure conftest;
19377 end ConfPackage;
19378 CF_EOF
19379                 cat >>confpackage.adb <<CF_EOF
19380 with Text_IO;
19381 package body ConfPackage is
19382    procedure conftest is
19383    begin
19384       Text_IO.Put ("Hello World");
19385       Text_IO.New_Line;
19386    end conftest;
19387 end ConfPackage;
19388 CF_EOF
19389                 if ( $cf_ada_make $ADAFLAGS \
19390                                 -Plibrary.gpr \
19391                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19392                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19393                                 -XSOURCE_DIR=`pwd` \
19394                                 -XSONAME=libConfTest.so.1 \
19395                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19396                         cf_gnat_projects=yes
19397                 fi
19398                 cd ..
19399                 if test -f conftest.lib/confpackage.ali
19400                 then
19401                         cf_gnat_libraries=yes
19402                 fi
19403                 rm -rf conftest* *~conftest*
19404                 ;;
19405         esac
19406         ;;
19407 esac
19408 echo "$as_me:19408: result: $cf_gnat_projects" >&5
19409 echo "${ECHO_T}$cf_gnat_projects" >&6
19410
19411 if test $cf_gnat_projects = yes
19412 then
19413         echo "$as_me:19413: checking if GNAT supports libraries" >&5
19414 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19415         echo "$as_me:19415: result: $cf_gnat_libraries" >&5
19416 echo "${ECHO_T}$cf_gnat_libraries" >&6
19417 fi
19418
19419 if test "$cf_gnat_projects" = yes
19420 then
19421         USE_OLD_MAKERULES="#"
19422         USE_GNAT_PROJECTS=""
19423 else
19424         USE_OLD_MAKERULES=""
19425         USE_GNAT_PROJECTS="#"
19426 fi
19427
19428 if test "$cf_gnat_libraries" = yes
19429 then
19430         USE_GNAT_LIBRARIES=""
19431 else
19432         USE_GNAT_LIBRARIES="#"
19433 fi
19434
19435 echo "$as_me:19435: checking for ada-compiler" >&5
19436 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19437
19438 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19439 if test "${with_ada_compiler+set}" = set; then
19440   withval="$with_ada_compiler"
19441   cf_ada_compiler=$withval
19442 else
19443   cf_ada_compiler=gnatmake
19444 fi;
19445
19446 echo "$as_me:19446: result: $cf_ada_compiler" >&5
19447 echo "${ECHO_T}$cf_ada_compiler" >&6
19448
19449                         cf_ada_package=terminal_interface
19450
19451 echo "$as_me:19451: checking for ada-include" >&5
19452 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19453
19454 # Check whether --with-ada-include or --without-ada-include was given.
19455 if test "${with_ada_include+set}" = set; then
19456   withval="$with_ada_include"
19457
19458 else
19459   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19460 fi; if test -n "$prefix/share/ada/adainclude" ; then
19461
19462 if test "x$prefix" != xNONE; then
19463   cf_path_syntax="$prefix"
19464 else
19465   cf_path_syntax="$ac_default_prefix"
19466 fi
19467
19468 case ".$withval" in #(vi
19469 .\$\(*\)*|.\'*\'*) #(vi
19470   ;;
19471 ..|./*|.\\*) #(vi
19472   ;;
19473 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19474   ;;
19475 .\${*prefix}*|.\${*dir}*) #(vi
19476   eval withval="$withval"
19477   case ".$withval" in #(vi
19478   .NONE/*)
19479     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19480     ;;
19481   esac
19482   ;; #(vi
19483 .no|.NONE/*)
19484   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19485   ;;
19486 *)
19487   { { echo "$as_me:19487: error: expected a pathname, not \"$withval\"" >&5
19488 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19489    { (exit 1); exit 1; }; }
19490   ;;
19491 esac
19492
19493 fi
19494 eval ADA_INCLUDE="$withval"
19495
19496 echo "$as_me:19496: result: $ADA_INCLUDE" >&5
19497 echo "${ECHO_T}$ADA_INCLUDE" >&6
19498
19499 echo "$as_me:19499: checking for ada-objects" >&5
19500 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19501
19502 # Check whether --with-ada-objects or --without-ada-objects was given.
19503 if test "${with_ada_objects+set}" = set; then
19504   withval="$with_ada_objects"
19505
19506 else
19507   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19508 fi; if test -n "$prefix/lib/ada/adalib" ; then
19509
19510 if test "x$prefix" != xNONE; then
19511   cf_path_syntax="$prefix"
19512 else
19513   cf_path_syntax="$ac_default_prefix"
19514 fi
19515
19516 case ".$withval" in #(vi
19517 .\$\(*\)*|.\'*\'*) #(vi
19518   ;;
19519 ..|./*|.\\*) #(vi
19520   ;;
19521 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19522   ;;
19523 .\${*prefix}*|.\${*dir}*) #(vi
19524   eval withval="$withval"
19525   case ".$withval" in #(vi
19526   .NONE/*)
19527     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19528     ;;
19529   esac
19530   ;; #(vi
19531 .no|.NONE/*)
19532   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19533   ;;
19534 *)
19535   { { echo "$as_me:19535: error: expected a pathname, not \"$withval\"" >&5
19536 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19537    { (exit 1); exit 1; }; }
19538   ;;
19539 esac
19540
19541 fi
19542 eval ADA_OBJECTS="$withval"
19543
19544 echo "$as_me:19544: result: $ADA_OBJECTS" >&5
19545 echo "${ECHO_T}$ADA_OBJECTS" >&6
19546
19547 echo "$as_me:19547: checking if an Ada95 shared-library should be built" >&5
19548 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19549
19550 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19551 if test "${with_ada_sharedlib+set}" = set; then
19552   withval="$with_ada_sharedlib"
19553   with_ada_sharedlib=$withval
19554 else
19555   with_ada_sharedlib=no
19556 fi;
19557 echo "$as_me:19557: result: $with_ada_sharedlib" >&5
19558 echo "${ECHO_T}$with_ada_sharedlib" >&6
19559
19560 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19561 MAKE_ADA_SHAREDLIB="#"
19562
19563 if test "x$with_ada_sharedlib" != xno
19564 then
19565         MAKE_ADA_SHAREDLIB=
19566         if test "x$with_ada_sharedlib" != xyes
19567         then
19568                 ADA_SHAREDLIB="$with_ada_sharedlib"
19569         fi
19570 fi
19571
19572                 fi
19573         fi
19574 else
19575         cf_with_ada=no
19576 fi
19577
19578 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19579 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19580 ###
19581 ### ticlib modules may be a separate library, otherwise contained in termlib.
19582 ### termlib modules may be a separate library, otherwise contained in ncurses.
19583 ###
19584 ### The of "+" or " " between the tokens controls the way the script
19585 ### chooses to split module lists into libraries.
19586 ###
19587 ### (see CF_LIB_RULES).
19588 echo "$as_me:19588: checking for library subsets" >&5
19589 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19590 LIB_SUBSETS=
19591
19592 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19593         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19594         if test "$with_ticlib" != no ; then
19595                 LIB_SUBSETS="${LIB_SUBSETS} "
19596         else
19597                 LIB_SUBSETS="${LIB_SUBSETS}+"
19598         fi
19599 fi
19600
19601 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19602 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19603
19604 if test "$with_termlib" != no ; then
19605         LIB_SUBSETS="${LIB_SUBSETS} "
19606 else
19607         LIB_SUBSETS="${LIB_SUBSETS}+"
19608 fi
19609
19610 LIB_SUBSETS="${LIB_SUBSETS}base"
19611
19612 # Most term-driver calls are to tinfo, but some like init_pair are to the
19613 # base library (so it resides in base).
19614 if test "$with_term_driver" != no ; then
19615         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19616         case $cf_cv_system_name in #(vi
19617         *mingw32*) #(vi
19618                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19619                 ;;
19620         *) #(vi
19621                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19622                 ;;
19623         esac
19624 fi
19625
19626 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19627 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19628
19629 echo "$as_me:19629: result: $LIB_SUBSETS" >&5
19630 echo "${ECHO_T}$LIB_SUBSETS" >&6
19631
19632 ### Construct the list of include-directories to be generated
19633
19634 CPPFLAGS="$CPPFLAGS -I. -I../include"
19635 if test "$srcdir" != "."; then
19636         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19637 fi
19638 if test "$GCC" != yes; then
19639         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19640 elif test "$includedir" != "/usr/include"; then
19641         if test "$includedir" = '${prefix}/include' ; then
19642                 if test $prefix != /usr ; then
19643                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19644                 fi
19645         else
19646                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19647         fi
19648 fi
19649
19650 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19651 if test "$srcdir" != "."; then
19652         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19653 fi
19654 if test "$GCC" != yes; then
19655         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19656 elif test "$includedir" != "/usr/include"; then
19657         if test "$includedir" = '${prefix}/include' ; then
19658                 if test $prefix != /usr ; then
19659                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19660                 fi
19661         else
19662                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19663         fi
19664 fi
19665
19666 ### Build up pieces for makefile rules
19667 echo "$as_me:19667: checking default library suffix" >&5
19668 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19669
19670         case $DFT_LWR_MODEL in
19671         libtool) DFT_ARG_SUFFIX=''   ;;
19672         normal)  DFT_ARG_SUFFIX=''   ;;
19673         debug)   DFT_ARG_SUFFIX='_g' ;;
19674         profile) DFT_ARG_SUFFIX='_p' ;;
19675         shared)  DFT_ARG_SUFFIX=''   ;;
19676         esac
19677         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19678 echo "$as_me:19678: result: $DFT_ARG_SUFFIX" >&5
19679 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19680
19681 echo "$as_me:19681: checking default library-dependency suffix" >&5
19682 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19683
19684         case $DFT_LWR_MODEL in #(vi
19685         libtool) #(vi
19686                 DFT_LIB_SUFFIX='.la'
19687                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19688                 ;;
19689         normal) #(vi
19690                 DFT_LIB_SUFFIX='.a'
19691                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19692                 ;;
19693         debug) #(vi
19694                 DFT_LIB_SUFFIX='_g.a'
19695                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19696                 ;;
19697         profile) #(vi
19698                 DFT_LIB_SUFFIX='_p.a'
19699                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19700                 ;;
19701         shared) #(vi
19702                 case $cf_cv_system_name in
19703                 aix[5-7]*) #(vi
19704                         DFT_LIB_SUFFIX='.a'
19705                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19706                         ;;
19707                 cygwin*|mingw*) #(vi
19708                         DFT_LIB_SUFFIX='.dll'
19709                         DFT_DEP_SUFFIX='.dll.a'
19710                         ;;
19711                 darwin*) #(vi
19712                         DFT_LIB_SUFFIX='.dylib'
19713                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19714                         ;;
19715                 hpux*) #(vi
19716                         case $target in
19717                         ia64*) #(vi
19718                                 DFT_LIB_SUFFIX='.so'
19719                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19720                                 ;;
19721                         *) #(vi
19722                                 DFT_LIB_SUFFIX='.sl'
19723                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19724                                 ;;
19725                         esac
19726                         ;;
19727                 *)      DFT_LIB_SUFFIX='.so'
19728                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19729                         ;;
19730                 esac
19731         esac
19732         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19733         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19734 echo "$as_me:19734: result: $DFT_DEP_SUFFIX" >&5
19735 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19736
19737 echo "$as_me:19737: checking default object directory" >&5
19738 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19739
19740         case $DFT_LWR_MODEL in
19741         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19742         normal)  DFT_OBJ_SUBDIR='objects' ;;
19743         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19744         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19745         shared)
19746                 case $cf_cv_system_name in #(vi
19747                 cygwin) #(vi
19748                         DFT_OBJ_SUBDIR='objects' ;;
19749                 *)
19750                         DFT_OBJ_SUBDIR='obj_s' ;;
19751                 esac
19752         esac
19753 echo "$as_me:19753: result: $DFT_OBJ_SUBDIR" >&5
19754 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19755
19756 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19757 if test "x$cf_with_cxx" = xyes ; then
19758 echo "$as_me:19758: checking c++ library-dependency suffix" >&5
19759 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19760 if test "$with_libtool" != "no"; then
19761         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19762 else
19763
19764         case normal in #(vi
19765         libtool) #(vi
19766                 CXX_LIB_SUFFIX='.la'
19767                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19768                 ;;
19769         normal) #(vi
19770                 CXX_LIB_SUFFIX='.a'
19771                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19772                 ;;
19773         debug) #(vi
19774                 CXX_LIB_SUFFIX='_g.a'
19775                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19776                 ;;
19777         profile) #(vi
19778                 CXX_LIB_SUFFIX='_p.a'
19779                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19780                 ;;
19781         shared) #(vi
19782                 case $cf_cv_system_name in
19783                 aix[5-7]*) #(vi
19784                         CXX_LIB_SUFFIX='.a'
19785                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19786                         ;;
19787                 cygwin*|mingw*) #(vi
19788                         CXX_LIB_SUFFIX='.dll'
19789                         CXX_DEP_SUFFIX='.dll.a'
19790                         ;;
19791                 darwin*) #(vi
19792                         CXX_LIB_SUFFIX='.dylib'
19793                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19794                         ;;
19795                 hpux*) #(vi
19796                         case $target in
19797                         ia64*) #(vi
19798                                 CXX_LIB_SUFFIX='.so'
19799                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19800                                 ;;
19801                         *) #(vi
19802                                 CXX_LIB_SUFFIX='.sl'
19803                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19804                                 ;;
19805                         esac
19806                         ;;
19807                 *)      CXX_LIB_SUFFIX='.so'
19808                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19809                         ;;
19810                 esac
19811         esac
19812         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19813         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19814 fi
19815 echo "$as_me:19815: result: $CXX_LIB_SUFFIX" >&5
19816 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19817
19818 fi
19819
19820 # do not want -ldl in build except as needed for -lncurses dependency
19821 if test "x$with_dlsym" = xyes ; then
19822 if test $DFT_LWR_MODEL = shared || \
19823    test $DFT_LWR_MODEL = libtool ; then
19824
19825 # remove dl library from $LIBS
19826 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19827
19828 fi
19829 fi
19830 ### Set up low-level terminfo dependencies for makefiles.
19831
19832 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19833 # do not need libdl
19834 TICS_LIST=
19835 if test "x$with_dlsym" = xyes ; then
19836
19837 # remove dl library from $SHLIB_LIST
19838 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19839
19840 fi
19841
19842 if test "$with_ticlib" != no ; then
19843
19844         if test "x$with_ticlib" != xyes ; then
19845                 TICS_NAME=$with_ticlib
19846                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19847                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19848                 TICS_LIB_SUFFIX="${with_ticlib}"
19849         else
19850                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19851                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19852                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19853         fi
19854         TICS_LDFLAGS="-L${LIB_DIR}"
19855         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19856 else
19857         TICS_LDFLAGS="-L${LIB_DIR}"
19858         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19859 fi
19860
19861 if test "$with_termlib" != no ; then
19862
19863         if test "x$with_termlib" != xyes ; then
19864                 TINFO_NAME=$with_termlib
19865                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19866                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19867                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19868                 TINFO_LIB_SUFFIX="${with_termlib}"
19869         else
19870                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19871                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19872                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19873                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19874         fi
19875
19876         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19877         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19878         if test "$DFT_LWR_MODEL" = "libtool"; then
19879                 TEST_ARGS="${TEST_DEPS}"
19880                 TEST_ARG2="${TEST_DEP2}"
19881                 TINFO_LDFLAGS="-L${LIB_DIR}"
19882                 TINFO_LIBS="$TEST_ARGS"
19883                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19884                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19885         else
19886                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19887                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19888                 if test "x$with_term_driver" != xno ; then
19889                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19890                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19891                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19892                 else
19893                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19894                         TINFO_LIBS="$TEST_ARGS"
19895                 fi
19896                 TINFO_LDFLAGS="-L${LIB_DIR}"
19897                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19898         fi
19899 else
19900         # the next lines are needed for linking libtic over libncurses
19901         TINFO_NAME=${LIB_NAME}
19902         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19903         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19904         if test "x$with_tic_depends" = xyes ; then
19905                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19906         else
19907                 TICS_LIST="$SHLIB_LIST"
19908         fi
19909
19910         TINFO_LDFLAGS="-L${LIB_DIR}"
19911         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19912 fi
19913
19914 if test "$DFT_LWR_MODEL" = shared ; then
19915         case $cf_cv_system_name in #(vi
19916         cygwin*)
19917                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19918                 TINFO_SUFFIX=.dll
19919                 ;;
19920         esac
19921 fi
19922
19923 if test "x$with_dlsym" = xyes ; then
19924
19925 # remove dl library from $TICS_LIST
19926 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19927
19928 fi
19929
19930 if test "$DFT_LWR_MODEL" = "libtool"; then
19931     OBJEXT=lo
19932 fi
19933
19934 # needed for Ada95
19935 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19936
19937 case $DFT_LWR_MODEL in
19938 normal|debug|profile)
19939
19940 if test "$GCC" = yes ; then
19941         case $cf_cv_system_name in #(
19942         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19943                 LDFLAGS_STATIC=
19944                 LDFLAGS_SHARED=
19945                 ;;
19946     *)  #( normally, except when broken
19947         LDFLAGS_STATIC=-static
19948         LDFLAGS_SHARED=-dynamic
19949         ;;
19950     esac
19951 else
19952         case $cf_cv_system_name in #(
19953         aix[4-7]*)      #( from ld manpage
19954                 LDFLAGS_STATIC=-bstatic
19955                 LDFLAGS_SHARED=-bdynamic
19956                 ;;
19957         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19958                 # We could also use just "archive" and "shared".
19959                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19960                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19961                 ;;
19962         irix*)          #( from ld manpage IRIX64
19963                 LDFLAGS_STATIC=-Bstatic
19964                 LDFLAGS_SHARED=-Bdynamic
19965                 ;;
19966         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19967                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19968                 LDFLAGS_STATIC=-noso
19969                 LDFLAGS_SHARED=-so_archive
19970                 ;;
19971         solaris2*)
19972                 LDFLAGS_STATIC=-Bstatic
19973                 LDFLAGS_SHARED=-Bdynamic
19974                 ;;
19975         esac
19976 fi
19977
19978 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19979 then
19980         echo "$as_me:19980: checking if linker supports switching between static/dynamic" >&5
19981 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19982
19983         rm -f libconftest.a
19984         cat >conftest.$ac_ext <<EOF
19985 #line 19985 "configure"
19986 #include <stdio.h>
19987 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19988 EOF
19989         if { (eval echo "$as_me:19989: \"$ac_compile\"") >&5
19990   (eval $ac_compile) 2>&5
19991   ac_status=$?
19992   echo "$as_me:19992: \$? = $ac_status" >&5
19993   (exit $ac_status); } ; then
19994                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19995                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19996         fi
19997         rm -f conftest.*
19998
19999         cf_save_LIBS="$LIBS"
20000
20001         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20002         cat >conftest.$ac_ext <<_ACEOF
20003 #line 20003 "configure"
20004 #include "confdefs.h"
20005
20006 #line 20006 "configure"
20007 #include <stdio.h>
20008 int cf_ldflags_static(FILE *fp);
20009
20010 int
20011 main ()
20012 {
20013
20014         return cf_ldflags_static(stdin);
20015
20016   ;
20017   return 0;
20018 }
20019 _ACEOF
20020 rm -f conftest.$ac_objext conftest$ac_exeext
20021 if { (eval echo "$as_me:20021: \"$ac_link\"") >&5
20022   (eval $ac_link) 2>&5
20023   ac_status=$?
20024   echo "$as_me:20024: \$? = $ac_status" >&5
20025   (exit $ac_status); } &&
20026          { ac_try='test -s conftest$ac_exeext'
20027   { (eval echo "$as_me:20027: \"$ac_try\"") >&5
20028   (eval $ac_try) 2>&5
20029   ac_status=$?
20030   echo "$as_me:20030: \$? = $ac_status" >&5
20031   (exit $ac_status); }; }; then
20032
20033         # some linkers simply ignore the -dynamic
20034         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20035         *static*) # (vi
20036                 cf_ldflags_static=no
20037                 ;;
20038         *)
20039                 cf_ldflags_static=yes
20040                 ;;
20041         esac
20042
20043 else
20044   echo "$as_me: failed program was:" >&5
20045 cat conftest.$ac_ext >&5
20046 cf_ldflags_static=no
20047 fi
20048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20049
20050         rm -f libconftest.*
20051         LIBS="$cf_save_LIBS"
20052
20053         echo "$as_me:20053: result: $cf_ldflags_static" >&5
20054 echo "${ECHO_T}$cf_ldflags_static" >&6
20055
20056         if test $cf_ldflags_static != yes
20057         then
20058                 LDFLAGS_STATIC=
20059                 LDFLAGS_SHARED=
20060         fi
20061 else
20062         LDFLAGS_STATIC=
20063         LDFLAGS_SHARED=
20064 fi
20065
20066         ;;
20067 esac
20068
20069 echo "$as_me:20069: checking where we will install curses.h" >&5
20070 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20071 test "$with_overwrite" = no && \
20072 test "x$includedir" = 'x${prefix}/include' && \
20073         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20074 echo "$as_me:20074: result: $includedir" >&5
20075 echo "${ECHO_T}$includedir" >&6
20076
20077 ### Resolve a conflict between normal and wide-curses by forcing applications
20078 ### that will need libutf8 to add it to their configure script.
20079 if test "$with_overwrite" != no ; then
20080 if test "$NCURSES_LIBUTF8" = 1 ; then
20081         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20082         { echo "$as_me:20082: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20083 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20084 fi
20085 fi
20086 WITH_OVERWRITE=$with_overwrite
20087
20088 # used to separate tack out of the tree
20089 NCURSES_TREE=
20090
20091 ### predefined stuff for the test programs
20092
20093 cat >>confdefs.h <<\EOF
20094 #define HAVE_SLK_COLOR 1
20095 EOF
20096
20097 ### Construct the list of subdirectories for which we'll customize makefiles
20098 ### with the appropriate compile-rules.
20099
20100 echo "$as_me:20100: checking for src modules" >&5
20101 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20102
20103 # dependencies and linker-arguments for test-programs
20104 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20105 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20106 if test "$DFT_LWR_MODEL" = "libtool"; then
20107         TEST_ARGS="${TEST_DEPS}"
20108         TEST_ARG2="${TEST_DEP2}"
20109 else
20110         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20111         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20112 fi
20113
20114 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20115 cf_cv_src_modules=
20116 for cf_dir in $modules_to_build
20117 do
20118         if test -f $srcdir/$cf_dir/modules; then
20119
20120                 # We may/may not have tack in the distribution, though the
20121                 # makefile is.
20122                 if test $cf_dir = tack ; then
20123                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20124                                 continue
20125                         fi
20126                 fi
20127
20128                 if test -z "$cf_cv_src_modules"; then
20129                         cf_cv_src_modules=$cf_dir
20130                 else
20131                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20132                 fi
20133
20134                 # Make the ncurses_cfg.h file record the library interface files as
20135                 # well.  These are header files that are the same name as their
20136                 # directory.  Ncurses is the only library that does not follow
20137                 # that pattern.
20138                 if test $cf_dir = tack ; then
20139                         continue
20140                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20141
20142 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20143
20144                         cat >>confdefs.h <<EOF
20145 #define HAVE_${cf_have_include}_H 1
20146 EOF
20147
20148                         cat >>confdefs.h <<EOF
20149 #define HAVE_LIB${cf_have_include} 1
20150 EOF
20151
20152                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20153                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20154                         if test "$DFT_LWR_MODEL" = "libtool"; then
20155                                 TEST_ARGS="${TEST_DEPS}"
20156                                 TEST_ARG2="${TEST_DEP2}"
20157                         else
20158                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20159                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20160                         fi
20161                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20162                 fi
20163         fi
20164 done
20165 echo "$as_me:20165: result: $cf_cv_src_modules" >&5
20166 echo "${ECHO_T}$cf_cv_src_modules" >&6
20167
20168 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20169 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20170
20171 SRC_SUBDIRS=
20172 if test "x$cf_with_manpages" != xno ; then
20173         SRC_SUBDIRS="$SRC_SUBDIRS man"
20174 fi
20175 SRC_SUBDIRS="$SRC_SUBDIRS include"
20176 for cf_dir in $cf_cv_src_modules
20177 do
20178         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20179 done
20180 if test "x$cf_with_tests" != "xno" ; then
20181         SRC_SUBDIRS="$SRC_SUBDIRS test"
20182 fi
20183 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20184 if test "$cf_with_cxx_binding" != no; then
20185         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20186         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20187 fi
20188
20189 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20190 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20191
20192 ADA_SUBDIRS=
20193 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20194         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20195         ADA_SUBDIRS="gen src"
20196         if test "x$cf_with_tests" != "xno" ; then
20197                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20198         fi
20199 fi
20200
20201 SUB_MAKEFILES=
20202 for cf_dir in $SRC_SUBDIRS
20203 do
20204         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20205 done
20206
20207 if test -n "$ADA_SUBDIRS"; then
20208         for cf_dir in $ADA_SUBDIRS
20209         do
20210                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20211         done
20212
20213 fi
20214
20215 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20216    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20217    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20218 fi
20219
20220 DIRS_TO_MAKE="lib"
20221 for cf_item in $cf_list_models
20222 do
20223
20224         case $cf_item in
20225         libtool) cf_subdir='obj_lo'  ;;
20226         normal)  cf_subdir='objects' ;;
20227         debug)   cf_subdir='obj_g' ;;
20228         profile) cf_subdir='obj_p' ;;
20229         shared)
20230                 case $cf_cv_system_name in #(vi
20231                 cygwin) #(vi
20232                         cf_subdir='objects' ;;
20233                 *)
20234                         cf_subdir='obj_s' ;;
20235                 esac
20236         esac
20237
20238         for cf_item2 in $DIRS_TO_MAKE
20239         do
20240                 test $cf_item2 = $cf_subdir && break
20241         done
20242         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20243 done
20244 for cf_dir in $DIRS_TO_MAKE
20245 do
20246         test ! -d $cf_dir && mkdir $cf_dir
20247 done
20248
20249 # symbols that differ when compiling Ada95 by itself.
20250 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20251
20252 # values to use as strings
20253
20254 cat >>confdefs.h <<EOF
20255 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20256 EOF
20257
20258 cat >>confdefs.h <<EOF
20259 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20260 EOF
20261
20262 ### Now that we're done running tests, add the compiler-warnings, if any
20263
20264 cf_fix_cppflags=no
20265 cf_new_cflags=
20266 cf_new_cppflags=
20267 cf_new_extra_cppflags=
20268
20269 for cf_add_cflags in $EXTRA_CFLAGS
20270 do
20271 case $cf_fix_cppflags in
20272 no)
20273         case $cf_add_cflags in #(vi
20274         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20275                 case $cf_add_cflags in
20276                 -D*)
20277                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20278
20279                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20280                                 && test -z "${cf_tst_cflags}" \
20281                                 && cf_fix_cppflags=yes
20282
20283                         if test $cf_fix_cppflags = yes ; then
20284                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20285                                 continue
20286                         elif test "${cf_tst_cflags}" = "\"'" ; then
20287                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20288                                 continue
20289                         fi
20290                         ;;
20291                 esac
20292                 case "$CPPFLAGS" in
20293                 *$cf_add_cflags) #(vi
20294                         ;;
20295                 *) #(vi
20296                         case $cf_add_cflags in #(vi
20297                         -D*)
20298                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20299
20300 CPPFLAGS=`echo "$CPPFLAGS" | \
20301         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20302                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20303
20304                                 ;;
20305                         esac
20306                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20307                         ;;
20308                 esac
20309                 ;;
20310         *)
20311                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20312                 ;;
20313         esac
20314         ;;
20315 yes)
20316         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20317
20318         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20319
20320         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20321                 && test -z "${cf_tst_cflags}" \
20322                 && cf_fix_cppflags=no
20323         ;;
20324 esac
20325 done
20326
20327 if test -n "$cf_new_cflags" ; then
20328
20329         CFLAGS="$CFLAGS $cf_new_cflags"
20330 fi
20331
20332 if test -n "$cf_new_cppflags" ; then
20333
20334         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20335 fi
20336
20337 if test -n "$cf_new_extra_cppflags" ; then
20338
20339         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20340 fi
20341
20342 ### Define substitutions for header files to avoid name-pollution
20343
20344 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20345         HAVE_TCGETATTR=1
20346 else
20347         HAVE_TCGETATTR=0
20348 fi
20349
20350 if test "x$ac_cv_header_termio_h" = xyes ; then
20351         HAVE_TERMIO_H=1
20352 else
20353         HAVE_TERMIO_H=0
20354 fi
20355
20356 if test "x$ac_cv_header_termios_h" = xyes ; then
20357         HAVE_TERMIOS_H=1
20358 else
20359         HAVE_TERMIOS_H=0
20360 fi
20361
20362 ################################################################################
20363 test "x$use_database" = xyes && \
20364 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20365
20366 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20367 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20368
20369 if test "x$enable_pc_files" = xyes ; then \
20370 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20371 MAKE_PC_FILES=
20372 else
20373 MAKE_PC_FILES="#"
20374 fi
20375
20376 # Extract the first word of "tic", so it can be a program name with args.
20377 set dummy tic; ac_word=$2
20378 echo "$as_me:20378: checking for $ac_word" >&5
20379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20380 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20381   echo $ECHO_N "(cached) $ECHO_C" >&6
20382 else
20383   case $TIC_PATH in
20384   [\\/]* | ?:[\\/]*)
20385   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20386   ;;
20387   *)
20388   ac_save_IFS=$IFS; IFS=$ac_path_separator
20389 ac_dummy="$PATH:/usr/local/ncurses/bin"
20390 for ac_dir in $ac_dummy; do
20391   IFS=$ac_save_IFS
20392   test -z "$ac_dir" && ac_dir=.
20393   if $as_executable_p "$ac_dir/$ac_word"; then
20394    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20395    echo "$as_me:20395: found $ac_dir/$ac_word" >&5
20396    break
20397 fi
20398 done
20399
20400   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20401   ;;
20402 esac
20403 fi
20404 TIC_PATH=$ac_cv_path_TIC_PATH
20405
20406 if test -n "$TIC_PATH"; then
20407   echo "$as_me:20407: result: $TIC_PATH" >&5
20408 echo "${ECHO_T}$TIC_PATH" >&6
20409 else
20410   echo "$as_me:20410: result: no" >&5
20411 echo "${ECHO_T}no" >&6
20412 fi
20413
20414 if test -n "$FALLBACK_LIST"
20415 then
20416         if test "$TIC_PATH" = unknown
20417         then
20418                 { echo "$as_me:20418: WARNING: no tic program found for fallbacks" >&5
20419 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20420         fi
20421 fi
20422
20423 if test "x$cf_with_tests" != xno ; then
20424         MAKE_TESTS=
20425 else
20426         MAKE_TESTS="#"
20427 fi
20428
20429 ADAHTML_DIR=../../doc/html/ada
20430
20431 SUB_SCRIPTS=
20432
20433 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"
20434 ac_config_commands="$ac_config_commands default"
20435 cat >confcache <<\_ACEOF
20436 # This file is a shell script that caches the results of configure
20437 # tests run on this system so they can be shared between configure
20438 # scripts and configure runs, see configure's option --config-cache.
20439 # It is not useful on other systems.  If it contains results you don't
20440 # want to keep, you may remove or edit it.
20441 #
20442 # config.status only pays attention to the cache file if you give it
20443 # the --recheck option to rerun configure.
20444 #
20445 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20446 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20447 # following values.
20448
20449 _ACEOF
20450
20451 # The following way of writing the cache mishandles newlines in values,
20452 # but we know of no workaround that is simple, portable, and efficient.
20453 # So, don't put newlines in cache variables' values.
20454 # Ultrix sh set writes to stderr and can't be redirected directly,
20455 # and sets the high bit in the cache file unless we assign to the vars.
20456 {
20457   (set) 2>&1 |
20458     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20459     *ac_space=\ *)
20460       # `set' does not quote correctly, so add quotes (double-quote
20461       # substitution turns \\\\ into \\, and sed turns \\ into \).
20462       sed -n \
20463         "s/'/'\\\\''/g;
20464           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20465       ;;
20466     *)
20467       # `set' quotes correctly as required by POSIX, so do not add quotes.
20468       sed -n \
20469         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20470       ;;
20471     esac;
20472 } |
20473   sed '
20474      t clear
20475      : clear
20476      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20477      t end
20478      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20479      : end' >>confcache
20480 if cmp -s $cache_file confcache; then :; else
20481   if test -w $cache_file; then
20482     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20483     cat confcache >$cache_file
20484   else
20485     echo "not updating unwritable cache $cache_file"
20486   fi
20487 fi
20488 rm -f confcache
20489
20490 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20491 # Let make expand exec_prefix.
20492 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20493
20494 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20495 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20496 # trailing colons and then remove the whole line if VPATH becomes empty
20497 # (actually we leave an empty line to preserve line numbers).
20498 if test "x$srcdir" = x.; then
20499   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20500 s/:*\$(srcdir):*/:/;
20501 s/:*\${srcdir}:*/:/;
20502 s/:*@srcdir@:*/:/;
20503 s/^\([^=]*=[    ]*\):*/\1/;
20504 s/:*$//;
20505 s/^[^=]*=[      ]*$//;
20506 }'
20507 fi
20508
20509 DEFS=-DHAVE_CONFIG_H
20510
20511 : ${CONFIG_STATUS=./config.status}
20512 ac_clean_files_save=$ac_clean_files
20513 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20514 { echo "$as_me:20514: creating $CONFIG_STATUS" >&5
20515 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20516 cat >$CONFIG_STATUS <<_ACEOF
20517 #! $SHELL
20518 # Generated automatically by configure.
20519 # Run this file to recreate the current configuration.
20520 # Compiler output produced by configure, useful for debugging
20521 # configure, is in config.log if it exists.
20522
20523 debug=false
20524 SHELL=\${CONFIG_SHELL-$SHELL}
20525 ac_cs_invocation="\$0 \$@"
20526
20527 _ACEOF
20528
20529 cat >>$CONFIG_STATUS <<\_ACEOF
20530 # Be Bourne compatible
20531 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20532   emulate sh
20533   NULLCMD=:
20534 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20535   set -o posix
20536 fi
20537
20538 # Name of the executable.
20539 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20540
20541 if expr a : '\(a\)' >/dev/null 2>&1; then
20542   as_expr=expr
20543 else
20544   as_expr=false
20545 fi
20546
20547 rm -f conf$$ conf$$.exe conf$$.file
20548 echo >conf$$.file
20549 if ln -s conf$$.file conf$$ 2>/dev/null; then
20550   # We could just check for DJGPP; but this test a) works b) is more generic
20551   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20552   if test -f conf$$.exe; then
20553     # Don't use ln at all; we don't have any links
20554     as_ln_s='cp -p'
20555   else
20556     as_ln_s='ln -s'
20557   fi
20558 elif ln conf$$.file conf$$ 2>/dev/null; then
20559   as_ln_s=ln
20560 else
20561   as_ln_s='cp -p'
20562 fi
20563 rm -f conf$$ conf$$.exe conf$$.file
20564
20565 as_executable_p="test -f"
20566
20567 # Support unset when possible.
20568 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20569   as_unset=unset
20570 else
20571   as_unset=false
20572 fi
20573
20574 # NLS nuisances.
20575 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20576 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20577 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20578 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20579 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20580 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20581 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20582 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20583
20584 # IFS
20585 # We need space, tab and new line, in precisely that order.
20586 as_nl='
20587 '
20588 IFS="   $as_nl"
20589
20590 # CDPATH.
20591 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20592
20593 exec 6>&1
20594
20595 _ACEOF
20596
20597 # Files that config.status was made for.
20598 if test -n "$ac_config_files"; then
20599   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20600 fi
20601
20602 if test -n "$ac_config_headers"; then
20603   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20604 fi
20605
20606 if test -n "$ac_config_links"; then
20607   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20608 fi
20609
20610 if test -n "$ac_config_commands"; then
20611   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20612 fi
20613
20614 cat >>$CONFIG_STATUS <<\EOF
20615
20616 ac_cs_usage="\
20617 \`$as_me' instantiates files from templates according to the
20618 current configuration.
20619
20620 Usage: $0 [OPTIONS] [FILE]...
20621
20622   -h, --help       print this help, then exit
20623   -V, --version    print version number, then exit
20624   -d, --debug      don't remove temporary files
20625       --recheck    update $as_me by reconfiguring in the same conditions
20626   --file=FILE[:TEMPLATE]
20627                    instantiate the configuration file FILE
20628   --header=FILE[:TEMPLATE]
20629                    instantiate the configuration header FILE
20630
20631 Configuration files:
20632 $config_files
20633
20634 Configuration headers:
20635 $config_headers
20636
20637 Configuration commands:
20638 $config_commands
20639
20640 Report bugs to <dickey@invisible-island.net>."
20641 EOF
20642
20643 cat >>$CONFIG_STATUS <<EOF
20644 ac_cs_version="\\
20645 config.status
20646 configured by $0, generated by GNU Autoconf 2.52.20121002,
20647   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20648
20649 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20650 Free Software Foundation, Inc.
20651 This config.status script is free software; the Free Software Foundation
20652 gives unlimited permission to copy, distribute and modify it."
20653 srcdir=$srcdir
20654 INSTALL="$INSTALL"
20655 EOF
20656
20657 cat >>$CONFIG_STATUS <<\EOF
20658 # If no file are specified by the user, then we need to provide default
20659 # value.  By we need to know if files were specified by the user.
20660 ac_need_defaults=:
20661 while test $# != 0
20662 do
20663   case $1 in
20664   --*=*)
20665     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20666     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20667     shift
20668     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20669     shift
20670     ;;
20671   -*);;
20672   *) # This is not an option, so the user has probably given explicit
20673      # arguments.
20674      ac_need_defaults=false;;
20675   esac
20676
20677   case $1 in
20678   # Handling of the options.
20679 EOF
20680 cat >>$CONFIG_STATUS <<EOF
20681   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20682     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20683     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20684 EOF
20685 cat >>$CONFIG_STATUS <<\EOF
20686   --version | --vers* | -V )
20687     echo "$ac_cs_version"; exit 0 ;;
20688   --he | --h)
20689     # Conflict between --help and --header
20690     { { echo "$as_me:20690: error: ambiguous option: $1
20691 Try \`$0 --help' for more information." >&5
20692 echo "$as_me: error: ambiguous option: $1
20693 Try \`$0 --help' for more information." >&2;}
20694    { (exit 1); exit 1; }; };;
20695   --help | --hel | -h )
20696     echo "$ac_cs_usage"; exit 0 ;;
20697   --debug | --d* | -d )
20698     debug=: ;;
20699   --file | --fil | --fi | --f )
20700     shift
20701     CONFIG_FILES="$CONFIG_FILES $1"
20702     ac_need_defaults=false;;
20703   --header | --heade | --head | --hea )
20704     shift
20705     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20706     ac_need_defaults=false;;
20707
20708   # This is an error.
20709   -*) { { echo "$as_me:20709: error: unrecognized option: $1
20710 Try \`$0 --help' for more information." >&5
20711 echo "$as_me: error: unrecognized option: $1
20712 Try \`$0 --help' for more information." >&2;}
20713    { (exit 1); exit 1; }; } ;;
20714
20715   *) ac_config_targets="$ac_config_targets $1" ;;
20716
20717   esac
20718   shift
20719 done
20720
20721 exec 5>>config.log
20722 cat >&5 << _ACEOF
20723
20724 ## ----------------------- ##
20725 ## Running config.status.  ##
20726 ## ----------------------- ##
20727
20728 This file was extended by $as_me 2.52.20121002, executed with
20729   CONFIG_FILES    = $CONFIG_FILES
20730   CONFIG_HEADERS  = $CONFIG_HEADERS
20731   CONFIG_LINKS    = $CONFIG_LINKS
20732   CONFIG_COMMANDS = $CONFIG_COMMANDS
20733   > $ac_cs_invocation
20734 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20735
20736 _ACEOF
20737 EOF
20738
20739 cat >>$CONFIG_STATUS <<EOF
20740 #
20741 # INIT-COMMANDS section.
20742 #
20743
20744 ### Special initialization commands, used to pass information from the
20745 ### configuration-run into config.status
20746
20747 AWK="$AWK"
20748 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20749 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20750 ECHO_LD="$ECHO_LD"
20751 LDCONFIG="$LDCONFIG"
20752 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20753 LIB_NAME="$LIB_NAME"
20754 LIB_PREFIX="$LIB_PREFIX"
20755 LIB_SUBSETS="$LIB_SUBSETS"
20756 LIB_SUFFIX="$LIB_SUFFIX"
20757 LIB_TRACING="$LIB_TRACING"
20758 LN_S="$LN_S"
20759 MAKE_TERMINFO="$MAKE_TERMINFO"
20760 NCURSES_MAJOR="$NCURSES_MAJOR"
20761 NCURSES_MINOR="$NCURSES_MINOR"
20762 NCURSES_OSPEED="$NCURSES_OSPEED"
20763 NCURSES_PATCH="$NCURSES_PATCH"
20764 SRC_SUBDIRS="$SRC_SUBDIRS"
20765 TERMINFO="$TERMINFO"
20766 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20767 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20768 TICS_NAME="$TICS_NAME"
20769 TIC_PATH="$TIC_PATH"
20770 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20771 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20772 TINFO_NAME="$TINFO_NAME"
20773 TINFO_SUFFIX="$TINFO_SUFFIX"
20774 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20775 WITH_CURSES_H="$with_curses_h"
20776 WITH_ECHO="${enable_echo:=yes}"
20777 WITH_OVERWRITE="$with_overwrite"
20778 cf_LIST_MODELS="$cf_list_models"
20779 cf_cv_abi_version="$cf_cv_abi_version"
20780 cf_cv_do_relink="$cf_cv_do_relink"
20781 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20782 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20783 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20784 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20785 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20786 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20787 cf_cv_rel_version="$cf_cv_rel_version"
20788 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20789 cf_cv_shared_soname='$cf_cv_shared_soname'
20790 cf_cv_shlib_version="$cf_cv_shlib_version"
20791 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20792 cf_cv_system_name="$cf_cv_system_name"
20793 cf_cv_term_driver="$with_term_driver"
20794 cf_with_ada="$cf_with_ada"
20795 cf_with_cxx_binding="$cf_with_cxx_binding"
20796 cf_with_manpages="$cf_with_manpages"
20797 cf_with_tests="$cf_with_tests"
20798 host="$host"
20799 target="$target"
20800
20801 EOF
20802
20803 cat >>$CONFIG_STATUS <<\EOF
20804 for ac_config_target in $ac_config_targets
20805 do
20806   case "$ac_config_target" in
20807   # Handling of arguments.
20808   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20809   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20810   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20811   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20812   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20813   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20814   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20815   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20816   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20817   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20818   *) { { echo "$as_me:20818: error: invalid argument: $ac_config_target" >&5
20819 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20820    { (exit 1); exit 1; }; };;
20821   esac
20822 done
20823
20824 # If the user did not use the arguments to specify the items to instantiate,
20825 # then the envvar interface is used.  Set only those that are not.
20826 # We use the long form for the default assignment because of an extremely
20827 # bizarre bug on SunOS 4.1.3.
20828 if $ac_need_defaults; then
20829   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20830   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20831   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20832 fi
20833
20834 # Create a temporary directory, and hook for its removal unless debugging.
20835 $debug ||
20836 {
20837   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20838   trap '{ (exit 1); exit 1; }' 1 2 13 15
20839 }
20840
20841 # Create a (secure) tmp directory for tmp files.
20842 : ${TMPDIR=/tmp}
20843 {
20844   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20845   test -n "$tmp" && test -d "$tmp"
20846 }  ||
20847 {
20848   tmp=$TMPDIR/cs$$-$RANDOM
20849   (umask 077 && mkdir $tmp)
20850 } ||
20851 {
20852    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20853    { (exit 1); exit 1; }
20854 }
20855
20856 EOF
20857
20858 cat >>$CONFIG_STATUS <<EOF
20859
20860 #
20861 # CONFIG_FILES section.
20862 #
20863
20864 # No need to generate the scripts if there are no CONFIG_FILES.
20865 # This happens for instance when ./config.status config.h
20866 if test -n "\$CONFIG_FILES"; then
20867   # Protect against being on the right side of a sed subst in config.status.
20868   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20869    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20870 s,@SHELL@,$SHELL,;t t
20871 s,@exec_prefix@,$exec_prefix,;t t
20872 s,@prefix@,$prefix,;t t
20873 s,@program_transform_name@,$program_transform_name,;t t
20874 s,@bindir@,$bindir,;t t
20875 s,@sbindir@,$sbindir,;t t
20876 s,@libexecdir@,$libexecdir,;t t
20877 s,@datarootdir@,$datarootdir,;t t
20878 s,@datadir@,$datadir,;t t
20879 s,@sysconfdir@,$sysconfdir,;t t
20880 s,@sharedstatedir@,$sharedstatedir,;t t
20881 s,@localstatedir@,$localstatedir,;t t
20882 s,@libdir@,$libdir,;t t
20883 s,@includedir@,$includedir,;t t
20884 s,@oldincludedir@,$oldincludedir,;t t
20885 s,@infodir@,$infodir,;t t
20886 s,@mandir@,$mandir,;t t
20887 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20888 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20889 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20890 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20891 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20892 s,@build_alias@,$build_alias,;t t
20893 s,@host_alias@,$host_alias,;t t
20894 s,@target_alias@,$target_alias,;t t
20895 s,@ECHO_C@,$ECHO_C,;t t
20896 s,@ECHO_N@,$ECHO_N,;t t
20897 s,@ECHO_T@,$ECHO_T,;t t
20898 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20899 s,@DEFS@,$DEFS,;t t
20900 s,@LIBS@,$LIBS,;t t
20901 s,@top_builddir@,$top_builddir,;t t
20902 s,@EGREP@,$EGREP,;t t
20903 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20904 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20905 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20906 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20907 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20908 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20909 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20910 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20911 s,@build@,$build,;t t
20912 s,@build_cpu@,$build_cpu,;t t
20913 s,@build_vendor@,$build_vendor,;t t
20914 s,@build_os@,$build_os,;t t
20915 s,@host@,$host,;t t
20916 s,@host_cpu@,$host_cpu,;t t
20917 s,@host_vendor@,$host_vendor,;t t
20918 s,@host_os@,$host_os,;t t
20919 s,@target@,$target,;t t
20920 s,@target_cpu@,$target_cpu,;t t
20921 s,@target_vendor@,$target_vendor,;t t
20922 s,@target_os@,$target_os,;t t
20923 s,@CC@,$CC,;t t
20924 s,@CFLAGS@,$CFLAGS,;t t
20925 s,@LDFLAGS@,$LDFLAGS,;t t
20926 s,@CPPFLAGS@,$CPPFLAGS,;t t
20927 s,@ac_ct_CC@,$ac_ct_CC,;t t
20928 s,@EXEEXT@,$EXEEXT,;t t
20929 s,@OBJEXT@,$OBJEXT,;t t
20930 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20931 s,@CPP@,$CPP,;t t
20932 s,@LDCONFIG@,$LDCONFIG,;t t
20933 s,@CXX@,$CXX,;t t
20934 s,@CXXFLAGS@,$CXXFLAGS,;t t
20935 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20936 s,@AWK@,$AWK,;t t
20937 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20938 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20939 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20940 s,@LINT@,$LINT,;t t
20941 s,@LINT_OPTS@,$LINT_OPTS,;t t
20942 s,@LN_S@,$LN_S,;t t
20943 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20944 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20945 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20946 s,@SET_MAKE@,$SET_MAKE,;t t
20947 s,@CTAGS@,$CTAGS,;t t
20948 s,@ETAGS@,$ETAGS,;t t
20949 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20950 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20951 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20952 s,@RANLIB@,$RANLIB,;t t
20953 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20954 s,@LD@,$LD,;t t
20955 s,@ac_ct_LD@,$ac_ct_LD,;t t
20956 s,@AR@,$AR,;t t
20957 s,@ac_ct_AR@,$ac_ct_AR,;t t
20958 s,@ARFLAGS@,$ARFLAGS,;t t
20959 s,@DESTDIR@,$DESTDIR,;t t
20960 s,@BUILD_CC@,$BUILD_CC,;t t
20961 s,@BUILD_CPP@,$BUILD_CPP,;t t
20962 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20963 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20964 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20965 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20966 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20967 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20968 s,@cf_list_models@,$cf_list_models,;t t
20969 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20970 s,@LIBTOOL@,$LIBTOOL,;t t
20971 s,@LT_UNDEF@,$LT_UNDEF,;t t
20972 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20973 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20974 s,@LIB_CREATE@,$LIB_CREATE,;t t
20975 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20976 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20977 s,@LIB_PREP@,$LIB_PREP,;t t
20978 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20979 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20980 s,@LIB_LINK@,$LIB_LINK,;t t
20981 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20982 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20983 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20984 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20985 s,@TICS_NAME@,$TICS_NAME,;t t
20986 s,@TINFO_NAME@,$TINFO_NAME,;t t
20987 s,@LIB_NAME@,$LIB_NAME,;t t
20988 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20989 s,@CC_G_OPT@,$CC_G_OPT,;t t
20990 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20991 s,@LD_MODEL@,$LD_MODEL,;t t
20992 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20993 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20994 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20995 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20996 s,@LINK_PROGS@,$LINK_PROGS,;t t
20997 s,@LINK_TESTS@,$LINK_TESTS,;t t
20998 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20999 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21000 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21001 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21002 s,@RPATH_LIST@,$RPATH_LIST,;t t
21003 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21004 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21005 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21006 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21007 s,@XTERM_KBS@,$XTERM_KBS,;t t
21008 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21009 s,@TERMINFO@,$TERMINFO,;t t
21010 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21011 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21012 s,@TERMPATH@,$TERMPATH,;t t
21013 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21014 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21015 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21016 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21017 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21018 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21019 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21020 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21021 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21022 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21023 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21024 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21025 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21026 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21027 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21028 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21029 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21030 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21031 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21032 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21033 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21034 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21035 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21036 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21037 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21038 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21039 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21040 s,@PTHREAD@,$PTHREAD,;t t
21041 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21042 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21043 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21044 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21045 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21046 s,@ECHO_LT@,$ECHO_LT,;t t
21047 s,@ECHO_LD@,$ECHO_LD,;t t
21048 s,@RULE_CC@,$RULE_CC,;t t
21049 s,@SHOW_CC@,$SHOW_CC,;t t
21050 s,@ECHO_CC@,$ECHO_CC,;t t
21051 s,@ECHO_LINK@,$ECHO_LINK,;t t
21052 s,@ADAFLAGS@,$ADAFLAGS,;t t
21053 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21054 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21055 s,@ADA_TRACE@,$ADA_TRACE,;t t
21056 s,@MATH_LIB@,$MATH_LIB,;t t
21057 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21058 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21059 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21060 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21061 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21062 s,@TEST_LIBS@,$TEST_LIBS,;t t
21063 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21064 s,@CXXCPP@,$CXXCPP,;t t
21065 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21066 s,@CXX_AR@,$CXX_AR,;t t
21067 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21068 s,@CXXLIBS@,$CXXLIBS,;t t
21069 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21070 s,@gnat_exists@,$gnat_exists,;t t
21071 s,@M4_exists@,$M4_exists,;t t
21072 s,@cf_ada_make@,$cf_ada_make,;t t
21073 s,@cf_compile_generics@,$cf_compile_generics,;t t
21074 s,@cf_generic_objects@,$cf_generic_objects,;t t
21075 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21076 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21077 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21078 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21079 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21080 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21081 s,@cf_ada_package@,$cf_ada_package,;t t
21082 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21083 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21084 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21085 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21086 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21087 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21088 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21089 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21090 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21091 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21092 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21093 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21094 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21095 s,@TICS_LIBS@,$TICS_LIBS,;t t
21096 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21097 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21098 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21099 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21100 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21101 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21102 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21103 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21104 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21105 s,@TICS_LIST@,$TICS_LIST,;t t
21106 s,@TINFO_LIST@,$TINFO_LIST,;t t
21107 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21108 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21109 s,@TEST_ARGS@,$TEST_ARGS,;t t
21110 s,@TEST_DEPS@,$TEST_DEPS,;t t
21111 s,@TEST_ARG2@,$TEST_ARG2,;t t
21112 s,@TEST_DEP2@,$TEST_DEP2,;t t
21113 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21114 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21115 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21116 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21117 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21118 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21119 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21120 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21121 s,@cross_compiling@,$cross_compiling,;t t
21122 s,@TIC_PATH@,$TIC_PATH,;t t
21123 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21124 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21125 CEOF
21126
21127 EOF
21128
21129   cat >>$CONFIG_STATUS <<\EOF
21130   # Split the substitutions into bite-sized pieces for seds with
21131   # small command number limits, like on Digital OSF/1 and HP-UX.
21132   ac_max_sed_lines=48
21133   ac_sed_frag=1 # Number of current file.
21134   ac_beg=1 # First line for current file.
21135   ac_end=$ac_max_sed_lines # Line after last line for current file.
21136   ac_more_lines=:
21137   ac_sed_cmds=
21138   while $ac_more_lines; do
21139     if test $ac_beg -gt 1; then
21140       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21141     else
21142       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21143     fi
21144     if test ! -s $tmp/subs.frag; then
21145       ac_more_lines=false
21146     else
21147       # The purpose of the label and of the branching condition is to
21148       # speed up the sed processing (if there are no `@' at all, there
21149       # is no need to browse any of the substitutions).
21150       # These are the two extra sed commands mentioned above.
21151       (echo ':t
21152   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21153       if test -z "$ac_sed_cmds"; then
21154         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21155       else
21156         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21157       fi
21158       ac_sed_frag=`expr $ac_sed_frag + 1`
21159       ac_beg=$ac_end
21160       ac_end=`expr $ac_end + $ac_max_sed_lines`
21161     fi
21162   done
21163   if test -z "$ac_sed_cmds"; then
21164     ac_sed_cmds=cat
21165   fi
21166 fi # test -n "$CONFIG_FILES"
21167
21168 EOF
21169 cat >>$CONFIG_STATUS <<\EOF
21170 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21171   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21172   case $ac_file in
21173   - | *:- | *:-:* ) # input from stdin
21174         cat >$tmp/stdin
21175         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21176         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21177   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21178         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21179   * )   ac_file_in=$ac_file.in ;;
21180   esac
21181
21182   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21183   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21184          X"$ac_file" : 'X\(//\)[^/]' \| \
21185          X"$ac_file" : 'X\(//\)$' \| \
21186          X"$ac_file" : 'X\(/\)' \| \
21187          .     : '\(.\)' 2>/dev/null ||
21188 echo X"$ac_file" |
21189     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21190           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21191           /^X\(\/\/\)$/{ s//\1/; q; }
21192           /^X\(\/\).*/{ s//\1/; q; }
21193           s/.*/./; q'`
21194   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21195     { case "$ac_dir" in
21196   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21197   *)                      as_incr_dir=.;;
21198 esac
21199 as_dummy="$ac_dir"
21200 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21201   case $as_mkdir_dir in
21202     # Skip DOS drivespec
21203     ?:) as_incr_dir=$as_mkdir_dir ;;
21204     *)
21205       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21206       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21207     ;;
21208   esac
21209 done; }
21210
21211     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21212     # A "../" for each directory in $ac_dir_suffix.
21213     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21214   else
21215     ac_dir_suffix= ac_dots=
21216   fi
21217
21218   case $srcdir in
21219   .)  ac_srcdir=.
21220       if test -z "$ac_dots"; then
21221          ac_top_srcdir=.
21222       else
21223          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21224       fi ;;
21225   [\\/]* | ?:[\\/]* )
21226       ac_srcdir=$srcdir$ac_dir_suffix;
21227       ac_top_srcdir=$srcdir ;;
21228   *) # Relative path.
21229     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21230     ac_top_srcdir=$ac_dots$srcdir ;;
21231   esac
21232
21233   case $INSTALL in
21234   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21235   *) ac_INSTALL=$ac_dots$INSTALL ;;
21236   esac
21237
21238   if test x"$ac_file" != x-; then
21239     { echo "$as_me:21239: creating $ac_file" >&5
21240 echo "$as_me: creating $ac_file" >&6;}
21241     rm -f "$ac_file"
21242   fi
21243   # Let's still pretend it is `configure' which instantiates (i.e., don't
21244   # use $as_me), people would be surprised to read:
21245   #    /* config.h.  Generated automatically by config.status.  */
21246   configure_input="Generated automatically from `echo $ac_file_in |
21247                                                  sed 's,.*/,,'` by configure."
21248
21249   # First look for the input files in the build tree, otherwise in the
21250   # src tree.
21251   ac_file_inputs=`IFS=:
21252     for f in $ac_file_in; do
21253       case $f in
21254       -) echo $tmp/stdin ;;
21255       [\\/$]*)
21256          # Absolute (can't be DOS-style, as IFS=:)
21257          test -f "$f" || { { echo "$as_me:21257: error: cannot find input file: $f" >&5
21258 echo "$as_me: error: cannot find input file: $f" >&2;}
21259    { (exit 1); exit 1; }; }
21260          echo $f;;
21261       *) # Relative
21262          if test -f "$f"; then
21263            # Build tree
21264            echo $f
21265          elif test -f "$srcdir/$f"; then
21266            # Source tree
21267            echo $srcdir/$f
21268          else
21269            # /dev/null tree
21270            { { echo "$as_me:21270: error: cannot find input file: $f" >&5
21271 echo "$as_me: error: cannot find input file: $f" >&2;}
21272    { (exit 1); exit 1; }; }
21273          fi;;
21274       esac
21275     done` || { (exit 1); exit 1; }
21276 EOF
21277 cat >>$CONFIG_STATUS <<\EOF
21278   ac_warn_datarootdir=no
21279   if test x"$ac_file" != x-; then
21280     for ac_item in $ac_file_inputs
21281     do
21282       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21283       if test -n "$ac_seen"; then
21284         ac_used=`grep '@datarootdir@' $ac_item`
21285         if test -z "$ac_used"; then
21286           { echo "$as_me:21286: WARNING: datarootdir was used implicitly but not set:
21287 $ac_seen" >&5
21288 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21289 $ac_seen" >&2;}
21290           ac_warn_datarootdir=yes
21291         fi
21292       fi
21293       ac_seen=`grep '${datarootdir}' $ac_item`
21294       if test -n "$ac_seen"; then
21295         { echo "$as_me:21295: WARNING: datarootdir was used explicitly but not set:
21296 $ac_seen" >&5
21297 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21298 $ac_seen" >&2;}
21299         ac_warn_datarootdir=yes
21300       fi
21301     done
21302   fi
21303
21304 if test "x$ac_warn_datarootdir" = xyes; then
21305   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21306 fi
21307
21308 EOF
21309 cat >>$CONFIG_STATUS <<EOF
21310   sed "$ac_vpsub
21311 $extrasub
21312 EOF
21313 cat >>$CONFIG_STATUS <<\EOF
21314 :t
21315 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21316 s,@configure_input@,$configure_input,;t t
21317 s,@srcdir@,$ac_srcdir,;t t
21318 s,@top_srcdir@,$ac_top_srcdir,;t t
21319 s,@INSTALL@,$ac_INSTALL,;t t
21320 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21321   rm -f $tmp/stdin
21322   if test x"$ac_file" != x-; then
21323     cp $tmp/out $ac_file
21324
21325     for ac_name in prefix exec_prefix datarootdir
21326     do
21327         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21328         if test -n "$ac_seen"; then
21329             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21330             if test -z "$ac_init"; then
21331               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21332               { echo "$as_me:21332: WARNING: Variable $ac_name is used but was not set:
21333 $ac_seen" >&5
21334 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21335 $ac_seen" >&2;}
21336             fi
21337         fi
21338     done
21339     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21340     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21341     if test -s $tmp/out; then
21342       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21343       { echo "$as_me:21343: WARNING: Some variables may not be substituted:
21344 $ac_seen" >&5
21345 echo "$as_me: WARNING: Some variables may not be substituted:
21346 $ac_seen" >&2;}
21347     fi
21348   else
21349     cat $tmp/out
21350   fi
21351   rm -f $tmp/out
21352
21353 done
21354 EOF
21355 cat >>$CONFIG_STATUS <<\EOF
21356
21357 #
21358 # CONFIG_HEADER section.
21359 #
21360
21361 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21362 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21363 #
21364 # ac_d sets the value in "#define NAME VALUE" lines.
21365 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21366 ac_dB='[        ].*$,\1#\2'
21367 ac_dC=' '
21368 ac_dD=',;t'
21369 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21370 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21371 ac_iB='\([      ]\),\1#\2define\3'
21372 ac_iC=' '
21373 ac_iD='\4,;t'
21374 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21375 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21376 ac_uB='$,\1#\2define\3'
21377 ac_uC=' '
21378 ac_uD=',;t'
21379
21380 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21381   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21382   case $ac_file in
21383   - | *:- | *:-:* ) # input from stdin
21384         cat >$tmp/stdin
21385         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21386         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21387   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21388         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21389   * )   ac_file_in=$ac_file.in ;;
21390   esac
21391
21392   test x"$ac_file" != x- && { echo "$as_me:21392: creating $ac_file" >&5
21393 echo "$as_me: creating $ac_file" >&6;}
21394
21395   # First look for the input files in the build tree, otherwise in the
21396   # src tree.
21397   ac_file_inputs=`IFS=:
21398     for f in $ac_file_in; do
21399       case $f in
21400       -) echo $tmp/stdin ;;
21401       [\\/$]*)
21402          # Absolute (can't be DOS-style, as IFS=:)
21403          test -f "$f" || { { echo "$as_me:21403: error: cannot find input file: $f" >&5
21404 echo "$as_me: error: cannot find input file: $f" >&2;}
21405    { (exit 1); exit 1; }; }
21406          echo $f;;
21407       *) # Relative
21408          if test -f "$f"; then
21409            # Build tree
21410            echo $f
21411          elif test -f "$srcdir/$f"; then
21412            # Source tree
21413            echo $srcdir/$f
21414          else
21415            # /dev/null tree
21416            { { echo "$as_me:21416: error: cannot find input file: $f" >&5
21417 echo "$as_me: error: cannot find input file: $f" >&2;}
21418    { (exit 1); exit 1; }; }
21419          fi;;
21420       esac
21421     done` || { (exit 1); exit 1; }
21422   # Remove the trailing spaces.
21423   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21424
21425 EOF
21426
21427 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21428 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21429 # be either 'cat' or 'sort'.
21430 cat confdefs.h | uniq >conftest.vals
21431
21432 # Break up conftest.vals because some shells have a limit on
21433 # the size of here documents, and old seds have small limits too.
21434
21435 rm -f conftest.tail
21436 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21437 while grep . conftest.vals >/dev/null
21438 do
21439   # Write chunks of a limited-size here document to conftest.frag.
21440   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21441   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21442   echo 'CEOF' >> $CONFIG_STATUS
21443   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21444   rm -f conftest.vals
21445   mv conftest.tail conftest.vals
21446 done
21447 rm -f conftest.vals
21448
21449 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21450 # marker @DEFS@.
21451 echo '  cat >> conftest.edit <<CEOF
21452 /@DEFS@/r conftest.frag
21453 /@DEFS@/d
21454 CEOF
21455 sed -f conftest.edit $tmp/in > $tmp/out
21456 rm -f $tmp/in
21457 mv $tmp/out $tmp/in
21458 rm -f conftest.edit conftest.frag
21459 ' >> $CONFIG_STATUS
21460
21461 cat >>$CONFIG_STATUS <<\EOF
21462   # Let's still pretend it is `configure' which instantiates (i.e., don't
21463   # use $as_me), people would be surprised to read:
21464   #    /* config.h.  Generated automatically by config.status.  */
21465   if test x"$ac_file" = x-; then
21466     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21467   else
21468     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21469   fi
21470   cat $tmp/in >>$tmp/config.h
21471   rm -f $tmp/in
21472   if test x"$ac_file" != x-; then
21473     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21474       { echo "$as_me:21474: $ac_file is unchanged" >&5
21475 echo "$as_me: $ac_file is unchanged" >&6;}
21476     else
21477       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21478          X"$ac_file" : 'X\(//\)[^/]' \| \
21479          X"$ac_file" : 'X\(//\)$' \| \
21480          X"$ac_file" : 'X\(/\)' \| \
21481          .     : '\(.\)' 2>/dev/null ||
21482 echo X"$ac_file" |
21483     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21484           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21485           /^X\(\/\/\)$/{ s//\1/; q; }
21486           /^X\(\/\).*/{ s//\1/; q; }
21487           s/.*/./; q'`
21488       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21489         { case "$ac_dir" in
21490   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21491   *)                      as_incr_dir=.;;
21492 esac
21493 as_dummy="$ac_dir"
21494 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21495   case $as_mkdir_dir in
21496     # Skip DOS drivespec
21497     ?:) as_incr_dir=$as_mkdir_dir ;;
21498     *)
21499       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21500       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21501     ;;
21502   esac
21503 done; }
21504
21505       fi
21506       rm -f $ac_file
21507       mv $tmp/config.h $ac_file
21508     fi
21509   else
21510     cat $tmp/config.h
21511     rm -f $tmp/config.h
21512   fi
21513 done
21514 EOF
21515 cat >>$CONFIG_STATUS <<\EOF
21516 #
21517 # CONFIG_COMMANDS section.
21518 #
21519 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21520   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21521   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21522
21523   case $ac_dest in
21524     default )
21525 if test "x$cf_with_tests" != xno ; then
21526
21527 for cf_dir in test
21528 do
21529         if test ! -d $srcdir/$cf_dir; then
21530                 continue
21531         elif test -f $srcdir/$cf_dir/programs; then
21532                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21533         fi
21534 done
21535
21536 fi
21537
21538 cf_prefix=$LIB_PREFIX
21539
21540 case $cf_cv_shlib_version in #(vi
21541 cygdll|mingw)
21542         TINFO_NAME=$TINFO_ARG_SUFFIX
21543         TINFO_SUFFIX=.dll
21544         ;;
21545 esac
21546
21547 if test -n "$TINFO_SUFFIX" ; then
21548         case $TINFO_SUFFIX in
21549         tw*)
21550                 TINFO_NAME="${TINFO_NAME}tw"
21551                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21552                 ;;
21553         t*)
21554                 TINFO_NAME="${TINFO_NAME}t"
21555                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21556                 ;;
21557         w*)
21558                 TINFO_NAME="${TINFO_NAME}w"
21559                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21560                 ;;
21561         esac
21562 fi
21563
21564 for cf_dir in $SRC_SUBDIRS
21565 do
21566         if test ! -d $srcdir/$cf_dir ; then
21567                 continue
21568         elif test -f $srcdir/$cf_dir/modules; then
21569
21570                 SHARED_LIB=
21571                 Libs_To_Make=
21572                 for cf_item in $cf_LIST_MODELS
21573                 do
21574
21575         case $cf_item in #(vi
21576         libtool) #(vi
21577                 cf_suffix='.la'
21578                 cf_depsuf=$cf_suffix
21579                 ;;
21580         normal) #(vi
21581                 cf_suffix='.a'
21582                 cf_depsuf=$cf_suffix
21583                 ;;
21584         debug) #(vi
21585                 cf_suffix='_g.a'
21586                 cf_depsuf=$cf_suffix
21587                 ;;
21588         profile) #(vi
21589                 cf_suffix='_p.a'
21590                 cf_depsuf=$cf_suffix
21591                 ;;
21592         shared) #(vi
21593                 case $cf_cv_system_name in
21594                 aix[5-7]*) #(vi
21595                         cf_suffix='.a'
21596                         cf_depsuf=$cf_suffix
21597                         ;;
21598                 cygwin*|mingw*) #(vi
21599                         cf_suffix='.dll'
21600                         cf_depsuf='.dll.a'
21601                         ;;
21602                 darwin*) #(vi
21603                         cf_suffix='.dylib'
21604                         cf_depsuf=$cf_suffix
21605                         ;;
21606                 hpux*) #(vi
21607                         case $target in
21608                         ia64*) #(vi
21609                                 cf_suffix='.so'
21610                                 cf_depsuf=$cf_suffix
21611                                 ;;
21612                         *) #(vi
21613                                 cf_suffix='.sl'
21614                                 cf_depsuf=$cf_suffix
21615                                 ;;
21616                         esac
21617                         ;;
21618                 *)      cf_suffix='.so'
21619                         cf_depsuf=$cf_suffix
21620                         ;;
21621                 esac
21622         esac
21623         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21624         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21625
21626                         if test $cf_item = shared ; then
21627                         if test "$cf_cv_do_symlinks" = yes ; then
21628                                 case "$cf_cv_shlib_version" in #(vi
21629                                 rel) #(vi
21630                                         case "$cf_cv_system_name" in #(vi
21631                                         darwin*)
21632                                         case .${LIB_SUFFIX} in
21633                                         .tw*)
21634                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21635                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21636                                                 ;;
21637                                         .t*)
21638                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21639                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21640                                                 ;;
21641                                         .w*)
21642                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21643                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21644                                                 ;;
21645                                         *)
21646                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21647                                                 ;;
21648                                         esac
21649                                         ;; #(vi
21650                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21651                                         esac
21652                                         ;;
21653                                 abi)
21654                                         case "$cf_cv_system_name" in #(vi
21655                                         darwin*)
21656                                         case .${LIB_SUFFIX} in
21657                                         .tw*)
21658                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21659                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21660                                                 ;;
21661                                         .t*)
21662                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21663                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21664                                                 ;;
21665                                         .w*)
21666                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21667                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21668                                                 ;;
21669                                         *)
21670                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21671                                                 ;;
21672                                         esac
21673                                         ;; #(vi
21674                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21675                                         esac
21676                                         ;;
21677                                 esac
21678                         fi
21679                         # cygwin needs import library, and has unique naming convention
21680                         # use autodetected ${cf_prefix} for import lib and static lib, but
21681                         # use 'cyg' prefix for shared lib.
21682                         case $cf_cv_shlib_version in #(vi
21683                         cygdll) #(vi
21684                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21685                                 Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_dir}${cf_cygsuf}"
21686                                 continue
21687                                 ;;
21688                         mingw)
21689                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21690                                 Libs_To_Make="$Libs_To_Make ../lib/lib${cf_dir}${cf_cygsuf}"
21691                                 continue
21692                                 ;;
21693                         esac
21694                         fi
21695                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21696                 done
21697
21698                 if test $cf_dir = ncurses ; then
21699                         cf_subsets="$LIB_SUBSETS"
21700                         cf_r_parts="$cf_subsets"
21701                         cf_liblist="$Libs_To_Make"
21702
21703                         while test -n "$cf_r_parts"
21704                         do
21705                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21706                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21707                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21708                                         cf_item=
21709                                         case $cf_l_parts in #(vi
21710                                         *termlib*) #(vi
21711                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21712                                                 ;;
21713                                         *ticlib*)
21714                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21715                                                 ;;
21716                                         *)
21717                                                 break
21718                                                 ;;
21719                                         esac
21720                                         if test -n "$cf_item"; then
21721                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21722                                         fi
21723                                 else
21724                                         break
21725                                 fi
21726                         done
21727                 else
21728                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21729                 fi
21730
21731                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21732                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21733                         $cf_dir/Makefile >$cf_dir/Makefile.out
21734                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21735
21736                 $AWK -f $srcdir/mk-0th.awk \
21737                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21738                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21739
21740                 for cf_subset in $cf_subsets
21741                 do
21742                         cf_subdirs=
21743                         for cf_item in $cf_LIST_MODELS
21744                         do
21745                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21746
21747 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21748
21749         case $cf_item in #(vi
21750         libtool) #(vi
21751                 cf_suffix='.la'
21752                 cf_depsuf=$cf_suffix
21753                 ;;
21754         normal) #(vi
21755                 cf_suffix='.a'
21756                 cf_depsuf=$cf_suffix
21757                 ;;
21758         debug) #(vi
21759                 cf_suffix='_g.a'
21760                 cf_depsuf=$cf_suffix
21761                 ;;
21762         profile) #(vi
21763                 cf_suffix='_p.a'
21764                 cf_depsuf=$cf_suffix
21765                 ;;
21766         shared) #(vi
21767                 case $cf_cv_system_name in
21768                 aix[5-7]*) #(vi
21769                         cf_suffix='.a'
21770                         cf_depsuf=$cf_suffix
21771                         ;;
21772                 cygwin*|mingw*) #(vi
21773                         cf_suffix='.dll'
21774                         cf_depsuf='.dll.a'
21775                         ;;
21776                 darwin*) #(vi
21777                         cf_suffix='.dylib'
21778                         cf_depsuf=$cf_suffix
21779                         ;;
21780                 hpux*) #(vi
21781                         case $target in
21782                         ia64*) #(vi
21783                                 cf_suffix='.so'
21784                                 cf_depsuf=$cf_suffix
21785                                 ;;
21786                         *) #(vi
21787                                 cf_suffix='.sl'
21788                                 cf_depsuf=$cf_suffix
21789                                 ;;
21790                         esac
21791                         ;;
21792                 *)      cf_suffix='.so'
21793                         cf_depsuf=$cf_suffix
21794                         ;;
21795                 esac
21796         esac
21797         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21798         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21799
21800         case $cf_item in
21801         libtool) cf_subdir='obj_lo'  ;;
21802         normal)  cf_subdir='objects' ;;
21803         debug)   cf_subdir='obj_g' ;;
21804         profile) cf_subdir='obj_p' ;;
21805         shared)
21806                 case $cf_cv_system_name in #(vi
21807                 cygwin) #(vi
21808                         cf_subdir='objects' ;;
21809                 *)
21810                         cf_subdir='obj_s' ;;
21811                 esac
21812         esac
21813
21814                         # Test for case where we build libtinfo with a different name.
21815                         cf_libname=$cf_dir
21816                         if test $cf_dir = ncurses ; then
21817                                 case $cf_subset in
21818                                 *base*)
21819                                         cf_libname=${cf_libname}$LIB_SUFFIX
21820                                         ;;
21821                                 *termlib*)
21822                                         cf_libname=$TINFO_LIB_SUFFIX
21823                                         ;;
21824                                 ticlib*)
21825                                         cf_libname=$TICS_LIB_SUFFIX
21826                                         ;;
21827                                 esac
21828                         else
21829                                 cf_libname=${cf_libname}$LIB_SUFFIX
21830                         fi
21831                         if test -n "${DFT_ARG_SUFFIX}" ; then
21832                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21833                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21834                         fi
21835
21836                         # These dependencies really are for development, not
21837                         # builds, but they are useful in porting, too.
21838                         cf_depend="../include/ncurses_cfg.h"
21839                         if test "$srcdir" = "."; then
21840                                 cf_reldir="."
21841                         else
21842                                 cf_reldir="\${srcdir}"
21843                         fi
21844
21845                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21846                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21847                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21848                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21849                         fi
21850
21851                         cf_dir_suffix=
21852                         old_cf_suffix="$cf_suffix"
21853                         if test "$cf_cv_shlib_version_infix" = yes ; then
21854                         if test -n "$LIB_SUFFIX" ; then
21855                                 case $LIB_SUFFIX in
21856                                 tw*)
21857                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21858                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21859                                         cf_dir_suffix=tw
21860                                         ;;
21861                                 t*)
21862                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21863                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21864                                         cf_dir_suffix=t
21865                                         ;;
21866                                 w*)
21867                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21868                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21869                                         cf_dir_suffix=w
21870                                         ;;
21871                                 esac
21872                         fi
21873                         fi
21874
21875                         $AWK -f $srcdir/mk-1st.awk \
21876                                 name=${cf_libname}${cf_dir_suffix} \
21877                                 traces=$LIB_TRACING \
21878                                 MODEL=$cf_ITEM \
21879                                 model=$cf_subdir \
21880                                 prefix=$cf_prefix \
21881                                 suffix=$cf_suffix \
21882                                 subset=$cf_subset \
21883                                 driver=$cf_cv_term_driver \
21884                                 SymLink="$LN_S" \
21885                                 TermlibRoot=$TINFO_NAME \
21886                                 TermlibSuffix=$TINFO_SUFFIX \
21887                                 ShlibVer=$cf_cv_shlib_version \
21888                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21889                                 ReLink=${cf_cv_do_relink:-no} \
21890                                 DoLinks=$cf_cv_do_symlinks \
21891                                 rmSoLocs=$cf_cv_rm_so_locs \
21892                                 ldconfig="$LDCONFIG" \
21893                                 overwrite=$WITH_OVERWRITE \
21894                                 depend="$cf_depend" \
21895                                 host="$host" \
21896                                 libtool_version="$LIBTOOL_VERSION" \
21897                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21898
21899                         cf_suffix="$old_cf_suffix"
21900
21901                         for cf_subdir2 in $cf_subdirs lib
21902                         do
21903                                 test $cf_subdir = $cf_subdir2 && break
21904                         done
21905                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21906                         $AWK -f $srcdir/mk-2nd.awk \
21907                                 name=$cf_dir \
21908                                 traces=$LIB_TRACING \
21909                                 MODEL=$cf_ITEM \
21910                                 model=$cf_subdir \
21911                                 subset=$cf_subset \
21912                                 srcdir=$srcdir \
21913                                 echo=$WITH_ECHO \
21914                                 crenames=$cf_cv_prog_CC_c_o \
21915                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21916                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21917                         cf_subdirs="$cf_subdirs $cf_subdir"
21918                         done
21919                 done
21920         fi
21921
21922         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
21923 done
21924
21925 for cf_dir in $SRC_SUBDIRS
21926 do
21927         if test ! -d $srcdir/$cf_dir ; then
21928                 continue
21929         fi
21930
21931         if test -f $cf_dir/Makefile ; then
21932                 case "$cf_dir" in
21933                 Ada95) #(vi
21934                         echo 'libs \' >> Makefile
21935                         echo 'install.libs \' >> Makefile
21936                         echo 'uninstall.libs ::' >> Makefile
21937                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
21938                         ;;
21939                 esac
21940         fi
21941
21942         if test -f $srcdir/$cf_dir/modules; then
21943                 echo >> Makefile
21944                 if test -f $srcdir/$cf_dir/headers; then
21945 cat >> Makefile <<CF_EOF
21946 install.includes \\
21947 uninstall.includes \\
21948 CF_EOF
21949                 fi
21950 if test "$cf_dir" != "c++" ; then
21951 echo 'lint \' >> Makefile
21952 fi
21953 cat >> Makefile <<CF_EOF
21954 libs \\
21955 lintlib \\
21956 install.libs \\
21957 uninstall.libs \\
21958 install.$cf_dir \\
21959 uninstall.$cf_dir ::
21960         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21961 CF_EOF
21962         elif test -f $srcdir/$cf_dir/headers; then
21963 cat >> Makefile <<CF_EOF
21964
21965 libs \\
21966 install.libs \\
21967 uninstall.libs \\
21968 install.includes \\
21969 uninstall.includes ::
21970         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21971 CF_EOF
21972 fi
21973 done
21974
21975 cat >> Makefile <<CF_EOF
21976
21977 install.libs uninstall.libs \\
21978 install.data uninstall.data ::
21979 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
21980 CF_EOF
21981
21982 if test "x$cf_with_manpages" = xyes; then
21983 cat >> Makefile <<CF_EOF
21984
21985 install.man \\
21986 uninstall.man ::
21987         cd man && \${MAKE} \${TOP_MFLAGS} \$@
21988 CF_EOF
21989 fi
21990
21991 cat >> Makefile <<CF_EOF
21992
21993 distclean ::
21994         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21995         rm -f headers.sh headers.sed mk_shared_lib.sh
21996         rm -f edit_man.* man_alias.*
21997         rm -rf \${DIRS_TO_MAKE}
21998 CF_EOF
21999
22000 # Special case: tack's manpage lives in its own directory.
22001 if test "x$cf_with_manpages" = xyes; then
22002 if test -d tack ; then
22003 if test -f $srcdir/$tack.h; then
22004 cat >> Makefile <<CF_EOF
22005
22006 install.man \\
22007 uninstall.man ::
22008         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22009 CF_EOF
22010 fi
22011 fi
22012 fi
22013
22014 rm -f headers.sed headers.sh
22015
22016 echo creating headers.sh
22017 cat >headers.sh <<CF_EOF
22018 #! /bin/sh
22019 # This shell script is generated by the 'configure' script.  It is invoked in a
22020 # subdirectory of the build tree.  It generates a sed-script in the parent
22021 # directory that is used to adjust includes for header files that reside in a
22022 # subdirectory of /usr/include, etc.
22023 PRG=""
22024 while test \$# != 3
22025 do
22026 PRG="\$PRG \$1"; shift
22027 done
22028 DST=\$1
22029 REF=\$2
22030 SRC=\$3
22031 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22032 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22033 echo installing \$SRC in \$DST
22034 CF_EOF
22035
22036 if test $WITH_CURSES_H = yes; then
22037         cat >>headers.sh <<CF_EOF
22038 case \$DST in
22039 /*/include/*)
22040         END=\`basename \$DST\`
22041         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22042         do
22043                 NAME=\`basename \$i\`
22044                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22045         done
22046         ;;
22047 *)
22048         echo "" >> \$TMPSED
22049         ;;
22050 esac
22051 CF_EOF
22052
22053 else
22054         cat >>headers.sh <<CF_EOF
22055 case \$DST in
22056 /*/include/*)
22057         END=\`basename \$DST\`
22058         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22059         do
22060                 NAME=\`basename \$i\`
22061                 if test "\$NAME" = "curses.h"
22062                 then
22063                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22064                         NAME=ncurses.h
22065                 fi
22066                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22067         done
22068         ;;
22069 *)
22070         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22071         ;;
22072 esac
22073 CF_EOF
22074 fi
22075 cat >>headers.sh <<CF_EOF
22076 rm -f \$TMPSRC
22077 sed -f \$TMPSED \$SRC > \$TMPSRC
22078 NAME=\`basename \$SRC\`
22079 CF_EOF
22080 if test $WITH_CURSES_H != yes; then
22081         cat >>headers.sh <<CF_EOF
22082 test "\$NAME" = "curses.h" && NAME=ncurses.h
22083 CF_EOF
22084 fi
22085 cat >>headers.sh <<CF_EOF
22086 # Just in case someone gzip'd manpages, remove the conflicting copy.
22087 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22088
22089 eval \$PRG \$TMPSRC \$DST/\$NAME
22090 rm -f \$TMPSRC \$TMPSED
22091 CF_EOF
22092
22093 chmod 0755 headers.sh
22094
22095 for cf_dir in $SRC_SUBDIRS
22096 do
22097         if test ! -d $srcdir/$cf_dir ; then
22098                 continue
22099         fi
22100
22101         if test -f $srcdir/$cf_dir/headers; then
22102                 $AWK -f $srcdir/mk-hdr.awk \
22103                         subset="$LIB_SUBSETS" \
22104                         compat="$WITH_CURSES_H" \
22105                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22106         fi
22107
22108         if test -f $srcdir/$cf_dir/modules; then
22109                 if test "$cf_dir" != "c++" ; then
22110                         cat >>$cf_dir/Makefile <<"CF_EOF"
22111 depend : ${AUTO_SRC}
22112         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22113
22114 # DO NOT DELETE THIS LINE -- make depend depends on it.
22115 CF_EOF
22116                 fi
22117         fi
22118 done
22119
22120 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22121 if test -z "$USE_OLD_MAKERULES" ; then
22122         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22123 fi
22124 fi
22125  ;;
22126   esac
22127 done
22128 EOF
22129
22130 cat >>$CONFIG_STATUS <<\EOF
22131
22132 { (exit 0); exit 0; }
22133 EOF
22134 chmod +x $CONFIG_STATUS
22135 ac_clean_files=$ac_clean_files_save
22136
22137 # configure is writing to config.log, and then calls config.status.
22138 # config.status does its own redirection, appending to config.log.
22139 # Unfortunately, on DOS this fails, as config.log is still kept open
22140 # by configure, so config.status won't be able to write to it; its
22141 # output is simply discarded.  So we exec the FD to /dev/null,
22142 # effectively closing config.log, so it can be properly (re)opened and
22143 # appended to by config.status.  When coming back to configure, we
22144 # need to make the FD available again.
22145 if test "$no_create" != yes; then
22146   ac_cs_success=:
22147   exec 5>/dev/null
22148   $SHELL $CONFIG_STATUS || ac_cs_success=false
22149   exec 5>>config.log
22150   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22151   # would make configure fail if this is the last instruction.
22152   $ac_cs_success || { (exit 1); exit 1; }
22153 fi
22154 ${MAKE:-make} preinstall